VkVideoDecodeInfoKHR(3)

# VkVideoDecodeInfoKHR(3) Manual Page

## Name

VkVideoDecodeInfoKHR - Structure specifying video decode parameters

Loading… please wait.

## 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;
        VkBuffer                              srcBuffer;
        VkDeviceSize                          srcBufferOffset;
        VkDeviceSize                          srcBufferRange;
        VkVideoPictureResourceInfoKHR         dstPictureResource;
        const VkVideoReferenceSlotInfoKHR*    pSetupReferenceSlot;
        uint32_t                              referenceSlotCount;
        const VkVideoReferenceSlotInfoKHR*    pReferenceSlots;
    } VkVideoDecodeInfoKHR;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `srcBuffer` is the source video bitstream buffer to read the encoded bitstream from.

- `srcBufferOffset` is the starting offset in bytes from the start of `srcBuffer` to read the encoded bitstream from.

- `srcBufferRange` is the size in bytes of the encoded bitstream to decode from `srcBuffer`, starting from `srcBufferOffset`.

- `dstPictureResource` is the video picture resource to use as the decode output picture.

- `pSetupReferenceSlot` is `NULL` or a pointer to a VkVideoReferenceSlotInfoKHR structure describing the DPB slot to activate and the video picture resource to use as the reconstructed picture to activate the DPB slot with.

- `referenceSlotCount` is the number of elements in the `pReferenceSlots` array.

- `pReferenceSlots` is a pointer to an array of VkVideoReferenceSlotInfoKHR structures describing the DPB slots and corresponding reference picture resources to use in this video decode operation (the set of active reference pictures).

## Description

Valid Usage

- VUID-VkVideoDecodeInfoKHR-srcBuffer-07165
  `srcBuffer` must have been created with `VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR` set

- VUID-VkVideoDecodeInfoKHR-srcBufferOffset-07166
  `srcBufferOffset` must be less than the size of `srcBuffer`

- VUID-VkVideoDecodeInfoKHR-srcBufferRange-07167
  `srcBufferRange` must be less than or equal to the size of `srcBuffer` minus `srcBufferOffset`

- VUID-VkVideoDecodeInfoKHR-pSetupReferenceSlot-07168
  If `pSetupReferenceSlot` is not `NULL`, then its `slotIndex` member must not be negative

- VUID-VkVideoDecodeInfoKHR-pSetupReferenceSlot-07169
  If `pSetupReferenceSlot` is not `NULL`, then its `pPictureResource` must not be `NULL`

- VUID-VkVideoDecodeInfoKHR-slotIndex-07171
  The `slotIndex` member of each element of `pReferenceSlots` must not be negative

- VUID-VkVideoDecodeInfoKHR-pPictureResource-07172
  The `pPictureResource` member of each element of `pReferenceSlots` must not be `NULL`

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 VkVideoDecodeH264PictureInfoKHR or VkVideoDecodeH265PictureInfoKHR

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

- VUID-VkVideoDecodeInfoKHR-flags-zerobitmask
  `flags` must be `0`

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

- VUID-VkVideoDecodeInfoKHR-dstPictureResource-parameter
  `dstPictureResource` must be a valid VkVideoPictureResourceInfoKHR structure

- VUID-VkVideoDecodeInfoKHR-pSetupReferenceSlot-parameter
  If `pSetupReferenceSlot` is not `NULL`, `pSetupReferenceSlot` must be a valid pointer to a valid VkVideoReferenceSlotInfoKHR structure

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

## See Also

VK_KHR_video_decode_queue, VkBuffer, VkDeviceSize, VkStructureType, VkVideoDecodeFlagsKHR, VkVideoPictureResourceInfoKHR, VkVideoReferenceSlotInfoKHR, vkCmdDecodeVideoKHR

## 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

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0