Including this structure in the pNext chain of VkVideoCodingControlInfoKHR and including VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR in VkVideoCodingControlInfoKHR::flags will define stream rate control settings for video encoding.
Additional structures providing codec-specific rate control parameters may need to be included in the pNext chain of VkVideoCodingControlInfoKHR depending on the codec profile the bound video session was created with and the parameters specified in VkVideoEncodeRateControlInfoKHR (see Video Coding Control).
To ensure that the video session is properly initialized with stream-level rate control settings, the application must call CmdControlVideoCodingKHR with stream-level rate control settings at least once in execution order before the first CmdEncodeVideoKHR command that is executed after video session reset. If not provided, default implementation-specific stream rate control settings will be used.
Stream rate control settings can also be re-initialized during an active video encoding session. The re-initialization takes effect whenever the VkVideoEncodeRateControlInfoKHR structure is included in the pNext chain of the VkVideoCodingControlInfoKHR structure in the call to CmdControlVideoCodingKHR, and only impacts CmdEncodeVideoKHR operations that follow in execution order.
sType must be STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHRflags must be 0rateControlMode is not 0, rateControlMode must be a valid VkVideoEncodeRateControlModeFlagBitsKHR valuelayerCount is not 0, pLayers must be a valid pointer to an array of layerCount valid VkVideoEncodeRateControlLayerInfoKHR structuresVkVideoEncodeRateControlLayerInfoKHR
struct VkVideoEncodeRateControlInfoKHR {
VkStructureType sType;
void const * pNext;
VkVideoEncodeRateControlFlagsKHR flags;
VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode;
uint32_t layerCount;
VkVideoEncodeRateControlLayerInfoKHR const * pLayers;
uint32_t virtualBufferSizeInMs;
uint32_t initialVirtualBufferSizeInMs;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkVideoEncodeRateControlInfoKHR.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | FLAGS
The struct member offsets. |
| public static final int | INITIALVIRTUALBUFFERSIZEINMS
The struct member offsets. |
| public static final int | LAYERCOUNT
The struct member offsets. |
| public static final int | PLAYERS
The struct member offsets. |
| public static final int | PNEXT
The struct member offsets. |
| public static final int | RATECONTROLMODE
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STYPE
The struct member offsets. |
| public static final int | VIRTUALBUFFERSIZEINMS
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkVideoEncodeRateControlInfoKHR(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR | |
| public static VkVideoEncodeRateControlInfoKHR. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkVideoEncodeRateControlInfoKHR | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkVideoEncodeRateControlInfoKHR. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected VkVideoEncodeRateControlInfoKHR | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkVideoEncodeRateControlInfoKHR | |
| public static VkVideoEncodeRateControlInfoKHR | create(long address)
Returns a new |
| public static VkVideoEncodeRateControlInfoKHR. | create(int
the buffer capacity capacity)Returns a new |
| public static VkVideoEncodeRateControlInfoKHR. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkVideoEncodeRateControlInfoKHR | |
| public static VkVideoEncodeRateControlInfoKHR. | |
| public int | |
| public VkVideoEncodeRateControlInfoKHR | |
| public int | initialVirtualBufferSizeInMs()
the initial occupancy in milliseconds of the virtual buffer in the leaky bucket model. |
| public VkVideoEncodeRateControlInfoKHR | initialVirtualBufferSizeInMs(int value)
Sets the specified value to the |
| public int | |
| public static VkVideoEncodeRateControlInfoKHR | |
| public static VkVideoEncodeRateControlInfoKHR. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkVideoEncodeRateControlInfoKHR | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkVideoEncodeRateControlInfoKHR. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static int | |
| public static void | |
| public static int | |
| public static void | ninitialVirtualBufferSizeInMs(long struct, int value)
Unsafe version of |
| public static int | |
| public static void | nlayerCount(long struct, int value)
Sets the specified value to the |
| public static VkVideoEncodeRateControlLayerInfoKHR. | |
| public static void | |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public VkVideoEncodeRateControlLayerInfoKHR. | pLayers()
a pointer to an array of |
| public VkVideoEncodeRateControlInfoKHR | pLayers(VkVideoEncodeRateControlLayerInfoKHR.
Sets the address of the specified |
| public long | |
| public VkVideoEncodeRateControlInfoKHR | |
| public int | rateControlMode()
a |
| public VkVideoEncodeRateControlInfoKHR | |
| public VkVideoEncodeRateControlInfoKHR | set(int sType, long pNext, int flags, int rateControlMode, VkVideoEncodeRateControlLayerInfoKHR.
Initializes this struct with the specified values. |
| public VkVideoEncodeRateControlInfoKHR | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public VkVideoEncodeRateControlInfoKHR | |
| public VkVideoEncodeRateControlInfoKHR | |
| public static void | |
| public int | virtualBufferSizeInMs()
the leaky bucket model virtual buffer size in milliseconds, with respect to peak bitrate. |
| public VkVideoEncodeRateControlInfoKHR |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| FLAGS | back to summary |
|---|---|
| public static final int FLAGS The struct member offsets. | |
| INITIALVIRTUALBUFFERSIZEINMS | back to summary |
|---|---|
| public static final int INITIALVIRTUALBUFFERSIZEINMS The struct member offsets. | |
| LAYERCOUNT | back to summary |
|---|---|
| public static final int LAYERCOUNT The struct member offsets. | |
| PLAYERS | back to summary |
|---|---|
| public static final int PLAYERS The struct member offsets. | |
| PNEXT | back to summary |
|---|---|
| public static final int PNEXT The struct member offsets. | |
| RATECONTROLMODE | back to summary |
|---|---|
| public static final int RATECONTROLMODE The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| STYPE | back to summary |
|---|---|
| public static final int STYPE The struct member offsets. | |
| VIRTUALBUFFERSIZEINMS | back to summary |
|---|---|
| public static final int VIRTUALBUFFERSIZEINMS The struct member offsets. | |
| VkVideoEncodeRateControlInfoKHR | back to summary |
|---|---|
| protected VkVideoEncodeRateControlInfoKHR(long address, ByteBuffer container) | |
| VkVideoEncodeRateControlInfoKHR | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| calloc | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR. Returns a new
| |
| create | back to summary |
|---|---|
| protected VkVideoEncodeRateControlInfoKHR create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR create() Returns a new | |
| create | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR. Returns a new
| |
| create | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR. Create a
| |
| createSafe | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR. Like
| |
| flags | back to summary |
|---|---|
| public int flags() reserved for future use.
| |
| flags | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR flags(int value) Sets the specified value to the | |
| initialVirtualBufferSizeInMs | back to summary |
|---|---|
| public int initialVirtualBufferSizeInMs() the initial occupancy in milliseconds of the virtual buffer in the leaky bucket model. Valid when rate control mode is
| |
| initialVirtualBufferSizeInMs | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR initialVirtualBufferSizeInMs(int value) Sets the specified value to the | |
| layerCount | back to summary |
|---|---|
| public int layerCount() specifies the number of rate control layers in the video encode stream.
| |
| malloc | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkVideoEncodeRateControlInfoKHR. Returns a new
| |
| nflags | back to summary |
|---|---|
| public static int nflags(long struct) Unsafe version of | |
| nflags | back to summary |
|---|---|
| public static void nflags(long struct, int value) Unsafe version of | |
| ninitialVirtualBufferSizeInMs | back to summary |
|---|---|
| public static int ninitialVirtualBufferSizeInMs(long struct) Unsafe version of | |
| ninitialVirtualBufferSizeInMs | back to summary |
|---|---|
| public static void ninitialVirtualBufferSizeInMs(long struct, int value) Unsafe version of | |
| nlayerCount | back to summary |
|---|---|
| public static int nlayerCount(long struct) Unsafe version of | |
| nlayerCount | back to summary |
|---|---|
| public static void nlayerCount(long struct, int value) Sets the specified value to the | |
| npLayers | back to summary |
|---|---|
| public static VkVideoEncodeRateControlLayerInfoKHR. Unsafe version of
| |
| npLayers | back to summary |
|---|---|
| public static void npLayers(long struct, VkVideoEncodeRateControlLayerInfoKHR. Unsafe version of | |
| npNext | back to summary |
|---|---|
| public static long npNext(long struct) Unsafe version of | |
| npNext | back to summary |
|---|---|
| public static void npNext(long struct, long value) Unsafe version of | |
| nrateControlMode | back to summary |
|---|---|
| public static int nrateControlMode(long struct) Unsafe version of | |
| nrateControlMode | back to summary |
|---|---|
| public static void nrateControlMode(long struct, int value) Unsafe version of | |
| nsType | back to summary |
|---|---|
| public static int nsType(long struct) Unsafe version of | |
| nsType | back to summary |
|---|---|
| public static void nsType(long struct, int value) Unsafe version of | |
| nvirtualBufferSizeInMs | back to summary |
|---|---|
| public static int nvirtualBufferSizeInMs(long struct) Unsafe version of | |
| nvirtualBufferSizeInMs | back to summary |
|---|---|
| public static void nvirtualBufferSizeInMs(long struct, int value) Unsafe version of | |
| pLayers | back to summary |
|---|---|
| public VkVideoEncodeRateControlLayerInfoKHR. a pointer to an array of
| |
| pLayers | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR pLayers(VkVideoEncodeRateControlLayerInfoKHR. Sets the address of the specified | |
| pNext | back to summary |
|---|---|
| public long pNext()
| |
| pNext | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR pNext(long value) Sets the specified value to the | |
| rateControlMode | back to summary |
|---|---|
| public int rateControlMode() a
| |
| rateControlMode | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR rateControlMode(int value) Sets the specified value to the | |
| set | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR set(int sType, long pNext, int flags, int rateControlMode, VkVideoEncodeRateControlLayerInfoKHR. Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR set(VkVideoEncodeRateControlInfoKHR src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| sType | back to summary |
|---|---|
| public int sType() a
| |
| sType | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR sType(int value) Sets the specified value to the | |
| sType$Default | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR sType$Default() Sets the | |
| validate | back to summary |
|---|---|
| public static void validate(long struct) Validates pointer members that should not be
| |
| virtualBufferSizeInMs | back to summary |
|---|---|
| public int virtualBufferSizeInMs() the leaky bucket model virtual buffer size in milliseconds, with respect to peak bitrate. Valid when rate control mode is
| |
| virtualBufferSizeInMs | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR virtualBufferSizeInMs(int value) Sets the specified value to the | |
VkVideoEncodeRateControlInfoKHR structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final VkVideoEncodeRateControlInfoKHR |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final VkVideoEncodeRateControlInfoKHR ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| flags | back to summary |
|---|---|
public int flags()
| |
| flags | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR. Sets the specified value to the | |
| getElementFactory | back to summary |
|---|---|
| protected VkVideoEncodeRateControlInfoKHR getElementFactory() Implements abstract org.
| |
| initialVirtualBufferSizeInMs | back to summary |
|---|---|
public int initialVirtualBufferSizeInMs()
| |
| initialVirtualBufferSizeInMs | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR. Sets the specified value to the | |
| layerCount | back to summary |
|---|---|
public int layerCount()
| |
| pLayers | back to summary |
|---|---|
public VkVideoEncodeRateControlLayerInfoKHR.
| |
| pLayers | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR. Sets the address of the specified | |
| pNext | back to summary |
|---|---|
public long pNext()
| |
| pNext | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR. Sets the specified value to the | |
| rateControlMode | back to summary |
|---|---|
public int rateControlMode()
| |
| rateControlMode | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected VkVideoEncodeRateControlInfoKHR. Implements abstract org.
| |
| sType | back to summary |
|---|---|
public int sType()
| |
| sType | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR. Sets the specified value to the | |
| sType$Default | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR. Sets the | |
| virtualBufferSizeInMs | back to summary |
|---|---|
public int virtualBufferSizeInMs()
| |
| virtualBufferSizeInMs | back to summary |
|---|---|
| public VkVideoEncodeRateControlInfoKHR. Sets the specified value to the | |