Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class KHRVideoDecodeQueue

extends Object
Class Inheritance
Imports
org.lwjgl.system.*

This extension builds upon the VK_KHR_video_queue extension by adding common APIs specific to video decoding and thus enabling implementations to expose queue families supporting video decode operations.

More specifically, it adds video decode specific capabilities and a new command buffer command that allows recording video decode operations against a video session.

This extension is to be used in conjunction with other codec specific video decode extensions that enable decoding video sequences of specific video compression standards.

VK_KHR_video_decode_queue
Name String
VK_KHR_video_decode_queue
Extension Type
Device extension
Registered Extension Number
25
Revision
7
Extension and Version Dependencies
VK_KHR_video_queue and VK_KHR_synchronization2
Contact
Extension Proposal
VK_KHR_video_decode_queue
Other Extension Metadata
Last Modified Date
2022-09-29
IP Status
No known IP claims.
Contributors
  • Ahmed Abdelkhalek, AMD
  • Jake Beju, AMD
  • Olivier Lapicque, NVIDIA
  • Peter Fang, AMD
  • Piers Daniell, NVIDIA
  • Srinath Kumarapuram, NVIDIA
  • Tony Zlatinski, NVIDIA
  • Daniel Rakos, RasterGrid

Field Summary

Modifier and TypeField and Description
public static final long
VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR

Extends VkAccessFlagBits2.

public static final long
VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR

Extends VkAccessFlagBits2.

public static final int
VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR

Extends VkBufferUsageFlagBits.

public static final int
VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR

Extends VkBufferUsageFlagBits.

public static final long
VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR

Extends VkFormatFeatureFlagBits2.

public static final long
VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR

Extends VkFormatFeatureFlagBits2.

public static final int
VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR

Extends VkFormatFeatureFlagBits.

public static final int
VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR

Extends VkFormatFeatureFlagBits.

public static final int
public static final int
public static final int
public static final int
VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR

Extends VkImageUsageFlagBits.

public static final int
VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR

Extends VkImageUsageFlagBits.

public static final int
VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR

Extends VkImageUsageFlagBits.

public static final String
public static final int
VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION

The extension specification version.

public static final long
VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

Extends VkPipelineStageFlagBits2.

public static final int
VK_QUEUE_VIDEO_DECODE_BIT_KHR

Extends VkQueueFlagBits.

public static final int
public static final int
public static final int
public static final int
VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR

VkVideoDecodeCapabilityFlagBitsKHR - Video decode capability flags Description

public static final int
VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR

VkVideoDecodeCapabilityFlagBitsKHR - Video decode capability flags Description

public static final int
VK_VIDEO_DECODE_USAGE_DEFAULT_KHR

VkVideoDecodeUsageFlagBitsKHR - Video decode usage flags Description

public static final int
VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR

VkVideoDecodeUsageFlagBitsKHR - Video decode usage flags Description

public static final int
VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR

VkVideoDecodeUsageFlagBitsKHR - Video decode usage flags Description

public static final int
VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR

VkVideoDecodeUsageFlagBitsKHR - Video decode usage flags Description

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
nvkCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, long pDecodeInfo)

Unsafe version of: CmdDecodeVideoKHR

public static void
vkCmdDecodeVideoKHR(VkCommandBuffer
the command buffer in which to record the command.
commandBuffer
,
VkVideoDecodeInfoKHR
a pointer to a VkVideoDecodeInfoKHR structure specifying the parameters of the video decode operations.
pDecodeInfo
)

Launch a video decode operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHRback to summary
public static final long VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR

Extends VkAccessFlagBits2.

Enum values:
VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHRback to summary
public static final long VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR

Extends VkAccessFlagBits2.

Enum values:
VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHRback to summary
public static final int VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR

Extends VkBufferUsageFlagBits.

Enum values:
VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHRback to summary
public static final int VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR

Extends VkBufferUsageFlagBits.

Enum values:
VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHRback to summary
public static final long VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR

Extends VkFormatFeatureFlagBits2.

Enum values:
VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHRback to summary
public static final long VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR

Extends VkFormatFeatureFlagBits2.

Enum values:
VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHRback to summary
public static final int VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR

Extends VkFormatFeatureFlagBits.

Enum values:
VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHRback to summary
public static final int VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR

Extends VkFormatFeatureFlagBits.

Enum values:
VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHRback to summary
public static final int VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR

Extends VkImageLayout.

Enum values:
VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHRback to summary
public static final int VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR

Extends VkImageLayout.

Enum values:
VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHRback to summary
public static final int VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR

Extends VkImageLayout.

Enum values:
VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHRback to summary
public static final int VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR

Extends VkImageUsageFlagBits.

Enum values:
VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHRback to summary
public static final int VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR

Extends VkImageUsageFlagBits.

Enum values:
VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHRback to summary
public static final int VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR

Extends VkImageUsageFlagBits.

Enum values:
VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAMEback to summary
public static final String VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME

The extension name.

VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSIONback to summary
public static final int VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION

The extension specification version.

VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHRback to summary
public static final long VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR

Extends VkPipelineStageFlagBits2.

VK_QUEUE_VIDEO_DECODE_BIT_KHRback to summary
public static final int VK_QUEUE_VIDEO_DECODE_BIT_KHR

Extends VkQueueFlagBits.

VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHRback to summary
public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR

Extends VkStructureType.

Enum values:
VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHRback to summary
public static final int VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR

VkVideoDecodeCapabilityFlagBitsKHR - Video decode capability flags

Description

Implementations are only required to support one of VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR and VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR. Accordingly, applications should handle both cases to maximize portability.

Note:

If both VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR and VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR are supported, an application can choose to create separate images for decode DPB and decode output. E.g. in cases when linear tiling is preferred (and supported) for the decode output picture and the DPB requires optimal tiling, this avoids the need for a separate copy at the expense of additional memory bandwidth requirements during decoding.

VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHRback to summary
public static final int VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR

VkVideoDecodeCapabilityFlagBitsKHR - Video decode capability flags

Description

Implementations are only required to support one of VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR and VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR. Accordingly, applications should handle both cases to maximize portability.

Note:

If both VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR and VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR are supported, an application can choose to create separate images for decode DPB and decode output. E.g. in cases when linear tiling is preferred (and supported) for the decode output picture and the DPB requires optimal tiling, this avoids the need for a separate copy at the expense of additional memory bandwidth requirements during decoding.

VK_VIDEO_DECODE_USAGE_DEFAULT_KHRback to summary
public static final int VK_VIDEO_DECODE_USAGE_DEFAULT_KHR

VkVideoDecodeUsageFlagBitsKHR - Video decode usage flags

Description
Note

There are no restrictions on the combination of bits that can be specified by the application. However, applications should use reasonable combinations in order for the implementation to be able to select the most appropriate mode of operation for the particular use case.

Enum values:
VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHRback to summary
public static final int VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR

VkVideoDecodeUsageFlagBitsKHR - Video decode usage flags

Description
Note

There are no restrictions on the combination of bits that can be specified by the application. However, applications should use reasonable combinations in order for the implementation to be able to select the most appropriate mode of operation for the particular use case.

Enum values:
VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHRback to summary
public static final int VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR

VkVideoDecodeUsageFlagBitsKHR - Video decode usage flags

Description
Note

There are no restrictions on the combination of bits that can be specified by the application. However, applications should use reasonable combinations in order for the implementation to be able to select the most appropriate mode of operation for the particular use case.

Enum values:
VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHRback to summary
public static final int VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR

VkVideoDecodeUsageFlagBitsKHR - Video decode usage flags

Description
Note

There are no restrictions on the combination of bits that can be specified by the application. However, applications should use reasonable combinations in order for the implementation to be able to select the most appropriate mode of operation for the particular use case.

Enum values:

Constructor Detail

KHRVideoDecodeQueueback to summary
protected KHRVideoDecodeQueue()

Method Detail

nvkCmdDecodeVideoKHRback to summary
public static void nvkCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, long pDecodeInfo)

Unsafe version of: CmdDecodeVideoKHR

vkCmdDecodeVideoKHRback to summary
public static void vkCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, VkVideoDecodeInfoKHR pDecodeInfo)

Launch a video decode operation.

C Specification

To launch video decode operations, call:


void vkCmdDecodeVideoKHR(
    VkCommandBuffer                             commandBuffer,
    const VkVideoDecodeInfoKHR*                 pDecodeInfo);
Description

Each call issues one or more video decode operations. The implicit parameter opCount corresponds to the number of video decode operations issued by the command. After calling this command, the active query index of each active query is incremented by opCount.

Currently each call to this command results in the issue of a single video decode operation.

Active Reference Picture Information
  • The image subregion within the image subresource referred to by the video picture resource used as the reference picture.
  • The DPB slot index the reference picture is associated with.
  • The codec-specific reference information related to the reference picture.
Reconstructed Picture Information
  • The image subregion within the image subresource referred to by the video picture resource used as the reconstructed picture.
  • The DPB slot index to activate with the reconstructed picture.
  • The codec-specific reference information related to the reconstructed picture.
Decode Output Picture Information
  • The image subregion within the image subresource referred to by the video picture resource used as the decode output picture.
  • The codec-specific picture information related to the decode output picture.

Several limiting values are defined below that are referenced by the relevant valid usage statements of this command.

  • Let uint32_t activeReferencePictureCount be the size of the list of active reference pictures used by the video decode operation. Unless otherwise defined, activeReferencePictureCount is set to the value of pDecodeInfo→referenceSlotCount.
    • If the bound video session was created with an H.264 decode profile, then let activeReferencePictureCount be the value of pDecodeInfo→referenceSlotCount plus the number of elements of the pDecodeInfo→pReferenceSlots array that have a VkVideoDecodeH264DpbSlotInfoKHR structure included in their pNext chain with both pStdReferenceInfo→flags.top_field_flag and pStdReferenceInfo→flags.bottom_field_flag set.
      Note

      This means that the elements of pDecodeInfo→pReferenceSlots that include both a top and bottom field reference are counted as two separate active reference pictures, as described in the active reference picture list construction rules for H.264 decode operations.

  • Let VkOffset2D codedOffsetGranularity be the minimum alignment requirement for the coded offset of video picture resources. Unless otherwise defined, the value of the x and y members of codedOffsetGranularity are 0.
  • Let uint32_t dpbFrameUseCount[] be an array of size maxDpbSlots, where maxDpbSlots is the VkVideoSessionCreateInfoKHR::maxDpbSlots the bound video session was created with, with each element indicating the number of times a frame associated with the corresponding DPB slot index is referred to by the video coding operation. Let the initial value of each element of the array be 0.
    • If pDecodeInfo→pSetupReferenceSlot is not NULL, then dpbFrameUseCount[i] is incremented by one, where i equals pDecodeInfo→pSetupReferenceSlot→slotIndex. If the bound video session object was created with an H.264 decode profile, then dpbFrameUseCount[i] is decremented by one if either pStdReferenceInfo→flags.top_field_flag or pStdReferenceInfo→flags.bottom_field_flag is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the pDecodeInfo→pSetupReferenceSlot→pNext chain.
    • For each element of pDecodeInfo→pReferenceSlots, dpbFrameUseCount[i] is incremented by one, where i equals the slotIndex member of the corresponding element. If the bound video session object was created with an H.264 decode profile, then dpbFrameUseCount[i] is decremented by one if either pStdReferenceInfo→flags.top_field_flag or pStdReferenceInfo→flags.bottom_field_flag is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the pNext chain of the corresponding element of pDecodeInfo→pReferenceSlots.
  • Let uint32_t dpbTopFieldUseCount[] and uint32_t dpbBottomFieldUseCount[] be arrays of size maxDpbSlots, where maxDpbSlots is the VkVideoSessionCreateInfoKHR::maxDpbSlots the bound video session was created with, with each element indicating the number of times the top field or the bottom field, respectively, associated with the corresponding DPB slot index is referred to by the video coding operation. Let the initial value of each element of the arrays be 0.
    • If the bound video session object was created with an H.264 decode profile and pDecodeInfo→pSetupReferenceSlot is not NULL, then perform the following:
      • If pStdReferenceInfo→flags.top_field_flag is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the pDecodeInfo→pSetupReferenceSlot→pNext chain, then dpbTopFieldUseCount[i] is incremented by one, where i equals pDecodeInfo→pSetupReferenceSlot→slotIndex.
      • If pStdReferenceInfo→flags.bottom_field_flag is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the pDecodeInfo→pSetupReferenceSlot→pNext chain, then dpbBottomFieldUseCount[i] is incremented by one, where i equals pDecodeInfo→pSetupReferenceSlot→slotIndex.
    • If the bound video session object was created with an H.264 decode profile, then perform the following for each element of pDecodeInfo→pReferenceSlots:
      • If pStdReferenceInfo→flags.top_field_flag is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the pNext chain of the element, then dpbTopFieldUseCount[i] is incremented by one, where i equals the slotIndex member of the element.
      • If pStdReferenceInfo→flags.bottom_field_flag is set in the VkVideoDecodeH264DpbSlotInfoKHR structure in the pNext chain of the element, then dpbBottomFieldUseCount[i] is incremented by one, where i equals the slotIndex member of the element.
Valid Usage
  • The bound video session must not be in uninitialized state at the time the command is executed on the device
  • For each active query, the active query index corresponding to the query type of that query plus opCount must be less than or equal to the last activatable query index corresponding to the query type of that query plus one
  • pDecodeInfo→srcBuffer must be compatible with the video profile the bound video session was created with
  • If commandBuffer is an unprotected command buffer and protectedNoFault is not supported, then pDecodeInfo→srcBuffer must not be a protected buffer
  • If commandBuffer is a protected command buffer and protectedNoFault is not supported, then pDecodeInfo→srcBuffer must be a protected buffer
  • pDecodeInfo→srcBufferOffset must be an integer multiple of VkVideoCapabilitiesKHR::minBitstreamBufferOffsetAlignment, as returned by GetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with
  • pDecodeInfo→srcBufferRange must be an integer multiple of VkVideoCapabilitiesKHR::minBitstreamBufferSizeAlignment, as returned by GetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with
  • If pDecodeInfo→pSetupReferenceSlot is not NULL and VkVideoDecodeCapabilitiesKHR::flags does not include VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR, as returned by GetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the video picture resources specified by pDecodeInfo→dstPictureResource and pDecodeInfo→pSetupReferenceSlot→pPictureResource must not match
  • If pDecodeInfo→pSetupReferenceSlot is not NULL and VkVideoDecodeCapabilitiesKHR::flags does not include VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR, as returned by GetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with, then the video picture resources specified by pDecodeInfo→dstPictureResource and pDecodeInfo→pSetupReferenceSlot→pPictureResource must match
  • pDecodeInfo→dstPictureResource.imageViewBinding must be compatible with the video profile the bound video session was created with
  • The format of pDecodeInfo→dstPictureResource.imageViewBinding must match the VkVideoSessionCreateInfoKHR::pictureFormat the bound video session was created with
  • pDecodeInfo→dstPictureResource.codedOffset must be an integer multiple of codedOffsetGranularity
  • pDecodeInfo→dstPictureResource.codedExtent must be between minCodedExtent and maxCodedExtent, inclusive, the bound video session was created with
  • pDecodeInfo→dstPictureResource.imageViewBinding must have been created with IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR
  • If commandBuffer is an unprotected command buffer and protectedNoFault is not supported, then pDecodeInfo→dstPictureResource.imageViewBinding must not have been created from a protected image
  • If commandBuffer is a protected command buffer and protectedNoFault is not supported, then pDecodeInfo→dstPictureResource.imageViewBinding must have been created from a protected image
  • If pDecodeInfo→pSetupReferenceSlot is not NULL, then pDecodeInfo→pSetupReferenceSlot→slotIndex must be less than the VkVideoSessionCreateInfoKHR::maxDpbSlots specified when the bound video session was created
  • If pDecodeInfo→pSetupReferenceSlot is not NULL, then pDecodeInfo→pSetupReferenceSlot→pPictureResource→codedOffset must be an integer multiple of codedOffsetGranularity
  • If pDecodeInfo→pSetupReferenceSlot is not NULL, then pDecodeInfo→pSetupReferenceSlot→pPictureResource must match one of the bound reference picture resource
  • activeReferencePictureCount must be less than or equal to the VkVideoSessionCreateInfoKHR::maxActiveReferencePictures specified when the bound video session was created
  • The slotIndex member of each element of pDecodeInfo→pReferenceSlots must be less than the VkVideoSessionCreateInfoKHR::maxDpbSlots specified when the bound video session was created
  • The codedOffset member of the VkVideoPictureResourceInfoKHR structure pointed to by the pPictureResource member of each element of pDecodeInfo→pReferenceSlots must be an integer multiple of codedOffsetGranularity
  • The pPictureResource member of each element of pDecodeInfo→pReferenceSlots must match one of the bound reference picture resource associated with the DPB slot index specified in the slotIndex member of that element
  • Each video picture resource corresponding to the pPictureResource member specified in the elements of pDecodeInfo→pReferenceSlots must be unique within pDecodeInfo→pReferenceSlots
  • All elements of dpbFrameUseCount must be less than or equal to 1
  • All elements of dpbTopFieldUseCount must be less than or equal to 1
  • All elements of dpbBottomFieldUseCount must be less than or equal to 1
  • If pDecodeInfo→pSetupReferenceSlot is NULL or pDecodeInfo→pSetupReferenceSlot→pPictureResource does not refer to the same image subresource as pDecodeInfo→dstPictureResource, then the image subresource referred to by pDecodeInfo→dstPictureResource must be in the IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR layout at the time the video decode operation is executed on the device
  • If pDecodeInfo→pSetupReferenceSlot is not NULL and pDecodeInfo→pSetupReferenceSlot→pPictureResource refers to the same image subresource as pDecodeInfo→dstPictureResource, then the image subresource referred to by pDecodeInfo→dstPictureResource must be in the IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video decode operation is executed on the device
  • If pDecodeInfo→pSetupReferenceSlot is not NULL, then the image subresource referred to by pDecodeInfo→pSetupReferenceSlot→pPictureResource must be in the IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video decode operation is executed on the device
  • The image subresource referred to by the pPictureResource member of each element of pDecodeInfo→pReferenceSlots must be in the IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video decode operation is executed on the device
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the pNext chain of pDecodeInfo must include a VkVideoDecodeH264PictureInfoKHR structure
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR but was not created with interlaced frame support, then the decode output picture must represent a frame
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then all elements of the pSliceOffsets member of the VkVideoDecodeH264PictureInfoKHR structure included in the pNext chain of pDecodeInfo must be less than pDecodeInfo→srcBufferRange
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the bound video session parameters object must contain a StdVideoH264SequenceParameterSet entry with seq_parameter_set_id matching StdVideoDecodeH264PictureInfo::seq_parameter_set_id that is provided in the pStdPictureInfo member of the VkVideoDecodeH264PictureInfoKHR structure included in the pNext chain of pDecodeInfo
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the bound video session parameters object must contain a StdVideoH264PictureParameterSet entry with seq_parameter_set_id and pic_parameter_set_id matching StdVideoDecodeH264PictureInfo::seq_parameter_set_id and StdVideoDecodeH264PictureInfo::pic_parameter_set_id, respectively, that are provided in the pStdPictureInfo member of the VkVideoDecodeH264PictureInfoKHR structure included in the pNext chain of pDecodeInfo
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and pDecodeInfo→pSetupReferenceSlot is not NULL, then the pNext chain of pDecodeInfo→pSetupReferenceSlot must include a VkVideoDecodeH264DpbSlotInfoKHR structure
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR but was not created with interlaced frame support, and pDecodeInfo→pSetupReferenceSlot is not NULL, then the reconstructed picture must represent a frame
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the pNext chain of each element of pDecodeInfo→pReferenceSlots must include a VkVideoDecodeH264DpbSlotInfoKHR structure
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR but was not created with interlaced frame support, then each active reference picture corresponding to the elements of pDecodeInfo→pReferenceSlots must represent a frame
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, pDecodeInfo→pSetupReferenceSlot is not NULL, and the decode output picture represents a frame, then the reconstructed picture must also represent a frame
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, pDecodeInfo→pSetupReferenceSlot is not NULL, and the decode output picture represents a top field, then the reconstructed picture must also represent a top field
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, pDecodeInfo→pSetupReferenceSlot is not NULL, and the decode output picture represents a bottom field, then the reconstructed picture must also represent a bottom field
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and an active reference picture corresponding to any element of pDecodeInfo→pReferenceSlots represents a frame, then the DPB slot index of the bound video session specified by the slotIndex member of that element must be currently associated with a frame picture matching the video picture resource specified by the pPictureResource member of the same element at the time the command is executed on the device
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and an active reference picture corresponding to any element of pDecodeInfo→pReferenceSlots represents a top field, then the DPB slot index of the bound video session specified by the slotIndex member of that element must be currently associated with a top field picture matching the video picture resource specified by the pPictureResource member of the same element at the time the command is executed on the device
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and an active reference picture corresponding to any element of pDecodeInfo→pReferenceSlots represents a bottom field, then the DPB slot index of the bound video session specified by the slotIndex member of that element must be currently associated with a bottom field picture matching the video picture resource specified by the pPictureResource member of the same element at the time the command is executed on the device
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the pNext chain of pDecodeInfo must include a VkVideoDecodeH265PictureInfoKHR structure
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then all elements of the pSliceSegmentOffsets member of the VkVideoDecodeH265PictureInfoKHR structure included in the pNext chain of pDecodeInfo must be less than pDecodeInfo→srcBufferRange
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video session parameters object must contain a StdVideoH265VideoParameterSet entry with vps_video_parameter_set_id matching StdVideoDecodeH265PictureInfo::sps_video_parameter_set_id that is provided in the pStdPictureInfo member of the VkVideoDecodeH265PictureInfoKHR structure included in the pNext chain of pDecodeInfo
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video session parameters object must contain a StdVideoH265SequenceParameterSet entry with sps_video_parameter_set_id and sps_seq_parameter_set_id matching StdVideoDecodeH265PictureInfo::sps_video_parameter_set_id and StdVideoDecodeH265PictureInfo::pps_seq_parameter_set_id, respectively, that are provided in the pStdPictureInfo member of the VkVideoDecodeH265PictureInfoKHR structure included in the pNext chain of pDecodeInfo
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video session parameters object must contain a StdVideoH265PictureParameterSet entry with sps_video_parameter_set_id, pps_seq_parameter_set_id, and pps_pic_parameter_set_id matching StdVideoDecodeH265PictureInfo::sps_video_parameter_set_id, StdVideoDecodeH265PictureInfo::pps_seq_parameter_set_id, and StdVideoDecodeH265PictureInfo::pps_pic_parameter_set_id, respectively, that are provided in the pStdPictureInfo member of the VkVideoDecodeH265PictureInfoKHR structure included in the pNext chain of pDecodeInfo
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and pDecodeInfo→pSetupReferenceSlot is not NULL, then the pNext chain of pDecodeInfo→pSetupReferenceSlot must include a VkVideoDecodeH265DpbSlotInfoKHR structure
  • If the bound video session was created with the video codec operation VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the pNext chain of each element of pDecodeInfo→pReferenceSlots must include a VkVideoDecodeH265DpbSlotInfoKHR structure
Valid Usage (Implicit)
  • commandBuffer must be a valid VkCommandBuffer handle
  • pDecodeInfo must be a valid pointer to a valid VkVideoDecodeInfoKHR structure
  • commandBuffer must be in the recording state
  • The VkCommandPool that commandBuffer was allocated from must support decode operations
  • This command must only be called outside of a render pass instance
  • This command must only be called inside of a video coding scope
  • commandBuffer must be a primary VkCommandBuffer
Host Synchronization
  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized
Command Properties
Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
PrimaryOutsideInsideDecodeAction
See Also

VkVideoDecodeInfoKHR

Parameters
commandBuffer:VkCommandBuffer

the command buffer in which to record the command.

pDecodeInfo:VkVideoDecodeInfoKHR

a pointer to a VkVideoDecodeInfoKHR structure specifying the parameters of the video decode operations.