API: h264 decode: fix the definition of slice_data_bit_offset.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 6 Apr 2012 09:25:34 +0000 (11:25 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Sun, 8 Apr 2012 05:14:50 +0000 (07:14 +0200)
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 <gwenole.beauchesne@intel.com>
va/va.h

diff --git a/va/va.h b/va/va.h
index 5f3c2c5..325cbc3 100644 (file)
--- a/va/va.h
+++ b/va/va.h
@@ -1227,12 +1227,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;