OSDN Git Service

API: h264 decode: clarify slice_data_bit_offset field.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 3 Apr 2012 08:08:59 +0000 (10:08 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 5 Apr 2012 08:09:31 +0000 (10:09 +0200)
slice_data_bit_offset represents a bit offset from the NAL Header Unit
byte to the begining of the slice_data(), thus including any emulation
prevention bytes. Baiscally, this represents the number of bits parsed
for slice_header().

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
va/va.h

diff --git a/va/va.h b/va/va.h
index 0d61f9a..5f3c2c5 100644 (file)
--- a/va/va.h
+++ b/va/va.h
@@ -1221,9 +1221,20 @@ typedef struct _VAIQMatrixBufferH264
 typedef struct _VASliceParameterBufferH264
 {
     unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */
-    unsigned int slice_data_offset;/* the offset to the NAL start code for this slice */
+    /** \brief Byte offset to the NAL Header Unit for this slice. */
+    unsigned int slice_data_offset;
     unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
-    unsigned short slice_data_bit_offset; /* bit offset from NAL start code to the beginning of slice data */
+    /**
+     * \brief Bit offset from NAL Header Unit to the begining of slice_data().
+     *
+     * This bit offset is relative from the NAL unit byte to the first
+     * bit of slice_data(), thus including any emulation prevention
+     * bytes in slice_header().
+     *
+     * Basically, this field represents the number of bits parsed in
+     * the slice_header() + 8 for the initial NAL unit byte.
+     */
+    unsigned short slice_data_bit_offset;
     unsigned short first_mb_in_slice;
     unsigned char slice_type;
     unsigned char direct_spatial_mv_pred_flag;