#include <stdlib.h>
#include "i965_drv_video.h"
+/* Extra set of chroma formats supported for JPEG decoding (beyond YUV 4:2:0) */
+#define EXTRA_JPEG_DEC_CHROMA_FORMATS \
+ (VA_RT_FORMAT_YUV400 | VA_RT_FORMAT_YUV411 | VA_RT_FORMAT_YUV422 | \
+ VA_RT_FORMAT_YUV444)
+
extern struct hw_context *i965_proc_context_init(VADriverContextP, struct object_config *);
extern struct hw_context *g4x_dec_hw_context_init(VADriverContextP, struct object_config *);
extern bool genx_render_init(VADriverContextP);
.min_linear_wpitch = 64,
.min_linear_hpitch = 16,
+ .jpeg_dec_chroma_formats = EXTRA_JPEG_DEC_CHROMA_FORMATS,
+
.has_mpeg2_decoding = 1,
.has_mpeg2_encoding = 1,
.has_h264_decoding = 1,
.min_linear_wpitch = 64,
.min_linear_hpitch = 16,
+ .jpeg_dec_chroma_formats = EXTRA_JPEG_DEC_CHROMA_FORMATS,
+
.has_mpeg2_decoding = 1,
.has_mpeg2_encoding = 1,
.has_h264_decoding = 1,
.min_linear_wpitch = 64,
.min_linear_hpitch = 16,
+ .jpeg_dec_chroma_formats = EXTRA_JPEG_DEC_CHROMA_FORMATS,
+
.has_mpeg2_decoding = 1,
.has_mpeg2_encoding = 1,
.has_h264_decoding = 1,
uint32_t chroma_formats = VA_RT_FORMAT_YUV420;
switch (profile) {
+ case VAProfileJPEGBaseline:
+ if (HAS_JPEG_DECODING(i965) && entrypoint == VAEntrypointVLD)
+ chroma_formats |= i965->codec_info->jpeg_dec_chroma_formats;
+ break;
+
default:
break;
}
int min_linear_wpitch;
int min_linear_hpitch;
+ unsigned int jpeg_dec_chroma_formats;
+
unsigned int has_mpeg2_decoding:1;
unsigned int has_mpeg2_encoding:1;
unsigned int has_h264_decoding:1;