VA-API  2.19.0
Public Attributes | List of all members
VAEncPictureParameterBufferVP9 Struct Reference

VP9 Encoding Picture Parameter Buffer Structure. More...

#include <va_enc_vp9.h>

Public Attributes

uint32_t frame_width_src
 
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 refresh_frame_flags
 indicate which frames in DPB should be refreshed. same syntax and semantic as in VP9 code.
 
uint8_t luma_ac_qindex
 Base Q index in the VP9 term. Added with per segment delta Q index to get Q index of Luma AC.
 
int8_t luma_dc_qindex_delta
 
int8_t chroma_ac_qindex_delta
 
int8_t chroma_dc_qindex_delta
 
uint8_t filter_level
 filter level Corresponds to the same VP9 syntax element in frame header.
 
uint8_t sharpness_level
 
int8_t ref_lf_delta [4]
 Loop filter level reference delta values. Contains a list of 4 delta values for reference frame based block-level loop filter adjustment. If no update, set to 0. value range [-63..63].
 
int8_t mode_lf_delta [2]
 Loop filter level mode delta values. Contains a list of 4 delta values for coding mode based MB-level loop filter adjustment. If no update, set to 0. value range [-63..63].
 
uint16_t bit_offset_ref_lf_delta
 
uint16_t bit_offset_mode_lf_delta
 
uint16_t bit_offset_lf_level
 
uint16_t bit_offset_qindex
 
uint16_t bit_offset_first_partition_size
 
uint16_t bit_offset_segmentation
 
uint16_t bit_size_segmentation
 length in bit of segmentation portion from the location in bit stream where segmentation_enabled syntax is coded. When auto_segmentation is enabled, GPU uses this bit size to locate and update the information after segmentation.
 
uint8_t log2_tile_rows
 log2 of number of tile rows Corresponds to the same VP9 syntax element in frame header. value range [0..2]
 
uint8_t log2_tile_columns
 log2 of number of tile columns Corresponds to the same VP9 syntax element in frame header. value range [0..6]
 
uint8_t skip_frame_flag
 indicate frame-skip happens Application may choose to drop/skip one or mulitple encoded frames or to-be-encoded frame due to various reasons such as insufficient bandwidth. Application uses the following three flags to inform GPU about frame-skip. More...
 
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, and does not include the frame with skip_frame_flag == 2. Valid when skip_frame_flag = 1.
 
uint32_t skip_frames_size
 When skip_frame_flag = 1, the size of the skipped frames in bits. It includes only the skipped frames that were not counted before, and does not include the frame size with skip_frame_flag = 2. When skip_frame_flag = 2, it is the size of the current skipped frame that is to be encrypted.
 
uint32_t va_reserved [VA_PADDING_MEDIUM]
 Reserved bytes for future use, must be zero.
 
uint32_t ref_frame_ctrl_l0: 3
 Indiates which frames to be used as reference. (Ref_frame_ctrl & 0x01) ? 1: last frame as reference frame, 0: not. (Ref_frame_ctrl & 0x02) ? 1: golden frame as reference frame, 0: not. (Ref_frame_ctrl & 0x04) ? 1: alt frame as reference frame, 0: not. L0 is for forward prediction. L1 is for backward prediction.
 
uint32_t ref_last_idx: 3
 Last Reference Frame index Specifies the index to RefFrameList[] which points to the LAST reference frame. It corresponds to active_ref_idx[0] in VP9 code.
 
uint32_t ref_last_sign_bias: 1
 Specifies the Sign Bias of the LAST reference frame. It corresponds to ref_frame_sign_bias[LAST_FRAME] in VP9 code.
 
uint32_t ref_gf_idx: 3
 GOLDEN Reference Frame index Specifies the index to RefFrameList[] which points to the Golden reference frame. It corresponds to active_ref_idx[1] in VP9 code.
 
uint32_t ref_gf_sign_bias: 1
 Specifies the Sign Bias of the GOLDEN reference frame. It corresponds to ref_frame_sign_bias[GOLDEN_FRAME] in VP9 code.
 
uint32_t ref_arf_idx: 3
 Alternate Reference Frame index Specifies the index to RefFrameList[] which points to the Alternate reference frame. It corresponds to active_ref_idx[2] in VP9 code.
 
uint32_t ref_arf_sign_bias: 1
 Specifies the Sign Bias of the ALTERNATE reference frame. It corresponds to ref_frame_sign_bias[ALTREF_FRAME] in VP9 code.
 
uint32_t frame_type: 1
 
uint32_t show_frame: 1
 show_frame 0: current frame is not for display 1: current frame is for display
 
uint32_t error_resilient_mode: 1
 
uint32_t intra_only: 1
 Indicate intra-only for inter pictures. Must be 0 for key frames. 0: inter frame use both intra and inter blocks 1: inter frame use only intra blocks.
 
uint32_t allow_high_precision_mv: 1
 Indicate high precision mode for Motion Vector prediction 0: normal mode 1: high precision mode.
 
uint32_t mcomp_filter_type: 3
 Motion Compensation Filter type 0: eight-tap (only this mode is supported now.) 1: eight-tap-smooth 2: eight-tap-sharp 3: bilinear 4: switchable.
 
uint32_t lossless_mode: 1
 Specifies if the picture is coded in lossless mode. More...
 
uint32_t comp_prediction_mode: 2
 MV prediction mode. Corresponds to VP9 variable with same name. comp_prediction_mode = 0: single prediction ony, comp_prediction_mode = 1: compound prediction, comp_prediction_mode = 2: hybrid prediction. More...
 
uint32_t auto_segmentation: 1
 Indicate how segmentation is specified 0 application specifies segmentation partitioning and relevant parameters. 1 GPU may decide on segmentation. If application already provides segmentation information, GPU may choose to honor it and further split into more levels if possible.
 
uint32_t super_frame_flag: 1
 Indicate super frame syntax should be inserted 0 current frame is not encapsulated in super frame structure 1 current fame is to be encapsulated in super frame structure. super frame index syntax will be inserted by encoder at the end of current frame.
 

Detailed Description

VP9 Encoding Picture Parameter Buffer Structure.

This structure conveys picture level parameters.

Member Data Documentation

◆ bit_offset_first_partition_size

uint16_t VAEncPictureParameterBufferVP9::bit_offset_first_partition_size

Offset from starting position of output bitstream in bits where First Partition Size should be inserted.

◆ bit_offset_lf_level

uint16_t VAEncPictureParameterBufferVP9::bit_offset_lf_level

Offset from starting position of output bitstream in bits where (loop) filter_level should be inserted.

◆ bit_offset_mode_lf_delta

uint16_t VAEncPictureParameterBufferVP9::bit_offset_mode_lf_delta

Offset from starting position of output bitstream in bits where mode_lf_delta[] should be inserted.

In BRC mode, always insert mode_lf_delta[] (This implies uncompressed header should have mode_ref_delta_enabled=1 and mode_ref_delta_update=1).

◆ bit_offset_qindex

uint16_t VAEncPictureParameterBufferVP9::bit_offset_qindex

Offset from starting position of output bitstream in bits where Base Qindex should be inserted.

◆ bit_offset_ref_lf_delta

uint16_t VAEncPictureParameterBufferVP9::bit_offset_ref_lf_delta

Offset from starting position of output bitstream in bits where ref_lf_delta[] should be inserted. This offset should cover any metadata ahead of uncompressed header in inserted bit stream buffer (the offset should be same as that for final output bitstream buffer).

In BRC mode, always insert ref_lf_delta[] (This implies uncompressed header should have mode_ref_delta_enabled=1 and mode_ref_delta_update=1).

◆ bit_offset_segmentation

uint16_t VAEncPictureParameterBufferVP9::bit_offset_segmentation

Offset from starting position of output bitstream in bits where segmentation_enabled is located in bitstream. When auto_segmentation is enabled, GPU uses this offset to locate and update the segmentation related information.

◆ chroma_ac_qindex_delta

int8_t VAEncPictureParameterBufferVP9::chroma_ac_qindex_delta

Q index delta from base Q index in the VP9 term for Chroma AC.

◆ chroma_dc_qindex_delta

int8_t VAEncPictureParameterBufferVP9::chroma_dc_qindex_delta

Q index delta from base Q index in the VP9 term for Chroma DC.

◆ comp_prediction_mode

uint32_t VAEncPictureParameterBufferVP9::comp_prediction_mode

MV prediction mode. Corresponds to VP9 variable with same name. comp_prediction_mode = 0: single prediction ony, comp_prediction_mode = 1: compound prediction, comp_prediction_mode = 2: hybrid prediction.

Not mandatory. App may suggest the setting based on power or performance. Kernal may use it as a guildline and decide the proper setting on its own.

◆ error_resilient_mode

uint32_t VAEncPictureParameterBufferVP9::error_resilient_mode

The following fields correspond to the same VP9 syntax elements in the frame header.

◆ frame_type

uint32_t VAEncPictureParameterBufferVP9::frame_type

Indicates if the current frame is a key frame or not. Corresponds to the same VP9 syntax element in frame tag.

◆ frame_width_src

uint32_t VAEncPictureParameterBufferVP9::frame_width_src

VP9 encoder may support dynamic scaling function. If enabled (enable_dynamic_scaling is set), application may request GPU encodes picture with a different resolution from the raw source. GPU should handle the scaling process of source and all reference frames.

◆ lossless_mode

uint32_t VAEncPictureParameterBufferVP9::lossless_mode

Specifies if the picture is coded in lossless mode.

lossless_mode = base_qindex == 0 && y_dc_delta_q == 0 \ && uv_dc_delta_q == 0 && uv_ac_delta_q == 0; Where base_qindex, y_dc_delta_q, uv_dc_delta_q and uv_ac_delta_q are all variables in VP9 code.

When enabled, tx_mode needs to be set to 4x4 only and all tu_size in CU record set to 4x4 for entire frame. Software also has to program such that final_qindex=0 and final_filter_level=0 following the Quant Scale and Filter Level Table in Segmentation State section. Hardware forces Hadamard Tx when this bit is set. When lossless_mode is on, BRC has to be turned off. 0: normal mode 1: lossless mode

◆ luma_dc_qindex_delta

int8_t VAEncPictureParameterBufferVP9::luma_dc_qindex_delta

Q index delta from base Q index in the VP9 term for Luma DC.

◆ reference_frames

VASurfaceID VAEncPictureParameterBufferVP9::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.

◆ sharpness_level

uint8_t VAEncPictureParameterBufferVP9::sharpness_level

Controls the deblocking filter sensitivity. Corresponds to the same VP9 syntax element in frame header.

◆ skip_frame_flag

uint8_t VAEncPictureParameterBufferVP9::skip_frame_flag

indicate frame-skip happens Application may choose to drop/skip one or mulitple encoded frames or to-be-encoded frame due to various reasons such as insufficient bandwidth. Application uses the following three flags to inform GPU about frame-skip.

value range of skip_frame_flag: [0..2] 0 - encode as normal, no skip; 1 - one or more frames were skipped by application prior to the current frame. Encode the current frame as normal. The driver will pass the number_skip_frames and skip_frames_size to bit rate control for adjustment. 2 - the current frame is to be skipped. Do not encode it but encrypt the packed header contents. This is for the secure encoding case where application generates a frame of all skipped blocks. The packed header will contain the skipped frame.


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