VkVideoEncodeAV1PictureInfoKHR
The VkVideoEncodeAV1PictureInfoKHR structure is defined as:
typedef struct VkVideoEncodeAV1PictureInfoKHR {
VkStructureType sType;
const void* pNext;
VkVideoEncodeAV1PredictionModeKHR predictionMode;
VkVideoEncodeAV1RateControlGroupKHR rateControlGroup;
uint32_t constantQIndex;
const StdVideoEncodeAV1PictureInfo* pStdPictureInfo;
int32_t referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR];
VkBool32 primaryReferenceCdfOnly;
VkBool32 generateObuExtensionHeader;
} VkVideoEncodeAV1PictureInfoKHR;
sType
is a VkStructureType value identifying this structure.pNext
isNULL
or a pointer to a structure extending this structure.predictionMode
specifies the AV1 prediction mode to use for the encoded frame.rateControlGroup
specifies the AV1 rate control group to use for the encoded frame when the current rate control mode is notVK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR
. Otherwise it is ignored.constantQIndex
is the quantizer index to use for the encoded frame if the current rate control mode configured for the video session isVK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR
.pStdPictureInfo
is a pointer to aStdVideoEncodeAV1PictureInfo
structure specifying AV1 picture information.referenceNameSlotIndices
is an array of seven (VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR
, which is equal to the Video Std definitionSTD_VIDEO_AV1_REFS_PER_FRAME
) signed integer values specifying the index of the DPB slot or a negative integer value for each AV1 reference name used for inter coding. In particular, the DPB slot index for the AV1 reference nameframe
is specified inreferenceNameSlotIndices
[frame
-STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME
].primaryReferenceCdfOnly
controls whether the primary reference frame indicated by the value ofpStdPictureInfo→primary_ref_frame
is used only for CDF data reference, as defined in sections 6.8.2 of the AV1 Specification. If set toVK_TRUE
, then the primary reference frame’s picture data will not be used for sample prediction.generateObuExtensionHeader
controls whether OBU extension headers are generated into the target bitstream, as defined in sections 5.3.1, 5.3.2, and 5.3.3 of the AV1 Specification.
This structure is specified in the pNext
chain of the
VkVideoEncodeInfoKHR structure passed to vkCmdEncodeVideoKHR to
specify the codec-specific picture information for an AV1
encode operation.
Encode Input Picture Information
When this structure is specified in the pNext
chain of the
VkVideoEncodeInfoKHR structure passed to vkCmdEncodeVideoKHR,
the information related to the encode input
picture is defined as follows:
- The image subregion used is determined according to the AV1 Encode Picture Data Access section.
- The encode input picture is associated with the
AV1 picture information provided in
pStdPictureInfo
.
Std Picture Information
The members of the StdVideoEncodeAV1PictureInfo
structure pointed to by
pStdPictureInfo
are interpreted as follows:
flags.reserved
andreserved1
are used only for padding purposes and are otherwise ignored;pSegmentation
must beNULL
AV1 segmentation is currently not supported in video encode operations. Accordingly, the application needs to set
flags.segmentation_enabled
to0
andpSegmentation
toNULL
.pTileInfo
isNULL
or a pointer to aStdVideoAV1TileInfo
structure specifying AV1 tile parameters;- the
StdVideoAV1Quantization
structure pointed to bypQuantization
is interpreted as follows:flags.reserved
is used only for padding purposes and is otherwise ignored;- all other members of
StdVideoAV1Quantization
are interpreted as defined in section 6.8.11 of the AV1 Specification;
- the
StdVideoAV1LoopFilter
structure pointed to bypLoopFilter
is interpreted as follows:flags.reserved
is used only for padding purposes and is otherwise ignored;update_ref_delta
is a bitmask where bit index i is interpreted as the value ofupdate_ref_delta
corresponding to element i ofloop_filter_ref_deltas
as defined in section 6.8.10 of the AV1 Specification;update_mode_delta
is a bitmask where bit index i is interpreted as the value ofupdate_mode_delta
corresponding to element i ofloop_filter_mode_deltas
as defined in section 6.8.10 of the AV1 Specification;- all other members of
StdVideoAV1LoopFilter
are interpreted as defined in section 6.8.10 of the AV1 Specification;
- if
flags.enable_cdef
is set in the active sequence header, then the members of theStdVideoAV1CDEF
structure pointed to bypCDEF
are interpreted as follows:cdef_y_sec_strength
andcdef_uv_sec_strength
are the bitstream values of the corresponding syntax elements defined in section 5.9.19 of the AV1 Specification;- all other members of
StdVideoAV1CDEF
are interpreted as defined in section 6.10.14 of the AV1 Specification;
- if
flags.UsesLr
is set in the active sequence header, then theStdVideoAV1LoopRestoration
structure pointed to bypLoopRestoration
is interpreted as follows:LoopRestorationSize
[plane
] is interpreted as log2(size
) - 5, wheresize
is the value ofLoopRestorationSize
[plane
] as defined in section 6.10.15 of the AV1 Specification;- all other members of
StdVideoAV1LoopRestoration
are defined as in section 6.10.15 of the AV1 Specification;
- the members of the
StdVideoAV1GlobalMotion
structure provided inglobal_motion
are interpreted as defined in section 7.10 of the AV1 Specification; pExtensionHeader
isNULL
or a pointer to aStdVideoEncodeAV1ExtensionHeader
structure whosetemporal_id
andspatial_id
members specify the temporal and spatial layer ID of the reference frame, respectively (these IDs are encoded into the OBU extension header if VkVideoEncodeAV1PictureInfoKHR::generateObuExtensionHeader
is set toVK_TRUE
for the encode operation);- if
flags.buffer_removal_time_present_flag
is set, thenpBufferRemovalTimes
is a pointer to an array of N number of unsigned integer values specifying the elements of thebuffer_removal_time
array, as defined in section 6.8.2 of the AV1 Specification, where N is the number of operating points specified for the active sequence header through VkVideoEncodeAV1SessionParametersCreateInfoKHR::stdOperatingPointCount
; - all other members are interpreted as defined in section 6.8 of the AV1 Specification.
Reference picture setup is controlled by the value of
StdVideoEncodeAV1PictureInfo
::refresh_frame_flags
.
If it is not zero and a reconstructed
picture is specified, then the latter is used as the target of picture
reconstruction to activate the DPB slot
specified in pEncodeInfo→pSetupReferenceSlot→slotIndex
.
If StdVideoEncodeAV1PictureInfo
::refresh_frame_flags
is zero, but
a reconstructed picture is specified,
then the corresponding picture reference associated with the DPB
slot is invalidated, as described in the DPB Slot
States section.
Std Tile Parameters
Specifying AV1 tile parameters is optional.
If StdVideoEncodeAV1PictureInfo
::pTileInfo
is NULL
, then the
implementation determines the values of AV1 tile parameters defined in
section 6.8.14 of the AV1 Specification in an
implementation-dependent manner.
If StdVideoEncodeAV1PictureInfo
::pTileInfo
is not NULL
, then the
members of the StdVideoAV1TileInfo
structure pointed to by
StdVideoEncodeAV1PictureInfo
::pTileInfo
are interpreted as
follows:
flags.reserved
andreserved1
are used only for padding purposes and are otherwise ignored;TileCols
andTileRows
specify the number of tile columns and tile rows as defined in section 6.8.14 of the AV1 Specification;tile_size_bytes_minus_1
is ignored, as its value, as defined in section 6.8.14 of the AV1 Specification, is determined as the result of the encoding process;pMiColStarts
andpMiRowStarts
are ignored, as the elements of theMiColStarts
andMiRowStarts
arrays defined in section 6.8.14 of the AV1 Specification are determined by the implementation based on the tile widths and heights determined by the implementation or specified through thepWidthInSbsMinus1
andpHeightInSbsMinus1
arrays, respectively;pWidthInSbsMinus1
isNULL
or a pointer to an array ofTileCols
number of unsigned integers that corresponds towidth_in_sbs_minus_1
defined in section 6.8.14 of the AV1 Specification;pHeightInSbsMinus1
isNULL
or is a pointer to an array ofTileRows
number of unsigned integers that corresponds toheight_in_sbs_minus_1
defined in section 6.8.14 of the AV1 Specification;- all other members of
StdVideoAV1TileInfo
are interpreted as defined in section 6.8.14 of the AV1 Specification.
If flags.uniform_tile_spacing_flag
is set, then pWidthInSbsMinus1
and pHeightInSbsMinus1
are ignored.
If flags.uniform_tile_spacing_flag
is not set and
pWidthInSbsMinus1
is NULL
, then the width of individual tile columns
is determined in an implementation-dependent manner.
If flags.uniform_tile_spacing_flag
is not set and
pHeightInSbsMinus1
is NULL
, then the height of individual tile rows
is determined in an implementation-dependent manner.
In general, implementations are expected to respect the application-specified AV1 tile parameters. However, as implementations may have restrictions on the combination of tile column and row counts, and tile widths and heights with respect to the extent of the encoded frame beyond the restrictions specified in the AV1 Specification and this specification (through video profile capabilities), certain parameter combinations may require the implementation to override them in order to conform to such implementation-specific limitations.
Active Parameter Sets
The active sequence header is the AV1 sequence header stored in the bound video session parameters object.
Valid Usage
VUID-VkVideoEncodeAV1PictureInfoKHR-flags-10289
If VkVideoEncodeAV1CapabilitiesKHR::flags
, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video
profile, does not include
VK_VIDEO_ENCODE_AV1_CAPABILITY_PRIMARY_REFERENCE_CDF_ONLY_BIT_KHR
,
then primaryReferenceCdfOnly
must be VK_FALSE
VUID-VkVideoEncodeAV1PictureInfoKHR-primaryReferenceCdfOnly-10290
If primaryReferenceCdfOnly
is set to VK_TRUE
, then
pStdPictureInfo→primary_ref_frame
must be less than
VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR
VUID-VkVideoEncodeAV1PictureInfoKHR-pStdPictureInfo-10291
If pStdPictureInfo→primary_ref_frame
is less than
VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR
, then
referenceNameSlotIndices
[pStdPictureInfo→primary_ref_frame
]
must not be negative
VUID-VkVideoEncodeAV1PictureInfoKHR-flags-10292
If VkVideoEncodeAV1CapabilitiesKHR::flags
, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video
profile, does not include
VK_VIDEO_ENCODE_AV1_CAPABILITY_GENERATE_OBU_EXTENSION_HEADER_BIT_KHR
,
then generateObuExtensionHeader
must be VK_FALSE
VUID-VkVideoEncodeAV1PictureInfoKHR-generateObuExtensionHeader-10293
If generateObuExtensionHeader
is set to VK_TRUE
, then
pStdPictureInfo→pExtensionHeader
must not be NULL
Valid Usage (Implicit)
VUID-VkVideoEncodeAV1PictureInfoKHR-sType-sType
sType
must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PICTURE_INFO_KHR
VUID-VkVideoEncodeAV1PictureInfoKHR-predictionMode-parameter
predictionMode
must be a valid VkVideoEncodeAV1PredictionModeKHR value
VUID-VkVideoEncodeAV1PictureInfoKHR-rateControlGroup-parameter
rateControlGroup
must be a valid VkVideoEncodeAV1RateControlGroupKHR value
VUID-VkVideoEncodeAV1PictureInfoKHR-pStdPictureInfo-parameter
pStdPictureInfo
must be a valid pointer to a valid StdVideoEncodeAV1PictureInfo
value