summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2017-06-20 12:15:17 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2017-09-27 12:49:34 +0800
commit64e9587bae9d77b315072c2375d1c238a1503747 (patch)
tree82cdcff8d6afbf2a32ebb35f812bae59174790a9
parentd0f71d4a161d4a74a15ba09db313ddf256533800 (diff)
downloadlibva-64e9587bae9d77b315072c2375d1c238a1503747.tar.gz
Use portable types for VA structures
We have already defined VA structures using portable types in some header files. Use portable types in the remaining header files to keep the style consistency, Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r--va/va.h801
-rw-r--r--va/va_dec_jpeg.h40
-rw-r--r--va/va_dec_vp8.h76
-rw-r--r--va/va_enc_h264.h184
-rw-r--r--va/va_enc_jpeg.h46
-rw-r--r--va/va_enc_mpeg2.h90
-rw-r--r--va/va_enc_vp8.h102
-rw-r--r--va/va_vpp.h26
8 files changed, 683 insertions, 682 deletions
diff --git a/va/va.h b/va/va.h
index 4d4db19..7cc2a06 100644
--- a/va/va.h
+++ b/va/va.h
@@ -236,10 +236,10 @@ const char *vaErrorStr(VAStatus error_status);
typedef struct _VARectangle
{
- short x;
- short y;
- unsigned short width;
- unsigned short height;
+ int16_t x;
+ int16_t y;
+ uint16_t width;
+ uint16_t height;
} VARectangle;
/** \brief Generic motion vector data structure. */
@@ -563,7 +563,7 @@ typedef enum
*/
typedef struct _VAConfigAttrib {
VAConfigAttribType type;
- unsigned int value; /* OR'd flags (bits) for this attribute */
+ uint32_t value; /* OR'd flags (bits) for this attribute */
} VAConfigAttrib;
/** attribute value for VAConfigAttribRTFormat */
@@ -660,26 +660,26 @@ typedef struct _VAConfigAttrib {
typedef union _VAConfigAttribValEncJPEG {
struct {
/** \brief set to 1 for arithmatic coding. */
- unsigned int arithmatic_coding_mode : 1;
+ uint32_t arithmatic_coding_mode : 1;
/** \brief set to 1 for progressive dct. */
- unsigned int progressive_dct_mode : 1;
+ uint32_t progressive_dct_mode : 1;
/** \brief set to 1 for non-interleaved. */
- unsigned int non_interleaved_mode : 1;
+ uint32_t non_interleaved_mode : 1;
/** \brief set to 1 for differential. */
- unsigned int differential_mode : 1;
- unsigned int max_num_components : 3;
- unsigned int max_num_scans : 4;
- unsigned int max_num_huffman_tables : 3;
- unsigned int max_num_quantization_tables : 3;
+ uint32_t differential_mode : 1;
+ uint32_t max_num_components : 3;
+ uint32_t max_num_scans : 4;
+ uint32_t max_num_huffman_tables : 3;
+ uint32_t max_num_quantization_tables : 3;
} bits;
- unsigned int value;
+ uint32_t value;
} VAConfigAttribValEncJPEG;
/** \brief Attribute value for VAConfigAttribEncROI */
typedef union _VAConfigAttribValEncROI {
struct {
/** \brief The number of ROI regions supported, 0 if ROI is not supported. */
- unsigned int num_roi_regions : 8;
+ uint32_t num_roi_regions : 8;
/**
* \brief A flag indicates whether ROI priority is supported
*
@@ -691,7 +691,7 @@ typedef union _VAConfigAttribValEncROI {
* User should ignore \ref roi_rc_priority_support when VAConfigAttribRateControl == VA_RC_CQP
* because ROI delta QP is always required when VAConfigAttribRateControl == VA_RC_CQP.
*/
- unsigned int roi_rc_priority_support : 1;
+ uint32_t roi_rc_priority_support : 1;
/**
* \brief A flag indicates whether ROI delta QP is supported
*
@@ -703,10 +703,10 @@ typedef union _VAConfigAttribValEncROI {
* User should ignore \ref roi_rc_qp_delta_support when VAConfigAttribRateControl == VA_RC_CQP
* because ROI delta QP is always required when VAConfigAttribRateControl == VA_RC_CQP.
*/
- unsigned int roi_rc_qp_delta_support : 1;
- unsigned int reserved : 22;
+ uint32_t roi_rc_qp_delta_support : 1;
+ uint32_t reserved : 22;
} bits;
- unsigned int value;
+ uint32_t value;
} VAConfigAttribValEncROI;
/** \brief Attribute value for VAConfigAttribEncRateControlExt */
@@ -719,7 +719,7 @@ typedef union _VAConfigAttribValEncRateControlExt {
* layers that supported by the underlying driver. \ref max_num_temporal_layers_minus1
* equal to 0 implies the underlying driver doesn't support encoding with temporal layer.
*/
- unsigned int max_num_temporal_layers_minus1 : 8;
+ uint32_t max_num_temporal_layers_minus1 : 8;
/**
* /brief support temporal layer bit-rate control flag
@@ -744,10 +744,10 @@ typedef union _VAConfigAttribValEncRateControlExt {
* in #VAEncMiscParameterRateControl and #VAEncMiscParameterFrameRate if
* \ref temporal_layer_bitrate_control_flag is equal to 0 or #VAConfigAttribRateControl == #VA_RC_CQP
*/
- unsigned int temporal_layer_bitrate_control_flag : 1;
- unsigned int reserved : 23;
+ uint32_t temporal_layer_bitrate_control_flag : 1;
+ uint32_t reserved : 23;
} bits;
- unsigned int value;
+ uint32_t value;
} VAConfigAttribValEncRateControlExt;
/**
@@ -898,7 +898,7 @@ typedef struct _VAGenericValue {
/** \brief Value holder. */
union {
/** \brief 32-bit signed integer. */
- int i;
+ int32_t i;
/** \brief 32-bit float. */
float f;
/** \brief Generic pointer. */
@@ -956,7 +956,7 @@ typedef struct _VASurfaceAttrib {
/** \brief Type. */
VASurfaceAttribType type;
/** \brief Flags. See "Surface attribute flags". */
- unsigned int flags;
+ uint32_t flags;
/** \brief Value. See "Surface attribute types" for the expected types. */
VAGenericValue value;
} VASurfaceAttrib;
@@ -982,25 +982,25 @@ typedef struct _VASurfaceAttrib {
*/
typedef struct _VASurfaceAttribExternalBuffers {
/** \brief pixel format in fourcc. */
- unsigned int pixel_format;
+ uint32_t pixel_format;
/** \brief width in pixels. */
- unsigned int width;
+ uint32_t width;
/** \brief height in pixels. */
- unsigned int height;
+ uint32_t height;
/** \brief total size of the buffer in bytes. */
- unsigned int data_size;
+ uint32_t data_size;
/** \brief number of planes for planar layout */
- unsigned int num_planes;
+ uint32_t num_planes;
/** \brief pitch for each plane in bytes */
- unsigned int pitches[4];
+ uint32_t pitches[4];
/** \brief offset for each plane in bytes */
- unsigned int offsets[4];
+ uint32_t offsets[4];
/** \brief buffer handles or user pointers */
- unsigned long *buffers;
+ uintptr_t *buffers;
/** \brief number of elements in the "buffers" array */
- unsigned int num_buffers;
+ uint32_t num_buffers;
/** \brief flags. See "Surface external buffer descriptor flags". */
- unsigned int flags;
+ uint32_t flags;
/** \brief reserved for passing private data */
void *private_data;
} VASurfaceAttribExternalBuffers;
@@ -1279,11 +1279,11 @@ typedef enum {
/** \brief Packed header parameter. */
typedef struct _VAEncPackedHeaderParameterBuffer {
/** Type of the packed header buffer. See #VAEncPackedHeaderType. */
- unsigned int type;
+ uint32_t type;
/** \brief Size of the #VAEncPackedHeaderDataBuffer in bits. */
- unsigned int bit_length;
+ uint32_t bit_length;
/** \brief Flag: buffer contains start code emulation prevention bytes? */
- unsigned char has_emulation_bytes;
+ uint8_t has_emulation_bytes;
} VAEncPackedHeaderParameterBuffer;
/**
@@ -1306,23 +1306,23 @@ typedef struct _VAEncPackedHeaderParameterBuffer {
typedef struct _VAEncMiscParameterBuffer
{
VAEncMiscParameterType type;
- unsigned int data[];
+ uint32_t data[];
} VAEncMiscParameterBuffer;
/** \brief Temporal layer Structure*/
typedef struct _VAEncMiscParameterTemporalLayerStructure
{
/** \brief The number of temporal layers */
- unsigned int number_of_layers;
+ uint32_t number_of_layers;
/** \brief The length of the array defining frame layer membership. Should be 1-32 */
- unsigned int periodicity;
+ uint32_t periodicity;
/**
* \brief The array indicating the layer id for each frame
*
* The layer id for the first frame in a coded sequence is always 0, so layer_id[] specifies the layer
* ids for frames starting from the 2nd frame.
*/
- unsigned int layer_id[32];
+ uint32_t layer_id[32];
} VAEncMiscParameterTemporalLayerStructure;
@@ -1330,35 +1330,35 @@ typedef struct _VAEncMiscParameterTemporalLayerStructure
typedef struct _VAEncMiscParameterRateControl
{
/* this is the maximum bit-rate to be constrained by the rate control implementation */
- unsigned int bits_per_second;
+ uint32_t bits_per_second;
/* this is the bit-rate the rate control is targeting, as a percentage of the maximum
* bit-rate for example if target_percentage is 95 then the rate control will target
* a bit-rate that is 95% of the maximum bit-rate
*/
- unsigned int target_percentage;
+ uint32_t target_percentage;
/* windows size in milliseconds. For example if this is set to 500,
* then the rate control will guarantee the target bit-rate over a 500 ms window
*/
- unsigned int window_size;
+ uint32_t window_size;
/* initial QP at I frames */
- unsigned int initial_qp;
- unsigned int min_qp;
- unsigned int basic_unit_size;
+ uint32_t initial_qp;
+ uint32_t min_qp;
+ uint32_t basic_unit_size;
union
{
struct
{
- unsigned int reset : 1;
- unsigned int disable_frame_skip : 1; /* Disable frame skip in rate control mode */
- unsigned int disable_bit_stuffing : 1; /* Disable bit stuffing in rate control mode */
- unsigned int mb_rate_control : 4; /* Control VA_RC_MB 0: default, 1: enable, 2: disable, other: reserved*/
+ uint32_t reset : 1;
+ uint32_t disable_frame_skip : 1; /* Disable frame skip in rate control mode */
+ uint32_t disable_bit_stuffing : 1; /* Disable bit stuffing in rate control mode */
+ uint32_t mb_rate_control : 4; /* Control VA_RC_MB 0: default, 1: enable, 2: disable, other: reserved*/
/*
* The temporal layer that the rate control parameters are specified for.
*/
- unsigned int temporal_id : 8;
- unsigned int reserved : 17;
+ uint32_t temporal_id : 8;
+ uint32_t reserved : 17;
} bits;
- unsigned int value;
+ uint32_t value;
} rc_flags;
} VAEncMiscParameterRateControl;
@@ -1382,7 +1382,7 @@ typedef struct _VAEncMiscParameterFrameRate
* it takes the value one instead, so the framerate is just the integer
* in the low 2 bytes.
*/
- unsigned int framerate;
+ uint32_t framerate;
union
{
struct
@@ -1390,10 +1390,10 @@ typedef struct _VAEncMiscParameterFrameRate
/*
* The temporal id the framerate parameters are specified for.
*/
- unsigned int temporal_id : 8;
- unsigned int reserved : 24;
+ uint32_t temporal_id : 8;
+ uint32_t reserved : 24;
} bits;
- unsigned int value;
+ uint32_t value;
} framerate_flags;
} VAEncMiscParameterFrameRate;
@@ -1404,20 +1404,20 @@ typedef struct _VAEncMiscParameterFrameRate
*/
typedef struct _VAEncMiscParameterMaxSliceSize
{
- unsigned int max_slice_size;
+ uint32_t max_slice_size;
} VAEncMiscParameterMaxSliceSize;
typedef struct _VAEncMiscParameterAIR
{
- unsigned int air_num_mbs;
- unsigned int air_threshold;
- unsigned int air_auto; /* if set to 1 then hardware auto-tune the AIR threshold */
+ uint32_t air_num_mbs;
+ uint32_t air_threshold;
+ uint32_t air_auto; /* if set to 1 then hardware auto-tune the AIR threshold */
} VAEncMiscParameterAIR;
typedef struct _VAEncMiscParameterHRD
{
- unsigned int initial_buffer_fullness; /* in bits */
- unsigned int buffer_size; /* in bits */
+ uint32_t initial_buffer_fullness; /* in bits */
+ uint32_t buffer_size; /* in bits */
} VAEncMiscParameterHRD;
/**
@@ -1433,7 +1433,7 @@ typedef struct _VAEncMiscParameterBufferMaxFrameSize {
/** \brief Type. Shall be set to #VAEncMiscParameterTypeMaxFrameSize. */
VAEncMiscParameterType type;
/** \brief Maximum size of a frame (in bits). */
- unsigned int max_frame_size;
+ uint32_t max_frame_size;
} VAEncMiscParameterBufferMaxFrameSize;
/**
@@ -1451,7 +1451,7 @@ typedef struct _VAEncMiscParameterBufferQualityLevel {
/** \brief Encoding quality level setting. When set to 0, default quality
* level is used.
*/
- unsigned int quality_level;
+ uint32_t quality_level;
} VAEncMiscParameterBufferQualityLevel;
/**
@@ -1470,12 +1470,12 @@ typedef struct _VAEncMiscParameterSkipFrame {
* 2: The current frame is to be skipped, do not encode it but pack/encrypt the packed header contents
* (all except VAEncPackedHeaderSlice) which could contain actual frame contents (e.g. pack the frame
* in VAEncPackedHeaderPicture). */
- unsigned char skip_frame_flag;
+ uint8_t skip_frame_flag;
/** \brief The number of frames skipped prior to the current frame. Valid when skip_frame_flag = 1. */
- unsigned char num_skip_frames;
+ uint8_t num_skip_frames;
/** \brief When skip_frame_flag = 1, the size of the skipped frames in bits. When skip_frame_flag = 2,
* the size of the current skipped frame that is to be packed/encrypted in bits. */
- unsigned int size_skip_frames;
+ uint32_t size_skip_frames;
} VAEncMiscParameterSkipFrame;
/**
@@ -1511,18 +1511,18 @@ typedef struct _VAEncROI
* VAConfigAttribRateControl != VA_RC_CQP. \ref roi_value specifies ROI_delta QP if \c roi_value_is_qp_delta
* in VAEncMiscParameterBufferROI is 1, otherwise \ref roi_value specifies ROI priority.
*/
- char roi_value;
+ int8_t roi_value;
} VAEncROI;
typedef struct _VAEncMiscParameterBufferROI {
/** \brief Number of ROIs being sent.*/
- unsigned int num_roi;
+ uint32_t num_roi;
/** \brief Valid when VAConfigAttribRateControl != VA_RC_CQP, then the encoder's
* rate control will determine actual delta QPs. Specifies the max/min allowed delta
* QPs. */
- char max_delta_qp;
- char min_delta_qp;
+ int8_t max_delta_qp;
+ int8_t min_delta_qp;
/** \brief Pointer to a VAEncROI array with num_roi elements. It is relative to frame
* coordinates for the frame case and to field coordinates for the field case.*/
@@ -1564,9 +1564,9 @@ typedef struct _VAEncMiscParameterBufferROI {
/* Codec-independent Slice Parameter Buffer base */
typedef struct _VASliceParameterBufferBase
{
- 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 first byte of slice data */
- unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX definitions */
+ uint32_t slice_data_size; /* number of bytes in the slice data buffer for this slice */
+ uint32_t slice_data_offset; /* the offset to the first byte of slice data */
+ uint32_t slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX definitions */
} VASliceParameterBufferBase;
/**********************************
@@ -1586,24 +1586,24 @@ typedef struct _VASliceParameterBufferBase
*/
typedef struct _VAHuffmanTableBufferJPEGBaseline {
/** \brief Specifies which #huffman_table is valid. */
- unsigned char load_huffman_table[2];
+ uint8_t load_huffman_table[2];
/** \brief Huffman tables indexed by table identifier (Th). */
struct {
/** @name DC table (up to 12 categories) */
/**@{*/
/** \brief Number of Huffman codes of length i + 1 (Li). */
- unsigned char num_dc_codes[16];
+ uint8_t num_dc_codes[16];
/** \brief Value associated with each Huffman code (Vij). */
- unsigned char dc_values[12];
+ uint8_t dc_values[12];
/**@}*/
/** @name AC table (2 special codes + up to 16 * 10 codes) */
/**@{*/
/** \brief Number of Huffman codes of length i + 1 (Li). */
- unsigned char num_ac_codes[16];
+ uint8_t num_ac_codes[16];
/** \brief Value associated with each Huffman code (Vij). */
- unsigned char ac_values[162];
+ uint8_t ac_values[162];
/** \brief Padding to 4-byte boundaries. Must be set to zero. */
- unsigned char pad[2];
+ uint8_t pad[2];
/**@}*/
} huffman_table[2];
} VAHuffmanTableBufferJPEGBaseline;
@@ -1619,30 +1619,30 @@ typedef struct _VAHuffmanTableBufferJPEGBaseline {
*/
typedef struct _VAPictureParameterBufferMPEG2
{
- unsigned short horizontal_size;
- unsigned short vertical_size;
+ uint16_t horizontal_size;
+ uint16_t vertical_size;
VASurfaceID forward_reference_picture;
VASurfaceID backward_reference_picture;
/* meanings of the following fields are the same as in the standard */
- int picture_coding_type;
- int f_code; /* pack all four fcode into this */
+ int32_t picture_coding_type;
+ int32_t f_code; /* pack all four fcode into this */
union {
struct {
- unsigned int intra_dc_precision : 2;
- unsigned int picture_structure : 2;
- unsigned int top_field_first : 1;
- unsigned int frame_pred_frame_dct : 1;
- unsigned int concealment_motion_vectors : 1;
- unsigned int q_scale_type : 1;
- unsigned int intra_vlc_format : 1;
- unsigned int alternate_scan : 1;
- unsigned int repeat_first_field : 1;
- unsigned int progressive_frame : 1;
- unsigned int is_first_field : 1; /* indicate whether the current field
+ uint32_t intra_dc_precision : 2;
+ uint32_t picture_structure : 2;
+ uint32_t top_field_first : 1;
+ uint32_t frame_pred_frame_dct : 1;
+ uint32_t concealment_motion_vectors : 1;
+ uint32_t q_scale_type : 1;
+ uint32_t intra_vlc_format : 1;
+ uint32_t alternate_scan : 1;
+ uint32_t repeat_first_field : 1;
+ uint32_t progressive_frame : 1;
+ uint32_t is_first_field : 1; /* indicate whether the current field
* is the first field for field picture
*/
} bits;
- unsigned int value;
+ uint32_t value;
} picture_coding_extension;
} VAPictureParameterBufferMPEG2;
@@ -1650,55 +1650,55 @@ typedef struct _VAPictureParameterBufferMPEG2
typedef struct _VAIQMatrixBufferMPEG2
{
/** \brief Same as the MPEG-2 bitstream syntax element. */
- int load_intra_quantiser_matrix;
+ int32_t load_intra_quantiser_matrix;
/** \brief Same as the MPEG-2 bitstream syntax element. */
- int load_non_intra_quantiser_matrix;
+ int32_t load_non_intra_quantiser_matrix;
/** \brief Same as the MPEG-2 bitstream syntax element. */
- int load_chroma_intra_quantiser_matrix;
+ int32_t load_chroma_intra_quantiser_matrix;
/** \brief Same as the MPEG-2 bitstream syntax element. */
- int load_chroma_non_intra_quantiser_matrix;
+ int32_t load_chroma_non_intra_quantiser_matrix;
/** \brief Luminance intra matrix, in zig-zag scan order. */
- unsigned char intra_quantiser_matrix[64];
+ uint8_t intra_quantiser_matrix[64];
/** \brief Luminance non-intra matrix, in zig-zag scan order. */
- unsigned char non_intra_quantiser_matrix[64];
+ uint8_t non_intra_quantiser_matrix[64];
/** \brief Chroma intra matrix, in zig-zag scan order. */
- unsigned char chroma_intra_quantiser_matrix[64];
+ uint8_t chroma_intra_quantiser_matrix[64];
/** \brief Chroma non-intra matrix, in zig-zag scan order. */
- unsigned char chroma_non_intra_quantiser_matrix[64];
+ uint8_t chroma_non_intra_quantiser_matrix[64];
} VAIQMatrixBufferMPEG2;
/** MPEG-2 Slice Parameter Buffer */
typedef struct _VASliceParameterBufferMPEG2
{
- 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 first byte of slice data */
- unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
- unsigned int macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */
- unsigned int slice_horizontal_position;
- unsigned int slice_vertical_position;
- int quantiser_scale_code;
- int intra_slice_flag;
+ uint32_t slice_data_size;/* number of bytes in the slice data buffer for this slice */
+ uint32_t slice_data_offset;/* the offset to the first byte of slice data */
+ uint32_t slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
+ uint32_t macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */
+ uint32_t slice_horizontal_position;
+ uint32_t slice_vertical_position;
+ int32_t quantiser_scale_code;
+ int32_t intra_slice_flag;
} VASliceParameterBufferMPEG2;
/** MPEG-2 Macroblock Parameter Buffer */
typedef struct _VAMacroblockParameterBufferMPEG2
{
- unsigned short macroblock_address;
+ uint16_t macroblock_address;
/*
* macroblock_address (in raster scan order)
* top-left: 0
* bottom-right: picture-height-in-mb*picture-width-in-mb - 1
*/
- unsigned char macroblock_type; /* see definition below */
+ uint8_t macroblock_type; /* see definition below */
union {
struct {
- unsigned int frame_motion_type : 2;
- unsigned int field_motion_type : 2;
- unsigned int dct_type : 1;
+ uint32_t frame_motion_type : 2;
+ uint32_t field_motion_type : 2;
+ uint32_t dct_type : 1;
} bits;
- unsigned int value;
+ uint32_t value;
} macroblock_modes;
- unsigned char motion_vertical_field_select;
+ uint8_t motion_vertical_field_select;
/*
* motion_vertical_field_select:
* see section 6.3.17.2 in the spec
@@ -1708,15 +1708,15 @@ typedef struct _VAMacroblockParameterBufferMPEG2
* bit 2: second vector forward
* bit 3: second vector backward
*/
- short PMV[2][2][2]; /* see Table 7-7 in the spec */
- unsigned short coded_block_pattern;
+ int16_t PMV[2][2][2]; /* see Table 7-7 in the spec */
+ uint16_t coded_block_pattern;
/*
* The bitplanes for coded_block_pattern are described
* in Figure 6.10-12 in the spec
*/
/* Number of skipped macroblocks after this macroblock */
- unsigned short num_skipped_macroblocks;
+ uint16_t num_skipped_macroblocks;
} VAMacroblockParameterBufferMPEG2;
/*
@@ -1744,74 +1744,74 @@ typedef struct _VAMacroblockParameterBufferMPEG2
*/
typedef struct _VAPictureParameterBufferMPEG4
{
- unsigned short vop_width;
- unsigned short vop_height;
+ uint16_t vop_width;
+ uint16_t vop_height;
VASurfaceID forward_reference_picture;
VASurfaceID backward_reference_picture;
union {
struct {
- unsigned int short_video_header : 1;
- unsigned int chroma_format : 2;
- unsigned int interlaced : 1;
- unsigned int obmc_disable : 1;
- unsigned int sprite_enable : 2;
- unsigned int sprite_warping_accuracy : 2;
- unsigned int quant_type : 1;
- unsigned int quarter_sample : 1;
- unsigned int data_partitioned : 1;
- unsigned int reversible_vlc : 1;
- unsigned int resync_marker_disable : 1;
+ uint32_t short_video_header : 1;
+ uint32_t chroma_format : 2;
+ uint32_t interlaced : 1;
+ uint32_t obmc_disable : 1;
+ uint32_t sprite_enable : 2;
+ uint32_t sprite_warping_accuracy : 2;
+ uint32_t quant_type : 1;
+ uint32_t quarter_sample : 1;
+ uint32_t data_partitioned : 1;
+ uint32_t reversible_vlc : 1;
+ uint32_t resync_marker_disable : 1;
} bits;
- unsigned int value;
+ uint32_t value;
} vol_fields;
- unsigned char no_of_sprite_warping_points;
- short sprite_trajectory_du[3];
- short sprite_trajectory_dv[3];
- unsigned char quant_precision;
+ uint8_t no_of_sprite_warping_points;
+ int16_t sprite_trajectory_du[3];
+ int16_t sprite_trajectory_dv[3];
+ uint8_t quant_precision;
union {
struct {
- unsigned int vop_coding_type : 2;
- unsigned int backward_reference_vop_coding_type : 2;
- unsigned int vop_rounding_type : 1;
- unsigned int intra_dc_vlc_thr : 3;
- unsigned int top_field_first : 1;
- unsigned int alternate_vertical_scan_flag : 1;
+ uint32_t vop_coding_type : 2;
+ uint32_t backward_reference_vop_coding_type : 2;
+ uint32_t vop_rounding_type : 1;
+ uint32_t intra_dc_vlc_thr : 3;
+ uint32_t top_field_first : 1;
+ uint32_t alternate_vertical_scan_flag : 1;
} bits;
- unsigned int value;
+ uint32_t value;
} vop_fields;
- unsigned char vop_fcode_forward;
- unsigned char vop_fcode_backward;
- unsigned short vop_time_increment_resolution;
+ uint8_t vop_fcode_forward;
+ uint8_t vop_fcode_backward;
+ uint16_t vop_time_increment_resolution;
/* short header related */
- unsigned char num_gobs_in_vop;
- unsigned char num_macroblocks_in_gob;
+ uint8_t num_gobs_in_vop;
+ uint8_t num_macroblocks_in_gob;
/* for direct mode prediction */
- short TRB;
- short TRD;
+ int16_t TRB;
+ int16_t TRD;
} VAPictureParameterBufferMPEG4;
/** MPEG-4 Inverse Quantization Matrix Buffer */
typedef struct _VAIQMatrixBufferMPEG4
{
/** Same as the MPEG-4:2 bitstream syntax element. */
- int load_intra_quant_mat;
+ int32_t load_intra_quant_mat;
/** Same as the MPEG-4:2 bitstream syntax element. */
- int load_non_intra_quant_mat;
+ int32_t load_non_intra_quant_mat;
/** The matrix for intra blocks, in zig-zag scan order. */
- unsigned char intra_quant_mat[64];
+ uint8_t intra_quant_mat[64];
/** The matrix for non-intra blocks, in zig-zag scan order. */
- unsigned char non_intra_quant_mat[64];
+ uint8_t non_intra_quant_mat[64];
} VAIQMatrixBufferMPEG4;
/** MPEG-4 Slice Parameter Buffer */
typedef struct _VASliceParameterBufferMPEG4
{
- 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 first byte of slice data */
- unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
- unsigned int macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */
- unsigned int macroblock_number;
- int quant_scale;
+ uint32_t slice_data_size;/* number of bytes in the slice data buffer for this slice */
+ uint32_t slice_data_offset;/* the offset to the first byte of slice data */
+ uint32_t slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
+ uint32_t macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */
+ uint32_t macroblock_number;
+ int32_t quant_scale;
} VASliceParameterBufferMPEG4;
/**
@@ -1852,137 +1852,138 @@ typedef struct _VAPictureParameterBufferVC1
/* sequence layer for AP or meta data for SP and MP */
union {
struct {
- unsigned int pulldown : 1; /* SEQUENCE_LAYER::PULLDOWN */
- unsigned int interlace : 1; /* SEQUENCE_LAYER::INTERLACE */
- unsigned int tfcntrflag : 1; /* SEQUENCE_LAYER::TFCNTRFLAG */
- unsigned int finterpflag : 1; /* SEQUENCE_LAYER::FINTERPFLAG */
- unsigned int psf : 1; /* SEQUENCE_LAYER::PSF */
- unsigned int multires : 1; /* METADATA::MULTIRES */
- unsigned int overlap : 1; /* METADATA::OVERLAP */
- unsigned int syncmarker : 1; /* METADATA::SYNCMARKER */
- unsigned int rangered : 1; /* METADATA::RANGERED */
- unsigned int max_b_frames : 3; /* METADATA::MAXBFRAMES */
- unsigned int profile : 2; /* SEQUENCE_LAYER::PROFILE or The MSB of METADATA::PROFILE */
+ uint32_t pulldown : 1; /* SEQUENCE_LAYER::PULLDOWN */
+ uint32_t interlace : 1; /* SEQUENCE_LAYER::INTERLACE */
+ uint32_t tfcntrflag : 1; /* SEQUENCE_LAYER::TFCNTRFLAG */
+ uint32_t finterpflag : 1; /* SEQUENCE_LAYER::FINTERPFLAG */
+ uint32_t psf : 1; /* SEQUENCE_LAYER::PSF */
+ uint32_t multires : 1; /* METADATA::MULTIRES */
+ uint32_t overlap : 1; /* METADATA::OVERLAP */
+ uint32_t syncmarker : 1; /* METADATA::SYNCMARKER */
+ uint32_t rangered : 1; /* METADATA::RANGERED */
+ uint32_t max_b_frames : 3; /* METADATA::MAXBFRAMES */
+ uint32_t profile : 2; /* SEQUENCE_LAYER::PROFILE or The MSB of METADATA::PROFILE */
} bits;
- unsigned int value;
+ uint32_t value;
} sequence_fields;
- unsigned short coded_width; /* ENTRY_POINT_LAYER::CODED_WIDTH */
- unsigned short coded_height; /* ENTRY_POINT_LAYER::CODED_HEIGHT */
+ uint16_t coded_width; /* ENTRY_POINT_LAYER::CODED_WIDTH */
+ uint16_t coded_height; /* ENTRY_POINT_LAYER::CODED_HEIGHT */
union {
struct {
- unsigned int broken_link : 1; /* ENTRY_POINT_LAYER::BROKEN_LINK */
- unsigned int closed_entry : 1; /* ENTRY_POINT_LAYER::CLOSED_ENTRY */
- unsigned int panscan_flag : 1; /* ENTRY_POINT_LAYER::PANSCAN_FLAG */
- unsigned int loopfilter : 1; /* ENTRY_POINT_LAYER::LOOPFILTER */
+ uint32_t broken_link : 1; /* ENTRY_POINT_LAYER::BROKEN_LINK */
+ uint32_t closed_entry : 1; /* ENTRY_POINT_LAYER::CLOSED_ENTRY */
+ uint32_t panscan_flag : 1; /* ENTRY_POINT_LAYER::PANSCAN_FLAG */
+ uint32_t loopfilter : 1; /* ENTRY_POINT_LAYER::LOOPFILTER */
} bits;
- unsigned int value;
+ uint32_t value;
} entrypoint_fields;
- unsigned char conditional_overlap_flag; /* ENTRY_POINT_LAYER::CONDOVER */
- unsigned char fast_uvmc_flag; /* ENTRY_POINT_LAYER::FASTUVMC */
+ uint8_t conditional_overlap_flag; /* ENTRY_POINT_LAYER::CONDOVER */
+ uint8_t fast_uvmc_flag; /* ENTRY_POINT_LAYER::FASTUVMC */
union {
struct {
- unsigned int luma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPY_FLAG */
- unsigned int luma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPY */
- unsigned int chroma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPUV_FLAG */
- unsigned int chroma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPUV */
+ uint32_t luma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPY_FLAG */
+ uint32_t luma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPY */
+ uint32_t chroma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPUV_FLAG */
+ uint32_t chroma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPUV */
} bits;
- unsigned int value;
+ uint32_t value;
} range_mapping_fields;
- unsigned char b_picture_fraction; /* Index for PICTURE_LAYER::BFRACTION value in Table 40 (7.1.1.14) */
- unsigned char cbp_table; /* PICTURE_LAYER::CBPTAB/ICBPTAB */
- unsigned char mb_mode_table; /* PICTURE_LAYER::MBMODETAB */
- unsigned char range_reduction_frame;/* PICTURE_LAYER::RANGEREDFRM */
- unsigned char rounding_control; /* PICTURE_LAYER::RNDCTRL */
- unsigned char post_processing; /* PICTURE_LAYER::POSTPROC */
- unsigned char picture_resolution_index; /* PICTURE_LAYER::RESPIC */
- unsigned char luma_scale; /* PICTURE_LAYER::LUMSCALE */
- unsigned char luma_shift; /* PICTURE_LAYER::LUMSHIFT */
+ uint8_t b_picture_fraction; /* Index for PICTURE_LAYER::BFRACTION value in Table 40 (7.1.1.14) */
+ uint8_t cbp_table; /* PICTURE_LAYER::CBPTAB/ICBPTAB */
+ uint8_t mb_mode_table; /* PICTURE_LAYER::MBMODETAB */
+ uint8_t range_reduction_frame;/* PICTURE_LAYER::RANGEREDFRM */
+ uint8_t rounding_control; /* PICTURE_LAYER::RNDCTRL */
+ uint8_t post_processing; /* PICTURE_LAYER::POSTPROC */
+ uint8_t picture_resolution_index; /* PICTURE_LAYER::RESPIC */
+ uint8_t luma_scale; /* PICTURE_LAYER::LUMSCALE */
+ uint8_t luma_shift; /* PICTURE_LAYER::LUMSHIFT */
+
union {
struct {
- unsigned int picture_type : 3; /* PICTURE_LAYER::PTYPE */
- unsigned int frame_coding_mode : 3; /* PICTURE_LAYER::FCM */
- unsigned int top_field_first : 1; /* PICTURE_LAYER::TFF */
- unsigned int is_first_field : 1; /* set to 1 if it is the first field */
- unsigned int intensity_compensation : 1; /* PICTURE_LAYER::INTCOMP */
+ uint32_t picture_type : 3; /* PICTURE_LAYER::PTYPE */
+ uint32_t frame_coding_mode : 3; /* PICTURE_LAYER::FCM */
+ uint32_t top_field_first : 1; /* PICTURE_LAYER::TFF */
+ uint32_t is_first_field : 1; /* set to 1 if it is the first field */
+ uint32_t intensity_compensation : 1; /* PICTURE_LAYER::INTCOMP */
} bits;
- unsigned int value;
+ uint32_t value;
} picture_fields;
union {
struct {
- unsigned int mv_type_mb : 1; /* PICTURE::MVTYPEMB */
- unsigned int direct_mb : 1; /* PICTURE::DIRECTMB */
- unsigned int skip_mb : 1; /* PICTURE::SKIPMB */
- unsigned int field_tx : 1; /* PICTURE::FIELDTX */
- unsigned int forward_mb : 1; /* PICTURE::FORWARDMB */
- unsigned int ac_pred : 1; /* PICTURE::ACPRED */
- unsigned int overflags : 1; /* PICTURE::OVERFLAGS */
+ uint32_t mv_type_mb : 1; /* PICTURE::MVTYPEMB */
+ uint32_t direct_mb : 1; /* PICTURE::DIRECTMB */
+ uint32_t skip_mb : 1; /* PICTURE::SKIPMB */
+ uint32_t field_tx : 1; /* PICTURE::FIELDTX */
+ uint32_t forward_mb : 1; /* PICTURE::FORWARDMB */
+ uint32_t ac_pred : 1; /* PICTURE::ACPRED */
+ uint32_t overflags : 1; /* PICTURE::OVERFLAGS */
} flags;
- unsigned int value;
+ uint32_t value;
} raw_coding;
union {
struct {
- unsigned int bp_mv_type_mb : 1; /* PICTURE::MVTYPEMB */
- unsigned int bp_direct_mb : 1; /* PICTURE::DIRECTMB */
- unsigned int bp_skip_mb : 1; /* PICTURE::SKIPMB */
- unsigned int bp_field_tx : 1; /* PICTURE::FIELDTX */
- unsigned int bp_forward_mb : 1; /* PICTURE::FORWARDMB */
- unsigned int bp_ac_pred : 1; /* PICTURE::ACPRED */
- unsigned int bp_overflags : 1; /* PICTURE::OVERFLAGS */
+ uint32_t bp_mv_type_mb : 1; /* PICTURE::MVTYPEMB */
+ uint32_t bp_direct_mb : 1; /* PICTURE::DIRECTMB */
+ uint32_t bp_skip_mb : 1; /* PICTURE::SKIPMB */
+ uint32_t bp_field_tx : 1; /* PICTURE::FIELDTX */
+ uint32_t bp_forward_mb : 1; /* PICTURE::FORWARDMB */
+ uint32_t bp_ac_pred : 1; /* PICTURE::ACPRED */
+ uint32_t bp_overflags : 1; /* PICTURE::OVERFLAGS */
} flags;
- unsigned int value;
+ uint32_t value;
} bitplane_present; /* signal what bitplane is being passed via the bitplane buffer */
union {
struct {
- unsigned int reference_distance_flag : 1;/* PICTURE_LAYER::REFDIST_FLAG */
- unsigned int reference_distance : 5;/* PICTURE_LAYER::REFDIST */
- unsigned int num_reference_pictures: 1;/* PICTURE_LAYER::NUMREF */
- unsigned int reference_field_pic_indicator : 1;/* PICTURE_LAYER::REFFIELD */
+ uint32_t reference_distance_flag : 1;/* PICTURE_LAYER::REFDIST_FLAG */
+ uint32_t reference_distance : 5;/* PICTURE_LAYER::REFDIST */
+ uint32_t num_reference_pictures: 1;/* PICTURE_LAYER::NUMREF */
+ uint32_t reference_field_pic_indicator : 1;/* PICTURE_LAYER::REFFIELD */
} bits;
- unsigned int value;
+ uint32_t value;
} reference_fields;
union {
struct {
- unsigned int mv_mode : 3; /* PICTURE_LAYER::MVMODE */
- unsigned int mv_mode2 : 3; /* PICTURE_LAYER::MVMODE2 */
- unsigned int mv_table : 3; /* PICTURE_LAYER::MVTAB/IMVTAB */
- unsigned int two_mv_block_pattern_table: 2; /* PICTURE_LAYER::2MVBPTAB */
- unsigned int four_mv_switch : 1; /* PICTURE_LAYER::4MVSWITCH */
- unsigned int four_mv_block_pattern_table : 2; /* PICTURE_LAYER::4MVBPTAB */
- unsigned int extended_mv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_MV */
- unsigned int extended_mv_range : 2; /* PICTURE_LAYER::MVRANGE */
- unsigned int extended_dmv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_DMV */
- unsigned int extended_dmv_range : 2; /* PICTURE_LAYER::DMVRANGE */
+ uint32_t mv_mode : 3; /* PICTURE_LAYER::MVMODE */
+ uint32_t mv_mode2 : 3; /* PICTURE_LAYER::MVMODE2 */
+ uint32_t mv_table : 3; /* PICTURE_LAYER::MVTAB/IMVTAB */
+ uint32_t two_mv_block_pattern_table: 2; /* PICTURE_LAYER::2MVBPTAB */
+ uint32_t four_mv_switch : 1; /* PICTURE_LAYER::4MVSWITCH */
+ uint32_t four_mv_block_pattern_table : 2; /* PICTURE_LAYER::4MVBPTAB */
+ uint32_t extended_mv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_MV */
+ uint32_t extended_mv_range : 2; /* PICTURE_LAYER::MVRANGE */
+ uint32_t extended_dmv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_DMV */
+ uint32_t extended_dmv_range : 2; /* PICTURE_LAYER::DMVRANGE */
} bits;
- unsigned int value;
+ uint32_t value;
} mv_fields;
union {
struct {
- unsigned int dquant : 2; /* ENTRY_POINT_LAYER::DQUANT */
- unsigned int quantizer : 2; /* ENTRY_POINT_LAYER::QUANTIZER */
- unsigned int half_qp : 1; /* PICTURE_LAYER::HALFQP */
- unsigned int pic_quantizer_scale : 5;/* PICTURE_LAYER::PQUANT */
- unsigned int pic_quantizer_type : 1;/* PICTURE_LAYER::PQUANTIZER */
- unsigned int dq_frame : 1; /* VOPDQUANT::DQUANTFRM */
- unsigned int dq_profile : 2; /* VOPDQUANT::DQPROFILE */
- unsigned int dq_sb_edge : 2; /* VOPDQUANT::DQSBEDGE */
- unsigned int dq_db_edge : 2; /* VOPDQUANT::DQDBEDGE */
- unsigned int dq_binary_level : 1; /* VOPDQUANT::DQBILEVEL */
- unsigned int alt_pic_quantizer : 5;/* VOPDQUANT::ALTPQUANT */
+ uint32_t dquant : 2; /* ENTRY_POINT_LAYER::DQUANT */
+ uint32_t quantizer : 2; /* ENTRY_POINT_LAYER::QUANTIZER */
+ uint32_t half_qp : 1; /* PICTURE_LAYER::HALFQP */
+ uint32_t pic_quantizer_scale : 5;/* PICTURE_LAYER::PQUANT */
+ uint32_t pic_quantizer_type : 1;/* PICTURE_LAYER::PQUANTIZER */
+ uint32_t dq_frame : 1; /* VOPDQUANT::DQUANTFRM */
+ uint32_t dq_profile : 2; /* VOPDQUANT::DQPROFILE */
+ uint32_t dq_sb_edge : 2; /* VOPDQUANT::DQSBEDGE */
+ uint32_t dq_db_edge : 2; /* VOPDQUANT::DQDBEDGE */
+ uint32_t dq_binary_level : 1; /* VOPDQUANT::DQBILEVEL */
+ uint32_t alt_pic_quantizer : 5;/* VOPDQUANT::ALTPQUANT */
} bits;
- unsigned int value;
+ uint32_t value;
} pic_quantizer_fields;
union {
struct {
- unsigned int variable_sized_transform_flag : 1;/* ENTRY_POINT_LAYER::VSTRANSFORM */
- unsigned int mb_level_transform_type_flag : 1;/* PICTURE_LAYER::TTMBF */
- unsigned int frame_level_transform_type : 2;/* PICTURE_LAYER::TTFRM */
- unsigned int transform_ac_codingset_idx1 : 2;/* PICTURE_LAYER::TRANSACFRM */
- unsigned int transform_ac_codingset_idx2 : 2;/* PICTURE_LAYER::TRANSACFRM2 */
- unsigned int intra_transform_dc_table : 1;/* PICTURE_LAYER::TRANSDCTAB */
+ uint32_t variable_sized_transform_flag : 1;/* ENTRY_POINT_LAYER::VSTRANSFORM */
+ uint32_t mb_level_transform_type_flag : 1;/* PICTURE_LAYER::TTMBF */
+ uint32_t frame_level_transform_type : 2;/* PICTURE_LAYER::TTFRM */
+ uint32_t transform_ac_codingset_idx1 : 2;/* PICTURE_LAYER::TRANSACFRM */
+ uint32_t transform_ac_codingset_idx2 : 2;/* PICTURE_LAYER::TRANSACFRM2 */
+ uint32_t intra_transform_dc_table : 1;/* PICTURE_LAYER::TRANSDCTAB */
} bits;
- unsigned int value;
+ uint32_t value;
} transform_fields;
} VAPictureParameterBufferVC1;
@@ -2007,11 +2008,11 @@ Macroblock #2 in the first row.
/* VC-1 Slice Parameter Buffer */
typedef struct _VASliceParameterBufferVC1
{
- 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 first byte of slice data */
- unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
- unsigned int macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */
- unsigned int slice_vertical_position;
+ uint32_t slice_data_size;/* number of bytes in the slice data buffer for this slice */
+ uint32_t slice_data_offset;/* the offset to the first byte of slice data */
+ uint32_t slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
+ uint32_t macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */
+ uint32_t slice_vertical_position;
} VASliceParameterBufferVC1;
/* VC-1 Slice Data Buffer */
@@ -2026,10 +2027,10 @@ This is simplely a buffer containing raw bit-stream bytes
typedef struct _VAPictureH264
{
VASurfaceID picture_id;
- unsigned int frame_idx;
- unsigned int flags;
- signed int TopFieldOrderCnt;
- signed int BottomFieldOrderCnt;
+ uint32_t frame_idx;
+ uint32_t flags;
+ int32_t TopFieldOrderCnt;
+ int32_t BottomFieldOrderCnt;
} VAPictureH264;
/* flags in VAPictureH264 could be OR of the following */
#define VA_PICTURE_H264_INVALID 0x00000001
@@ -2047,69 +2048,69 @@ typedef struct _VAPictureParameterBufferH264
{
VAPictureH264 CurrPic;
VAPictureH264 ReferenceFrames[16]; /* in DPB */
- unsigned short picture_width_in_mbs_minus1;
- unsigned short picture_height_in_mbs_minus1;
- unsigned char bit_depth_luma_minus8;
- unsigned char bit_depth_chroma_minus8;
- unsigned char num_ref_frames;
+ uint16_t picture_width_in_mbs_minus1;
+ uint16_t picture_height_in_mbs_minus1;
+ uint8_t bit_depth_luma_minus8;
+ uint8_t bit_depth_chroma_minus8;
+ uint8_t num_ref_frames;
union {
struct {
- unsigned int chroma_format_idc : 2;
- unsigned int residual_colour_transform_flag : 1; /* Renamed to separate_colour_plane_flag in newer standard versions. */
- unsigned int gaps_in_frame_num_value_allowed_flag : 1;
- unsigned int frame_mbs_only_flag : 1;
- unsigned int mb_adaptive_frame_field_flag : 1;
- unsigned int direct_8x8_inference_flag : 1;
- unsigned int MinLumaBiPredSize8x8 : 1; /* see A.3.3.2 */
- unsigned int log2_max_frame_num_minus4 : 4;
- unsigned int pic_order_cnt_type : 2;
- unsigned int log2_max_pic_order_cnt_lsb_minus4 : 4;
- unsigned int delta_pic_order_always_zero_flag : 1;
+ uint32_t chroma_format_idc : 2;
+ uint32_t residual_colour_transform_flag : 1; /* Renamed to separate_colour_plane_flag in newer standard versions. */
+ uint32_t gaps_in_frame_num_value_allowed_flag : 1;
+ uint32_t frame_mbs_only_flag : 1;
+ uint32_t mb_adaptive_frame_field_flag : 1;
+ uint32_t direct_8x8_inference_flag : 1;
+ uint32_t MinLumaBiPredSize8x8 : 1; /* see A.3.3.2 */
+ uint32_t log2_max_frame_num_minus4 : 4;
+ uint32_t pic_order_cnt_type : 2;
+ uint32_t log2_max_pic_order_cnt_lsb_minus4 : 4;
+ uint32_t delta_pic_order_always_zero_flag : 1;
} bits;
- unsigned int value;
+ uint32_t value;
} seq_fields;
// FMO is not supported.
- va_deprecated unsigned char num_slice_groups_minus1;
- va_deprecated unsigned char slice_group_map_type;
- va_deprecated unsigned short slice_group_change_rate_minus1;
- signed char pic_init_qp_minus26;
- signed char pic_init_qs_minus26;
- signed char chroma_qp_index_offset;
- signed char second_chroma_qp_index_offset;
+ va_deprecated uint8_t num_slice_groups_minus1;
+ va_deprecated uint8_t slice_group_map_type;
+ va_deprecated uint16_t slice_group_change_rate_minus1;
+ int8_t pic_init_qp_minus26;
+ int8_t pic_init_qs_minus26;
+ int8_t chroma_qp_index_offset;
+ int8_t second_chroma_qp_index_offset;
union {
struct {
- unsigned int entropy_coding_mode_flag : 1;
- unsigned int weighted_pred_flag : 1;
- unsigned int weighted_bipred_idc : 2;
- unsigned int transform_8x8_mode_flag : 1;
- unsigned int field_pic_flag : 1;
- unsigned int constrained_intra_pred_flag : 1;
- unsigned int pic_order_present_flag : 1; /* Renamed to bottom_field_pic_order_in_frame_present_flag in newer standard versions. */
- unsigned int deblocking_filter_control_present_flag : 1;
- unsigned int redundant_pic_cnt_present_flag : 1;
- unsigned int reference_pic_flag : 1; /* nal_ref_idc != 0 */
+ uint32_t entropy_coding_mode_flag : 1;
+ uint32_t weighted_pred_flag : 1;
+ uint32_t weighted_bipred_idc : 2;
+ uint32_t transform_8x8_mode_flag : 1;
+ uint32_t field_pic_flag : 1;
+ uint32_t constrained_intra_pred_flag : 1;
+ uint32_t pic_order_present_flag : 1; /* Renamed to bottom_field_pic_order_in_frame_present_flag in newer standard versions. */
+ uint32_t deblocking_filter_control_present_flag : 1;
+ uint32_t redundant_pic_cnt_present_flag : 1;
+ uint32_t reference_pic_flag : 1; /* nal_ref_idc != 0 */
} bits;
- unsigned int value;
+ uint32_t value;
} pic_fields;
- unsigned short frame_num;
+ uint16_t frame_num;
} VAPictureParameterBufferH264;
/** H.264 Inverse Quantization Matrix Buffer */
typedef struct _VAIQMatrixBufferH264
{
/** \brief 4x4 scaling list, in raster scan order. */
- unsigned char ScalingList4x4[6][16];
+ uint8_t ScalingList4x4[6][16];
/** \brief 8x8 scaling list, in raster scan order. */
- unsigned char ScalingList8x8[2][64];
+ uint8_t ScalingList8x8[2][64];
} VAIQMatrixBufferH264;
/** H.264 Slice Parameter Buffer */
typedef struct _VASliceParameterBufferH264
{
- unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */
+ uint32_t 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 */
+ uint32_t slice_data_offset;
+ uint32_t slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
/**
* \brief Bit offset from NAL Header Unit to the begining of slice_data().
*
@@ -2120,33 +2121,33 @@ typedef struct _VASliceParameterBufferH264
* the original bitstream, thus including any emulation prevention
* bytes.
*/
- unsigned short slice_data_bit_offset;
- unsigned short first_mb_in_slice;
- unsigned char slice_type;
- unsigned char direct_spatial_mv_pred_flag;
- unsigned char num_ref_idx_l0_active_minus1;
- unsigned char num_ref_idx_l1_active_minus1;
- unsigned char cabac_init_idc;
- char slice_qp_delta;
- unsigned char disable_deblocking_filter_idc;
- char slice_alpha_c0_offset_div2;
- char slice_beta_offset_div2;
+ uint16_t slice_data_bit_offset;
+ uint16_t first_mb_in_slice;
+ uint8_t slice_type;
+ uint8_t direct_spatial_mv_pred_flag;
+ uint8_t num_ref_idx_l0_active_minus1;
+ uint8_t num_ref_idx_l1_active_minus1;
+ uint8_t cabac_init_idc;
+ int8_t slice_qp_delta;
+ uint8_t disable_deblocking_filter_idc;
+ int8_t slice_alpha_c0_offset_div2;
+ int8_t slice_beta_offset_div2;
VAPictureH264 RefPicList0[32]; /* See 8.2.4.2 */
VAPictureH264 RefPicList1[32]; /* See 8.2.4.2 */
- unsigned char luma_log2_weight_denom;
- unsigned char chroma_log2_weight_denom;
- unsigned char luma_weight_l0_flag;
- short luma_weight_l0[32];
- short luma_offset_l0[32];
- unsigned char chroma_weight_l0_flag;
- short chroma_weight_l0[32][2];
- short chroma_offset_l0[32][2];
- unsigned char luma_weight_l1_flag;
- short luma_weight_l1[32];
- short luma_offset_l1[32];
- unsigned char chroma_weight_l1_flag;
- short chroma_weight_l1[32][2];
- short chroma_offset_l1[32][2];
+ uint8_t luma_log2_weight_denom;
+ uint8_t chroma_log2_weight_denom;
+ uint8_t luma_weight_l0_flag;
+ int16_t luma_weight_l0[32];
+ int16_t luma_offset_l0[32];
+ uint8_t chroma_weight_l0_flag;
+ int16_t chroma_weight_l0[32][2];
+ int16_t chroma_offset_l0[32][2];
+ uint8_t luma_weight_l1_flag;
+ int16_t luma_weight_l1[32];
+ int16_t luma_offset_l1[32];
+ uint8_t chroma_weight_l1_flag;
+ int16_t chroma_weight_l1[32][2];
+ int16_t chroma_offset_l1[32][2];
} VASliceParameterBufferH264;
/****************************
@@ -2162,16 +2163,16 @@ typedef enum
/* Encode Slice Parameter Buffer */
typedef struct _VAEncSliceParameterBuffer
{
- unsigned int start_row_number; /* starting MB row number for this slice */
- unsigned int slice_height; /* slice height measured in MB */
+ uint32_t start_row_number; /* starting MB row number for this slice */
+ uint32_t slice_height; /* slice height measured in MB */
union {
struct {
- unsigned int is_intra : 1;
- unsigned int disable_deblocking_filter_idc : 2;
- unsigned int uses_long_term_ref :1;
- unsigned int is_long_term_ref :1;
+ uint32_t is_intra : 1;
+ uint32_t disable_deblocking_filter_idc : 2;
+ uint32_t uses_long_term_ref :1;
+ uint32_t is_long_term_ref :1;
} bits;
- unsigned int value;
+ uint32_t value;
} slice_flags;
} VAEncSliceParameterBuffer;
@@ -2182,11 +2183,11 @@ typedef struct _VAEncSliceParameterBuffer
typedef struct _VAEncSequenceParameterBufferH263
{
- unsigned int intra_period;
- unsigned int bits_per_second;
- unsigned int frame_rate;
- unsigned int initial_qp;
- unsigned int min_qp;
+ uint32_t intra_period;
+ uint32_t bits_per_second;
+ uint32_t frame_rate;
+ uint32_t initial_qp;
+ uint32_t min_qp;
} VAEncSequenceParameterBufferH263;
typedef struct _VAEncPictureParameterBufferH263
@@ -2194,8 +2195,8 @@ typedef struct _VAEncPictureParameterBufferH263
VASurfaceID reference_picture;
VASurfaceID reconstructed_picture;
VABufferID coded_buf;
- unsigned short picture_width;
- unsigned short picture_height;
+ uint16_t picture_width;
+ uint16_t picture_height;
VAEncPictureType picture_type;
} VAEncPictureParameterBufferH263;
@@ -2205,17 +2206,17 @@ typedef struct _VAEncPictureParameterBufferH263
typedef struct _VAEncSequenceParameterBufferMPEG4
{
- unsigned char profile_and_level_indication;
- unsigned int intra_period;
- unsigned int video_object_layer_width;
- unsigned int video_object_layer_height;
- unsigned int vop_time_increment_resolution;
- unsigned int fixed_vop_rate;
- unsigned int fixed_vop_time_increment;
- unsigned int bits_per_second;
- unsigned int frame_rate;
- unsigned int initial_qp;
- unsigned int min_qp;
+ uint8_t profile_and_level_indication;
+ uint32_t intra_period;
+ uint32_t video_object_layer_width;
+ uint32_t video_object_layer_height;
+ uint32_t vop_time_increment_resolution;
+ uint32_t fixed_vop_rate;
+ uint32_t fixed_vop_time_increment;
+ uint32_t bits_per_second;
+ uint32_t frame_rate;
+ uint32_t initial_qp;
+ uint32_t min_qp;
} VAEncSequenceParameterBufferMPEG4;
typedef struct _VAEncPictureParameterBufferMPEG4
@@ -2223,10 +2224,10 @@ typedef struct _VAEncPictureParameterBufferMPEG4
VASurfaceID reference_picture;
VASurfaceID reconstructed_picture;
VABufferID coded_buf;
- unsigned short picture_width;
- unsigned short picture_height;
- unsigned int modulo_time_base; /* number of 1s */
- unsigned int vop_time_increment;
+ uint16_t picture_width;
+ uint16_t picture_height;
+ uint32_t modulo_time_base; /* number of 1s */
+ uint32_t vop_time_increment;
VAEncPictureType picture_type;
} VAEncPictureParameterBufferMPEG4;
@@ -2324,13 +2325,13 @@ typedef struct _VACodedBufferSegment {
/**
* \brief Size of the data buffer in this segment (in bytes).
*/
- unsigned int size;
+ uint32_t size;
/** \brief Bit offset into the data buffer where the video data starts. */
- unsigned int bit_offset;
+ uint32_t bit_offset;
/** \brief Status set by the driver. See \c VA_CODED_BUF_STATUS_*. */
- unsigned int status;
+ uint32_t status;
/** \brief Reserved for future use. */
- unsigned int reserved;
+ uint32_t reserved;
/** \brief Pointer to the start of the data buffer. */
void *buf;
/**
@@ -2565,9 +2566,9 @@ typedef enum
*/
typedef struct _VASurfaceDecodeMBErrors
{
- int status; /* 1 if hardware has returned detailed info below, -1 means this record is invalid */
- unsigned int start_mb; /* start mb address with errors */
- unsigned int end_mb; /* end mb address with errors */
+ int32_t status; /* 1 if hardware has returned detailed info below, -1 means this record is invalid */
+ uint32_t start_mb; /* start mb address with errors */
+ uint32_t end_mb; /* end mb address with errors */
VADecodeErrorType decode_error_type;
} VASurfaceDecodeMBErrors;
@@ -2650,15 +2651,15 @@ VAStatus vaQuerySurfaceError(
typedef struct _VAImageFormat
{
- unsigned int fourcc;
- unsigned int byte_order; /* VA_LSB_FIRST, VA_MSB_FIRST */
- unsigned int bits_per_pixel;
+ uint32_t fourcc;
+ uint32_t byte_order; /* VA_LSB_FIRST, VA_MSB_FIRST */
+ uint32_t bits_per_pixel;
/* for RGB formats */
- unsigned int depth; /* significant bits per pixel */
- unsigned int red_mask;
- unsigned int green_mask;
- unsigned int blue_mask;
- unsigned int alpha_mask;
+ uint32_t depth; /* significant bits per pixel */
+ uint32_t red_mask;
+ uint32_t green_mask;
+ uint32_t blue_mask;
+ uint32_t alpha_mask;
} VAImageFormat;
typedef VAGenericID VAImageID;
@@ -2675,33 +2676,33 @@ typedef struct _VAImage
* size and format. This buffer is managed by the library implementation, and
* accessed by the client through the buffer Map/Unmap functions.
*/
- unsigned short width;
- unsigned short height;
- unsigned int data_size;
- unsigned int num_planes; /* can not be greater than 3 */
+ uint16_t width;
+ uint16_t height;
+ uint32_t data_size;
+ uint32_t num_planes; /* can not be greater than 3 */
/*
* An array indicating the scanline pitch in bytes for each plane.
* Each plane may have a different pitch. Maximum 3 planes for planar formats
*/
- unsigned int pitches[3];
+ uint32_t pitches[3];
/*
* An array indicating the byte offset from the beginning of the image data
* to the start of each plane.
*/
- unsigned int offsets[3];
+ uint32_t offsets[3];
/* The following fields are only needed for paletted formats */
- int num_palette_entries; /* set to zero for non-palette images */
+ int32_t num_palette_entries; /* set to zero for non-palette images */
/*
* Each component is one byte and entry_bytes indicates the number of components in
* each entry (eg. 3 for YUV palette entries). set to zero for non-palette images
*/
- int entry_bytes;
+ int32_t entry_bytes;
/*
* An array of ascii characters describing the order of the components within the bytes.
* Only entry_bytes characters of the string are used.
*/
- char component_order[4];
+ int8_t component_order[4];
} VAImage;
/** Get maximum number of image formats supported by the implementation */
@@ -2930,19 +2931,19 @@ VAStatus vaAssociateSubpicture (
VASubpictureID subpicture,
VASurfaceID *target_surfaces,
int num_surfaces,
- short src_x, /* upper left offset in subpicture */
- short src_y,
- unsigned short src_width,
- unsigned short src_height,
- short dest_x, /* upper left offset in surface */
- short dest_y,
- unsigned short dest_width,
- unsigned short dest_height,
+ int16_t src_x, /* upper left offset in subpicture */
+ int16_t src_y,
+ uint16_t src_width,
+ uint16_t src_height,
+ int16_t dest_x, /* upper left offset in surface */
+ int16_t dest_y,
+ uint16_t dest_width,
+ uint16_t dest_height,
/*
* whether to enable chroma-keying, global-alpha, or screen relative mode
* see VA_SUBPICTURE_XXX values
*/
- unsigned int flags
+ uint32_t flags
);
/**
@@ -3076,11 +3077,11 @@ typedef enum
typedef struct _VADisplayAttribute
{
VADisplayAttribType type;
- int min_value;
- int max_value;
- int value; /* used by the set/get attribute functions */
+ int32_t min_value;
+ int32_t max_value;
+ int32_t value; /* used by the set/get attribute functions */
/* flags can be VA_DISPLAY_ATTRIB_GETTABLE or VA_DISPLAY_ATTRIB_SETTABLE or OR'd together */
- unsigned int flags;
+ uint32_t flags;
} VADisplayAttribute;
/** Get maximum number of display attributs supported by the implementation */
diff --git a/va/va_dec_jpeg.h b/va/va_dec_jpeg.h
index 644ce3b..4b66229 100644
--- a/va/va_dec_jpeg.h
+++ b/va/va_dec_jpeg.h
@@ -54,22 +54,22 @@ extern "C" {
*/
typedef struct _VAPictureParameterBufferJPEGBaseline {
/** \brief Picture width in pixels. */
- unsigned short picture_width;
+ uint16_t picture_width;
/** \brief Picture height in pixels. */
- unsigned short picture_height;
+ uint16_t picture_height;
struct {
/** \brief Component identifier (Ci). */
- unsigned char component_id;
+ uint8_t component_id;
/** \brief Horizontal sampling factor (Hi). */
- unsigned char h_sampling_factor;
+ uint8_t h_sampling_factor;
/** \brief Vertical sampling factor (Vi). */
- unsigned char v_sampling_factor;
+ uint8_t v_sampling_factor;
/* \brief Quantization table selector (Tqi). */
- unsigned char quantiser_table_selector;
+ uint8_t quantiser_table_selector;
} components[255];
/** \brief Number of components in frame (Nf). */
- unsigned char num_components;
+ uint8_t num_components;
} VAPictureParameterBufferJPEGBaseline;
/**
@@ -88,9 +88,9 @@ typedef struct _VAPictureParameterBufferJPEGBaseline {
*/
typedef struct _VAIQMatrixBufferJPEGBaseline {
/** \brief Specifies which #quantiser_table is valid. */
- unsigned char load_quantiser_table[4];
+ uint8_t load_quantiser_table[4];
/** \brief Quanziation tables indexed by table identifier (Tqi). */
- unsigned char quantiser_table[4][64];
+ uint8_t quantiser_table[4][64];
} VAIQMatrixBufferJPEGBaseline;
/**
@@ -104,33 +104,33 @@ typedef struct _VASliceParameterBufferJPEGBaseline {
/** @name Codec-independent Slice Parameter Buffer base. */
/**@{*/
/** \brief Number of bytes in the slice data buffer for this slice. */
- unsigned int slice_data_size;
+ uint32_t slice_data_size;
/** \brief The offset to the first byte of the first MCU. */
- unsigned int slice_data_offset;
+ uint32_t slice_data_offset;
/** \brief Slice data buffer flags. See \c VA_SLICE_DATA_FLAG_xxx. */
- unsigned int slice_data_flag;
+ uint32_t slice_data_flag;
/**@}*/
/** \brief Scan horizontal position. */
- unsigned int slice_horizontal_position;
+ uint32_t slice_horizontal_position;
/** \brief Scan vertical position. */
- unsigned int slice_vertical_position;
+ uint32_t slice_vertical_position;
struct {
/** \brief Scan component selector (Csj). */
- unsigned char component_selector;
+ uint8_t component_selector;
/** \brief DC entropy coding table selector (Tdj). */
- unsigned char dc_table_selector;
+ uint8_t dc_table_selector;
/** \brief AC entropy coding table selector (Taj). */
- unsigned char ac_table_selector;
+ uint8_t ac_table_selector;
} components[4];
/** \brief Number of components in scan (Ns). */
- unsigned char num_components;
+ uint8_t num_components;
/** \brief Restart interval definition (Ri). */
- unsigned short restart_interval;
+ uint16_t restart_interval;
/** \brief Number of MCUs in a scan. */
- unsigned int num_mcus;
+ uint32_t num_mcus;
} VASliceParameterBufferJPEGBaseline;
/**@}*/
diff --git a/va/va_dec_vp8.h b/va/va_dec_vp8.h
index 32830cb..c45e476 100644
--- a/va/va_dec_vp8.h
+++ b/va/va_dec_vp8.h
@@ -51,15 +51,15 @@ extern "C" {
typedef struct _VABoolCoderContextVPX
{
/* partition 0 "range" */
- unsigned char range;
+ uint8_t range;
/* partition 0 "value" */
- unsigned char value;
+ uint8_t value;
/*
* 'partition 0 number of shifts before an output byte is available'
* it is the number of remaining bits in 'value' for decoding, range [0, 7].
*/
- unsigned char count;
+ uint8_t count;
} VABoolCoderContextVPX;
/**
@@ -72,9 +72,9 @@ typedef struct _VABoolCoderContextVPX
typedef struct _VAPictureParameterBufferVP8
{
/* frame width in pixels */
- unsigned int frame_width;
+ uint32_t frame_width;
/* frame height in pixels */
- unsigned int frame_height;
+ uint32_t frame_height;
/* specifies the "last" reference frame */
VASurfaceID last_ref_frame;
@@ -88,72 +88,72 @@ typedef struct _VAPictureParameterBufferVP8
union {
struct {
/* same as key_frame in bitstream syntax, 0 means a key frame */
- unsigned int key_frame : 1;
+ uint32_t key_frame : 1;
/* same as version in bitstream syntax */
- unsigned int version : 3;
+ uint32_t version : 3;
/* same as segmentation_enabled in bitstream syntax */
- unsigned int segmentation_enabled : 1;
+ uint32_t segmentation_enabled : 1;
/* same as update_mb_segmentation_map in bitstream syntax */
- unsigned int update_mb_segmentation_map : 1;
+ uint32_t update_mb_segmentation_map : 1;
/* same as update_segment_feature_data in bitstream syntax */
- unsigned int update_segment_feature_data : 1;
+ uint32_t update_segment_feature_data : 1;
/* same as filter_type in bitstream syntax */
- unsigned int filter_type : 1;
+ uint32_t filter_type : 1;
/* same as sharpness_level in bitstream syntax */
- unsigned int sharpness_level : 3;
+ uint32_t sharpness_level : 3;
/* same as loop_filter_adj_enable in bitstream syntax */
- unsigned int loop_filter_adj_enable : 1;
+ uint32_t loop_filter_adj_enable : 1;
/* same as mode_ref_lf_delta_update in bitstream syntax */
- unsigned int mode_ref_lf_delta_update : 1;
+ uint32_t mode_ref_lf_delta_update : 1;
/* same as sign_bias_golden in bitstream syntax */
- unsigned int sign_bias_golden : 1;
+ uint32_t sign_bias_golden : 1;
/* same as sign_bias_alternate in bitstream syntax */
- unsigned int sign_bias_alternate : 1;
+ uint32_t sign_bias_alternate : 1;
/* same as mb_no_coeff_skip in bitstream syntax */
- unsigned int mb_no_coeff_skip : 1;
+ uint32_t mb_no_coeff_skip : 1;
/* flag to indicate that loop filter should be disabled */
- unsigned int loop_filter_disable : 1;
+ uint32_t loop_filter_disable : 1;
} bits;
- unsigned int value;
+ uint32_t value;
} pic_fields;
/*
* probabilities of the segment_id decoding tree and same as
* mb_segment_tree_probs in the spec.
*/
- unsigned char mb_segment_tree_probs[3];
+ uint8_t mb_segment_tree_probs[3];
/* Post-adjustment loop filter levels for the 4 segments */
- unsigned char loop_filter_level[4];
+ uint8_t loop_filter_level[4];
/* loop filter deltas for reference frame based MB level adjustment */
- char loop_filter_deltas_ref_frame[4];
+ int8_t loop_filter_deltas_ref_frame[4];
/* loop filter deltas for coding mode based MB level adjustment */
- char loop_filter_deltas_mode[4];
+ int8_t loop_filter_deltas_mode[4];
/* same as prob_skip_false in bitstream syntax */
- unsigned char prob_skip_false;
+ uint8_t prob_skip_false;
/* same as prob_intra in bitstream syntax */
- unsigned char prob_intra;
+ uint8_t prob_intra;
/* same as prob_last in bitstream syntax */
- unsigned char prob_last;
+ uint8_t prob_last;
/* same as prob_gf in bitstream syntax */
- unsigned char prob_gf;
+ uint8_t prob_gf;
/*
* list of 4 probabilities of the luma intra prediction mode decoding
* tree and same as y_mode_probs in frame header
*/
- unsigned char y_mode_probs[4];
+ uint8_t y_mode_probs[4];
/*
* list of 3 probabilities of the chroma intra prediction mode decoding
* tree and same as uv_mode_probs in frame header
*/
- unsigned char uv_mode_probs[3];
+ uint8_t uv_mode_probs[3];
/*
* updated mv decoding probabilities and same as mv_probs in
* frame header
*/
- unsigned char mv_probs[2][19];
+ uint8_t mv_probs[2][19];
VABoolCoderContextVPX bool_coder_ctx;
@@ -172,31 +172,31 @@ typedef struct _VASliceParameterBufferVP8
/*
* number of bytes in the slice data buffer for the partitions
*/
- unsigned int slice_data_size;
+ uint32_t slice_data_size;
/*
* offset to the first byte of partition data (control partition)
*/
- unsigned int slice_data_offset;
+ uint32_t slice_data_offset;
/*
* see VA_SLICE_DATA_FLAG_XXX definitions
*/
- unsigned int slice_data_flag;
+ uint32_t slice_data_flag;
/*
* offset to the first bit of MB from the first byte of partition data(slice_data_offset)
*/
- unsigned int macroblock_offset;
+ uint32_t macroblock_offset;
/*
* Partitions
* (1<<log2_nbr_of_dct_partitions)+1, count both control partition (frame header) and toke partition
*/
- unsigned char num_of_partitions;
+ uint8_t num_of_partitions;
/*
* partition_size[0] is remaining bytes of control partition after parsed by application.
* exclude current byte for the remaining bits in bool_coder_ctx.
* exclude the uncompress data chunk since first_part_size 'excluding the uncompressed data chunk'
*/
- unsigned int partition_size[9];
+ uint32_t partition_size[9];
} VASliceParameterBufferVP8;
/**
@@ -215,7 +215,7 @@ typedef struct _VASliceParameterBufferVP8
*/
typedef struct _VAProbabilityDataBufferVP8
{
- unsigned char dct_coeff_probs[4][8][3][11];
+ uint8_t dct_coeff_probs[4][8][3][11];
} VAProbabilityDataBufferVP8;
/**
@@ -231,7 +231,7 @@ typedef struct _VAIQMatrixBufferVP8
* array first dimensional is segment and 2nd dimensional is Q index
* all Q indexs should be clipped to be range [0, 127]
*/
- unsigned short quantization_index[4][6];
+ uint16_t quantization_index[4][6];
} VAIQMatrixBufferVP8;
/**@}*/
diff --git a/va/va_enc_h264.h b/va/va_enc_h264.h
index 0feaf35..216f2ed 100644
--- a/va/va_enc_h264.h
+++ b/va/va_enc_h264.h
@@ -147,15 +147,15 @@ typedef enum {
*/
typedef struct _VAEncSequenceParameterBufferH264 {
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char seq_parameter_set_id;
+ uint8_t seq_parameter_set_id;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char level_idc;
+ uint8_t level_idc;
/** \brief Period between I frames. */
- unsigned int intra_period;
+ uint32_t intra_period;
/** \brief Period between IDR frames. */
- unsigned int intra_idr_period;
+ uint32_t intra_idr_period;
/** \brief Period between I/P frames. */
- unsigned int ip_period;
+ uint32_t ip_period;
/**
* \brief Initial bitrate set for this sequence in CBR or VBR modes.
*
@@ -167,98 +167,98 @@ typedef struct _VAEncSequenceParameterBufferH264 {
* The bitrate can be modified later on through
* #VAEncMiscParameterRateControl buffers.
*/
- unsigned int bits_per_second;
+ uint32_t bits_per_second;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int max_num_ref_frames;
+ uint32_t max_num_ref_frames;
/** \brief Picture width in macroblocks. */
- unsigned short picture_width_in_mbs;
+ uint16_t picture_width_in_mbs;
/** \brief Picture height in macroblocks. */
- unsigned short picture_height_in_mbs;
+ uint16_t picture_height_in_mbs;
union {
struct {
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int chroma_format_idc : 2;
+ uint32_t chroma_format_idc : 2;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int frame_mbs_only_flag : 1;
+ uint32_t frame_mbs_only_flag : 1;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int mb_adaptive_frame_field_flag : 1;
+ uint32_t mb_adaptive_frame_field_flag : 1;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int seq_scaling_matrix_present_flag : 1;
+ uint32_t seq_scaling_matrix_present_flag : 1;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int direct_8x8_inference_flag : 1;
+ uint32_t direct_8x8_inference_flag : 1;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int log2_max_frame_num_minus4 : 4;
+ uint32_t log2_max_frame_num_minus4 : 4;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int pic_order_cnt_type : 2;
+ uint32_t pic_order_cnt_type : 2;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int log2_max_pic_order_cnt_lsb_minus4 : 4;
+ uint32_t log2_max_pic_order_cnt_lsb_minus4 : 4;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int delta_pic_order_always_zero_flag : 1;
+ uint32_t delta_pic_order_always_zero_flag : 1;
} bits;
- unsigned int value;
+ uint32_t value;
} seq_fields;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char bit_depth_luma_minus8;
+ uint8_t bit_depth_luma_minus8;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char bit_depth_chroma_minus8;
+ uint8_t bit_depth_chroma_minus8;
/** if pic_order_cnt_type == 1 */
/**@{*/
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char num_ref_frames_in_pic_order_cnt_cycle;
+ uint8_t num_ref_frames_in_pic_order_cnt_cycle;
/** \brief Same as the H.264 bitstream syntax element. */
- int offset_for_non_ref_pic;
+ int32_t offset_for_non_ref_pic;
/** \brief Same as the H.264 bitstream syntax element. */
- int offset_for_top_to_bottom_field;
+ int32_t offset_for_top_to_bottom_field;
/** \brief Same as the H.264 bitstream syntax element. */
- int offset_for_ref_frame[256];
+ int32_t offset_for_ref_frame[256];
/**@}*/
/** @name Cropping (optional) */
/**@{*/
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char frame_cropping_flag;
+ uint8_t frame_cropping_flag;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int frame_crop_left_offset;
+ uint32_t frame_crop_left_offset;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int frame_crop_right_offset;
+ uint32_t frame_crop_right_offset;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int frame_crop_top_offset;
+ uint32_t frame_crop_top_offset;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int frame_crop_bottom_offset;
+ uint32_t frame_crop_bottom_offset;
/**@}*/
/** @name VUI parameters (optional) */
/**@{*/
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char vui_parameters_present_flag;
+ uint8_t vui_parameters_present_flag;
union {
struct {
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int aspect_ratio_info_present_flag : 1;
+ uint32_t aspect_ratio_info_present_flag : 1;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int timing_info_present_flag : 1;
+ uint32_t timing_info_present_flag : 1;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int bitstream_restriction_flag : 1;
+ uint32_t bitstream_restriction_flag : 1;
/** \brief Range: 0 to 16, inclusive. */
- unsigned int log2_max_mv_length_horizontal : 5;
+ uint32_t log2_max_mv_length_horizontal : 5;
/** \brief Range: 0 to 16, inclusive. */
- unsigned int log2_max_mv_length_vertical : 5;
+ uint32_t log2_max_mv_length_vertical : 5;
} bits;
- unsigned int value;
+ uint32_t value;
} vui_fields;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char aspect_ratio_idc;
+ uint8_t aspect_ratio_idc;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int sar_width;
+ uint32_t sar_width;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int sar_height;
+ uint32_t sar_height;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int num_units_in_tick;
+ uint32_t num_units_in_tick;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int time_scale;
+ uint32_t time_scale;
/**@}*/
} VAEncSequenceParameterBufferH264;
@@ -310,9 +310,9 @@ typedef struct _VAEncPictureParameterBufferH264 {
VABufferID coded_buf;
/** \brief The picture parameter set referred to in the slice header. */
- unsigned char pic_parameter_set_id;
+ uint8_t pic_parameter_set_id;
/** \brief The active sequence parameter set. Range: 0 to 31, inclusive. */
- unsigned char seq_parameter_set_id;
+ uint8_t seq_parameter_set_id;
/**
* \brief OR'd flags describing whether the picture is the last one or not.
@@ -321,55 +321,55 @@ typedef struct _VAEncPictureParameterBufferH264 {
* one in the stream or sequence. Otherwise, it is a combination of
* \ref H264_LAST_PICTURE_EOSEQ or \ref H264_LAST_PICTURE_EOSTREAM.
*/
- unsigned char last_picture;
+ uint8_t last_picture;
/** \brief The picture identifier.
* Range: 0 to \f$2^{log2\_max\_frame\_num\_minus4 + 4} - 1\f$, inclusive.
*/
- unsigned short frame_num;
+ uint16_t frame_num;
/** \brief \c pic_init_qp_minus26 + 26. */
- unsigned char pic_init_qp;
+ uint8_t pic_init_qp;
/** \brief Maximum reference index for reference picture list 0.
* Range: 0 to 31, inclusive.
*/
- unsigned char num_ref_idx_l0_active_minus1;
+ uint8_t num_ref_idx_l0_active_minus1;
/** \brief Maximum reference index for reference picture list 1.
* Range: 0 to 31, inclusive.
*/
- unsigned char num_ref_idx_l1_active_minus1;
+ uint8_t num_ref_idx_l1_active_minus1;
/** \brief Range: -12 to 12, inclusive. */
- signed char chroma_qp_index_offset;
+ int8_t chroma_qp_index_offset;
/** \brief Range: -12 to 12, inclusive. */
- signed char second_chroma_qp_index_offset;
+ int8_t second_chroma_qp_index_offset;
union {
struct {
/** \brief Is picture an IDR picture? */
- unsigned int idr_pic_flag : 1;
+ uint32_t idr_pic_flag : 1;
/** \brief Is picture a reference picture? */
- unsigned int reference_pic_flag : 2;
+ uint32_t reference_pic_flag : 2;
/** \brief Selects CAVLC (0) or CABAC (1) entropy coding mode. */
- unsigned int entropy_coding_mode_flag : 1;
+ uint32_t entropy_coding_mode_flag : 1;
/** \brief Is weighted prediction applied to P slices? */
- unsigned int weighted_pred_flag : 1;
+ uint32_t weighted_pred_flag : 1;
/** \brief Range: 0 to 2, inclusive. */
- unsigned int weighted_bipred_idc : 2;
+ uint32_t weighted_bipred_idc : 2;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int constrained_intra_pred_flag : 1;
+ uint32_t constrained_intra_pred_flag : 1;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int transform_8x8_mode_flag : 1;
+ uint32_t transform_8x8_mode_flag : 1;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int deblocking_filter_control_present_flag : 1;
+ uint32_t deblocking_filter_control_present_flag : 1;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int redundant_pic_cnt_present_flag : 1;
+ uint32_t redundant_pic_cnt_present_flag : 1;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int pic_order_present_flag : 1;
+ uint32_t pic_order_present_flag : 1;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned int pic_scaling_matrix_present_flag : 1;
+ uint32_t pic_scaling_matrix_present_flag : 1;
} bits;
- unsigned int value;
+ uint32_t value;
} pic_fields;
} VAEncPictureParameterBufferH264;
@@ -405,9 +405,9 @@ typedef struct _VAEncQPBufferH264 {
*/
typedef struct _VAEncSliceParameterBufferH264 {
/** \brief Starting MB address for this slice. */
- unsigned int macroblock_address;
+ uint32_t macroblock_address;
/** \brief Number of macroblocks in this slice. */
- unsigned int num_macroblocks;
+ uint32_t num_macroblocks;
/**
* \brief Per-MB encoder configuration buffer, or \c VA_INVALID_ID.
*
@@ -424,28 +424,28 @@ typedef struct _VAEncSliceParameterBufferH264 {
/** \brief Slice type.
* Range: 0..2, 5..7, i.e. no switching slices.
*/
- unsigned char slice_type;
+ uint8_t slice_type;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char pic_parameter_set_id;
+ uint8_t pic_parameter_set_id;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned short idr_pic_id;
+ uint16_t idr_pic_id;
/** @name If pic_order_cnt_type == 0 */
/**@{*/
/** \brief The picture order count modulo MaxPicOrderCntLsb. */
- unsigned short pic_order_cnt_lsb;
+ uint16_t pic_order_cnt_lsb;
/** \brief Valid if \c pic_order_present_flag and this is a bottom field. */
- int delta_pic_order_cnt_bottom;
+ int32_t delta_pic_order_cnt_bottom;
/**@}*/
/** @name If pic_order_cnt_type == 1 && !delta_pic_order_always_zero_flag */
/**@{*/
/** \brief [0]: top, [1]: bottom. */
- int delta_pic_order_cnt[2];
+ int32_t delta_pic_order_cnt[2];
/**@}*/
/** @name If slice_type == B */
/**@{*/
- unsigned char direct_spatial_mv_pred_flag;
+ uint8_t direct_spatial_mv_pred_flag;
/**@}*/
/** @name If slice_type == P */
@@ -455,15 +455,15 @@ typedef struct _VAEncSliceParameterBufferH264 {
* \ref _VAEncPictureParameterBufferH264::num_ref_idx_l1_active_minus1 are
* overriden by the values for this slice.
*/
- unsigned char num_ref_idx_active_override_flag;
+ uint8_t num_ref_idx_active_override_flag;
/** \brief Maximum reference index for reference picture list 0.
* Range: 0 to 31, inclusive.
*/
- unsigned char num_ref_idx_l0_active_minus1;
+ uint8_t num_ref_idx_l0_active_minus1;
/** \brief Maximum reference index for reference picture list 1.
* Range: 0 to 31, inclusive.
*/
- unsigned char num_ref_idx_l1_active_minus1;
+ uint8_t num_ref_idx_l1_active_minus1;
/** \brief Reference picture list 0 (for P slices). */
VAPictureH264 RefPicList0[32];
/** \brief Reference picture list 1 (for B slices). */
@@ -473,29 +473,29 @@ typedef struct _VAEncSliceParameterBufferH264 {
/** @name pred_weight_table() */
/**@{*/
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char luma_log2_weight_denom;
+ uint8_t luma_log2_weight_denom;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char chroma_log2_weight_denom;
+ uint8_t chroma_log2_weight_denom;
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char luma_weight_l0_flag;
+ uint8_t luma_weight_l0_flag;
/** \brief Same as the H.264 bitstream syntax element. */
signed short luma_weight_l0[32];
/** \brief Same as the H.264 bitstream syntax element. */
signed short luma_offset_l0[32];
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char chroma_weight_l0_flag;
+ uint8_t chroma_weight_l0_flag;
/** \brief Same as the H.264 bitstream syntax element. */
signed short chroma_weight_l0[32][2];
/** \brief Same as the H.264 bitstream syntax element. */
signed short chroma_offset_l0[32][2];
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char luma_weight_l1_flag;
+ uint8_t luma_weight_l1_flag;
/** \brief Same as the H.264 bitstream syntax element. */
signed short luma_weight_l1[32];
/** \brief Same as the H.264 bitstream syntax element. */
signed short luma_offset_l1[32];
/** \brief Same as the H.264 bitstream syntax element. */
- unsigned char chroma_weight_l1_flag;
+ uint8_t chroma_weight_l1_flag;
/** \brief Same as the H.264 bitstream syntax element. */
signed short chroma_weight_l1[32][2];
/** \brief Same as the H.264 bitstream syntax element. */
@@ -503,17 +503,17 @@ typedef struct _VAEncSliceParameterBufferH264 {
/**@}*/
/** \brief Range: 0 to 2, inclusive. */
- unsigned char cabac_init_idc;
+ uint8_t cabac_init_idc;
/** \brief Same as the H.264 bitstream syntax element. */
- signed char slice_qp_delta;
+ int8_t slice_qp_delta;
/** @name If deblocking_filter_control_present_flag */
/**@{*/
/** \brief Range: 0 to 2, inclusive. */
- unsigned char disable_deblocking_filter_idc;
+ uint8_t disable_deblocking_filter_idc;
/** \brief Same as the H.264 bitstream syntax element. */
- signed char slice_alpha_c0_offset_div2;
+ int8_t slice_alpha_c0_offset_div2;
/** \brief Same as the H.264 bitstream syntax element. */
- signed char slice_beta_offset_div2;
+ int8_t slice_beta_offset_div2;
/**@}*/
} VAEncSliceParameterBufferH264;
@@ -554,7 +554,7 @@ typedef struct _VAEncMacroblockParameterBufferH264 {
* If \ref qp is set to 0xff, then the actual value is derived
* from the slice-level value: \c pic_init_qp + \c slice_qp_delta.
*/
- unsigned char qp;
+ uint8_t qp;
union {
/** @name Data for intra macroblock */
@@ -569,7 +569,7 @@ typedef struct _VAEncMacroblockParameterBufferH264 {
* availability bits from the VME stage are overriden
* by the \ref pred_avail_flags hereunder.
*/
- unsigned int pred_avail_override_flag : 1;
+ uint32_t pred_avail_override_flag : 1;
/**
* \brief Bitwise representation of which macroblocks
* are available for intra prediction.
@@ -579,9 +579,9 @@ typedef struct _VAEncMacroblockParameterBufferH264 {
* See \ref api_enc_h264_mb_pred_avail_bits
* "macroblock neighbour availability" bit definitions.
*/
- unsigned int pred_avail_flags : 8;
+ uint32_t pred_avail_flags : 8;
} bits;
- unsigned int value;
+ uint32_t value;
} intra_fields;
/**@}*/
@@ -589,9 +589,9 @@ typedef struct _VAEncMacroblockParameterBufferH264 {
/**@{*/
union {
struct {
- unsigned int reserved;
+ uint32_t reserved;
} bits;
- unsigned int value;
+ uint32_t value;
} inter_fields;
/**@}*/
} info;
diff --git a/va/va_enc_jpeg.h b/va/va_enc_jpeg.h
index 3aba7ad..f43f0b6 100644
--- a/va/va_enc_jpeg.h
+++ b/va/va_enc_jpeg.h
@@ -53,9 +53,9 @@ typedef struct _VAEncPictureParameterBufferJPEG
/** \brief holds reconstructed picture. */
VASurfaceID reconstructed_picture;
/** \brief picture width. */
- unsigned short picture_width;
+ uint16_t picture_width;
/** \brief picture height. */
- unsigned short picture_height;
+ uint16_t picture_height;
/** \brief holds coded data. */
VABufferID coded_buf;
@@ -69,43 +69,43 @@ typedef struct _VAEncPictureParameterBufferJPEG
* \brief profile:
* 0 - Baseline, 1 - Extended, 2 - Lossless, 3 - Hierarchical
*/
- unsigned int profile : 2;
+ uint32_t profile : 2;
/**
* \brief progressive:
* 0 - sequential, 1 - extended, 2 - progressive
*/
- unsigned int progressive : 1;
+ uint32_t progressive : 1;
/**
* \brief huffman:
* 0 - arithmetic, 1 - huffman
*/
- unsigned int huffman : 1;
+ uint32_t huffman : 1;
/**
* \brief interleaved:
* 0 - non interleaved, 1 - interleaved
*/
- unsigned int interleaved : 1;
+ uint32_t interleaved : 1;
/**
* \brief differential:
* 0 - non differential, 1 - differential
*/
- unsigned int differential : 1;
+ uint32_t differential : 1;
} bits;
- unsigned int value;
+ uint32_t value;
} pic_flags;
/** \brief number of bits per sample. */
- unsigned char sample_bit_depth;
+ uint8_t sample_bit_depth;
/** \brief total number of scans in image. */
- unsigned char num_scan;
+ uint8_t num_scan;
/** \brief number of image components in frame. */
- unsigned short num_components;
+ uint16_t num_components;
/** \brief Component identifier (Ci). */
- unsigned char component_id[4];
+ uint8_t component_id[4];
/** \brief Quantization table selector (Tqi). */
- unsigned char quantiser_table_selector[4];
+ uint8_t quantiser_table_selector[4];
/** \brief number from 1 to 100 that specifies quality of image. */
- unsigned char quality;
+ uint8_t quality;
} VAEncPictureParameterBufferJPEG;
@@ -118,16 +118,16 @@ typedef struct _VAEncPictureParameterBufferJPEG
*/
typedef struct _VAEncSliceParameterBufferJPEG {
/** \brief Restart interval definition (Ri). */
- unsigned short restart_interval;
+ uint16_t restart_interval;
/** \brief number of image components in a scan. */
- unsigned short num_components;
+ uint16_t num_components;
struct {
/** \brief Scan component selector (Csj). */
- unsigned char component_selector;
+ uint8_t component_selector;
/** \brief DC entropy coding table selector (Tdj). */
- unsigned char dc_table_selector;
+ uint8_t dc_table_selector;
/** \brief AC entropy coding table selector (Taj). */
- unsigned char ac_table_selector;
+ uint8_t ac_table_selector;
} components[4];
} VAEncSliceParameterBufferJPEG;
@@ -138,13 +138,13 @@ typedef struct _VAEncSliceParameterBufferJPEG {
typedef struct _VAQMatrixBufferJPEG
{
/** \brief load luma quantization table. */
- int load_lum_quantiser_matrix;
+ int32_t load_lum_quantiser_matrix;
/** \brief load chroma quantization table. */
- int load_chroma_quantiser_matrix;
+ int32_t load_chroma_quantiser_matrix;
/** \brief luma quantization table. */
- unsigned char lum_quantiser_matrix[64];
+ uint8_t lum_quantiser_matrix[64];
/** \brief chroma quantization table. */
- unsigned char chroma_quantiser_matrix[64];
+ uint8_t chroma_quantiser_matrix[64];
} VAQMatrixBufferJPEG;
/**@}*/
diff --git a/va/va_enc_mpeg2.h b/va/va_enc_mpeg2.h
index c12c8de..5cd632d 100644
--- a/va/va_enc_mpeg2.h
+++ b/va/va_enc_mpeg2.h
@@ -89,9 +89,9 @@ typedef enum {
*/
typedef struct _VAEncSequenceParameterBufferMPEG2 {
/** \brief Period between I frames. */
- unsigned int intra_period;
+ uint32_t intra_period;
/** \brief Period between I/P frames. */
- unsigned int ip_period;
+ uint32_t ip_period;
/** \brief Picture width.
*
* A 14bits unsigned inter, the lower 12bits
@@ -99,7 +99,7 @@ typedef struct _VAEncSequenceParameterBufferMPEG2 {
* 2bits is \c horizontal_size_extension
*
*/
- unsigned short picture_width;
+ uint16_t picture_width;
/** \brief Picture height.
*
* A 14bits unsigned inter, the lower 12bits
@@ -107,7 +107,7 @@ typedef struct _VAEncSequenceParameterBufferMPEG2 {
* vertical_size_size_extension
*
*/
- unsigned short picture_height;
+ uint16_t picture_height;
/**
* \brief Initial bitrate set for this sequence in CBR or VBR modes.
*
@@ -119,7 +119,7 @@ typedef struct _VAEncSequenceParameterBufferMPEG2 {
* bits_per_second may be derived from bit_rate.
*
*/
- unsigned int bits_per_second;
+ uint32_t bits_per_second;
/**
* \brief Frame rate
*
@@ -129,41 +129,41 @@ typedef struct _VAEncSequenceParameterBufferMPEG2 {
*/
float frame_rate;
/** \brief Same as the element in sequence_header() */
- unsigned short aspect_ratio_information;
+ uint16_t aspect_ratio_information;
/** \brief Define the size of VBV */
- unsigned int vbv_buffer_size;
+ uint32_t vbv_buffer_size;
union {
struct {
/** \brief Same as the element in Sequence extension() */
- unsigned int profile_and_level_indication : 8;
+ uint32_t profile_and_level_indication : 8;
/** \brief Same as the element in Sequence extension() */
- unsigned int progressive_sequence : 1;
+ uint32_t progressive_sequence : 1;
/** \brief Same as the element in Sequence extension() */
- unsigned int chroma_format : 2;
+ uint32_t chroma_format : 2;
/** \brief Same as the element in Sequence extension() */
- unsigned int low_delay : 1;
+ uint32_t low_delay : 1;
/** \brief Same as the element in Sequence extension() */
- unsigned int frame_rate_extension_n : 2;
+ uint32_t frame_rate_extension_n : 2;
/** \brief Same as the element in Sequence extension() */
- unsigned int frame_rate_extension_d : 5;
+ uint32_t frame_rate_extension_d : 5;
} bits;
- unsigned int value;
+ uint32_t value;
} sequence_extension;
/** \brief Flag to indicate the following GOP header are being updated */
- unsigned int new_gop_header;
+ uint32_t new_gop_header;
union {
struct {
/** \brief Time code */
- unsigned int time_code : 25;
+ uint32_t time_code : 25;
/** \brief Same as the element in GOP header */
- unsigned int closed_gop : 1;
+ uint32_t closed_gop : 1;
/** \brief SAme as the element in GOP header */
- unsigned int broken_link : 1;
+ uint32_t broken_link : 1;
} bits;
- unsigned int value;
+ uint32_t value;
} gop_header;
} VAEncSequenceParameterBufferMPEG2;
@@ -205,41 +205,41 @@ typedef struct _VAEncPictureParameterBufferMPEG2 {
* the last one in the stream. Otherwise, it
* is \ref MPEG2_LAST_PICTURE_EOSTREAM.
*/
- unsigned char last_picture;
+ uint8_t last_picture;
/** \brief Picture type */
VAEncPictureType picture_type;
/** \brief Same as the element in picture_header() */
- unsigned int temporal_reference;
+ uint32_t temporal_reference;
/** \brief Same as the element in picture_header() */
- unsigned int vbv_delay;
+ uint32_t vbv_delay;
/** \brief Same as the element in Picture coding extension */
- unsigned char f_code[2][2];
+ uint8_t f_code[2][2];
union {
struct {
/** \brief Same as the element in Picture coding extension */
- unsigned int intra_dc_precision : 2;
+ uint32_t intra_dc_precision : 2;
/** \brief Same as the element in Picture coding extension */
- unsigned int picture_structure : 2;
+ uint32_t picture_structure : 2;
/** \brief Same as the element in Picture coding extension */
- unsigned int top_field_first : 1;
+ uint32_t top_field_first : 1;
/** \brief Same as the element in Picture coding extension */
- unsigned int frame_pred_frame_dct : 1;
+ uint32_t frame_pred_frame_dct : 1;
/** \brief Same as the element in Picture coding extension */
- unsigned int concealment_motion_vectors : 1;
+ uint32_t concealment_motion_vectors : 1;
/** \brief Same as the element in Picture coding extension */
- unsigned int q_scale_type : 1;
+ uint32_t q_scale_type : 1;
/** \brief Same as the element in Picture coding extension */
- unsigned int intra_vlc_format : 1;
+ uint32_t intra_vlc_format : 1;
/** \brief Same as the element in Picture coding extension */
- unsigned int alternate_scan : 1;
+ uint32_t alternate_scan : 1;
/** \brief Same as the element in Picture coding extension */
- unsigned int repeat_first_field : 1;
+ uint32_t repeat_first_field : 1;
/** \brief Same as the element in Picture coding extension */
- unsigned int progressive_frame : 1;
+ uint32_t progressive_frame : 1;
/** \brief Same as the element in Picture coding extension */
- unsigned int composite_display_flag : 1;
+ uint32_t composite_display_flag : 1;
} bits;
- unsigned int value;
+ uint32_t value;
} picture_coding_extension;
/* \brief Parameters for composite display
@@ -249,17 +249,17 @@ typedef struct _VAEncPictureParameterBufferMPEG2 {
union {
struct {
/** \brief Same as the element in Picture coding extension */
- unsigned int v_axis : 1;
+ uint32_t v_axis : 1;
/** \brief Same as the element in Picture coding extension */
- unsigned int field_sequence : 3;
+ uint32_t field_sequence : 3;
/** \brief Same as the element in Picture coding extension */
- unsigned int sub_carrier : 1;
+ uint32_t sub_carrier : 1;
/** \brief Same as the element in Picture coding extension */
- unsigned int burst_amplitude : 7;
+ uint32_t burst_amplitude : 7;
/** \brief Same as the element in Picture coding extension */
- unsigned int sub_carrier_phase : 8;
+ uint32_t sub_carrier_phase : 8;
} bits;
- unsigned int value;
+ uint32_t value;
} composite_display;
} VAEncPictureParameterBufferMPEG2;
@@ -269,13 +269,13 @@ typedef struct _VAEncPictureParameterBufferMPEG2 {
*/
typedef struct _VAEncSliceParameterBufferMPEG2 {
/** \brief Starting MB address for this slice. */
- unsigned int macroblock_address;
+ uint32_t macroblock_address;
/** \brief Number of macroblocks in this slice. */
- unsigned int num_macroblocks;
+ uint32_t num_macroblocks;
/** \brief Same as the element in slice() */
- int quantiser_scale_code;
+ int32_t quantiser_scale_code;
/** \brief Flag to indicate intra slice */
- int is_intra_slice;
+ int32_t is_intra_slice;
} VAEncSliceParameterBufferMPEG2;
/**@}*/
diff --git a/va/va_enc_vp8.h b/va/va_enc_vp8.h
index d294042..d03a5e8 100644
--- a/va/va_enc_vp8.h
+++ b/va/va_enc_vp8.h
@@ -51,22 +51,22 @@ extern "C" {
typedef struct _VAEncSequenceParameterBufferVP8
{
/* frame width in pixels */
- unsigned int frame_width;
+ uint32_t frame_width;
/* frame height in pixels */
- unsigned int frame_height;
+ uint32_t frame_height;
/* horizontal scale */
- unsigned int frame_width_scale;
+ uint32_t frame_width_scale;
/* vertical scale */
- unsigned int frame_height_scale;
+ uint32_t frame_height_scale;
/* whether to enable error resilience features */
- unsigned int error_resilient;
+ uint32_t error_resilient;
/* auto keyframe placement, non-zero means enable auto keyframe placement */
- unsigned int kf_auto;
+ uint32_t kf_auto;
/* keyframe minimum interval */
- unsigned int kf_min_dist;
+ uint32_t kf_min_dist;
/* keyframe maximum interval */
- unsigned int kf_max_dist;
+ uint32_t kf_max_dist;
/* RC related fields. RC modes are set with VAConfigAttribRateControl */
@@ -83,9 +83,9 @@ typedef struct _VAEncSequenceParameterBufferVP8
* The bitrate can be modified later on through
* #VAEncMiscParameterRateControl buffers.
*/
- unsigned int bits_per_second;
+ uint32_t bits_per_second;
/* Period between I frames. */
- unsigned int intra_period;
+ uint32_t intra_period;
/* reference and reconstructed frame buffers
* Used for driver auto reference management when configured through
@@ -121,35 +121,35 @@ typedef struct _VAEncPictureParameterBufferVP8
union {
struct {
/* force this frame to be a keyframe */
- unsigned int force_kf : 1;
+ uint32_t force_kf : 1;
/* don't reference the last frame */
- unsigned int no_ref_last : 1;
+ uint32_t no_ref_last : 1;
/* don't reference the golden frame */
- unsigned int no_ref_gf : 1;
+ uint32_t no_ref_gf : 1;
/* don't reference the alternate reference frame */
- unsigned int no_ref_arf : 1;
- unsigned int reserved : 28;
+ uint32_t no_ref_arf : 1;
+ uint32_t reserved : 28;
} bits;
- unsigned int value;
+ uint32_t value;
} ref_flags;
union {
struct {
/* version */
- unsigned int frame_type : 1;
- unsigned int version : 3;
+ uint32_t frame_type : 1;
+ uint32_t version : 3;
/* show_frame */
- unsigned int show_frame : 1;
+ uint32_t show_frame : 1;
/* color_space */
- unsigned int color_space : 1;
+ uint32_t color_space : 1;
/* 0: bicubic, 1: bilinear, other: none */
- unsigned int recon_filter_type : 2;
+ uint32_t recon_filter_type : 2;
/* 0: no loop fitler, 1: simple loop filter */
- unsigned int loop_filter_type : 2;
+ uint32_t loop_filter_type : 2;
/* 0: disabled, 1: normal, 2: simple */
- unsigned int auto_partitions : 1;
+ uint32_t auto_partitions : 1;
/* same as log2_nbr_of_dct_partitions in frame header syntax */
- unsigned int num_token_partitions : 2;
+ uint32_t num_token_partitions : 2;
/**
* The following fields correspond to the same VP8 syntax elements
@@ -159,67 +159,67 @@ typedef struct _VAEncPictureParameterBufferVP8
* 0: clamping of reconstruction pixels is disabled,
* 1: clamping enabled.
*/
- unsigned int clamping_type : 1;
+ uint32_t clamping_type : 1;
/* indicate segmentation is enabled for the current frame. */
- unsigned int segmentation_enabled : 1;
+ uint32_t segmentation_enabled : 1;
/**
* Determines if the MB segmentation map is updated in the current
* frame.
*/
- unsigned int update_mb_segmentation_map : 1;
+ uint32_t update_mb_segmentation_map : 1;
/**
* Indicates if the segment feature data is updated in the current
* frame.
*/
- unsigned int update_segment_feature_data : 1;
+ uint32_t update_segment_feature_data : 1;
/**
* indicates if the MB level loop filter adjustment is enabled for
* the current frame (0 off, 1 on).
*/
- unsigned int loop_filter_adj_enable : 1;
+ uint32_t loop_filter_adj_enable : 1;
/**
* Determines whether updated token probabilities are used only for
* this frame or until further update.
* It may be used by application to enable error resilient mode.
* In this mode probability updates are allowed only at Key Frames.
*/
- unsigned int refresh_entropy_probs : 1;
+ uint32_t refresh_entropy_probs : 1;
/**
* Determines if the current decoded frame refreshes the golden frame.
*/
- unsigned int refresh_golden_frame : 1;
+ uint32_t refresh_golden_frame : 1;
/**
* Determines if the current decoded frame refreshes the alternate
* reference frame.
*/
- unsigned int refresh_alternate_frame : 1;
+ uint32_t refresh_alternate_frame : 1;
/**
* Determines if the current decoded frame refreshes the last frame
* reference buffer.
*/
- unsigned int refresh_last : 1;
+ uint32_t refresh_last : 1;
/**
* Determines if the golden reference is replaced by another reference.
*/
- unsigned int copy_buffer_to_golden : 2;
+ uint32_t copy_buffer_to_golden : 2;
/**
* Determines if the alternate reference is replaced by another reference.
*/
- unsigned int copy_buffer_to_alternate : 2;
+ uint32_t copy_buffer_to_alternate : 2;
/**
* Controls the sign of motion vectors when the golden frame is referenced.
*/
- unsigned int sign_bias_golden : 1;
+ uint32_t sign_bias_golden : 1;
/**
* Controls the sign of motion vectors when the alternate frame is
* referenced.
*/
- unsigned int sign_bias_alternate : 1;
+ uint32_t sign_bias_alternate : 1;
/**
* Enables or disables the skipping of macroblocks containing no
* non-zero coefficients.
*/
- unsigned int mb_no_coeff_skip : 1;
+ uint32_t mb_no_coeff_skip : 1;
/**
* Enforces unconditional per-MB loop filter delta update setting frame
* header flags mode_ref_lf_delta_update, all mb_mode_delta_update_flag[4],
@@ -229,10 +229,10 @@ typedef struct _VAEncPictureParameterBufferVP8
* correct decoding from the next key frame.
* Encoder application is advised to set this flag to 1 at key frames.
*/
- unsigned int forced_lf_adjustment : 1;
- unsigned int reserved : 2;
+ uint32_t forced_lf_adjustment : 1;
+ uint32_t reserved : 2;
} bits;
- unsigned int value;
+ uint32_t value;
} pic_flags;
/**
@@ -241,34 +241,34 @@ typedef struct _VAEncPictureParameterBufferVP8
* When segmentation is disabled, use entry 0.
* When loop_filter_level is 0, loop filter shall be disabled.
*/
- char loop_filter_level[4];
+ int8_t loop_filter_level[4];
/**
* Contains a list of 4 delta values for reference frame based MB-level
* loop filter adjustment.
* If no update, then set to 0.
*/
- char ref_lf_delta[4];
+ int8_t ref_lf_delta[4];
/**
* Contains a list of 4 delta values for coding mode based MB-level loop
* filter adjustment.
* If no update, then set to 0.
*/
- char mode_lf_delta[4];
+ int8_t mode_lf_delta[4];
/**
* Controls the deblocking filter sensitivity.
* Corresponds to the same VP8 syntax element in frame header.
*/
- unsigned char sharpness_level;
+ uint8_t sharpness_level;
/**
* Application supplied maximum clamp value for Qindex used in quantization.
* Qindex will not be allowed to exceed this value.
* It has a valid range [0..127] inclusive.
*/
- unsigned char clamp_qindex_high;
+ uint8_t clamp_qindex_high;
/**
* Application supplied minimum clamp value for Qindex used in quantization.
@@ -277,7 +277,7 @@ typedef struct _VAEncPictureParameterBufferVP8
* Condition clamp_qindex_low <= clamp_qindex_high must be guaranteed,
* otherwise they are ignored.
*/
- unsigned char clamp_qindex_low;
+ uint8_t clamp_qindex_low;
} VAEncPictureParameterBufferVP8;
@@ -297,11 +297,11 @@ typedef struct _VAEncMBMapBufferVP8
* number of MBs in the frame.
* It is also the number of entries of mb_segment_id[];
*/
- unsigned int num_mbs;
+ uint32_t num_mbs;
/**
* per MB Segmentation ID Buffer
*/
- unsigned char *mb_segment_id;
+ uint8_t *mb_segment_id;
} VAEncMBMapBufferVP8;
@@ -315,8 +315,8 @@ typedef struct _VAEncMBMapBufferVP8
*/
typedef struct _VAQMatrixBufferVP8
{
- unsigned short quantization_index[4];
- short quantization_index_delta[5];
+ uint16_t quantization_index[4];
+ int16_t quantization_index_delta[5];
} VAQMatrixBufferVP8;
diff --git a/va/va_vpp.h b/va/va_vpp.h
index 082f1d5..60c274a 100644
--- a/va/va_vpp.h
+++ b/va/va_vpp.h
@@ -339,21 +339,21 @@ typedef enum _VAProcColorStandardType {
/** \brief Video processing pipeline capabilities. */
typedef struct _VAProcPipelineCaps {
/** \brief Pipeline flags. See VAProcPipelineParameterBuffer::pipeline_flags. */
- unsigned int pipeline_flags;
+ uint32_t pipeline_flags;
/** \brief Extra filter flags. See VAProcPipelineParameterBuffer::filter_flags. */
- unsigned int filter_flags;
+ uint32_t filter_flags;
/** \brief Number of forward reference frames that are needed. */
- unsigned int num_forward_references;
+ uint32_t num_forward_references;
/** \brief Number of backward reference frames that are needed. */
- unsigned int num_backward_references;
+ uint32_t num_backward_references;
/** \brief List of color standards supported on input. */
VAProcColorStandardType *input_color_standards;
/** \brief Number of elements in \ref input_color_standards array. */
- unsigned int num_input_color_standards;
+ uint32_t num_input_color_standards;
/** \brief List of color standards supported on output. */
VAProcColorStandardType *output_color_standards;
/** \brief Number of elements in \ref output_color_standards array. */
- unsigned int num_output_color_standards;
+ uint32_t num_output_color_standards;
} VAProcPipelineCaps;
/** \brief Specification of values supported by the filter. */
@@ -448,7 +448,7 @@ typedef struct _VAProcPipelineParameterBuffer {
* appropriate background color. Next, the driver will blend this
* temporary surface into the target surface.
*/
- unsigned int output_background_color;
+ uint32_t output_background_color;
/**
* \brief Requested output color primaries.
*/
@@ -460,7 +460,7 @@ typedef struct _VAProcPipelineParameterBuffer {
* or not, notify the driver that it can opt for power optimizations,
* should this be needed.
*/
- unsigned int pipeline_flags;
+ uint32_t pipeline_flags;
/**
* \brief Extra filter flags. See vaPutSurface() flags.
*
@@ -477,7 +477,7 @@ typedef struct _VAProcPipelineParameterBuffer {
* - Scaling: \c VA_FILTER_SCALING_DEFAULT, \c VA_FILTER_SCALING_FAST,
* \c VA_FILTER_SCALING_HQ, \c VA_FILTER_SCALING_NL_ANAMORPHIC.
*/
- unsigned int filter_flags;
+ uint32_t filter_flags;
/**
* \brief Array of filters to apply to the surface.
*
@@ -492,15 +492,15 @@ typedef struct _VAProcPipelineParameterBuffer {
*/
VABufferID *filters;
/** \brief Actual number of filters. */
- unsigned int num_filters;
+ uint32_t num_filters;
/** \brief Array of forward reference frames. */
VASurfaceID *forward_references;
/** \brief Number of forward reference frames that were supplied. */
- unsigned int num_forward_references;
+ uint32_t num_forward_references;
/** \brief Array of backward reference frames. */
VASurfaceID *backward_references;
/** \brief Number of backward reference frames that were supplied. */
- unsigned int num_backward_references;
+ uint32_t num_backward_references;
} VAProcPipelineParameterBuffer;
/**
@@ -554,7 +554,7 @@ typedef struct _VAProcFilterParameterBufferDeinterlacing {
/** \brief Deinterlacing algorithm. */
VAProcDeinterlacingType algorithm;
/** \brief Deinterlacing flags. */
- unsigned int flags;
+ uint32_t flags;
} VAProcFilterParameterBufferDeinterlacing;
/**