VA-API  2.17.0.1
Public Attributes | List of all members
VAEncPictureParameterBufferAV1 Struct Reference

AV1 Encoding Picture Parameter Buffer Structure. More...

#include <va_enc_av1.h>

Public Attributes

uint16_t frame_width_minus_1
 AV1 encoder may support SupRes and dynamic scaling function. For SupRes, underline encoder is responsible to do downscaling. For dynamic scaling, app should provide the scaled raw source. More...
 
uint16_t frame_height_minus_1
 Raw source frame height in pixels.
 
VASurfaceID reconstructed_frame
 Surface to store reconstructed frame, not used for enc only case.
 
VABufferID coded_buf
 Buffer to store coded data.
 
VASurfaceID reference_frames [8]
 Reference frame buffers. Each entry of the array specifies the surface index of the picture that is referred by current picture or will be referred by any future picture. The valid entries take value from 0 to 127, inclusive. Non-valid entries, those do not point to pictures which are referred by current picture or future pictures, should take value 0xFF. Other values are not allowed. More...
 
uint8_t ref_frame_idx [7]
 Reference index list. Contains a list of indices into refernce_frames[]. Indice with refernce frames range: [LAST_FRAME - LAST_FRAME, LAST2_FRAME - LAST_FRAME, ..., ALTREF2_FRAME - LAST_FRAME]. #define LAST_FRAME 1 #define LAST2_FRAME 2 #define LAST3_FRAME 3 #define GOLDEN_FRAME 4 #define BWDREF_FRAME 5 #define ALTREF_FRAME 6 #define ALTREF2_FRAME 7 value range [0..7].
 
uint8_t hierarchical_level_plus1
 When hierarchical_level_plus1 > 0, hierarchical_level_plus1-1 indicates the current frame's level. If VAEncMiscParameterTemporalLayerStructure is valid (number_of_layers >0), hierarchical_level_plus1 shouldn't larger than number_of_layers.
 
uint8_t primary_ref_frame
 primary reference frame. Index into reference_frames[] segment id map, context table, etc. come from the reference frame pointed by this index. value range [0..7].
 
uint8_t order_hint
 Corresponds to AV1 syntax element of the same name.
 
uint8_t refresh_frame_flags
 Corresponds to AV1 syntax element of the same name.
 
uint8_t reserved8bits1
 Reserved bytes for future use, must be zero.
 
VARefFrameCtrlAV1 ref_frame_ctrl_l0
 Suggest which frames to be used as references. see struct #VARefFrameCtrl for details.
 
uint8_t seg_id_block_size
 Block size for each Segment ID in Segment Map. 0: 16x16 block size, default value; 1: 32x32 block size; 2: 64x64 block size; 3: 8x8 block size.
 
uint8_t num_tile_groups_minus1
 Number of tile groups minus 1. value range [0..255].
 
uint8_t temporal_id
 Temporal id of the frame. More...
 
uint8_t filter_level [2]
 Deblock filter parameters. value range [0..63].
 
uint8_t superres_scale_denominator
 Super resolution scale denominator. value range [9..16].
 
uint8_t interpolation_filter
 Corresponds to AV1 syntax element of the same name.
 
int8_t ref_deltas [8]
 Loop filter ref deltas. value range [-63..63].
 
int8_t mode_deltas [2]
 Loop filter mode deltas. value range [-63..63].
 
uint8_t base_qindex
 Quantization params.
 
uint8_t min_base_qindex
 Min value for base q index for BRC. value range [1..255].
 
uint8_t max_base_qindex
 Max value for base q index for BRC. value range [1..255].
 
union {
qmatrix_flags
 Quantization matrix.
 
uint16_t reserved16bits1
 Reserved bytes for future use, must be zero.
 
VAEncSegParamAV1 segments
 Segmentation parameters.
 
uint8_t tile_cols
 Number of tile columns.
 
uint8_t tile_rows
 Number of tile rows.
 
uint16_t reserved16bits2
 Reserved bytes for future use, must be zero.
 
uint16_t width_in_sbs_minus_1 [63]
 The last tile column or row size needs to be derived.
 
uint16_t context_update_tile_id
 specify which tile to use for the CDF update. value range [0..127]
 
uint8_t cdef_damping_minus_3
 Corresponds to AV1 syntax element of the same name. value range [0..3].
 
uint8_t cdef_bits
 Corresponds to AV1 syntax element of the same name. value range [0..3].
 
uint8_t cdef_y_strengths [8]
 CDEF Y strengths. value range [0..63].
 
uint8_t cdef_uv_strengths [8]
 CDEF UV strengths. value range [0..63].
 
VAEncWarpedMotionParamsAV1 wm [7]
 Global motion.
 
uint32_t bit_offset_qindex
 
uint32_t bit_offset_segmentation
 
uint32_t bit_offset_loopfilter_params
 
uint32_t bit_offset_cdef_params
 
uint32_t size_in_bits_cdef_params
 
uint32_t byte_offset_frame_hdr_obu_size
 
uint32_t size_in_bits_frame_hdr_obu
 
union {
tile_group_obu_hdr_info
 Tile Group OBU header.
 
uint8_t number_skip_frames
 The number of frames skipped prior to the current frame. It includes only the skipped frames that were not counted before. App may generate the "show_existing_frame" short frame header OBUs and send to driver with the next frame. Default value 0.
 
uint16_t reserved16bits3
 Reserved bytes for future use, must be zero.
 
int32_t skip_frames_reduced_size
 Indicates the application forced frame size change in bytes. When the value is positive, the frame size is reduced. Otherwise, the frame size increases. The parameter can be used when application skips frames with setting of NumSkipFrames. And application can also use it for other scenarios such as inserting "show_existing_frame" at very end of the sequence.
 
uint32_t va_reserved [VA_PADDING_HIGH]
 Reserved bytes for future use, must be zero.
 
uint32_t frame_type: 2
 frame type. 0: key_frame. 1: inter_frame. 2: intra_only frame. 3: switch_frame (app needs to set error_resilient_mode = 1, refresh_frame_flags, etc approperately.).
 
uint32_t error_resilient_mode: 1
 Corresponds to AV1 syntax element of the same name.
 
uint32_t disable_cdf_update: 1
 Corresponds to AV1 syntax element of the same name.
 
uint32_t use_superres: 1
 Corresponds to AV1 syntax element of the same name.
 
uint32_t allow_high_precision_mv: 1
 Corresponds to AV1 syntax element of the same name.
 
uint32_t use_ref_frame_mvs: 1
 Corresponds to AV1 syntax element of the same name.
 
uint32_t disable_frame_end_update_cdf: 1
 Corresponds to AV1 syntax element of the same name.
 
uint32_t reduced_tx_set: 1
 Corresponds to AV1 syntax element of the same name.
 
uint32_t enable_frame_obu: 1
 For single tile group, app may choose to use one frame obu to replace one frame header obu + one tile group obu. Invalid if num_tile_groups_minus1 > 0.
 
uint32_t long_term_reference: 1
 Indicate the current frame will be used as a long term reference.
 
uint32_t disable_frame_recon: 1
 If the encoded frame will not be referred by other frames, its recon may not be generated in order to save memory bandwidth.
 
uint32_t allow_intrabc: 1
 Corresponds to AV1 syntax element of the same name.
 
uint32_t palette_mode_enable: 1
 Equal to 1 indicates that intra blocks may use palette encoding. Otherwise disable palette encoding.
 
uint32_t reserved: 18
 Reserved bytes for future use, must be zero.
 
uint8_t sharpness_level: 3
 Sharpness level for deblock filter. value range [0..7].
 
uint8_t reserved: 3
 Reserved bytes for future use, must be zero.
 
uint16_t using_qmatrix: 1
 Corresponds to AV1 syntax element of the same name.
 
uint16_t qm_y: 4
 Following parameters only valid when using_qmatrix == 1.
 
uint16_t qm_u: 4
 Corresponds to AV1 syntax element of the same name.
 
uint16_t qm_v: 4
 Corresponds to AV1 syntax element of the same name.
 
uint16_t reserved: 3
 Reserved bytes for future use, must be zero.
 
uint32_t delta_q_present: 1
 Specify whether quantizer index delta values are present. value range [0..1].
 
uint32_t delta_q_res: 2
 Corresponds to AV1 syntax element of the same name. value range [0..3].
 
uint32_t delta_lf_present: 1
 Specify whether loop filter delta values are present. value range [0..1].
 
uint32_t delta_lf_res: 2
 Corresponds to AV1 syntax element of the same name. value range [0..3].
 
uint32_t delta_lf_multi: 1
 Corresponds to AV1 syntax element of the same name. value range [0..1].
 
uint32_t tx_mode: 2
 Corresponds to AV1 syntax element of the same name. 0: ONLY_4X4; 1: TX_MODE_LARGEST; 2: TX_MODE_SELECT; 3: Invalid.
 
uint32_t reference_mode: 2
 Indicates whether to use single or compound reference prediction. 0: SINGLE_REFERENCE; 1: COMPOUND_REFERENCE; 2: REFERENCE_MODE_SELECT. 3: Invalid. More...
 
uint32_t skip_mode_present: 1
 Corresponds to AV1 syntax element of the same name. value range [0..1].
 
uint16_t yframe_restoration_type: 2
 Restoration type for Y frame. value range [0..3].
 
uint16_t cbframe_restoration_type: 2
 Restoration type for Cb frame. value range [0..3].
 
uint16_t crframe_restoration_type: 2
 Restoration type for Cr frame. value range [0..3].
 
uint16_t lr_unit_shift: 2
 Corresponds to AV1 syntax element of the same name. value range [0..2].
 
uint16_t lr_uv_shift: 1
 Corresponds to AV1 syntax element of the same name. value range [0..1].
 
uint8_t obu_extension_flag: 1
 Corresponds to AV1 syntax element of the same name. value range [0..1].
 
uint8_t obu_has_size_field: 1
 Corresponds to AV1 syntax element of the same name. value range [0..1].
 
uint8_t spatial_id: 2
 Corresponds to AV1 syntax element of the same name. value range [0..2].
 

Detailed Description

AV1 Encoding Picture Parameter Buffer Structure.

This structure conveys picture level parameters.

Member Data Documentation

◆ bit_offset_cdef_params

uint32_t VAEncPictureParameterBufferAV1::bit_offset_cdef_params

In BRC mode, underline encoder should generate the approperiate CDEF values and write back into uncompressed header. And app should provide default CDEF values in packed header. This parameter should point to the starting bit of cdef_params() syntax structure in packed header. In CQP mode, this parameter should be set to 0 and ignored by driver.

◆ bit_offset_loopfilter_params

uint32_t VAEncPictureParameterBufferAV1::bit_offset_loopfilter_params

Offset in bits for syntax loop_filter_params() in packed frame header bit stream from the start of the packed header data. In BRC mode, this parameter should be set and driver will update filter params in packed frame header according to this offset. In CQP mode, this parameter should be set to 0 and ignored by driver.

◆ bit_offset_qindex

uint32_t VAEncPictureParameterBufferAV1::bit_offset_qindex

Offset in bits for syntax base_q_idx in packed frame header bit stream from the start of the packed header data. In BRC mode, this parameter should be set and driver will update base_q_idx in uncompressed header according to this offset. In CQP mode, this parameter should be set to 0 and ignored by driver.

◆ bit_offset_segmentation

uint32_t VAEncPictureParameterBufferAV1::bit_offset_segmentation

Offset in bits for syntax segmentation_enabled of frame header OBU in packed frame header bit stream from the start of the packed header data. Valid only in auto segmentation mode. Other than that, this parameter should be set to 0 and ignored by driver.

◆ byte_offset_frame_hdr_obu_size

uint32_t VAEncPictureParameterBufferAV1::byte_offset_frame_hdr_obu_size

Offset in bytes for syntax obu_size of frame header OBU in packed frame header bit stream from the start of the packed header. The frame header OBU size depends on the encoded tile sizes. It applies to both Frame Header OBU and Frame OBU if obu_size needs to be updated by underline encoder. Otherwise, app can set it to 0 and ignored by driver.

In BRC mode, obu_size needs to be updated and this parameter should be set. In CQP mode, this parameter should be set to 0 and ignored by driver.

◆ frame_width_minus_1

uint16_t VAEncPictureParameterBufferAV1::frame_width_minus_1

AV1 encoder may support SupRes and dynamic scaling function. For SupRes, underline encoder is responsible to do downscaling. For dynamic scaling, app should provide the scaled raw source.

Raw source frame width in pixels.

◆ reference_frames

VASurfaceID VAEncPictureParameterBufferAV1::reference_frames[8]

Reference frame buffers. Each entry of the array specifies the surface index of the picture that is referred by current picture or will be referred by any future picture. The valid entries take value from 0 to 127, inclusive. Non-valid entries, those do not point to pictures which are referred by current picture or future pictures, should take value 0xFF. Other values are not allowed.

Application should update this array based on the refreshing information expected.

◆ reference_mode

uint32_t VAEncPictureParameterBufferAV1::reference_mode

Indicates whether to use single or compound reference prediction. 0: SINGLE_REFERENCE; 1: COMPOUND_REFERENCE; 2: REFERENCE_MODE_SELECT. 3: Invalid.

Value 2 means driver make decision to use single reference or compound reference.

◆ size_in_bits_cdef_params

uint32_t VAEncPictureParameterBufferAV1::size_in_bits_cdef_params

In BRC mode, this parameter indicates the actual bit usage of cdef_params() syntax structure in packed uncompressed header. In CQP mode, this parameter should be set to 0 and ignored by driver.

◆ size_in_bits_frame_hdr_obu

uint32_t VAEncPictureParameterBufferAV1::size_in_bits_frame_hdr_obu

Frame header OBU bit stream size in bits. The frame header obu packed bit stream contains an obu header, a 4-byte long obu_size field, frame_header_obu() syntax chain, and a trailing bit if not inside a frame obu. If enable_frame_obu == 1, the value should include and up to the last bit of frame_header_obu() and excluding the bits generated by byte_alignment(). If enable_frame_obu == 0, the value should include and up to the trailing bit at the end of the frame header obu. The size will be used by encoder to calculate the final frame header size after bit shifting due to auto segmentation. In CQP mode, this parameter should be set to 0 and ignored by driver.

◆ temporal_id

uint8_t VAEncPictureParameterBufferAV1::temporal_id

Temporal id of the frame.

Corresponds to AV1 syntax element of the same name. value range [0..7].


The documentation for this struct was generated from the following file: