VA-API
2.17.0.1
|
Segment parameters. More...
#include <va_enc_av1.h>
Public Attributes | |
uint8_t | segment_number |
int16_t | feature_data [VA_AV1_MAX_SEGMENTS][VA_AV1_SEG_LVL_MAX] |
segment parameters. feature_data[][] is equivalent to variable FeatureData[][] in spec, which is after clip3() operation. Clip3(x, y, z) = (z<x)? x : ((z > y)? y : z); The limit is defined in Segmentation_Feature_Max[ SEG_LVL_MAX ] = { 255, MAX_LOOP_FILTER, MAX_LOOP_FILTER, MAX_LOOP_FILTER, MAX_LOOP_FILTER, 7, 0, 0 } | |
uint8_t | feature_mask [VA_AV1_MAX_SEGMENTS] |
Bit field to indicate each feature is enabled or not per segment_id. Each bit is the feature_id. | |
uint32_t | va_reserved [VA_PADDING_LOW] |
Reserved bytes for future use, must be zero. | |
uint8_t | segmentation_enabled: 1 |
Indicates if segmentation is enabled in the current frame. If disabled, all the below parameters in the structure should be set to 0, and ignored by driver. | |
uint8_t | segmentation_update_map: 1 |
uint8_t | segmentation_temporal_update: 1 |
uint8_t | reserved: 5 |
Reserved bytes for future use, must be zero. | |
Segment parameters.
uint8_t VAEncSegParamAV1::segment_number |
If segmentation_enabled equals 1, this parameter indicates the number of segments conveyed through VAAPI. In this case, if segment_number equals 0, it will force the driver to determine how many segments would be created as well as the segmentation map to be generated. Also the driver shall write the segmentation_params() syntax in the uncompressed header at bit_offset_segmentation
(back-annotation). In application, the rest parameters in this structure should be all set to 0 and ignored by driver. And app should NOT send the "Segment map data buffer". In packed uncompressed header bitstream, app should write syntax element segmentation_enabled as 0 and segmentation_params() should be only 1-bit-long. If segment_number > 0, and segmentation_update_map = 1, app should provide the "Segment map data buffer" and populate the rest of the current data structure. And that underline encoder would honor the segmentation parameters feature_data[0..segment_number-1][] and feature_mask[0..segment_number-1], etc. Value range [0..8].
uint8_t VAEncSegParamAV1::segmentation_temporal_update |
When segmentation_update_map equals 1, this parameter equaling 1 indicates segment id per block will be determined either from reference frame or from app. Equaling 0 means segment id per block will come from app. When segmentation_temporal_update equals 0, this parameter should be set to 0 and ignored by driver.
uint8_t VAEncSegParamAV1::segmentation_update_map |
When segmentation_enabled equals 1 and segment_number > 0, this parameter equals 1 indicates the segmentation map may come from application, and that "Segment map data buffer" should be provided with populated segment_id. If equals 0, segmentation map should be inherited from a reference frame (specified by primary_ref_frame
). When segmentation_enabled or segment_number equals 0, this parameter should be set to 0 and ignored by driver.