C Specification

The VkVideoDecodeInfoKHR structure is defined as:

// Provided by VK_KHR_video_decode_queue
typedef struct VkVideoDecodeInfoKHR {
    VkStructureType                   sType;
    const void*                       pNext;
    VkVideoDecodeFlagsKHR             flags;
    VkOffset2D                        codedOffset;
    VkExtent2D                        codedExtent;
    VkBuffer                          srcBuffer;
    VkDeviceSize                      srcBufferOffset;
    VkDeviceSize                      srcBufferRange;
    VkVideoPictureResourceKHR         dstPictureResource;
    const VkVideoReferenceSlotKHR*    pSetupReferenceSlot;
    uint32_t                          referenceSlotCount;
    const VkVideoReferenceSlotKHR*    pReferenceSlots;
} VkVideoDecodeInfoKHR;

Members

  • sType is the type of this structure.

  • pNext is NULL or a pointer to a structure extending this structure. All the codec specific structures related to each frame(picture parameters, quantization matrix, etc.) must be chained here and pass to decode session with the function call vkCmdDecodeVideoKHR.

  • flags is a bitmask of VkVideoDecodeFlagBitsKHR specifying decode flags, reserved for future versions of this specification.

  • codedOffset is the coded offset of the decode operations. The purpose of this field is interpreted based on the codec extension. When decoding content in H.264 field mode, the codedOffset specifies the line or picture field’s offset within the image.

  • codedExtent is the coded size of the decode operations.

  • srcBuffer is the source buffer that holds the encoded bitstream.

  • srcBufferOffset is the buffer offset where the valid encoded bitstream starts in srcBuffer. It must meet the alignment requirement minBitstreamBufferOffsetAlignment within VkVideoCapabilitiesKHR queried with the vkGetPhysicalDeviceVideoCapabilitiesKHR function.

  • srcBufferRange is the size of the srcBuffer with valid encoded bitstream, starting from srcBufferOffset. It must meet the alignment requirement minBitstreamBufferSizeAlignment within VkVideoCapabilitiesKHR queried with the vkGetPhysicalDeviceVideoCapabilitiesKHR function.

  • dstPictureResource is the destination Decoded Output Picture Resource.

  • pSetupReferenceSlot is NULL or a pointer to a VkVideoReferenceSlotKHR structure used for generating a DPB reference slot and Picture Resource. pSetupReferenceSlot->slotIndex specifies the slot index number to use as a target for producing the DPB data. slotIndex must reference a valid entry as specified in VkVideoBeginCodingInfoKHR via the pReferenceSlots within the vkCmdBeginVideoCodingKHR command that established the Vulkan Video Decode Context for this command.

  • referenceSlotCount is the number of the DPB Reference Pictures that will be used when this decoding operation is executing.

  • pReferenceSlots is a pointer to an array of VkVideoReferenceSlotKHR structures specifying the DPB Reference pictures that will be used when this decoding operation is executing.

Description

Valid Usage (Implicit)
  • VUID-VkVideoDecodeInfoKHR-sType-sType
    sType must be VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR

  • VUID-VkVideoDecodeInfoKHR-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 VkVideoDecodeH264PictureInfoEXT or VkVideoDecodeH265PictureInfoEXT

  • VUID-VkVideoDecodeInfoKHR-sType-unique
    The sType value of each struct in the pNext chain must be unique

  • VUID-VkVideoDecodeInfoKHR-flags-parameter
    flags must be a valid combination of VkVideoDecodeFlagBitsKHR values

  • VUID-VkVideoDecodeInfoKHR-srcBuffer-parameter
    srcBuffer must be a valid VkBuffer handle

  • VUID-VkVideoDecodeInfoKHR-dstPictureResource-parameter
    dstPictureResource must be a valid VkVideoPictureResourceKHR structure

  • VUID-VkVideoDecodeInfoKHR-pSetupReferenceSlot-parameter
    pSetupReferenceSlot must be a valid pointer to a valid VkVideoReferenceSlotKHR structure

  • VUID-VkVideoDecodeInfoKHR-pReferenceSlots-parameter
    If referenceSlotCount is not 0, pReferenceSlots must be a valid pointer to an array of referenceSlotCount valid VkVideoReferenceSlotKHR structures

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-2021 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0