vkCmdDecodeVideoKHR
To launch video decode operations, call:
void vkCmdDecodeVideoKHR(
VkCommandBuffer commandBuffer,
const VkVideoDecodeInfoKHR* pDecodeInfo);
commandBufferis the command buffer in which to record the command.pDecodeInfois a pointer to a VkVideoDecodeInfoKHR structure specifying the parameters of the video decode operations.
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.
If the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR and the pNext
chain of pDecodeInfo includes a VkVideoInlineQueryInfoKHR
structure with its queryPool member specifying a valid
VkQueryPool handle, then this command will execute a query for each
video decode operation issued by it.
Active Reference Picture Information
The list of active reference pictures used by
a video decode operation is a list of image subregions used as the source of
reference picture data and related parameters, and is
derived from the VkVideoReferenceSlotInfoKHR structures provided as
the elements of the pDecodeInfo→pReferenceSlots array.
For each element of pDecodeInfo→pReferenceSlots, one or more elements
are added to the active reference picture list, as defined by the
codec-specific semantics.
Each element of this list contains the following 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
Information related to the optional reconstructed
picture used by a video decode operation is derived from the
VkVideoReferenceSlotInfoKHR structure pointed to by
pDecodeInfo→pSetupReferenceSlot, if not NULL, as defined by the
codec-specific semantics, and consists
of the following:
- 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 VkVideoReferenceSlotInfoKHR structure in
pDecodeInfo→pSetupReferenceSlot is always required, unless the video
session was created with
VkVideoSessionCreateInfoKHR::maxDpbSlots equal to zero.
However, the DPB slot identified by
pDecodeInfo→pSetupReferenceSlot→slotIndex is only
activated with the reconstructed
picture specified in
pDecodeInfo→pSetupReferenceSlot→pPictureResource if reference
picture setup is requested according to the
codec-specific semantics.
If reconstructed picture information is specified, and
pDecodeInfo→pSetupReferenceSlot→pPictureResource refers 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.
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
Information related to the decode output picture
used by a video decode operation is derived from
pDecodeInfo→dstPictureResource and any codec-specific parameters
provided in the pDecodeInfo→pNext chain, as defined by the
codec-specific semantics, and consists
of the following:
- 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 a VkVideoDecodeH264DpbSlotInfoKHR structure included in theirpNextchain with bothpStdReferenceInfo→flags.top_field_flagandpStdReferenceInfo→flags.bottom_field_flagset.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 ofcodedOffsetGranularityare0.- If the bound video session was created with an H.264 decode profile with a
VkVideoDecodeH264ProfileInfoKHR::
pictureLayoutofVK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR, thencodedOffsetGranularityis equal to VkVideoDecodeH264CapabilitiesKHR::fieldOffsetGranularity, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for that video profile.
- If the bound video session was created with an H.264 decode profile with a
VkVideoDecodeH264ProfileInfoKHR::
- Let
uint32_t dpbFrameUseCount[]be an array of sizemaxDpbSlots, wheremaxDpbSlotsis the VkVideoSessionCreateInfoKHR::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 be0.- 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 the VkVideoDecodeH264DpbSlotInfoKHR structure 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 the VkVideoDecodeH264DpbSlotInfoKHR structure in thepNextchain of the corresponding element ofpDecodeInfo→pReferenceSlots.
- If
- Let
uint32_t dpbTopFieldUseCount[]anduint32_t dpbBottomFieldUseCount[]be arrays of sizemaxDpbSlots, wheremaxDpbSlotsis the VkVideoSessionCreateInfoKHR::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 be0.- 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 the VkVideoDecodeH264DpbSlotInfoKHR structure in thepDecodeInfo→pSetupReferenceSlot→pNextchain, thendpbTopFieldUseCount[i]is incremented by one, whereiequalspDecodeInfo→pSetupReferenceSlot→slotIndex. - If
pStdReferenceInfo→flags.bottom_field_flagis set in the VkVideoDecodeH264DpbSlotInfoKHR structure 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 the VkVideoDecodeH264DpbSlotInfoKHR structure in thepNextchain of the element, thendpbTopFieldUseCount[i]is incremented by one, whereiequals theslotIndexmember of the element. - If
pStdReferenceInfo→flags.bottom_field_flagis set in the VkVideoDecodeH264DpbSlotInfoKHR structure 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
VUID-vkCmdDecodeVideoKHR-None-08249
The bound video session must have been created with a decode operation
VUID-vkCmdDecodeVideoKHR-None-07011
The bound video session must not be in uninitialized state at the time the command is executed on the device
VUID-vkCmdDecodeVideoKHR-opCount-07134
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
VUID-vkCmdDecodeVideoKHR-pNext-08365
If the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and the
pNext chain of pDecodeInfo includes a
VkVideoInlineQueryInfoKHR structure with its queryPool
member specifying a valid VkQueryPool handle, then
VkVideoInlineQueryInfoKHR::queryCount must equal opCount
VUID-vkCmdDecodeVideoKHR-pNext-08366
If the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and the
pNext chain of pDecodeInfo includes a
VkVideoInlineQueryInfoKHR structure with its queryPool
member specifying a valid VkQueryPool handle, then all the queries
used by the command, as specified by the VkVideoInlineQueryInfoKHR
structure, must be unavailable
VUID-vkCmdDecodeVideoKHR-queryType-08367
If the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then the
queryType used to create the queryPool specified in the
VkVideoInlineQueryInfoKHR structure included in the pNext
chain of pDecodeInfo must be
VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR
VUID-vkCmdDecodeVideoKHR-queryPool-08368
If the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then the
queryPool specified in the VkVideoInlineQueryInfoKHR
structure included in the pNext chain of pDecodeInfo must
have been created with a VkVideoProfileInfoKHR structure included
in the pNext chain of VkQueryPoolCreateInfo identical to the
one specified in VkVideoSessionCreateInfoKHR::pVideoProfile
the bound video session was created with
VUID-vkCmdDecodeVideoKHR-queryType-08369
If the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, and the
queryType used to create the queryPool specified in the
VkVideoInlineQueryInfoKHR structure included in the pNext
chain of pDecodeInfo is
VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, then the VkCommandPool
that commandBuffer was allocated from must have been created with
a queue family index that supports result
status queries, as indicated by
VkQueueFamilyQueryResultStatusPropertiesKHR::queryResultStatusSupport
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07135
pDecodeInfo→srcBuffer must be compatible with the video profile the bound video session was created
with
VUID-vkCmdDecodeVideoKHR-commandBuffer-07136
If commandBuffer is an unprotected command buffer and
protectedNoFault is not supported,
then pDecodeInfo→srcBuffer must not be a protected buffer
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07138
pDecodeInfo→srcBufferOffset must be an integer multiple of
VkVideoCapabilitiesKHR::minBitstreamBufferOffsetAlignment,
as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the
video profile the bound video session was created with
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07139
pDecodeInfo→srcBufferRange must be an integer multiple of
VkVideoCapabilitiesKHR::minBitstreamBufferSizeAlignment, as
returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video
profile the bound video session was created with
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07140
If pDecodeInfo→pSetupReferenceSlot is not NULL and
VkVideoDecodeCapabilitiesKHR::flags does not include
VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR, as
returned by vkGetPhysicalDeviceVideoCapabilitiesKHR 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
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07141
If pDecodeInfo→pSetupReferenceSlot is not NULL and none of the
following is true:
- VkVideoDecodeCapabilitiesKHR::
flagsincludesVK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the bound video session was created with - the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHRand VkVideoDecodeAV1ProfileInfoKHR::filmGrainSupportset toVK_TRUE, and film grain is enabled for the decoded picture
then the video picture resources specified by
pDecodeInfo→dstPictureResource and
pDecodeInfo→pSetupReferenceSlot→pPictureResource mustmatch
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07142
pDecodeInfo→dstPictureResource.imageViewBinding must be
compatible with the video profile the
bound video session was created with
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07143
The format of pDecodeInfo→dstPictureResource.imageViewBindingmust match the VkVideoSessionCreateInfoKHR::pictureFormat
the bound video session was created with
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07144
pDecodeInfo→dstPictureResource.codedOffset must be an integer
multiple of codedOffsetGranularity
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07145
pDecodeInfo→dstPictureResource.codedExtent must be between
minCodedExtent and maxCodedExtent, inclusive, the bound
video session was created with
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07146
pDecodeInfo→dstPictureResource.imageViewBinding must have been
created with VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR
VUID-vkCmdDecodeVideoKHR-commandBuffer-07147
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
VUID-vkCmdDecodeVideoKHR-commandBuffer-07148
If commandBuffer is a protected command buffer and
protectedNoFault is not supported,
then pDecodeInfo→dstPictureResource.imageViewBinding must have
been created from a protected image
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-08376
pDecodeInfo→pSetupReferenceSlot must not be NULL unless the
bound video session was created with
VkVideoSessionCreateInfoKHR::maxDpbSlots equal to zero
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07170
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
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07173
If pDecodeInfo→pSetupReferenceSlot is not NULL, then
pDecodeInfo→pSetupReferenceSlot→pPictureResource→codedOffsetmust be an integer multiple of codedOffsetGranularity
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07149
If pDecodeInfo→pSetupReferenceSlot is not NULL, then
pDecodeInfo→pSetupReferenceSlot→pPictureResource mustmatch one of the
bound reference picture resource
VUID-vkCmdDecodeVideoKHR-activeReferencePictureCount-07150
activeReferencePictureCount must be less than or equal to the
VkVideoSessionCreateInfoKHR::maxActiveReferencePictures
specified when the bound video session was created
VUID-vkCmdDecodeVideoKHR-slotIndex-07256
The slotIndex member of each element of
pDecodeInfo→pReferenceSlots must be less than the
VkVideoSessionCreateInfoKHR::maxDpbSlots specified when the
bound video session was created
VUID-vkCmdDecodeVideoKHR-codedOffset-07257
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
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07151
The pPictureResource member of each element of
pDecodeInfo→pReferenceSlots mustmatch one of the
bound reference picture resource
associated with the DPB slot index specified in the slotIndex
member of that element
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07264
Each video picture resource corresponding to the pPictureResource
member specified in the elements of pDecodeInfo→pReferenceSlotsmust be unique within
pDecodeInfo→pReferenceSlots
VUID-vkCmdDecodeVideoKHR-dpbFrameUseCount-07176
All elements of dpbFrameUseCount must be less than or equal to
1
VUID-vkCmdDecodeVideoKHR-dpbTopFieldUseCount-07177
All elements of dpbTopFieldUseCount must be less than or equal to
1
VUID-vkCmdDecodeVideoKHR-dpbBottomFieldUseCount-07178
All elements of dpbBottomFieldUseCount must be less than or equal
to 1
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07252
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
VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR layout at the time the video
decode operation is executed on the device
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07253
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
VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video
decode operation is executed on the device
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07254
If pDecodeInfo→pSetupReferenceSlot is not NULL, then the image
subresource referred to by
pDecodeInfo→pSetupReferenceSlot→pPictureResource must be in the
VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video
decode operation is executed on the device
VUID-vkCmdDecodeVideoKHR-pPictureResource-07255
The image subresource referred to
by the pPictureResource member of each element of
pDecodeInfo→pReferenceSlots must be in the
VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video
decode operation is executed on the device
VUID-vkCmdDecodeVideoKHR-pNext-07152
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the pNext
chain of pDecodeInfo must include a
VkVideoDecodeH264PictureInfoKHR structure
VUID-vkCmdDecodeVideoKHR-None-07258
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR but was not created
with interlaced frame support, then
the decode output picture must
represent a frame
VUID-vkCmdDecodeVideoKHR-pSliceOffsets-07153
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-None-10400
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then there must be
a bound video session parameters object if any of the following
conditions are not met:
- the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR - the
pNextchain ofpDecodeInfoincludes a VkVideoDecodeH264InlineSessionParametersInfoKHR structure - the
pStdSPSmember of the VkVideoDecodeH264InlineSessionParametersInfoKHR structure included in thepNextchain ofpDecodeInfois notNULL - the
pStdPPSmember of the VkVideoDecodeH264InlineSessionParametersInfoKHR structure included in thepNextchain ofpDecodeInfois notNULL::
VUID-vkCmdDecodeVideoKHR-StdVideoH264SequenceParameterSet-07154
If the bound video session was created with the video codec operation
VK_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
, unless the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the
pNext chain of pDecodeInfo includes a
VkVideoDecodeH264InlineSessionParametersInfoKHR structure, and its
pStdSPS member is not equal to NULL
VUID-vkCmdDecodeVideoKHR-pNext-10401
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the
pNext chain of pDecodeInfo includes a
VkVideoDecodeH264InlineSessionParametersInfoKHR structure with a
non-NULL pStdSPS member, then
pStdSPS→seq_parameter_set_id must equal
StdVideoDecodeH264PictureInfo::seq_parameter_set_id provided
in the pStdPictureInfo member of the
VkVideoDecodeH264PictureInfoKHR structure included in the
pNext chain of pDecodeInfo
VUID-vkCmdDecodeVideoKHR-StdVideoH264PictureParameterSet-07155
If the bound video session was created with the video codec operation
VK_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
, unless the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the
pNext chain of pDecodeInfo includes a
VkVideoDecodeH264InlineSessionParametersInfoKHR structure, and its
pStdPPS member is not equal to NULL
VUID-vkCmdDecodeVideoKHR-pNext-10402
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the
pNext chain of pDecodeInfo includes a
VkVideoDecodeH264InlineSessionParametersInfoKHR structure with a
non-NULL pStdPPS member, then
pStdPPS→seq_parameter_set_id and
pStdPPS→pic_parameter_set_id must equal
StdVideoDecodeH264PictureInfo::seq_parameter_set_id and
StdVideoDecodeH264PictureInfo::pic_parameter_set_id,
respectively, provided in the pStdPictureInfo member of the
VkVideoDecodeH264PictureInfoKHR structure included in the
pNext chain of pDecodeInfo
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07156
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07259
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-pNext-07157
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the pNext
chain of each element of pDecodeInfo→pReferenceSlots must
include a VkVideoDecodeH264DpbSlotInfoKHR structure
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07260
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07261
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07262
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07263
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07266
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07267
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07268
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-pNext-07158
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the pNext
chain of pDecodeInfo must include a
VkVideoDecodeH265PictureInfoKHR structure
VUID-vkCmdDecodeVideoKHR-pSliceSegmentOffsets-07159
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-None-10403
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then there must be
a bound video session parameters object if any of the following
conditions are not met:
- the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR - the
pNextchain ofpDecodeInfoincludes a VkVideoDecodeH265InlineSessionParametersInfoKHR structure - the
pStdVPSmember of the VkVideoDecodeH265InlineSessionParametersInfoKHR structure included in thepNextchain ofpDecodeInfois notNULL - the
pStdSPSmember of the VkVideoDecodeH265InlineSessionParametersInfoKHR structure included in thepNextchain ofpDecodeInfois notNULL - the
pStdPPSmember of the VkVideoDecodeH265InlineSessionParametersInfoKHR structure included in thepNextchain ofpDecodeInfois notNULL::
VUID-vkCmdDecodeVideoKHR-StdVideoH265VideoParameterSet-07160
If the bound video session was created with the video codec operation
VK_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
, unless the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the
pNext chain of pDecodeInfo includes a
VkVideoDecodeH265InlineSessionParametersInfoKHR structure, and its
pStdVPS member is not equal to NULL
VUID-vkCmdDecodeVideoKHR-pNext-10404
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the
pNext chain of pDecodeInfo includes a
VkVideoDecodeH265InlineSessionParametersInfoKHR structure with a
non-NULL pStdVPS member, then
pStdVPS→vps_video_parameter_set_id must equal
StdVideoDecodeH265PictureInfo::sps_video_parameter_set_id
provided in the pStdPictureInfo member of the
VkVideoDecodeH265PictureInfoKHR structure included in the
pNext chain of pDecodeInfo
VUID-vkCmdDecodeVideoKHR-StdVideoH265SequenceParameterSet-07161
If the bound video session was created with the video codec operation
VK_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
, unless the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the
pNext chain of pDecodeInfo includes a
VkVideoDecodeH265InlineSessionParametersInfoKHR structure, and its
pStdSPS member is not equal to NULL
VUID-vkCmdDecodeVideoKHR-pNext-10405
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the
pNext chain of pDecodeInfo includes a
VkVideoDecodeH265InlineSessionParametersInfoKHR structure with a
non-NULL pStdSPS member, then
pStdSPS→sps_video_parameter_set_id and
pStdSPS→sps_seq_parameter_set_id must equal
StdVideoDecodeH265PictureInfo::sps_video_parameter_set_id and
StdVideoDecodeH265PictureInfo::pps_seq_parameter_set_id,
respectively, provided in the pStdPictureInfo member of the
VkVideoDecodeH265PictureInfoKHR structure included in the
pNext chain of pDecodeInfo
VUID-vkCmdDecodeVideoKHR-StdVideoH265PictureParameterSet-07162
If the bound video session was created with the video codec operation
VK_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
, unless the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the
pNext chain of pDecodeInfo includes a
VkVideoDecodeH265InlineSessionParametersInfoKHR structure, and its
pStdPPS member is not equal to NULL
VUID-vkCmdDecodeVideoKHR-pNext-10406
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the
pNext chain of pDecodeInfo includes a
VkVideoDecodeH265InlineSessionParametersInfoKHR structure with a
non-NULL pStdPPS member, then
pStdPPS→sps_video_parameter_set_id,
pStdPPS→pps_seq_parameter_set_id, and
pStdPPS→pps_pic_parameter_set_id must equal
StdVideoDecodeH265PictureInfo::sps_video_parameter_set_id,
StdVideoDecodeH265PictureInfo::pps_seq_parameter_set_id, and
StdVideoDecodeH265PictureInfo::pps_pic_parameter_set_id,
respectively, provided in the pStdPictureInfo member of the
VkVideoDecodeH265PictureInfoKHR structure included in the
pNext chain of pDecodeInfo
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07163
If the bound video session was created with the video codec operation
VK_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
VUID-vkCmdDecodeVideoKHR-pNext-07164
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the pNext
chain of each element of pDecodeInfo→pReferenceSlots must
include a VkVideoDecodeH265DpbSlotInfoKHR structure
VUID-vkCmdDecodeVideoKHR-filmGrainSupport-09248
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR and
VkVideoDecodeAV1ProfileInfoKHR::filmGrainSupport set to
VK_FALSE, then film grain must not be
enabled for the decoded picture
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-09249
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR,
pDecodeInfo→pSetupReferenceSlot is not NULL, and
film grain is enabled for the decoded picture,
then the video picture resources specified by
pDecodeInfo→dstPictureResource and
pDecodeInfo→pSetupReferenceSlot→pPictureResource must not
match
VUID-vkCmdDecodeVideoKHR-pNext-09250
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the pNext
chain of pDecodeInfo must include a
VkVideoDecodeAV1PictureInfoKHR structure
VUID-vkCmdDecodeVideoKHR-frameHeaderOffset-09251
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the
frameHeaderOffset member of the
VkVideoDecodeAV1PictureInfoKHR structure included in the
pNext chain of pDecodeInfo must be less than
pDecodeInfo→srcBufferRange
VUID-vkCmdDecodeVideoKHR-pTileOffsets-09253
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then all elements of
the pTileOffsets member of the
VkVideoDecodeAV1PictureInfoKHR structure included in the
pNext chain of pDecodeInfo must be less than
pDecodeInfo→srcBufferRange
VUID-vkCmdDecodeVideoKHR-pTileOffsets-09252
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then for each element
i of the pTileOffsets and pTileSizes members of the
VkVideoDecodeAV1PictureInfoKHR structure included in the
pNext chain of pDecodeInfo the sum of pTileOffsets[i]
and pTileSizes[i] must be less than or equal to
pDecodeInfo→srcBufferRange
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-09254
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR and
pDecodeInfo→pSetupReferenceSlot is not NULL, then the
pNext chain of pDecodeInfo→pSetupReferenceSlot must
include a VkVideoDecodeAV1DpbSlotInfoKHR structure
VUID-vkCmdDecodeVideoKHR-pNext-09255
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the pNext
chain of each element of pDecodeInfo→pReferenceSlots must
include a VkVideoDecodeAV1DpbSlotInfoKHR structure
VUID-vkCmdDecodeVideoKHR-referenceNameSlotIndices-09262
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then each element of
the referenceNameSlotIndices array member of the
VkVideoDecodeAV1PictureInfoKHR structure included in the
pNext chain of pDecodeInfo must either be negative or must
equal the slotIndex member of one of the elements of
pDecodeInfo→pReferenceSlots
VUID-vkCmdDecodeVideoKHR-slotIndex-09263
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then the
slotIndex member of each element of
pDecodeInfo→pReferenceSlots must equal one of the elements of
the referenceNameSlotIndices array member of the
VkVideoDecodeAV1PictureInfoKHR structure included in the
pNext chain of pDecodeInfo
VUID-vkCmdDecodeVideoKHR-None-10407
If the bound video session was created with the video codec operation
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then there must be a
bound video session parameters object if any of the following conditions
are not met:
- the bound video session was created with
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR - the
pNextchain ofpDecodeInfoincludes a VkVideoDecodeAV1InlineSessionParametersInfoKHR structure - the
pStdSequenceHeadermember of the VkVideoDecodeAV1InlineSessionParametersInfoKHR structure included in thepNextchain ofpDecodeInfois notNULL::
Valid Usage (Implicit)
VUID-vkCmdDecodeVideoKHR-commandBuffer-parameter
commandBuffer must be a valid VkCommandBuffer handle
VUID-vkCmdDecodeVideoKHR-pDecodeInfo-parameter
pDecodeInfo must be a valid pointer to a valid VkVideoDecodeInfoKHR structure
VUID-vkCmdDecodeVideoKHR-commandBuffer-recording
commandBuffer must be in the recording state
VUID-vkCmdDecodeVideoKHR-commandBuffer-cmdpool
The VkCommandPool that commandBuffer was allocated from must support decode operations
VUID-vkCmdDecodeVideoKHR-renderpass
This command must only be called outside of a render pass instance
VUID-vkCmdDecodeVideoKHR-videocoding
This command must only be called inside of a video coding scope
VUID-vkCmdDecodeVideoKHR-bufferlevel
commandBuffer must be a primary VkCommandBuffer
::
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized ::