C Specification
The VkVideoEncodeRateControlLayerInfoKHR structure is defined as:
// Provided by VK_KHR_video_encode_queue
typedef struct VkVideoEncodeRateControlLayerInfoKHR {
VkStructureType sType;
const void* pNext;
uint64_t averageBitrate;
uint64_t maxBitrate;
uint32_t frameRateNumerator;
uint32_t frameRateDenominator;
} VkVideoEncodeRateControlLayerInfoKHR;
Members
-
sTypeis a VkStructureType value identifying this structure. -
pNextis a pointer to a structure extending this structure. -
averageBitrateis the average bitrate in bits/second. Valid when rate control mode isVK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHRorVK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR. -
maxBitrateis the peak bitrate in bits/second. Valid when rate control mode isVK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR. -
frameRateNumeratoris the numerator of the frame rate. Valid when rate control mode isVK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHRorVK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR. -
frameRateDenominatoris the denominator of the frame rate. Valid when rate control mode isVK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHRorVK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR.
Description
A codec-specific structure specifying additional per-layer rate control
settings must be chained to VkVideoEncodeRateControlLayerInfoKHR.
If multiple rate control layers are enabled
(VkVideoEncodeRateControlInfoKHR::layerCount is greater than 1),
then the chained codec-specific extension structure also identifies the
specific video coding layer its parent
VkVideoEncodeRateControlLayerInfoKHR applies to.
If multiple rate control layers are enabled, the number of rate control
layers must match the number of video coding layers.
The specification for an encode codec-specific extension would describe how
multiple video coding layers are enabled for the corresponding codec.
Per-layer rate control settings for all enabled rate control layers must be
initialized or re-initialized whenever stream rate control settings are
provided via VkVideoEncodeRateControlInfoKHR.
This is done by specifying settings for all enabled rate control layers in
VkVideoEncodeRateControlInfoKHR::pLayers.
It is possible for an application to enable multiple video coding layers
(via codec-specific extensions to encoding operations) while only enabling a
single layer of rate control for the entire video stream.
To achieve this, layerCount in VkVideoEncodeRateControlInfoKHR
must be set to 1, and the single VkVideoEncodeRateControlLayerInfoKHR
provided in pLayers would apply to all encoded segments of the video
stream, regardless of which codec-defined video coding layer they belong to.
In this case, the implementation decides bitrate distribution across video
coding layers (if applicable to the specified stream rate control mode).
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.