VkVideoEncodeInfoKHR
The VkVideoEncodeInfoKHR structure is defined as:
typedef struct VkVideoEncodeInfoKHR {
VkStructureType sType;
const void* pNext;
VkVideoEncodeFlagsKHR flags;
VkBuffer dstBuffer;
VkDeviceSize dstBufferOffset;
VkDeviceSize dstBufferRange;
VkVideoPictureResourceInfoKHR srcPictureResource;
const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot;
uint32_t referenceSlotCount;
const VkVideoReferenceSlotInfoKHR* pReferenceSlots;
uint32_t precedingExternallyEncodedBytes;
} VkVideoEncodeInfoKHR;
sTypeis a VkStructureType value identifying this structure.pNextis a pointer to a structure extending this structure.flagsis a bitmask of VkVideoEncodeFlagBitsKHR indicating video encode command flags.dstBufferis the destination video bitstream buffer to write the encoded bitstream to.dstBufferOffsetis the starting offset in bytes from the start ofdstBufferto write the encoded bitstream to.dstBufferRangeis the maximum bitstream size in bytes that can be written todstBuffer, starting fromdstBufferOffset.srcPictureResourceis the video picture resource to use as the encode input picture.pSetupReferenceSlotisNULLor a pointer to a VkVideoReferenceSlotInfoKHR structure specifying the reconstructed picture information.referenceSlotCountis the number of elements in thepReferenceSlotsarray.pReferenceSlotsisNULLor a pointer to an array of VkVideoReferenceSlotInfoKHR structures describing the DPB slots and corresponding reference picture resources to use in this video encode operation (the set of active reference pictures).precedingExternallyEncodedBytesis the number of bytes externally encoded by the application to the video bitstream and is used to update the internal state of the implementation’s rate control algorithm to account for the bitrate budget consumed by these externally encoded bytes.
Valid Usage
VUID-VkVideoEncodeInfoKHR-dstBuffer-08236
dstBuffer must have been created with
VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR set
VUID-VkVideoEncodeInfoKHR-dstBufferOffset-08237
dstBufferOffset must be less than the size of dstBuffer
VUID-VkVideoEncodeInfoKHR-dstBufferRange-08238
dstBufferRange must be less than or equal to the size of
dstBuffer minus dstBufferOffset
VUID-VkVideoEncodeInfoKHR-pSetupReferenceSlot-08239
If pSetupReferenceSlot is not NULL, then its slotIndex
member must not be negative
VUID-VkVideoEncodeInfoKHR-pSetupReferenceSlot-08240
If pSetupReferenceSlot is not NULL, then its
pPictureResource must not be NULL
VUID-VkVideoEncodeInfoKHR-slotIndex-08241
The slotIndex member of each element of pReferenceSlotsmust not be negative
VUID-VkVideoEncodeInfoKHR-pPictureResource-08242
The pPictureResource member of each element of
pReferenceSlots must not be NULL
Valid Usage (Implicit)
VUID-VkVideoEncodeInfoKHR-sType-sType
sType must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR
VUID-VkVideoEncodeInfoKHR-pNext-pNext
Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkVideoEncodeAV1PictureInfoKHR, VkVideoEncodeH264PictureInfoKHR, VkVideoEncodeH265PictureInfoKHR, VkVideoEncodeQuantizationMapInfoKHR, or VkVideoInlineQueryInfoKHR
VUID-VkVideoEncodeInfoKHR-sType-unique
The sType value of each structure in the pNext chain must be unique
VUID-VkVideoEncodeInfoKHR-flags-parameter
flags must be a valid combination of VkVideoEncodeFlagBitsKHR values
VUID-VkVideoEncodeInfoKHR-dstBuffer-parameter
dstBuffer must be a valid VkBuffer handle
VUID-VkVideoEncodeInfoKHR-srcPictureResource-parameter
srcPictureResource must be a valid VkVideoPictureResourceInfoKHR structure
VUID-VkVideoEncodeInfoKHR-pSetupReferenceSlot-parameter
If pSetupReferenceSlot is not NULL, pSetupReferenceSlot must be a valid pointer to a valid VkVideoReferenceSlotInfoKHR structure
VUID-VkVideoEncodeInfoKHR-pReferenceSlots-parameter
If referenceSlotCount is not 0, pReferenceSlots must be a valid pointer to an array of referenceSlotCount valid VkVideoReferenceSlotInfoKHR structures