VkVideoEncodeAV1RateControlLayerInfoKHR
The VkVideoEncodeAV1RateControlLayerInfoKHR structure is defined as:
typedef struct VkVideoEncodeAV1RateControlLayerInfoKHR {
VkStructureType sType;
const void* pNext;
VkBool32 useMinQIndex;
VkVideoEncodeAV1QIndexKHR minQIndex;
VkBool32 useMaxQIndex;
VkVideoEncodeAV1QIndexKHR maxQIndex;
VkBool32 useMaxFrameSize;
VkVideoEncodeAV1FrameSizeKHR maxFrameSize;
} VkVideoEncodeAV1RateControlLayerInfoKHR;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.useMinQIndexindicates whether the quantizer index values determined by rate control will be clamped to the lower bounds on the quantizer index values specified inminQIndex.minQIndexspecifies the lower bounds on the quantizer index values, for each rate control group, that the implementation’s rate control algorithm will use whenuseMinQIndexis set toVK_TRUE.useMaxQIndexindicates whether the quantizer index values determined by rate control will be clamped to the upper bounds on the quantizer index values specified inmaxQIndex.maxQIndexspecifies the upper bounds on the quantizer index values, for each rate control group, that the implementation’s rate control algorithm will use whenuseMaxQIndexis set toVK_TRUE.useMaxFrameSizeindicates whether the implementation’s rate control algorithm should use the values specified inmaxFrameSizeas the upper bounds on the encoded frame size for each rate control group.maxFrameSizespecifies the upper bounds on the encoded frame size, for each rate control group, whenuseMaxFrameSizeis set toVK_TRUE.
When used, the values in minQIndex and maxQIndex guarantee that
the effective quantizer index values used by the implementation will respect
those lower and upper bounds, respectively.
However, limiting the range of quantizer index values that the
implementation is able to use will also limit the capabilities of the
implementation’s rate control algorithm to comply to other constraints.
In particular, the implementation may not be able to comply to the
following:
- The average and/or peak bitrate values to be used for
the encoded bitstream specified in the
averageBitrateandmaxBitratemembers of the VkVideoEncodeRateControlLayerInfoKHR structure. - The upper bounds on the encoded frame size, for each
rate control group, specified in the
maxFrameSizemember ofVkVideoEncodeAV1RateControlLayerInfoKHR.
In general, applications need to configure rate control parameters appropriately in order to be able to get the desired rate control behavior, as described in the Video Encode Rate Control section.
When an instance of this structure is included in the pNext chain of a
VkVideoEncodeRateControlLayerInfoKHR structure specified in one of the
elements of the pLayers array member of the
VkVideoEncodeRateControlInfoKHR structure passed to the
vkCmdControlVideoCodingKHR command,
VkVideoCodingControlInfoKHR::flags includes
VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, and the bound
video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, it specifies the
AV1-specific rate control parameters of the rate control layer corresponding
to that element of pLayers.
Valid Usage
VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-useMinQIndex-10300
If useMinQIndex is VK_TRUE, then the intraQIndex,
predictiveQIndex, and bipredictiveQIndex members of
minQIndex must all be between
VkVideoEncodeAV1CapabilitiesKHR::minQIndex and
VkVideoEncodeAV1CapabilitiesKHR::maxQIndex, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile
VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-useMinQIndex-10301
If useMinQIndex is VK_TRUE and
VkVideoEncodeAV1CapabilitiesKHR::flags, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video
profile, does not include
VK_VIDEO_ENCODE_AV1_CAPABILITY_PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_BIT_KHR,
then the intraQIndex, predictiveQIndex, and
bipredictiveQIndex members of minQIndex must all specify
the same value
VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-useMaxQIndex-10302
If useMaxQIndex is VK_TRUE, then the intraQIndex,
predictiveQIndex, and bipredictiveQIndex members of
maxQIndex must all be between
VkVideoEncodeAV1CapabilitiesKHR::minQIndex and
VkVideoEncodeAV1CapabilitiesKHR::maxQIndex, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile
VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-useMaxQIndex-10303
If useMaxQIndex is VK_TRUE and
VkVideoEncodeAV1CapabilitiesKHR::flags, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video
profile, does not include
VK_VIDEO_ENCODE_AV1_CAPABILITY_PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_BIT_KHR,
then the intraQIndex, predictiveQIndex, and
bipredictiveQIndex members of maxQIndex must all specify
the same value
VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-useMinQIndex-10304
If useMinQIndex and useMaxQIndex are both VK_TRUE,
then the intraQIndex, predictiveQIndex, and
bipredictiveQIndex members of minQIndex must all be less
than or equal to the respective members of maxQIndex
Valid Usage (Implicit)
VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-sType-sType
sType must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_LAYER_INFO_KHR
VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-minQIndex-parameter
minQIndex must be a valid VkVideoEncodeAV1QIndexKHR structure
VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-maxQIndex-parameter
maxQIndex must be a valid VkVideoEncodeAV1QIndexKHR structure
VUID-VkVideoEncodeAV1RateControlLayerInfoKHR-maxFrameSize-parameter
maxFrameSize must be a valid VkVideoEncodeAV1FrameSizeKHR structure