Class KHRVideoDecodeQueue
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.
- Name String
VK_KHR_video_decode_queue- Extension Type
- Device extension
- Registered Extension Number
- 25
- Revision
- 8
- Extension and Version Dependencies
VK_KHR_video_queueandVK_KHR_synchronization2or Version 1.3- API Interactions
- Interacts with VK_VERSION_1_3
- Interacts with VK_KHR_format_feature_flags2
- Contact
- Extension Proposal
- VK_KHR_video_decode_queue
Other Extension Metadata
- Last Modified Date
- 2023-12-05
- 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
FieldsModifier and TypeFieldDescriptionstatic final longExtendsVkAccessFlagBits2.static final longExtendsVkAccessFlagBits2.static final intExtendsVkBufferUsageFlagBits.static final intExtendsVkBufferUsageFlagBits.static final longExtendsVkFormatFeatureFlagBits2.static final longExtendsVkFormatFeatureFlagBits2.static final intExtendsVkFormatFeatureFlagBits.static final intExtendsVkFormatFeatureFlagBits.static final intExtendsVkImageLayout.static final intExtendsVkImageLayout.static final intExtendsVkImageLayout.static final intExtendsVkImageUsageFlagBits.static final intExtendsVkImageUsageFlagBits.static final intExtendsVkImageUsageFlagBits.static final StringThe extension name.static final intThe extension specification version.static final longExtendsVkPipelineStageFlagBits2.static final intExtendsVkQueueFlagBits.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intVkVideoDecodeCapabilityFlagBitsKHR - Video decode capability flagsstatic final intVkVideoDecodeCapabilityFlagBitsKHR - Video decode capability flagsstatic final intVkVideoDecodeUsageFlagBitsKHR - Video decode usage flagsstatic final intVkVideoDecodeUsageFlagBitsKHR - Video decode usage flagsstatic final intVkVideoDecodeUsageFlagBitsKHR - Video decode usage flagsstatic final intVkVideoDecodeUsageFlagBitsKHR - Video decode usage flags -
Method Summary
Modifier and TypeMethodDescriptionstatic voidnvkCmdDecodeVideoKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pDecodeInfo) Unsafe version of:CmdDecodeVideoKHRstatic voidvkCmdDecodeVideoKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkVideoDecodeInfoKHR pDecodeInfo) Launch a video decode operation.
-
Field Details
-
VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION
public static final int VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME
The extension name.- See Also:
-
VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR
public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHRExtendsVkStructureType.Enum values:
- See Also:
-
VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHR
public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHRExtendsVkStructureType.Enum values:
- See Also:
-
VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR
public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHRExtendsVkStructureType.Enum values:
- See Also:
-
VK_QUEUE_VIDEO_DECODE_BIT_KHR
public static final int VK_QUEUE_VIDEO_DECODE_BIT_KHRExtendsVkQueueFlagBits.- See Also:
-
VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR
public static final long VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHRExtendsVkPipelineStageFlagBits2.- See Also:
-
VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR
public static final long VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHRExtendsVkAccessFlagBits2.Enum values:
- See Also:
-
VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR
public static final long VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHRExtendsVkAccessFlagBits2.Enum values:
- See Also:
-
VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR
public static final int VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHRExtendsVkBufferUsageFlagBits.Enum values:
- See Also:
-
VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR
public static final int VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHRExtendsVkBufferUsageFlagBits.Enum values:
- See Also:
-
VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR
public static final int VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHRExtendsVkImageUsageFlagBits.Enum values:
- See Also:
-
VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR
public static final int VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHRExtendsVkImageUsageFlagBits.Enum values:
- See Also:
-
VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR
public static final int VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHRExtendsVkImageUsageFlagBits.Enum values:
- See Also:
-
VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR
public static final int VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHRExtendsVkFormatFeatureFlagBits.Enum values:
- See Also:
-
VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR
public static final int VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHRExtendsVkFormatFeatureFlagBits.Enum values:
- See Also:
-
VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR
public static final int VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHRExtendsVkImageLayout.Enum values:
- See Also:
-
VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR
public static final int VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHRExtendsVkImageLayout.Enum values:
- See Also:
-
VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR
public static final int VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHRExtendsVkImageLayout.Enum values:
- See Also:
-
VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR
public static final long VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHRExtendsVkFormatFeatureFlagBits2.Enum values:
- See Also:
-
VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR
public static final long VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHRExtendsVkFormatFeatureFlagBits2.Enum values:
- See Also:
-
VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR
public static final int VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHRVkVideoDecodeCapabilityFlagBitsKHR - Video decode capability flagsDescription
VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHRindicates support for using the same video picture resource as the reconstructed picture and decode output picture in a video decode operation.VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHRindicates support for using distinct video picture resources as the reconstructed picture and decode output picture in a video decode operation.Note
Some video profiles allow using distinct video picture resources as the reconstructed picture and decode output picture in specific video decode operations even when the video decode profile does not support
VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR. Even if the implementation only reports coincide, the decode output picture for film grain enabled frames must be a different video picture resource from the reconstructed picture because film grain is applied outside of the coding loop.
Implementations are only required to support one of
VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHRandVIDEO_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_KHRandVIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHRare 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.- See Also:
-
VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR
public static final int VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHRVkVideoDecodeCapabilityFlagBitsKHR - Video decode capability flagsDescription
VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHRindicates support for using the same video picture resource as the reconstructed picture and decode output picture in a video decode operation.VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHRindicates support for using distinct video picture resources as the reconstructed picture and decode output picture in a video decode operation.Note
Some video profiles allow using distinct video picture resources as the reconstructed picture and decode output picture in specific video decode operations even when the video decode profile does not support
VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR. Even if the implementation only reports coincide, the decode output picture for film grain enabled frames must be a different video picture resource from the reconstructed picture because film grain is applied outside of the coding loop.
Implementations are only required to support one of
VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHRandVIDEO_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_KHRandVIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHRare 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.- See Also:
-
VK_VIDEO_DECODE_USAGE_DEFAULT_KHR
public static final int VK_VIDEO_DECODE_USAGE_DEFAULT_KHRVkVideoDecodeUsageFlagBitsKHR - Video decode usage flagsDescription
VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHRspecifies that video decoding is intended to be used in conjunction with video encoding to transcode a video bitstream with the same and/or different codecs.VIDEO_DECODE_USAGE_OFFLINE_BIT_KHRspecifies that video decoding is intended to be used to consume a local video bitstream.VIDEO_DECODE_USAGE_STREAMING_BIT_KHRspecifies that video decoding is intended to be used to consume a video bitstream received as a continuous flow over network.
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:
- See Also:
-
VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR
public static final int VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHRVkVideoDecodeUsageFlagBitsKHR - Video decode usage flagsDescription
VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHRspecifies that video decoding is intended to be used in conjunction with video encoding to transcode a video bitstream with the same and/or different codecs.VIDEO_DECODE_USAGE_OFFLINE_BIT_KHRspecifies that video decoding is intended to be used to consume a local video bitstream.VIDEO_DECODE_USAGE_STREAMING_BIT_KHRspecifies that video decoding is intended to be used to consume a video bitstream received as a continuous flow over network.
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:
- See Also:
-
VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR
public static final int VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHRVkVideoDecodeUsageFlagBitsKHR - Video decode usage flagsDescription
VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHRspecifies that video decoding is intended to be used in conjunction with video encoding to transcode a video bitstream with the same and/or different codecs.VIDEO_DECODE_USAGE_OFFLINE_BIT_KHRspecifies that video decoding is intended to be used to consume a local video bitstream.VIDEO_DECODE_USAGE_STREAMING_BIT_KHRspecifies that video decoding is intended to be used to consume a video bitstream received as a continuous flow over network.
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:
- See Also:
-
VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR
public static final int VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHRVkVideoDecodeUsageFlagBitsKHR - Video decode usage flagsDescription
VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHRspecifies that video decoding is intended to be used in conjunction with video encoding to transcode a video bitstream with the same and/or different codecs.VIDEO_DECODE_USAGE_OFFLINE_BIT_KHRspecifies that video decoding is intended to be used to consume a local video bitstream.VIDEO_DECODE_USAGE_STREAMING_BIT_KHRspecifies that video decoding is intended to be used to consume a video bitstream received as a continuous flow over network.
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:
- See Also:
-
-
Method Details
-
nvkCmdDecodeVideoKHR
public static void nvkCmdDecodeVideoKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pDecodeInfo) Unsafe version of:CmdDecodeVideoKHR -
vkCmdDecodeVideoKHR
public static void vkCmdDecodeVideoKHR(org.lwjgl.vulkan.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
opCountcorresponds 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 byopCount.Currently each call to this command results in the issue of a single video decode operation.
If the bound video session was created with
VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHRand thepNextchain ofpDecodeInfoincludes aVkVideoInlineQueryInfoKHRstructure with itsqueryPoolmember specifying a validVkQueryPoolhandle, then this command will execute a query for each video decode operation issued by it.- 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 use for picture reconstruction.
- The codec-specific reference information related to the reconstructed picture.
Specifying a valid
VkVideoReferenceSlotInfoKHRstructure inpDecodeInfo→pSetupReferenceSlotis always required, unless the video session was created withVkVideoSessionCreateInfoKHR::maxDpbSlotequal to zero. However, the DPB slot identified bypDecodeInfo→pSetupReferenceSlot→slotIndexis only activated with the reconstructed picture specified inpDecodeInfo→pSetupReferenceSlot→pPictureResourceif reference picture setup is requested according to the codec-specific semantics.If reconstructed picture information is specified, and
pDecodeInfo→pSetupReferenceSlot→pPictureResourcerefers to a video picture resource different than that of the decode output picture, but reference picture setup is not requested, the contents of the video picture resource corresponding to the reconstructed picture will be undefined after the video decode operation.Note
Some implementations may always output the reconstructed picture or use it as temporary storage during the video decode operation even when the reconstructed picture is not marked for future reference.
- 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 activeReferencePictureCountbe the size of the list of active reference pictures used by the video decode operation. Unless otherwise defined,activeReferencePictureCountis set to the value ofpDecodeInfo→referenceSlotCount.- If the bound video session was created with an H.264 decode profile, then let
activeReferencePictureCountbe the value ofpDecodeInfo→referenceSlotCountplus the number of elements of thepDecodeInfo→pReferenceSlotsarray that have aVkVideoDecodeH264DpbSlotInfoKHRstructure included in theirpNextchain with bothpStdReferenceInfo→flags.top_field_flagandpStdReferenceInfo→flags.bottom_field_flagset.Note
This means that the elements of
pDecodeInfo→pReferenceSlotsthat 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.
- If the bound video session was created with an H.264 decode profile, then let
- Let
VkOffset2D codedOffsetGranularitybe the minimum alignment requirement for the coded offset of video picture resources. Unless otherwise defined, the value of thexandymembers ofcodedOffsetGranularityare 0.- If the bound video session was created with an H.264 decode profile with a
VkVideoDecodeH264ProfileInfoKHR::pictureLayoutofVIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR, thencodedOffsetGranularityis equal toVkVideoDecodeH264CapabilitiesKHR::fieldOffsetGranularity, as returned byGetPhysicalDeviceVideoCapabilitiesKHRfor that video profile.
- If the bound video session was created with an H.264 decode profile with a
- Let
uint32_t dpbFrameUseCount[]be an array of sizemaxDpbSlots, wheremaxDpbSlotsis theVkVideoSessionCreateInfoKHR::maxDpbSlotsthe 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→pSetupReferenceSlotis notNULL, thendpbFrameUseCount[i]is incremented by one, whereiequalspDecodeInfo→pSetupReferenceSlot→slotIndex. If the bound video session object was created with an H.264 decode profile, thendpbFrameUseCount[i]is decremented by one if eitherpStdReferenceInfo→flags.top_field_flagorpStdReferenceInfo→flags.bottom_field_flagis set in theVkVideoDecodeH264DpbSlotInfoKHRstructure in thepDecodeInfo→pSetupReferenceSlot→pNextchain. - For each element of
pDecodeInfo→pReferenceSlots,dpbFrameUseCount[i]is incremented by one, whereiequals theslotIndexmember of the corresponding element. If the bound video session object was created with an H.264 decode profile, thendpbFrameUseCount[i]is decremented by one if eitherpStdReferenceInfo→flags.top_field_flagorpStdReferenceInfo→flags.bottom_field_flagis set in theVkVideoDecodeH264DpbSlotInfoKHRstructure in thepNextchain of the corresponding element ofpDecodeInfo→pReferenceSlots.
- If
- Let
uint32_t dpbTopFieldUseCount[]anduint32_t dpbBottomFieldUseCount[]be arrays of sizemaxDpbSlots, wheremaxDpbSlotsis theVkVideoSessionCreateInfoKHR::maxDpbSlotsthe 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→pSetupReferenceSlotis notNULL, then perform the following:- If
pStdReferenceInfo→flags.top_field_flagis set in theVkVideoDecodeH264DpbSlotInfoKHRstructure in thepDecodeInfo→pSetupReferenceSlot→pNextchain, thendpbTopFieldUseCount[i]is incremented by one, whereiequalspDecodeInfo→pSetupReferenceSlot→slotIndex. - If
pStdReferenceInfo→flags.bottom_field_flagis set in theVkVideoDecodeH264DpbSlotInfoKHRstructure in thepDecodeInfo→pSetupReferenceSlot→pNextchain, thendpbBottomFieldUseCount[i]is incremented by one, whereiequalspDecodeInfo→pSetupReferenceSlot→slotIndex.
- If
- 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_flagis set in theVkVideoDecodeH264DpbSlotInfoKHRstructure in thepNextchain of the element, thendpbTopFieldUseCount[i]is incremented by one, whereiequals theslotIndexmember of the element. - If
pStdReferenceInfo→flags.bottom_field_flagis set in theVkVideoDecodeH264DpbSlotInfoKHRstructure in thepNextchain of the element, thendpbBottomFieldUseCount[i]is incremented by one, whereiequals theslotIndexmember of the element.
- If
- If the bound video session object was created with an H.264 decode profile and
Valid Usage
- The bound video session must have been created with a decode operation
- 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
opCountmust be less than or equal to the last activatable query index corresponding to the query type of that query plus one - If the bound video session was created with
VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and thepNextchain ofpDecodeInfoincludes aVkVideoInlineQueryInfoKHRstructure with itsqueryPoolmember specifying a validVkQueryPoolhandle, thenVkVideoInlineQueryInfoKHR::queryCount must equalopCount - If the bound video session was created with
VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and thepNextchain ofpDecodeInfoincludes aVkVideoInlineQueryInfoKHRstructure with itsqueryPoolmember specifying a validVkQueryPoolhandle, then all the queries used by the command, as specified by theVkVideoInlineQueryInfoKHRstructure, must be unavailable - If the bound video session was created with
VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then thequeryTypeused to create thequeryPoolspecified in theVkVideoInlineQueryInfoKHRstructure included in thepNextchain ofpDecodeInfomust beQUERY_TYPE_RESULT_STATUS_ONLY_KHR - If the bound video session was created with
VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then thequeryPoolspecified in theVkVideoInlineQueryInfoKHRstructure included in thepNextchain ofpDecodeInfomust have been created with aVkVideoProfileInfoKHRstructure included in thepNextchain ofVkQueryPoolCreateInfoidentical to the one specified inVkVideoSessionCreateInfoKHR::pVideoProfilethe bound video session was created with - If the bound video session was created with
VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and thequeryTypeused to create thequeryPoolspecified in theVkVideoInlineQueryInfoKHRstructure included in thepNextchain ofpDecodeInfoisQUERY_TYPE_RESULT_STATUS_ONLY_KHR, then theVkCommandPoolthatcommandBufferwas allocated from must have been created with a queue family index that supports result status queries, as indicated byVkQueueFamilyQueryResultStatusPropertiesKHR::queryResultStatusSupport pDecodeInfo→srcBuffermust be compatible with the video profile the bound video session was created with- If
commandBufferis an unprotected command buffer andprotectedNoFaultis not supported, thenpDecodeInfo→srcBuffermust not be a protected buffer pDecodeInfo→srcBufferOffsetmust be an integer multiple ofVkVideoCapabilitiesKHR::minBitstreamBufferOffsetAlignment, as returned byGetPhysicalDeviceVideoCapabilitiesKHRfor the video profile the bound video session was created withpDecodeInfo→srcBufferRangemust be an integer multiple ofVkVideoCapabilitiesKHR::minBitstreamBufferSizeAlignment, as returned byGetPhysicalDeviceVideoCapabilitiesKHRfor the video profile the bound video session was created with- If
pDecodeInfo→pSetupReferenceSlotis notNULLandVkVideoDecodeCapabilitiesKHR::flagsdoes not includeVIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR, as returned byGetPhysicalDeviceVideoCapabilitiesKHRfor the video profile the bound video session was created with, then the video picture resources specified bypDecodeInfo→dstPictureResourceandpDecodeInfo→pSetupReferenceSlot→pPictureResourcemust not match - If
pDecodeInfo→pSetupReferenceSlotis notNULLand none of the following is true:VkVideoDecodeCapabilitiesKHR::flagsincludesVIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR, as returned byGetPhysicalDeviceVideoCapabilitiesKHRfor the video profile the bound video session was created with- the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHRandVkVideoDecodeAV1ProfileInfoKHR::filmGrainSupportset toTRUE, and film grain is enabled for the decoded picture
then the video picture resources specified by
pDecodeInfo→dstPictureResourceandpDecodeInfo→pSetupReferenceSlot→pPictureResourcemust match pDecodeInfo→dstPictureResource.imageViewBindingmust be compatible with the video profile the bound video session was created with- The format of
pDecodeInfo→dstPictureResource.imageViewBindingmust match theVkVideoSessionCreateInfoKHR::pictureFormatthe bound video session was created with pDecodeInfo→dstPictureResource.codedOffsetmust be an integer multiple ofcodedOffsetGranularitypDecodeInfo→dstPictureResource.codedExtentmust be betweenminCodedExtentandmaxCodedExtent, inclusive, the bound video session was created withpDecodeInfo→dstPictureResource.imageViewBindingmust have been created withIMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR- If
commandBufferis an unprotected command buffer andprotectedNoFaultis not supported, thenpDecodeInfo→dstPictureResource.imageViewBindingmust not have been created from a protected image - If
commandBufferis a protected command buffer andprotectedNoFaultis not supported, thenpDecodeInfo→dstPictureResource.imageViewBindingmust have been created from a protected image pDecodeInfo→pSetupReferenceSlotmust not beNULLunless the bound video session was created withVkVideoSessionCreateInfoKHR::maxDpbSlotsequal to zero- If
pDecodeInfo→pSetupReferenceSlotis notNULL, thenpDecodeInfo→pSetupReferenceSlot→slotIndexmust be less than theVkVideoSessionCreateInfoKHR::maxDpbSlotsspecified when the bound video session was created - If
pDecodeInfo→pSetupReferenceSlotis notNULL, thenpDecodeInfo→pSetupReferenceSlot→pPictureResource→codedOffsetmust be an integer multiple ofcodedOffsetGranularity - If
pDecodeInfo→pSetupReferenceSlotis notNULL, thenpDecodeInfo→pSetupReferenceSlot→pPictureResourcemust match one of the bound reference picture resource activeReferencePictureCountmust be less than or equal to theVkVideoSessionCreateInfoKHR::maxActiveReferencePicturesspecified when the bound video session was created- The
slotIndexmember of each element ofpDecodeInfo→pReferenceSlotsmust be less than theVkVideoSessionCreateInfoKHR::maxDpbSlotsspecified when the bound video session was created - The
codedOffsetmember of theVkVideoPictureResourceInfoKHRstructure pointed to by thepPictureResourcemember of each element ofpDecodeInfo→pReferenceSlotsmust be an integer multiple ofcodedOffsetGranularity - The
pPictureResourcemember of each element ofpDecodeInfo→pReferenceSlotsmust match one of the bound reference picture resource associated with the DPB slot index specified in theslotIndexmember of that element - Each video picture resource corresponding to the
pPictureResourcemember specified in the elements ofpDecodeInfo→pReferenceSlotsmust be unique withinpDecodeInfo→pReferenceSlots - All elements of
dpbFrameUseCountmust be less than or equal to 1 - All elements of
dpbTopFieldUseCountmust be less than or equal to 1 - All elements of
dpbBottomFieldUseCountmust be less than or equal to 1 - If
pDecodeInfo→pSetupReferenceSlotisNULLorpDecodeInfo→pSetupReferenceSlot→pPictureResourcedoes not refer to the same image subresource aspDecodeInfo→dstPictureResource, then the image subresource referred to bypDecodeInfo→dstPictureResourcemust be in theIMAGE_LAYOUT_VIDEO_DECODE_DST_KHRlayout at the time the video decode operation is executed on the device - If
pDecodeInfo→pSetupReferenceSlotis notNULLandpDecodeInfo→pSetupReferenceSlot→pPictureResourcerefers to the same image subresource aspDecodeInfo→dstPictureResource, then the image subresource referred to bypDecodeInfo→dstPictureResourcemust be in theIMAGE_LAYOUT_VIDEO_DECODE_DPB_KHRlayout at the time the video decode operation is executed on the device - If
pDecodeInfo→pSetupReferenceSlotis notNULL, then the image subresource referred to bypDecodeInfo→pSetupReferenceSlot→pPictureResourcemust be in theIMAGE_LAYOUT_VIDEO_DECODE_DPB_KHRlayout at the time the video decode operation is executed on the device - The image subresource referred to by the
pPictureResourcemember of each element ofpDecodeInfo→pReferenceSlotsmust be in theIMAGE_LAYOUT_VIDEO_DECODE_DPB_KHRlayout 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 thepNextchain ofpDecodeInfomust include aVkVideoDecodeH264PictureInfoKHRstructure - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHRbut 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 thepSliceOffsetsmember of theVkVideoDecodeH264PictureInfoKHRstructure included in thepNextchain ofpDecodeInfomust be less thanpDecodeInfo→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 aStdVideoH264SequenceParameterSetentry withseq_parameter_set_idmatchingStdVideoDecodeH264PictureInfo::seq_parameter_set_idthat is provided in thepStdPictureInfomember of theVkVideoDecodeH264PictureInfoKHRstructure included in thepNextchain ofpDecodeInfo - 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 aStdVideoH264PictureParameterSetentry withseq_parameter_set_idandpic_parameter_set_idmatchingStdVideoDecodeH264PictureInfo::seq_parameter_set_idandStdVideoDecodeH264PictureInfo::pic_parameter_set_id, respectively, that are provided in thepStdPictureInfomember of theVkVideoDecodeH264PictureInfoKHRstructure included in thepNextchain ofpDecodeInfo - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHRandpDecodeInfo→pSetupReferenceSlotis notNULL, then thepNextchain ofpDecodeInfo→pSetupReferenceSlotmust include aVkVideoDecodeH264DpbSlotInfoKHRstructure - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHRbut was not created with interlaced frame support, andpDecodeInfo→pSetupReferenceSlotis notNULL, 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 thepNextchain of each element ofpDecodeInfo→pReferenceSlotsmust include aVkVideoDecodeH264DpbSlotInfoKHRstructure - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHRbut was not created with interlaced frame support, then each active reference picture corresponding to the elements ofpDecodeInfo→pReferenceSlotsmust represent a frame - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR,pDecodeInfo→pSetupReferenceSlotis notNULL, 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→pSetupReferenceSlotis notNULL, 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→pSetupReferenceSlotis notNULL, 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_KHRand an active reference picture corresponding to any element ofpDecodeInfo→pReferenceSlotsrepresents a frame, then the DPB slot index of the bound video session specified by theslotIndexmember of that element must be currently associated with a frame picture matching the video picture resource specified by thepPictureResourcemember 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_KHRand an active reference picture corresponding to any element ofpDecodeInfo→pReferenceSlotsrepresents a top field, then the DPB slot index of the bound video session specified by theslotIndexmember of that element must be currently associated with a top field picture matching the video picture resource specified by thepPictureResourcemember 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_KHRand an active reference picture corresponding to any element ofpDecodeInfo→pReferenceSlotsrepresents a bottom field, then the DPB slot index of the bound video session specified by theslotIndexmember of that element must be currently associated with a bottom field picture matching the video picture resource specified by thepPictureResourcemember 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 thepNextchain ofpDecodeInfomust include aVkVideoDecodeH265PictureInfoKHRstructure - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then all elements of thepSliceSegmentOffsetsmember of theVkVideoDecodeH265PictureInfoKHRstructure included in thepNextchain ofpDecodeInfomust be less thanpDecodeInfo→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 aStdVideoH265VideoParameterSetentry withvps_video_parameter_set_idmatchingStdVideoDecodeH265PictureInfo::sps_video_parameter_set_idthat is provided in thepStdPictureInfomember of theVkVideoDecodeH265PictureInfoKHRstructure included in thepNextchain ofpDecodeInfo - 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 aStdVideoH265SequenceParameterSetentry withsps_video_parameter_set_idandsps_seq_parameter_set_idmatchingStdVideoDecodeH265PictureInfo::sps_video_parameter_set_idandStdVideoDecodeH265PictureInfo::pps_seq_parameter_set_id, respectively, that are provided in thepStdPictureInfomember of theVkVideoDecodeH265PictureInfoKHRstructure included in thepNextchain ofpDecodeInfo - 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 aStdVideoH265PictureParameterSetentry withsps_video_parameter_set_id,pps_seq_parameter_set_id, andpps_pic_parameter_set_idmatchingStdVideoDecodeH265PictureInfo::sps_video_parameter_set_id,StdVideoDecodeH265PictureInfo::pps_seq_parameter_set_id, andStdVideoDecodeH265PictureInfo::pps_pic_parameter_set_id, respectively, that are provided in thepStdPictureInfomember of theVkVideoDecodeH265PictureInfoKHRstructure included in thepNextchain ofpDecodeInfo - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHRandpDecodeInfo→pSetupReferenceSlotis notNULL, then thepNextchain ofpDecodeInfo→pSetupReferenceSlotmust include aVkVideoDecodeH265DpbSlotInfoKHRstructure - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then thepNextchain of each element ofpDecodeInfo→pReferenceSlotsmust include aVkVideoDecodeH265DpbSlotInfoKHRstructure - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHRandVkVideoDecodeAV1ProfileInfoKHR::filmGrainSupportset toFALSE, then film grain must not be enabled for the decoded picture - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR,pDecodeInfo→pSetupReferenceSlotis notNULL, and film grain is enabled for the decoded picture, then the video picture resources specified bypDecodeInfo→dstPictureResourceandpDecodeInfo→pSetupReferenceSlot→pPictureResourcemust not match - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then thepNextchain ofpDecodeInfomust include aVkVideoDecodeAV1PictureInfoKHRstructure - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then theframeHeaderOffsetmember of theVkVideoDecodeAV1PictureInfoKHRstructure included in thepNextchain ofpDecodeInfomust be less than the minimum ofpDecodeInfo→srcBufferRange - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then all elements of thepTileOffsetsmember of theVkVideoDecodeAV1PictureInfoKHRstructure included in thepNextchain ofpDecodeInfomust be less thanpDecodeInfo→srcBufferRange - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then for each elementiof thepTileOffsetsandpTileSizesmembers of theVkVideoDecodeAV1PictureInfoKHRstructure included in thepNextchain ofpDecodeInfothe sum ofpTileOffsets[i] andpTileSizes[i] must be less than or equal topDecodeInfo→srcBufferRange - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHRandpDecodeInfo→pSetupReferenceSlotis notNULL, then thepNextchain ofpDecodeInfo→pSetupReferenceSlotmust include aVkVideoDecodeAV1DpbSlotInfoKHRstructure - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then thepNextchain of each element ofpDecodeInfo→pReferenceSlotsmust include aVkVideoDecodeAV1DpbSlotInfoKHRstructure - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then each element of thereferenceNameSlotIndicesarray member of theVkVideoDecodeAV1PictureInfoKHRstructure included in thepNextchain ofpDecodeInfomust either be negative or must equal theslotIndexmember of one of the elements ofpDecodeInfo→pReferenceSlots - If the bound video session was created with the video codec operation
VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then theslotIndexmember of each element ofpDecodeInfo→pReferenceSlotsmust equal one of the elements of thereferenceNameSlotIndicesarray member of theVkVideoDecodeAV1PictureInfoKHRstructure included in thepNextchain ofpDecodeInfo
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepDecodeInfomust be a valid pointer to a validVkVideoDecodeInfoKHRstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas 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
commandBuffermust be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Outside Inside Decode Action See Also
- Parameters:
commandBuffer- the command buffer in which to record the command.pDecodeInfo- a pointer to aVkVideoDecodeInfoKHRstructure specifying the parameters of the video decode operations.
-