C Specification

The VkVideoEncodeInfoKHR structure is defined as:

// Provided by VK_KHR_video_encode_queue
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;

Members

  • sType is a VkStructureType value identifying this structure.

  • pNext is a pointer to a structure extending this structure.

  • flags is a bitmask of VkVideoEncodeFlagBitsKHR indicating video encode command flags.

  • dstBuffer is the destination video bitstream buffer to write the encoded bitstream to.

  • dstBufferOffset is the starting offset in bytes from the start of dstBuffer to write the encoded bitstream to.

  • dstBufferRange is the maximum bitstream size in bytes that can be written to dstBuffer, starting from dstBufferOffset.

  • srcPictureResource is the video picture resource to use as the encode input picture.

  • pSetupReferenceSlot is NULL or a pointer to a VkVideoReferenceSlotInfoKHR structure specifying the reconstructed picture information.

  • referenceSlotCount is the number of elements in the pReferenceSlots array.

  • pReferenceSlots is NULL or 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).

  • precedingExternallyEncodedBytes is 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.

Description

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 pReferenceSlots must not be negative

  • VUID-VkVideoEncodeInfoKHR-pPictureResource-08242
    The pPictureResource member of each element of pReferenceSlots must not be NULL

Valid Usage (Implicit)

See Also

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.

Copyright 2014-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0