Skip to main content

VAEncSliceParameterBufferH264

Type Alias VAEncSliceParameterBufferH264 

Source
pub type VAEncSliceParameterBufferH264 = _VAEncSliceParameterBufferH264;
Expand description

\brief Slice parameter for H.264 encoding in baseline, main & high profiles.

This structure holds information for \c slice_layer_without_partitioning_rbsp() as defined by the H.264 specification.

If packed slice headers mode is used, i.e. if the encoding pipeline was configured with the #VA_ENC_PACKED_HEADER_SLICE flag, then the driver expects two more buffers to be provided to the same \c vaRenderPicture() as this buffer:

  • a #VAEncPackedHeaderParameterBuffer with type set to VAEncPackedHeaderType::VAEncPackedHeaderSlice ;
  • a #VAEncPackedHeaderDataBuffer which holds the actual packed header data.

If per-macroblock encoder configuration is needed, \c macroblock_info references a buffer of type #VAEncMacroblockParameterBufferH264. This buffer is not passed to vaRenderPicture() and it can be re-used without re-allocating the whole buffer.

Aliased Type§

#[repr(C)]
pub struct VAEncSliceParameterBufferH264 {
Show 35 fields pub macroblock_address: u32, pub num_macroblocks: u32, pub macroblock_info: u32, pub slice_type: u8, pub pic_parameter_set_id: u8, pub idr_pic_id: u16, pub pic_order_cnt_lsb: u16, pub delta_pic_order_cnt_bottom: i32, pub delta_pic_order_cnt: [i32; 2], pub direct_spatial_mv_pred_flag: u8, pub num_ref_idx_active_override_flag: u8, pub num_ref_idx_l0_active_minus1: u8, pub num_ref_idx_l1_active_minus1: u8, pub RefPicList0: [_VAPictureH264; 32], pub RefPicList1: [_VAPictureH264; 32], pub luma_log2_weight_denom: u8, pub chroma_log2_weight_denom: u8, pub luma_weight_l0_flag: u8, pub luma_weight_l0: [i16; 32], pub luma_offset_l0: [i16; 32], pub chroma_weight_l0_flag: u8, pub chroma_weight_l0: [[i16; 2]; 32], pub chroma_offset_l0: [[i16; 2]; 32], pub luma_weight_l1_flag: u8, pub luma_weight_l1: [i16; 32], pub luma_offset_l1: [i16; 32], pub chroma_weight_l1_flag: u8, pub chroma_weight_l1: [[i16; 2]; 32], pub chroma_offset_l1: [[i16; 2]; 32], pub cabac_init_idc: u8, pub slice_qp_delta: i8, pub disable_deblocking_filter_idc: u8, pub slice_alpha_c0_offset_div2: i8, pub slice_beta_offset_div2: i8, pub va_reserved: [u32; 4],
}

Fields§

§macroblock_address: u32

\brief Starting MB address for this slice.

§num_macroblocks: u32

\brief Number of macroblocks in this slice.

§macroblock_info: u32

\brief Per-MB encoder configuration buffer, or \c VA_INVALID_ID.

If per-MB encoder configuration is needed, then \ref macroblock_info references a buffer of type #VAEncMacroblockParameterBufferH264 (\c VAEncMacroblockParameterBufferType). Otherwise, buffer id is set to \c VA_INVALID_ID and per-MB configuration is derived from this slice parameter.

The \c macroblock_info buffer must hold \ref num_macroblocks elements.

§slice_type: u8

\brief Slice type. Range: 0..2, 5..7, i.e. no switching slices.

§pic_parameter_set_id: u8

\brief Same as the H.264 bitstream syntax element.

§idr_pic_id: u16

\brief Same as the H.264 bitstream syntax element.

§pic_order_cnt_lsb: u16

@name If pic_order_cnt_type == 0 / /**@{/ /** \brief The picture order count modulo MaxPicOrderCntLsb.

§delta_pic_order_cnt_bottom: i32

\brief Valid if \c pic_order_present_flag and this is a bottom field.

§delta_pic_order_cnt: [i32; 2]

@}*/ /** @name If pic_order_cnt_type == 1 && !delta_pic_order_always_zero_flag / /**@{/ /** \brief [0]: top, [1]: bottom.

§direct_spatial_mv_pred_flag: u8

@name If slice_type == B */ /**@{

§num_ref_idx_active_override_flag: u8

@name If slice_type == P / /**@{/ /** \brief Specifies if \ref _VAEncPictureParameterBufferH264::num_ref_idx_l0_active_minus1 or \ref _VAEncPictureParameterBufferH264::num_ref_idx_l1_active_minus1 are overriden by the values for this slice.

§num_ref_idx_l0_active_minus1: u8

\brief Maximum reference index for reference picture list 0. Range: 0 to 31, inclusive.

§num_ref_idx_l1_active_minus1: u8

\brief Maximum reference index for reference picture list 1. Range: 0 to 31, inclusive.

§RefPicList0: [_VAPictureH264; 32]

\brief Reference picture list 0 (for P slices).

§RefPicList1: [_VAPictureH264; 32]

\brief Reference picture list 1 (for B slices).

§luma_log2_weight_denom: u8

@name pred_weight_table() / /**@{/ /** \brief Same as the H.264 bitstream syntax element.

§chroma_log2_weight_denom: u8

\brief Same as the H.264 bitstream syntax element.

§luma_weight_l0_flag: u8

\brief Same as the H.264 bitstream syntax element.

§luma_weight_l0: [i16; 32]

\brief Same as the H.264 bitstream syntax element.

§luma_offset_l0: [i16; 32]

\brief Same as the H.264 bitstream syntax element.

§chroma_weight_l0_flag: u8

\brief Same as the H.264 bitstream syntax element.

§chroma_weight_l0: [[i16; 2]; 32]

\brief Same as the H.264 bitstream syntax element.

§chroma_offset_l0: [[i16; 2]; 32]

\brief Same as the H.264 bitstream syntax element.

§luma_weight_l1_flag: u8

\brief Same as the H.264 bitstream syntax element.

§luma_weight_l1: [i16; 32]

\brief Same as the H.264 bitstream syntax element.

§luma_offset_l1: [i16; 32]

\brief Same as the H.264 bitstream syntax element.

§chroma_weight_l1_flag: u8

\brief Same as the H.264 bitstream syntax element.

§chroma_weight_l1: [[i16; 2]; 32]

\brief Same as the H.264 bitstream syntax element.

§chroma_offset_l1: [[i16; 2]; 32]

\brief Same as the H.264 bitstream syntax element.

§cabac_init_idc: u8

\brief Range: 0 to 2, inclusive.

§slice_qp_delta: i8

\brief Same as the H.264 bitstream syntax element.

§disable_deblocking_filter_idc: u8

@name If deblocking_filter_control_present_flag / /**@{/ /** \brief Range: 0 to 2, inclusive.

§slice_alpha_c0_offset_div2: i8

\brief Same as the H.264 bitstream syntax element.

§slice_beta_offset_div2: i8

\brief Same as the H.264 bitstream syntax element.

§va_reserved: [u32; 4]

\brief Reserved bytes for future use, must be zero