diff options
author | Jonathan Bian <jonathan.bian@intel.com> | 2013-03-10 22:11:26 -0700 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2013-08-27 11:16:43 +0200 |
commit | cd356fd12bcbb6502f8c509109c01925582440d7 (patch) | |
tree | c1daaf938f3a3ab71caab2c1fab9733895622099 | |
parent | 4f8267d7dd0d90c602dd3196afae8dbe80f9444f (diff) | |
download | libva-cd356fd12bcbb6502f8c509109c01925582440d7.tar.gz |
Added new attribute and data structure to support slice decoding base mode.
-rw-r--r-- | va/va.h | 52 |
1 files changed, 51 insertions, 1 deletions
@@ -318,6 +318,21 @@ typedef enum VAConfigAttribEncryption = 4, VAConfigAttribRateControl = 5, + /** @name Attributes for decoding */ + /**@{*/ + /** + * \brief Slice Decoding mode. Read/write. + * + * This attribute determines what mode the driver supports for slice + * decoding, through vaGetConfigAttributes(); and what mode the user + * will be providing to the driver, through vaCreateConfig(), if the + * driver supports those. If this attribute is not set by the user then + * it is assumed that VA_DEC_SLICE_MODE_NORMAL mode is used. + * + * See \c VA_DEC_SLICE_MODE_xxx for the list of slice decoding modes. + */ + VAConfigAttribDecSliceMode = 6, + /** @name Attributes for encoding */ /**@{*/ /** @@ -430,6 +445,14 @@ typedef struct _VAConfigAttrib { #define VA_RC_VBR_CONSTRAINED 0x00000020 /**@}*/ +/** @name Attribute values for VAConfigAttribDecSliceMode */ +/**@{*/ +/** \brief Driver supports normal mode for slice decoding */ +#define VA_DEC_SLICE_MODE_NORMAL 0x00000001 +/** \brief Driver supports base mode for slice decoding */ +#define VA_DEC_SLICE_MODE_BASE 0x00000002 +/**@}*/ + /** @name Attribute values for VAConfigAttribEncPackedHeaders */ /**@{*/ /** \brief Driver does not support any packed headers mode. */ @@ -1503,7 +1526,14 @@ This is simplely a buffer containing raw bit-stream bytes typedef struct _VAPictureH264 { VASurfaceID picture_id; + /* + * frame_idx is long_term_frame_idx for long term reference picture, + * and frame_num for short term reference picture. + */ unsigned int frame_idx; + /* + * see flags below. + */ unsigned int flags; signed int TopFieldOrderCnt; signed int BottomFieldOrderCnt; @@ -1514,6 +1544,7 @@ typedef struct _VAPictureH264 #define VA_PICTURE_H264_BOTTOM_FIELD 0x00000004 #define VA_PICTURE_H264_SHORT_TERM_REFERENCE 0x00000008 #define VA_PICTURE_H264_LONG_TERM_REFERENCE 0x00000010 +#define VA_PICTURE_H264_NON_EXISTING 0x00000020 /* H.264 Picture Parameter Buffer */ /* @@ -1568,6 +1599,12 @@ typedef struct _VAPictureParameterBufferH264 unsigned int value; } pic_fields; unsigned short frame_num; + /* + * The following two fields will be used for base mode slice decoding. + * For normal mode the fields in the slice parameter structure will be used. + */ + unsigned char num_ref_idx_l0_active_minus1; + unsigned char num_ref_idx_l1_active_minus1; } VAPictureParameterBufferH264; /* H.264 Inverse Quantization Matrix Buffer */ @@ -1587,7 +1624,20 @@ typedef struct _VAIQMatrixBufferH264 * in raster scan order */ -/* H.264 Slice Parameter Buffer */ +/* + * H.264 Slice Parameter Buffer for base mode decoding + */ +typedef struct _VASliceParameterBufferBaseH264 +{ + unsigned int slice_data_size;/* number of bytes in the slice data buffer 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 */ +} VASliceParameterBufferH264Base; + +/* + * H.264 Slice Parameter Buffer for normal mode decoding + */ typedef struct _VASliceParameterBufferH264 { unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */ |