From c75833d3dd4d0f5b6eed6f0be410c7321f889db5 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Wed, 11 Jan 2012 15:12:35 +0800 Subject: Modify the interface of Quantization table for JPEG decoding The user application will send up to 4 quantization table to driver, and driver will select the right quantization table for each component via quantiser_table_selector. The quantization elements are specified in zig-zag scan order Signed-off-by: Xiang, Haihao --- va/va.h | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/va/va.h b/va/va.h index d0d8667..d5ff604 100644 --- a/va/va.h +++ b/va/va.h @@ -719,22 +719,12 @@ typedef struct _VAEncPictureParameterBufferJPEG } VAEncPictureParameterBufferJPEG; /* data struct for JPEG decoding */ -/* Indexes for JPEG QUANTIZER MATRIX */ -#define VA_JPEG_QUANTIZER_MATRIX_Y 0 -#define VA_JPEG_QUANTIZER_MATRIX_U 1 -#define VA_JPEG_QUANTIZER_MATRIX_V 2 -#define VA_JPEG_QUANTIZER_MATRIX_A 3 - -/* Maskes for JPEG QUANTIZER MATRIX */ -#define VA_JPEG_QUANTIZER_MATRIX_Y_MASK (1 << VA_JPEG_QUANTIZER_MATRIX_Y) -#define VA_JPEG_QUANTIZER_MATRIX_U_MASK (1 << VA_JPEG_QUANTIZER_MATRIX_U) -#define VA_JPEG_QUANTIZER_MATRIX_V_MASK (1 << VA_JPEG_QUANTIZER_MATRIX_V) -#define VA_JPEG_QUANTIZER_MATRIX_A_MASK (1 << VA_JPEG_QUANTIZER_MATRIX_A) - typedef struct _VAIQMatrixBufferJPEG { - unsigned int quantizer_matrix_mask; - unsigned char quantizer_matrix[4][64]; + unsigned char quantiser_matrix[4][64]; /* quantiser_matrix[Tq][64] (Tq=0,1,2,3) specifies a + * quantization table for destination Tq in zig-zag + * scan order + */ } VAIQMatrixBufferJPEG; #define VA_JPEG_SOF0 0xC0 @@ -767,7 +757,7 @@ typedef struct _VAPictureParameterBufferJPEG unsigned char component_id; unsigned char h_sampling_factor; unsigned char v_sampling_factor; - unsigned char quantizer_table_index; + unsigned char quantiser_table_selector; /* Tqi, quantization table destination selector */ } components[4]; /* ROI (region of interest), for JPEG2000 */ -- cgit v1.2.3