From 0a49e209e6d2802e2739c3f09d26819e743b5699 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Fri, 6 Apr 2012 11:25:34 +0200 Subject: [PATCH] API: h264 decode: fix the definition of slice_data_bit_offset. Align with the existing practice in various media stacks available in Linux today. i.e. codec layer submits slice data that represents the original bitstream, thus including any emulation prevent bytes. However, the slice_data_bit_offset represents an offset relative to the buffer that contains the NAL unit byte and the rest of the slice with any emulation prevention bytes removed. Signed-off-by: Gwenole Beauchesne --- va/va.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/va/va.h b/va/va.h index 2d92ce7..8468f4d 100644 --- a/va/va.h +++ b/va/va.h @@ -1495,12 +1495,12 @@ typedef struct _VASliceParameterBufferH264 /** * \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. + * This bit offset is relative to and includes the NAL unit byte + * and represents the number of bits parsed in the slice_header() + * after the removal of any emulation prevention bytes in + * there. However, the slice data buffer passed to the hardware is + * the original bitstream, thus including any emulation prevention + * bytes. */ unsigned short slice_data_bit_offset; unsigned short first_mb_in_slice; -- 2.7.4