[Libva] [PATCH] doc: fix scan order specification for quantization tables.

Gwenole Beauchesne gb.devel at gmail.com
Fri Sep 26 03:00:58 PDT 2014


Fix the VA-API specification to define all quantization tables, resp.
matrices, to be supplied in zig-zag scan order, except for the H.264
codec where scaling lists shall be provided in raster scan order.

This clarifies the existing usage inherited from the primary VA driver
implementation (Intel Poulsbo), and subsequently adopted by the major
multimedia frameworks.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
 va/va.h          | 14 ++++++++++++++
 va/va_dec_jpeg.h |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/va/va.h b/va/va.h
index 127ad49..01694a9 100644
--- a/va/va.h
+++ b/va/va.h
@@ -1185,13 +1185,21 @@ typedef struct _VAPictureParameterBufferMPEG2
 /** MPEG-2 Inverse Quantization Matrix Buffer */
 typedef struct _VAIQMatrixBufferMPEG2
 {
+    /** \brief Same as the MPEG-2 bitstream syntax element. */
     int load_intra_quantiser_matrix;
+    /** \brief Same as the MPEG-2 bitstream syntax element. */
     int load_non_intra_quantiser_matrix;
+    /** \brief Same as the MPEG-2 bitstream syntax element. */
     int load_chroma_intra_quantiser_matrix;
+    /** \brief Same as the MPEG-2 bitstream syntax element. */
     int load_chroma_non_intra_quantiser_matrix;
+    /** \brief Luminance intra matrix, in zig-zag scan order. */
     unsigned char intra_quantiser_matrix[64];
+    /** \brief Luminance non-intra matrix, in zig-zag scan order. */
     unsigned char non_intra_quantiser_matrix[64];
+    /** \brief Chroma intra matrix, in zig-zag scan order. */
     unsigned char chroma_intra_quantiser_matrix[64];
+    /** \brief Chroma non-intra matrix, in zig-zag scan order. */
     unsigned char chroma_non_intra_quantiser_matrix[64];
 } VAIQMatrixBufferMPEG2;
 
@@ -1321,9 +1329,13 @@ typedef struct _VAPictureParameterBufferMPEG4
 /** MPEG-4 Inverse Quantization Matrix Buffer */
 typedef struct _VAIQMatrixBufferMPEG4
 {
+    /** Same as the MPEG-4:2 bitstream syntax element. */
     int load_intra_quant_mat;
+    /** Same as the MPEG-4:2 bitstream syntax element. */
     int load_non_intra_quant_mat;
+    /** The matrix for intra blocks, in zig-zag scan order. */
     unsigned char intra_quant_mat[64];
+    /** The matrix for non-intra blocks, in zig-zag scan order. */
     unsigned char non_intra_quant_mat[64];
 } VAIQMatrixBufferMPEG4;
 
@@ -1620,7 +1632,9 @@ typedef struct _VAPictureParameterBufferH264
 /** H.264 Inverse Quantization Matrix Buffer */
 typedef struct _VAIQMatrixBufferH264
 {
+    /** \brief 4x4 scaling list, in raster scan order. */
     unsigned char ScalingList4x4[6][16];
+    /** \brief 8x8 scaling list, in raster scan order. */
     unsigned char ScalingList8x8[2][64];
 } VAIQMatrixBufferH264;
 
diff --git a/va/va_dec_jpeg.h b/va/va_dec_jpeg.h
index 9936692..380e0fe 100644
--- a/va/va_dec_jpeg.h
+++ b/va/va_dec_jpeg.h
@@ -83,6 +83,8 @@ typedef struct _VAPictureParameterBufferJPEGBaseline {
  * The #load_quantization_table array can be used as a hint to notify
  * the VA driver implementation about which table(s) actually changed
  * since the last submission of this buffer.
+ *
+ * The #quantiser_table values are specified in zig-zag scan order.
  */
 typedef struct _VAIQMatrixBufferJPEGBaseline {
     /** \brief Specifies which #quantiser_table is valid. */
-- 
1.9.1



More information about the Libva mailing list