From bccf8655fed772e98d7fdd2de6ff3144aaee183e Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Tue, 3 Apr 2012 10:08:59 +0200 Subject: [PATCH] API: h264 decode: clarify slice_data_bit_offset field. 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 --- va/va.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/va/va.h b/va/va.h index 0d61f9a..5f3c2c5 100644 --- 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; -- 2.11.0