summaryrefslogtreecommitdiff
path: root/va
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2012-01-11 15:12:35 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2012-02-06 16:26:11 +0800
commit037fb878e0680a6ede05d7b7aab02a24dcca1022 (patch)
treef0331b7127ab7a94b39191b81cf0f21c4c7c7f48 /va
parent82225f07c33e5ddbe1dbbe4b6d5538a6bd93fb57 (diff)
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 <haihao.xiang@intel.com>
Diffstat (limited to 'va')
-rw-r--r--va/va.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/va/va.h b/va/va.h
index 48eb9da..ecc505f 100644
--- a/va/va.h
+++ b/va/va.h
@@ -639,22 +639,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
@@ -687,7 +677,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 */