Class VkVideoEncodeRateControlInfoKHR

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkVideoEncodeRateControlInfoKHR>
org.lwjgl.vulkan.VkVideoEncodeRateControlInfoKHR
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VkVideoEncodeRateControlInfoKHR extends org.lwjgl.system.Struct<VkVideoEncodeRateControlInfoKHR> implements org.lwjgl.system.NativeResource
Structure to set encode stream rate control parameters.
Description

If layerCount is zero then the values of virtualBufferSizeInMs and initialVirtualBufferSizeInMs are ignored.

This structure can be specified in the following places:

Including this structure in the pNext chain of VkVideoCodingControlInfoKHR and including VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR in VkVideoCodingControlInfoKHR::flags enables updating the rate control configuration of the bound video session. This replaces the entire rate control configuration of the bound video session and may reset the state of all enabled rate control layers to an initial state according to the codec-specific rate control semantics defined in the corresponding sections listed below.

When layerCount is greater than one, multiple rate control layers are configured, and each rate control layer is applied to the corresponding video coding layer identified by the index of the corresponding element of pLayer.

  • If the video session was created with the video codec operation VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then this index specifies the H.264 temporal layer ID of the video coding layer the rate control layer is applied to.
  • If the video session was created with the video codec operation VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then this index specifies the H.265 temporal ID of the video coding layer the rate control layer is applied to.
  • If the video session was created with the video codec operation VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then this index specifies the AV1 temporal ID of the temporal layer the rate control layer is applied to.

Additional structures providing codec-specific rate control parameters can be included in the pNext chain of VkVideoCodingControlInfoKHR depending on the video profile the bound video session was created. For further details see:

The new rate control configuration takes effect when the corresponding CmdControlVideoCodingKHR is executed on the device, and only impacts video encode operations that follow in execution order.

Valid Usage
Valid Usage (Implicit)
See Also

VkVideoEncodeRateControlLayerInfoKHR

Layout


 struct VkVideoEncodeRateControlInfoKHR {
     VkStructureType sType();
     void const * pNext();
     VkVideoEncodeRateControlFlagsKHR flags();
     VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode();
     uint32_t layerCount();
     VkVideoEncodeRateControlLayerInfoKHR const * pLayers();
     uint32_t virtualBufferSizeInMs();
     uint32_t initialVirtualBufferSizeInMs();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • STYPE

      public static final int STYPE
      The struct member offsets.
    • PNEXT

      public static final int PNEXT
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • RATECONTROLMODE

      public static final int RATECONTROLMODE
      The struct member offsets.
    • LAYERCOUNT

      public static final int LAYERCOUNT
      The struct member offsets.
    • PLAYERS

      public static final int PLAYERS
      The struct member offsets.
    • VIRTUALBUFFERSIZEINMS

      public static final int VIRTUALBUFFERSIZEINMS
      The struct member offsets.
    • INITIALVIRTUALBUFFERSIZEINMS

      public static final int INITIALVIRTUALBUFFERSIZEINMS
      The struct member offsets.
  • Constructor Details

    • VkVideoEncodeRateControlInfoKHR

      public VkVideoEncodeRateControlInfoKHR(ByteBuffer container)
      Creates a VkVideoEncodeRateControlInfoKHR instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details