Class VkVideoEncodeRateControlLayerInfoKHR

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class VkVideoEncodeRateControlLayerInfoKHR
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure to set encode per-layer rate control parameters.
    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::pLayerConfigs.

    To adjust rate control settings for an individual layer at runtime, add a VkVideoEncodeRateControlLayerInfoKHR structure to the pNext chain of the VkVideoCodingControlInfoKHR structure passed to the CmdControlVideoCodingKHR command. This adjustment only impacts the specified layer without impacting the rate control settings or implementation rate control algorithm behavior for any other enabled rate control layers. The adjustment takes effect whenever the corresponding CmdControlVideoCodingKHR is executed, and only impacts CmdEncodeVideoKHR operations pertaining to the corresponding video coding layer that follow in execution order.

    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 pLayerConfigs 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).

    Valid Usage (Implicit)
    See Also

    VkVideoEncodeRateControlInfoKHR

    Layout

    
     struct VkVideoEncodeRateControlLayerInfoKHR {
         VkStructureType sType();
         void const * pNext();
         uint32_t averageBitrate();
         uint32_t maxBitrate();
         uint32_t frameRateNumerator();
         uint32_t frameRateDenominator();
         uint32_t virtualBufferSizeInMs();
         uint32_t initialVirtualBufferSizeInMs();
     }