1e5c31af7Sopenharmony_ci// Copyright 2018-2022 The Khronos Group Inc. 2e5c31af7Sopenharmony_ci// 3e5c31af7Sopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0 4e5c31af7Sopenharmony_ci 5e5c31af7Sopenharmony_ci[[video-decode-operations]] 6e5c31af7Sopenharmony_ci== Video Decode Operations 7e5c31af7Sopenharmony_ci 8e5c31af7Sopenharmony_ci[[decode-output-picture]] 9e5c31af7Sopenharmony_ciVideo decode operations consume compressed video data from a video bitstream 10e5c31af7Sopenharmony_cibuffer and zero or more reference pictures, and produce a _decode output 11e5c31af7Sopenharmony_cipicture_ and an optional <<reconstructed-picture,reconstructed picture>>. 12e5c31af7Sopenharmony_ci 13e5c31af7Sopenharmony_ci[NOTE] 14e5c31af7Sopenharmony_ci.Note: 15e5c31af7Sopenharmony_ci==== 16e5c31af7Sopenharmony_ciSuch decode output pictures can be shared with the <<dpb,Decoded Picture 17e5c31af7Sopenharmony_ciBuffer>>, and can also be used 18e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 19e5c31af7Sopenharmony_cias the <<encode-input-picture,input>> of video encode operations, 20e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 21e5c31af7Sopenharmony_ciwith graphics or compute operations, 22e5c31af7Sopenharmony_ciifdef::VK_KHR_surface[] 23e5c31af7Sopenharmony_cior with <<wsi,Window System Integration>> APIs, 24e5c31af7Sopenharmony_ciendif::VK_KHR_surface[] 25e5c31af7Sopenharmony_cidepending on the capabilities of the implementation. 26e5c31af7Sopenharmony_ci==== 27e5c31af7Sopenharmony_ci 28e5c31af7Sopenharmony_ciVideo decode operations may: access the following resources in the 29e5c31af7Sopenharmony_ciename:VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR stage: 30e5c31af7Sopenharmony_ci 31e5c31af7Sopenharmony_ci * The source video bitstream buffer range and the image subregions 32e5c31af7Sopenharmony_ci corresponding to the list of <<decode-active-reference-picture-info, 33e5c31af7Sopenharmony_ci active reference pictures>> with access 34e5c31af7Sopenharmony_ci ename:VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR. 35e5c31af7Sopenharmony_ci * The image subregions corresponding to the target 36e5c31af7Sopenharmony_ci <<decode-output-picture-info,decode output picture>> and 37e5c31af7Sopenharmony_ci <<decode-reconstructed-picture-info,reconstructed picture>> with access 38e5c31af7Sopenharmony_ci ename:VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR. 39e5c31af7Sopenharmony_ci 40e5c31af7Sopenharmony_ciThe image subresource of each <<video-picture-resources,video picture 41e5c31af7Sopenharmony_ciresource>> accessed by the video coding operation is specified using a 42e5c31af7Sopenharmony_cicorresponding slink:VkVideoPictureResourceInfoKHR structure. 43e5c31af7Sopenharmony_ciEach such image subresource must: be in the appropriate image layout as 44e5c31af7Sopenharmony_cifollows: 45e5c31af7Sopenharmony_ci 46e5c31af7Sopenharmony_ci * If the image subresource is used in the video decode operation only as 47e5c31af7Sopenharmony_ci <<decode-output-picture,decode output picture>>, then it must: be in the 48e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR layout. 49e5c31af7Sopenharmony_ci * If the image subresource is used in the video decode operation both as 50e5c31af7Sopenharmony_ci <<decode-output-picture,decode output picture>> and 51e5c31af7Sopenharmony_ci <<reconstructed-picture,reconstructed picture>>, then it must: be in the 52e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout. 53e5c31af7Sopenharmony_ci * If the image subresource is used in the video decode operation only as 54e5c31af7Sopenharmony_ci <<reconstructed-picture,reconstructed picture>>, then it must: be in the 55e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout. 56e5c31af7Sopenharmony_ci * If the image subresource is used in the video decode operation as a 57e5c31af7Sopenharmony_ci <<reference-picture,reference picture>>, then it must: be in the 58e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout. 59e5c31af7Sopenharmony_ci 60e5c31af7Sopenharmony_ci[[decode-unsuccessful]] 61e5c31af7Sopenharmony_ciA video decode operation may: complete unsuccessfully. 62e5c31af7Sopenharmony_ciIn this case the <<decode-output-picture,decode output picture>> will have 63e5c31af7Sopenharmony_ciundefined: contents. 64e5c31af7Sopenharmony_ciSimilarly, if a <<reconstructed-picture,reconstructed picture>> is 65e5c31af7Sopenharmony_cispecified, it will also have undefined: contents, and the activated DPB slot 66e5c31af7Sopenharmony_ciwill have an <<dpb-slot-states,invalid picture reference>>. 67e5c31af7Sopenharmony_ci 68e5c31af7Sopenharmony_ci 69e5c31af7Sopenharmony_ci[[decode-codec-specific-semantics]] 70e5c31af7Sopenharmony_ci=== Codec-Specific Semantics 71e5c31af7Sopenharmony_ci 72e5c31af7Sopenharmony_ciThe following aspects of video decode operations are codec-specific: 73e5c31af7Sopenharmony_ci 74e5c31af7Sopenharmony_ci * The interpretation of the contents of the source video bitstream buffer 75e5c31af7Sopenharmony_ci range. 76e5c31af7Sopenharmony_ci * The construction and interpretation of the list of 77e5c31af7Sopenharmony_ci <<decode-active-reference-picture-info,active reference pictures>> and 78e5c31af7Sopenharmony_ci the interpretation of the picture data referred to by the corresponding 79e5c31af7Sopenharmony_ci image subregions. 80e5c31af7Sopenharmony_ci * The construction and interpretation of information related to the 81e5c31af7Sopenharmony_ci <<decode-output-picture-info,decode output picture>> and the generation 82e5c31af7Sopenharmony_ci of picture data to the corresponding image subregion. 83e5c31af7Sopenharmony_ci * The construction and interpretation of information related to the 84e5c31af7Sopenharmony_ci optional <<decode-reconstructed-picture-info,reconstructed picture>> and 85e5c31af7Sopenharmony_ci the generation of picture data to the corresponding image subregion. 86e5c31af7Sopenharmony_ci 87e5c31af7Sopenharmony_ciThese codec-specific behaviors are defined for each video codec operation 88e5c31af7Sopenharmony_ciseparately. 89e5c31af7Sopenharmony_ci 90e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 91e5c31af7Sopenharmony_ci * If the used video codec operation is 92e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the 93e5c31af7Sopenharmony_ci codec-specific aspects of the video decoding process are performed as 94e5c31af7Sopenharmony_ci defined in the <<decode-h264,H.264 Decode Operations>> section. 95e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 96e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 97e5c31af7Sopenharmony_ci * If the used video codec operation is 98e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the 99e5c31af7Sopenharmony_ci codec-specific aspects of the video decoding process are performed as 100e5c31af7Sopenharmony_ci defined in the <<decode-h265,H.265 Decode Operations>> section. 101e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 102e5c31af7Sopenharmony_ci 103e5c31af7Sopenharmony_ci 104e5c31af7Sopenharmony_ci[[decode-operation-steps]] 105e5c31af7Sopenharmony_ci=== Video Decode Operation Steps 106e5c31af7Sopenharmony_ci 107e5c31af7Sopenharmony_ciEach video decode operation performs the following steps in the 108e5c31af7Sopenharmony_ciename:VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR stage: 109e5c31af7Sopenharmony_ci 110e5c31af7Sopenharmony_ci 1. Reads the encoded video data from the source video bitstream buffer 111e5c31af7Sopenharmony_ci range. 112e5c31af7Sopenharmony_ci 2. Performs picture reconstruction of the encoded video data according to 113e5c31af7Sopenharmony_ci the <<decode-codec-specific-semantics,codec-specific semantics>>, 114e5c31af7Sopenharmony_ci applying any prediction data read from the <<active-reference-pictures, 115e5c31af7Sopenharmony_ci active reference pictures>> in the process; 116e5c31af7Sopenharmony_ci 3. Writes the decoded picture data to the <<decode-output-picture,decode 117e5c31af7Sopenharmony_ci output picture>>, and to the <<reconstructed-picture,reconstructed 118e5c31af7Sopenharmony_ci picture>>, if one is specified and is different from the decode output 119e5c31af7Sopenharmony_ci picture, according to the <<decode-codec-specific-semantics, 120e5c31af7Sopenharmony_ci codec-specific semantics>>; 121e5c31af7Sopenharmony_ci 4. When <<decode-reconstructed-picture-info,reconstructed picture 122e5c31af7Sopenharmony_ci information>> is provided, the requested <<dpb-slot,DPB slot>> is 123e5c31af7Sopenharmony_ci <<dpb-slot-states,activated>> with the specified picture and the DPB 124e5c31af7Sopenharmony_ci slot index is associated with the corresponding 125e5c31af7Sopenharmony_ci <<bound-reference-picture-resources,bound reference picture resource>>. 126e5c31af7Sopenharmony_ci 127e5c31af7Sopenharmony_ci 128e5c31af7Sopenharmony_ci=== Capabilities 129e5c31af7Sopenharmony_ci 130e5c31af7Sopenharmony_ci[open,refpage='VkVideoDecodeCapabilitiesKHR',desc='Structure describing general video decode capabilities for a video profile',type='structs'] 131e5c31af7Sopenharmony_ci-- 132e5c31af7Sopenharmony_ciWhen calling flink:vkGetPhysicalDeviceVideoCapabilitiesKHR with 133e5c31af7Sopenharmony_cipname:pVideoProfile->videoCodecOperation specifying a decode operation, the 134e5c31af7Sopenharmony_cisname:VkVideoDecodeCapabilitiesKHR structure must: be included in the 135e5c31af7Sopenharmony_cipname:pNext chain of the slink:VkVideoCapabilitiesKHR structure to retrieve 136e5c31af7Sopenharmony_cicapabilities specific to video decoding. 137e5c31af7Sopenharmony_ci 138e5c31af7Sopenharmony_ciThe sname:VkVideoDecodeCapabilitiesKHR structure is defined as: 139e5c31af7Sopenharmony_ci 140e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoDecodeCapabilitiesKHR.adoc[] 141e5c31af7Sopenharmony_ci 142e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 143e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 144e5c31af7Sopenharmony_ci structure. 145e5c31af7Sopenharmony_ci * pname:flags is a bitmask of elink:VkVideoDecodeCapabilityFlagBitsKHR 146e5c31af7Sopenharmony_ci describing the supported video decoding capabilities. 147e5c31af7Sopenharmony_ci 148e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoDecodeCapabilitiesKHR.adoc[] 149e5c31af7Sopenharmony_ci-- 150e5c31af7Sopenharmony_ci 151e5c31af7Sopenharmony_ci[open,refpage='VkVideoDecodeCapabilityFlagBitsKHR',desc='Video decode capability flags',type='enums'] 152e5c31af7Sopenharmony_ci-- 153e5c31af7Sopenharmony_ciBits which may: be set in slink:VkVideoDecodeCapabilitiesKHR::pname:flags, 154e5c31af7Sopenharmony_ciindicating the decoding capabilities supported, are: 155e5c31af7Sopenharmony_ci 156e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoDecodeCapabilityFlagBitsKHR.adoc[] 157e5c31af7Sopenharmony_ci 158e5c31af7Sopenharmony_ci * ename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR 159e5c31af7Sopenharmony_ci indicates support for using the same video picture resource as the 160e5c31af7Sopenharmony_ci <<reconstructed-picture,reconstructed picture>> and 161e5c31af7Sopenharmony_ci <<decode-output-picture,decode output picture>> in a video decode 162e5c31af7Sopenharmony_ci operation. 163e5c31af7Sopenharmony_ci * ename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR 164e5c31af7Sopenharmony_ci indicates support for using distinct video picture resources as the 165e5c31af7Sopenharmony_ci <<reconstructed-picture,reconstructed picture>> and 166e5c31af7Sopenharmony_ci <<decode-output-picture,decode output picture>> in a video decode 167e5c31af7Sopenharmony_ci operation. 168e5c31af7Sopenharmony_ci 169e5c31af7Sopenharmony_ciImplementations are only required: to support one of 170e5c31af7Sopenharmony_ciename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR and 171e5c31af7Sopenharmony_ciename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR. 172e5c31af7Sopenharmony_ciAccordingly, applications should: handle both cases to maximize portability. 173e5c31af7Sopenharmony_ci 174e5c31af7Sopenharmony_ci[NOTE] 175e5c31af7Sopenharmony_ci.Note: 176e5c31af7Sopenharmony_ci==== 177e5c31af7Sopenharmony_ciIf both ename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR and 178e5c31af7Sopenharmony_ciename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR are 179e5c31af7Sopenharmony_cisupported, an application can choose to create separate images for decode 180e5c31af7Sopenharmony_ciDPB and decode output. 181e5c31af7Sopenharmony_ciE.g. in cases when linear tiling is preferred (and supported) for the decode 182e5c31af7Sopenharmony_cioutput picture and the DPB requires optimal tiling, this avoids the need for 183e5c31af7Sopenharmony_cia separate copy at the expense of additional memory bandwidth requirements 184e5c31af7Sopenharmony_ciduring decoding. 185e5c31af7Sopenharmony_ci==== 186e5c31af7Sopenharmony_ci-- 187e5c31af7Sopenharmony_ci 188e5c31af7Sopenharmony_ci[open,refpage='VkVideoDecodeCapabilityFlagsKHR',desc='Bitmask of VkVideoDecodeCapabilityFlagBitsKHR',type='flags'] 189e5c31af7Sopenharmony_ci-- 190e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoDecodeCapabilityFlagsKHR.adoc[] 191e5c31af7Sopenharmony_ci 192e5c31af7Sopenharmony_citname:VkVideoDecodeCapabilityFlagsKHR is a bitmask type for setting a mask 193e5c31af7Sopenharmony_ciof zero or more elink:VkVideoDecodeCapabilityFlagBitsKHR. 194e5c31af7Sopenharmony_ci-- 195e5c31af7Sopenharmony_ci 196e5c31af7Sopenharmony_ci 197e5c31af7Sopenharmony_ci=== Video Decode Commands 198e5c31af7Sopenharmony_ci 199e5c31af7Sopenharmony_ci[open,refpage='vkCmdDecodeVideoKHR',desc='Launch a video decode operation',type='protos'] 200e5c31af7Sopenharmony_ci-- 201e5c31af7Sopenharmony_ciTo launch video decode operations, call: 202e5c31af7Sopenharmony_ci 203e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdDecodeVideoKHR.adoc[] 204e5c31af7Sopenharmony_ci 205e5c31af7Sopenharmony_ci * pname:commandBuffer is the command buffer in which to record the 206e5c31af7Sopenharmony_ci command. 207e5c31af7Sopenharmony_ci * pname:pDecodeInfo is a pointer to a slink:VkVideoDecodeInfoKHR structure 208e5c31af7Sopenharmony_ci specifying the parameters of the video decode operations. 209e5c31af7Sopenharmony_ci 210e5c31af7Sopenharmony_ciEach call issues one or more video decode operations. 211e5c31af7Sopenharmony_ciThe implicit parameter pname:opCount corresponds to the number of video 212e5c31af7Sopenharmony_cidecode operations issued by the command. 213e5c31af7Sopenharmony_ciAfter calling this command, the 214e5c31af7Sopenharmony_ci<<queries-operation-active-query-index,active query index>> of each 215e5c31af7Sopenharmony_ci<<queries-operation-active,active>> query is incremented by pname:opCount. 216e5c31af7Sopenharmony_ci 217e5c31af7Sopenharmony_ciCurrently each call to this command results in the issue of a single video 218e5c31af7Sopenharmony_cidecode operation. 219e5c31af7Sopenharmony_ci 220e5c31af7Sopenharmony_ci[[decode-active-reference-picture-info]] 221e5c31af7Sopenharmony_ciActive Reference Picture Information:: 222e5c31af7Sopenharmony_ci 223e5c31af7Sopenharmony_ciThe list of <<active-reference-pictures,active reference pictures>> used by 224e5c31af7Sopenharmony_cia video decode operation is a list of image subregions used as the source of 225e5c31af7Sopenharmony_ci<<reference-picture,reference picture>> data and related parameters, and is 226e5c31af7Sopenharmony_ciderived from the slink:VkVideoReferenceSlotInfoKHR structures provided as 227e5c31af7Sopenharmony_cithe elements of the pname:pDecodeInfo->pReferenceSlots array. 228e5c31af7Sopenharmony_ciFor each element of pname:pDecodeInfo->pReferenceSlots, one or more elements 229e5c31af7Sopenharmony_ciare added to the active reference picture list, as defined by the 230e5c31af7Sopenharmony_ci<<decode-codec-specific-semantics,codec-specific semantics>>. 231e5c31af7Sopenharmony_ciEach element of this list contains the following information: 232e5c31af7Sopenharmony_ci 233e5c31af7Sopenharmony_ci * The image subregion within the image subresource 234e5c31af7Sopenharmony_ci <<video-image-subresource-reference,referred>> to by the 235e5c31af7Sopenharmony_ci <<video-picture-resources,video picture resource>> used as the reference 236e5c31af7Sopenharmony_ci picture. 237e5c31af7Sopenharmony_ci * The <<dpb-slot,DPB slot>> index the reference picture is associated 238e5c31af7Sopenharmony_ci with. 239e5c31af7Sopenharmony_ci * The codec-specific reference information related to the reference 240e5c31af7Sopenharmony_ci picture. 241e5c31af7Sopenharmony_ci 242e5c31af7Sopenharmony_ci[[decode-reconstructed-picture-info]] 243e5c31af7Sopenharmony_ciReconstructed Picture Information:: 244e5c31af7Sopenharmony_ci 245e5c31af7Sopenharmony_ciInformation related to the optional <<reconstructed-picture,reconstructed 246e5c31af7Sopenharmony_cipicture>> used by a video decode operation is derived from the 247e5c31af7Sopenharmony_cislink:VkVideoReferenceSlotInfoKHR structure pointed to by 248e5c31af7Sopenharmony_cipname:pDecodeInfo->pSetupReferenceSlot, if not `NULL`, as defined by the 249e5c31af7Sopenharmony_ci<<decode-codec-specific-semantics,codec-specific semantics>>, and consists 250e5c31af7Sopenharmony_ciof the following: 251e5c31af7Sopenharmony_ci 252e5c31af7Sopenharmony_ci * The image subregion within the image subresource 253e5c31af7Sopenharmony_ci <<video-image-subresource-reference,referred>> to by the 254e5c31af7Sopenharmony_ci <<video-picture-resources,video picture resource>> used as the 255e5c31af7Sopenharmony_ci reconstructed picture. 256e5c31af7Sopenharmony_ci * The <<dpb-slot,DPB slot>> index to <<dpb-slot-states,activate>> with the 257e5c31af7Sopenharmony_ci reconstructed picture. 258e5c31af7Sopenharmony_ci * The codec-specific reference information related to the reconstructed 259e5c31af7Sopenharmony_ci picture. 260e5c31af7Sopenharmony_ci 261e5c31af7Sopenharmony_ci[[decode-output-picture-info]] 262e5c31af7Sopenharmony_ciDecode Output Picture Information:: 263e5c31af7Sopenharmony_ci 264e5c31af7Sopenharmony_ciInformation related to the <<decode-output-picture,decode output picture>> 265e5c31af7Sopenharmony_ciused by a video decode operation is derived from 266e5c31af7Sopenharmony_cipname:pDecodeInfo->dstPictureResource and any codec-specific parameters 267e5c31af7Sopenharmony_ciprovided in the pname:pDecodeInfo->pNext chain, as defined by the 268e5c31af7Sopenharmony_ci<<decode-codec-specific-semantics,codec-specific semantics>>, and consists 269e5c31af7Sopenharmony_ciof the following: 270e5c31af7Sopenharmony_ci 271e5c31af7Sopenharmony_ci * The image subregion within the image subresource 272e5c31af7Sopenharmony_ci <<video-image-subresource-reference,referred>> to by the 273e5c31af7Sopenharmony_ci <<video-picture-resources,video picture resource>> used as the decode 274e5c31af7Sopenharmony_ci output picture. 275e5c31af7Sopenharmony_ci * The codec-specific picture information related to the decode output 276e5c31af7Sopenharmony_ci picture. 277e5c31af7Sopenharmony_ci 278e5c31af7Sopenharmony_ciSeveral limiting values are defined below that are referenced by the 279e5c31af7Sopenharmony_cirelevant valid usage statements of this command. 280e5c31af7Sopenharmony_ci 281e5c31af7Sopenharmony_ci * Let `uint32_t activeReferencePictureCount` be the size of the list of 282e5c31af7Sopenharmony_ci active reference pictures used by the video decode operation. 283e5c31af7Sopenharmony_ci Unless otherwise defined, pname:activeReferencePictureCount is set to 284e5c31af7Sopenharmony_ci the value of pname:pDecodeInfo->referenceSlotCount. 285e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 286e5c31af7Sopenharmony_ci ** If the bound video session was created with an <<decode-h264-profile, 287e5c31af7Sopenharmony_ci H.264 decode profile>>, then let pname:activeReferencePictureCount be 288e5c31af7Sopenharmony_ci the value of pname:pDecodeInfo->referenceSlotCount plus the number of 289e5c31af7Sopenharmony_ci elements of the pname:pDecodeInfo->pReferenceSlots array that have a 290e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264DpbSlotInfoKHR structure included in their 291e5c31af7Sopenharmony_ci pname:pNext chain with both 292e5c31af7Sopenharmony_ci pname:pStdReferenceInfo->flags.top_field_flag and 293e5c31af7Sopenharmony_ci pname:pStdReferenceInfo->flags.bottom_field_flag set. 294e5c31af7Sopenharmony_ci+ 295e5c31af7Sopenharmony_ci[NOTE] 296e5c31af7Sopenharmony_ci.Note 297e5c31af7Sopenharmony_ci==== 298e5c31af7Sopenharmony_ciThis means that the elements of pname:pDecodeInfo->pReferenceSlots that 299e5c31af7Sopenharmony_ciinclude both a top and bottom field reference are counted as two separate 300e5c31af7Sopenharmony_ciactive reference pictures, as described in the 301e5c31af7Sopenharmony_ci<<decode-h264-active-reference-picture-info,active reference picture list 302e5c31af7Sopenharmony_ciconstruction rules for H.264 decode operations>>. 303e5c31af7Sopenharmony_ci==== 304e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 305e5c31af7Sopenharmony_ci * Let `VkOffset2D codedOffsetGranularity` be the minimum alignment 306e5c31af7Sopenharmony_ci requirement for the coded offset of video picture resources. 307e5c31af7Sopenharmony_ci Unless otherwise defined, the value of the pname:x and pname:y members 308e5c31af7Sopenharmony_ci of pname:codedOffsetGranularity are `0`. 309e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 310e5c31af7Sopenharmony_ci ** If the bound video session was created with an <<decode-h264-profile, 311e5c31af7Sopenharmony_ci H.264 decode profile>> with a 312e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264ProfileInfoKHR::pname:pictureLayout of 313e5c31af7Sopenharmony_ci ename:VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR, 314e5c31af7Sopenharmony_ci then pname:codedOffsetGranularity is equal to 315e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264CapabilitiesKHR::pname:fieldOffsetGranularity, 316e5c31af7Sopenharmony_ci as returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for that 317e5c31af7Sopenharmony_ci video profile. 318e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 319e5c31af7Sopenharmony_ci * Let `uint32_t dpbFrameUseCount[]` be an array of size pname:maxDpbSlots, 320e5c31af7Sopenharmony_ci where pname:maxDpbSlots is the 321e5c31af7Sopenharmony_ci slink:VkVideoSessionCreateInfoKHR::pname:maxDpbSlots the bound video 322e5c31af7Sopenharmony_ci session was created with, with each element indicating the number of 323e5c31af7Sopenharmony_ci times a frame associated with the corresponding DPB slot index is 324e5c31af7Sopenharmony_ci referred to by the video coding operation. 325e5c31af7Sopenharmony_ci Let the initial value of each element of the array be `0`. 326e5c31af7Sopenharmony_ci ** If pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, then 327e5c31af7Sopenharmony_ci `dpbFrameUseCount[i]` is incremented by one, where pname:i equals 328e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->slotIndex. 329e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 330e5c31af7Sopenharmony_ci If the bound video session object was created with an 331e5c31af7Sopenharmony_ci <<decode-h264-profile,H.264 decode profile>>, then 332e5c31af7Sopenharmony_ci `dpbFrameUseCount[i]` is decremented by one if either 333e5c31af7Sopenharmony_ci pname:pStdReferenceInfo->flags.top_field_flag or 334e5c31af7Sopenharmony_ci pname:pStdReferenceInfo->flags.bottom_field_flag is set in the 335e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264DpbSlotInfoKHR structure in the 336e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->pNext chain. 337e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 338e5c31af7Sopenharmony_ci ** For each element of pname:pDecodeInfo->pReferenceSlots, 339e5c31af7Sopenharmony_ci `dpbFrameUseCount[i]` is incremented by one, where pname:i equals the 340e5c31af7Sopenharmony_ci pname:slotIndex member of the corresponding element. 341e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 342e5c31af7Sopenharmony_ci If the bound video session object was created with an 343e5c31af7Sopenharmony_ci <<decode-h264-profile,H.264 decode profile>>, then 344e5c31af7Sopenharmony_ci `dpbFrameUseCount[i]` is decremented by one if either 345e5c31af7Sopenharmony_ci pname:pStdReferenceInfo->flags.top_field_flag or 346e5c31af7Sopenharmony_ci pname:pStdReferenceInfo->flags.bottom_field_flag is set in the 347e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264DpbSlotInfoKHR structure in the pname:pNext 348e5c31af7Sopenharmony_ci chain of the corresponding element of 349e5c31af7Sopenharmony_ci pname:pDecodeInfo->pReferenceSlots. 350e5c31af7Sopenharmony_ci * Let `uint32_t dpbTopFieldUseCount[]` and `uint32_t 351e5c31af7Sopenharmony_ci dpbBottomFieldUseCount[]` be arrays of size pname:maxDpbSlots, where 352e5c31af7Sopenharmony_ci pname:maxDpbSlots is the 353e5c31af7Sopenharmony_ci slink:VkVideoSessionCreateInfoKHR::pname:maxDpbSlots the bound video 354e5c31af7Sopenharmony_ci session was created with, with each element indicating the number of 355e5c31af7Sopenharmony_ci times the top field or the bottom field, respectively, associated with 356e5c31af7Sopenharmony_ci the corresponding DPB slot index is referred to by the video coding 357e5c31af7Sopenharmony_ci operation. 358e5c31af7Sopenharmony_ci Let the initial value of each element of the arrays be `0`. 359e5c31af7Sopenharmony_ci ** If the bound video session object was created with an 360e5c31af7Sopenharmony_ci <<decode-h264-profile,H.264 decode profile>> and 361e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, then perform the 362e5c31af7Sopenharmony_ci following: 363e5c31af7Sopenharmony_ci *** If pname:pStdReferenceInfo->flags.top_field_flag is set in the 364e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264DpbSlotInfoKHR structure in the 365e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->pNext chain, then 366e5c31af7Sopenharmony_ci `dpbTopFieldUseCount[i]` is incremented by one, where pname:i equals 367e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->slotIndex. 368e5c31af7Sopenharmony_ci *** If pname:pStdReferenceInfo->flags.bottom_field_flag is set in the 369e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264DpbSlotInfoKHR structure in the 370e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->pNext chain, then 371e5c31af7Sopenharmony_ci `dpbBottomFieldUseCount[i]` is incremented by one, where pname:i 372e5c31af7Sopenharmony_ci equals pname:pDecodeInfo->pSetupReferenceSlot->slotIndex. 373e5c31af7Sopenharmony_ci ** If the bound video session object was created with an 374e5c31af7Sopenharmony_ci <<decode-h264-profile,H.264 decode profile>>, then perform the 375e5c31af7Sopenharmony_ci following for each element of pname:pDecodeInfo->pReferenceSlots: 376e5c31af7Sopenharmony_ci *** If pname:pStdReferenceInfo->flags.top_field_flag is set in the 377e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264DpbSlotInfoKHR structure in the pname:pNext 378e5c31af7Sopenharmony_ci chain of the element, then `dpbTopFieldUseCount[i]` is incremented by 379e5c31af7Sopenharmony_ci one, where pname:i equals the pname:slotIndex member of the element. 380e5c31af7Sopenharmony_ci *** If pname:pStdReferenceInfo->flags.bottom_field_flag is set in the 381e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264DpbSlotInfoKHR structure in the pname:pNext 382e5c31af7Sopenharmony_ci chain of the element, then `dpbBottomFieldUseCount[i]` is incremented 383e5c31af7Sopenharmony_ci by one, where pname:i equals the pname:slotIndex member of the 384e5c31af7Sopenharmony_ci element. 385e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 386e5c31af7Sopenharmony_ci 387e5c31af7Sopenharmony_ci.Valid Usage 388e5c31af7Sopenharmony_ci**** 389e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-None-07011]] 390e5c31af7Sopenharmony_ci The bound video session must: not be in <<video-session-uninitialized, 391e5c31af7Sopenharmony_ci uninitialized>> state at the time the command is executed on the device 392e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-opCount-07134]] 393e5c31af7Sopenharmony_ci For each <<queries-operation-active,active>> query, the 394e5c31af7Sopenharmony_ci <<queries-operation-active-query-index,active query index>> 395e5c31af7Sopenharmony_ci corresponding to the query type of that query plus pname:opCount must: 396e5c31af7Sopenharmony_ci be less than or equal to the 397e5c31af7Sopenharmony_ci <<queries-operation-last-activatable-query-index,last activatable query 398e5c31af7Sopenharmony_ci index>> corresponding to the query type of that query plus one 399e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07135]] 400e5c31af7Sopenharmony_ci pname:pDecodeInfo->srcBuffer must: be <<video-profile-compatibility, 401e5c31af7Sopenharmony_ci compatible>> with the video profile the bound video session was created 402e5c31af7Sopenharmony_ci with 403e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-commandBuffer-07136]] 404e5c31af7Sopenharmony_ci If pname:commandBuffer is an unprotected command buffer and 405e5c31af7Sopenharmony_ci <<limits-protectedNoFault, pname:protectedNoFault>> is not supported, 406e5c31af7Sopenharmony_ci then pname:pDecodeInfo->srcBuffer must: not be a protected buffer 407e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-commandBuffer-07137]] 408e5c31af7Sopenharmony_ci If pname:commandBuffer is a protected command buffer and 409e5c31af7Sopenharmony_ci <<limits-protectedNoFault, pname:protectedNoFault>> is not supported, 410e5c31af7Sopenharmony_ci then pname:pDecodeInfo->srcBuffer must: be a protected buffer 411e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07138]] 412e5c31af7Sopenharmony_ci pname:pDecodeInfo->srcBufferOffset must: be an integer multiple of 413e5c31af7Sopenharmony_ci slink:VkVideoCapabilitiesKHR::pname:minBitstreamBufferOffsetAlignment, 414e5c31af7Sopenharmony_ci as returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the 415e5c31af7Sopenharmony_ci video profile the bound video session was created with 416e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07139]] 417e5c31af7Sopenharmony_ci pname:pDecodeInfo->srcBufferRange must: be an integer multiple of 418e5c31af7Sopenharmony_ci slink:VkVideoCapabilitiesKHR::pname:minBitstreamBufferSizeAlignment, as 419e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video 420e5c31af7Sopenharmony_ci profile the bound video session was created with 421e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07140]] 422e5c31af7Sopenharmony_ci If pname:pDecodeInfo->pSetupReferenceSlot is not `NULL` and 423e5c31af7Sopenharmony_ci slink:VkVideoDecodeCapabilitiesKHR::pname:flags does not include 424e5c31af7Sopenharmony_ci ename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR, as 425e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video 426e5c31af7Sopenharmony_ci profile the bound video session was created with, then the video picture 427e5c31af7Sopenharmony_ci resources specified by pname:pDecodeInfo->dstPictureResource and 428e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->pPictureResource must: not 429e5c31af7Sopenharmony_ci <<video-picture-resource-matching,match>> 430e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07141]] 431e5c31af7Sopenharmony_ci If pname:pDecodeInfo->pSetupReferenceSlot is not `NULL` and 432e5c31af7Sopenharmony_ci slink:VkVideoDecodeCapabilitiesKHR::pname:flags does not include 433e5c31af7Sopenharmony_ci ename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR, as 434e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video 435e5c31af7Sopenharmony_ci profile the bound video session was created with, then the video picture 436e5c31af7Sopenharmony_ci resources specified by pname:pDecodeInfo->dstPictureResource and 437e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->pPictureResource must: 438e5c31af7Sopenharmony_ci <<video-picture-resource-matching,match>> 439e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07142]] 440e5c31af7Sopenharmony_ci pname:pDecodeInfo->dstPictureResource.imageViewBinding must: be 441e5c31af7Sopenharmony_ci <<video-profile-compatibility,compatible>> with the video profile the 442e5c31af7Sopenharmony_ci bound video session was created with 443e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07143]] 444e5c31af7Sopenharmony_ci The format of pname:pDecodeInfo->dstPictureResource.imageViewBinding 445e5c31af7Sopenharmony_ci must: match the slink:VkVideoSessionCreateInfoKHR::pname:pictureFormat 446e5c31af7Sopenharmony_ci the bound video session was created with 447e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07144]] 448e5c31af7Sopenharmony_ci pname:pDecodeInfo->dstPictureResource.codedOffset must: be an integer 449e5c31af7Sopenharmony_ci multiple of pname:codedOffsetGranularity 450e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07145]] 451e5c31af7Sopenharmony_ci pname:pDecodeInfo->dstPictureResource.codedExtent must: be between 452e5c31af7Sopenharmony_ci pname:minCodedExtent and pname:maxCodedExtent, inclusive, the bound 453e5c31af7Sopenharmony_ci video session was created with 454e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07146]] 455e5c31af7Sopenharmony_ci pname:pDecodeInfo->dstPictureResource.imageViewBinding must: have been 456e5c31af7Sopenharmony_ci created with ename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR 457e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-commandBuffer-07147]] 458e5c31af7Sopenharmony_ci If pname:commandBuffer is an unprotected command buffer and 459e5c31af7Sopenharmony_ci <<limits-protectedNoFault, pname:protectedNoFault>> is not supported, 460e5c31af7Sopenharmony_ci then pname:pDecodeInfo->dstPictureResource.imageViewBinding must: not 461e5c31af7Sopenharmony_ci have been created from a protected image 462e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-commandBuffer-07148]] 463e5c31af7Sopenharmony_ci If pname:commandBuffer is a protected command buffer and 464e5c31af7Sopenharmony_ci <<limits-protectedNoFault, pname:protectedNoFault>> is not supported, 465e5c31af7Sopenharmony_ci then pname:pDecodeInfo->dstPictureResource.imageViewBinding must: have 466e5c31af7Sopenharmony_ci been created from a protected image 467e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07170]] 468e5c31af7Sopenharmony_ci If pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, then 469e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->slotIndex must: be less than the 470e5c31af7Sopenharmony_ci slink:VkVideoSessionCreateInfoKHR::pname:maxDpbSlots specified when the 471e5c31af7Sopenharmony_ci bound video session was created 472e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07173]] 473e5c31af7Sopenharmony_ci If pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, then 474e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->pPictureResource->codedOffset 475e5c31af7Sopenharmony_ci must: be an integer multiple of pname:codedOffsetGranularity 476e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07149]] 477e5c31af7Sopenharmony_ci If pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, then 478e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->pPictureResource must: 479e5c31af7Sopenharmony_ci <<video-picture-resource-matching,match>> one of the 480e5c31af7Sopenharmony_ci <<bound-reference-picture-resources,bound reference picture resource>> 481e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-activeReferencePictureCount-07150]] 482e5c31af7Sopenharmony_ci pname:activeReferencePictureCount must: be less than or equal to the 483e5c31af7Sopenharmony_ci slink:VkVideoSessionCreateInfoKHR::pname:maxActiveReferencePictures 484e5c31af7Sopenharmony_ci specified when the bound video session was created 485e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-slotIndex-07256]] 486e5c31af7Sopenharmony_ci The pname:slotIndex member of each element of 487e5c31af7Sopenharmony_ci pname:pDecodeInfo->pReferenceSlots must: be less than the 488e5c31af7Sopenharmony_ci slink:VkVideoSessionCreateInfoKHR::pname:maxDpbSlots specified when the 489e5c31af7Sopenharmony_ci bound video session was created 490e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-codedOffset-07257]] 491e5c31af7Sopenharmony_ci The pname:codedOffset member of the slink:VkVideoPictureResourceInfoKHR 492e5c31af7Sopenharmony_ci structure pointed to by the pname:pPictureResource member of each 493e5c31af7Sopenharmony_ci element of pname:pDecodeInfo->pReferenceSlots must: be an integer 494e5c31af7Sopenharmony_ci multiple of pname:codedOffsetGranularity 495e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07151]] 496e5c31af7Sopenharmony_ci The pname:pPictureResource member of each element of 497e5c31af7Sopenharmony_ci pname:pDecodeInfo->pReferenceSlots must: 498e5c31af7Sopenharmony_ci <<video-picture-resource-matching,match>> one of the 499e5c31af7Sopenharmony_ci <<bound-reference-picture-resources,bound reference picture resource>> 500e5c31af7Sopenharmony_ci associated with the DPB slot index specified in the pname:slotIndex 501e5c31af7Sopenharmony_ci member of that element 502e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07264]] 503e5c31af7Sopenharmony_ci Each video picture resource corresponding to the pname:pPictureResource 504e5c31af7Sopenharmony_ci member specified in the elements of pname:pDecodeInfo->pReferenceSlots 505e5c31af7Sopenharmony_ci must: be <<video-picture-resource-uniqueness,unique>> within 506e5c31af7Sopenharmony_ci pname:pDecodeInfo->pReferenceSlots 507e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-dpbFrameUseCount-07176]] 508e5c31af7Sopenharmony_ci All elements of pname:dpbFrameUseCount must: be less than or equal to 509e5c31af7Sopenharmony_ci `1` 510e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 511e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-dpbTopFieldUseCount-07177]] 512e5c31af7Sopenharmony_ci All elements of pname:dpbTopFieldUseCount must: be less than or equal to 513e5c31af7Sopenharmony_ci `1` 514e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-dpbBottomFieldUseCount-07178]] 515e5c31af7Sopenharmony_ci All elements of pname:dpbBottomFieldUseCount must: be less than or equal 516e5c31af7Sopenharmony_ci to `1` 517e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 518e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07252]] 519e5c31af7Sopenharmony_ci If pname:pDecodeInfo->pSetupReferenceSlot is `NULL` or 520e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->pPictureResource does not 521e5c31af7Sopenharmony_ci <<video-image-subresource-reference,refer>> to the same image 522e5c31af7Sopenharmony_ci subresource as pname:pDecodeInfo->dstPictureResource, then the image 523e5c31af7Sopenharmony_ci subresource <<video-image-subresource-reference,referred>> to by 524e5c31af7Sopenharmony_ci pname:pDecodeInfo->dstPictureResource must: be in the 525e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR layout at the time the video 526e5c31af7Sopenharmony_ci decode operation is executed on the device 527e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07253]] 528e5c31af7Sopenharmony_ci If pname:pDecodeInfo->pSetupReferenceSlot is not `NULL` and 529e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->pPictureResource 530e5c31af7Sopenharmony_ci <<video-image-subresource-reference,refers>> to the same image 531e5c31af7Sopenharmony_ci subresource as pname:pDecodeInfo->dstPictureResource, then the image 532e5c31af7Sopenharmony_ci subresource <<video-image-subresource-reference,referred>> to by 533e5c31af7Sopenharmony_ci pname:pDecodeInfo->dstPictureResource must: be in the 534e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video 535e5c31af7Sopenharmony_ci decode operation is executed on the device 536e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07254]] 537e5c31af7Sopenharmony_ci If pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, then the image 538e5c31af7Sopenharmony_ci subresource <<video-image-subresource-reference,referred>> to by 539e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot->pPictureResource must: be in the 540e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video 541e5c31af7Sopenharmony_ci decode operation is executed on the device 542e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pPictureResource-07255]] 543e5c31af7Sopenharmony_ci The image subresource <<video-image-subresource-reference,referred>> to 544e5c31af7Sopenharmony_ci by the pname:pPictureResource member of each element of 545e5c31af7Sopenharmony_ci pname:pDecodeInfo->pReferenceSlots must: be in the 546e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR layout at the time the video 547e5c31af7Sopenharmony_ci decode operation is executed on the device 548e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 549e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pNext-07152]] 550e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 551e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the pname:pNext 552e5c31af7Sopenharmony_ci chain of pname:pDecodeInfo must: include a 553e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264PictureInfoKHR structure 554e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-None-07258]] 555e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 556e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR but was not created 557e5c31af7Sopenharmony_ci with <<decode-h264-interlaced-support,interlaced frame support>>, then 558e5c31af7Sopenharmony_ci the <<decode-h264-output-picture-info,decode output picture>> must: 559e5c31af7Sopenharmony_ci represent a frame 560e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pSliceOffsets-07153]] 561e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 562e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then all elements of 563e5c31af7Sopenharmony_ci the pname:pSliceOffsets member of the 564e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264PictureInfoKHR structure included in the 565e5c31af7Sopenharmony_ci pname:pNext chain of pname:pDecodeInfo must: be less than 566e5c31af7Sopenharmony_ci pname:pDecodeInfo->srcBufferRange 567e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-StdVideoH264SequenceParameterSet-07154]] 568e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 569e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the bound video 570e5c31af7Sopenharmony_ci session parameters object must: contain a 571e5c31af7Sopenharmony_ci code:StdVideoH264SequenceParameterSet entry with 572e5c31af7Sopenharmony_ci pname:seq_parameter_set_id matching 573e5c31af7Sopenharmony_ci code:StdVideoDecodeH264PictureInfo::pname:seq_parameter_set_id that is 574e5c31af7Sopenharmony_ci provided in the pname:pStdPictureInfo member of the 575e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264PictureInfoKHR structure included in the 576e5c31af7Sopenharmony_ci pname:pNext chain of pname:pDecodeInfo 577e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-StdVideoH264PictureParameterSet-07155]] 578e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 579e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the bound video 580e5c31af7Sopenharmony_ci session parameters object must: contain a 581e5c31af7Sopenharmony_ci code:StdVideoH264PictureParameterSet entry with 582e5c31af7Sopenharmony_ci pname:seq_parameter_set_id and pname:pic_parameter_set_id matching 583e5c31af7Sopenharmony_ci code:StdVideoDecodeH264PictureInfo::pname:seq_parameter_set_id and 584e5c31af7Sopenharmony_ci code:StdVideoDecodeH264PictureInfo::pname:pic_parameter_set_id, 585e5c31af7Sopenharmony_ci respectively, that are provided in the pname:pStdPictureInfo member of 586e5c31af7Sopenharmony_ci the slink:VkVideoDecodeH264PictureInfoKHR structure included in the 587e5c31af7Sopenharmony_ci pname:pNext chain of pname:pDecodeInfo 588e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07156]] 589e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 590e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and 591e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, then the 592e5c31af7Sopenharmony_ci pname:pNext chain of pname:pDecodeInfo->pSetupReferenceSlot must: 593e5c31af7Sopenharmony_ci include a slink:VkVideoDecodeH264DpbSlotInfoKHR structure 594e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07259]] 595e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 596e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR but was not created 597e5c31af7Sopenharmony_ci with <<decode-h264-interlaced-support,interlaced frame support>>, and 598e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, then the 599e5c31af7Sopenharmony_ci <<decode-h264-reconstructed-picture-info,reconstructed picture>> must: 600e5c31af7Sopenharmony_ci represent a frame 601e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pNext-07157]] 602e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 603e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the pname:pNext 604e5c31af7Sopenharmony_ci chain of each element of pname:pDecodeInfo->pReferenceSlots must: 605e5c31af7Sopenharmony_ci include a slink:VkVideoDecodeH264DpbSlotInfoKHR structure 606e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07260]] 607e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 608e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR but was not created 609e5c31af7Sopenharmony_ci with <<decode-h264-interlaced-support,interlaced frame support>>, then 610e5c31af7Sopenharmony_ci each <<decode-h264-active-reference-picture-info,active reference 611e5c31af7Sopenharmony_ci picture>> corresponding to the elements of 612e5c31af7Sopenharmony_ci pname:pDecodeInfo->pReferenceSlots must: represent a frame 613e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07261]] 614e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 615e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, 616e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, and the 617e5c31af7Sopenharmony_ci <<decode-h264-output-picture-info,decode output picture>> represents a 618e5c31af7Sopenharmony_ci frame, then the <<decode-h264-reconstructed-picture-info,reconstructed 619e5c31af7Sopenharmony_ci picture>> must: also represent a frame 620e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07262]] 621e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 622e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, 623e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, and the 624e5c31af7Sopenharmony_ci <<decode-h264-output-picture-info,decode output picture>> represents a 625e5c31af7Sopenharmony_ci top field, then the 626e5c31af7Sopenharmony_ci <<decode-h264-reconstructed-picture-info,reconstructed picture>> must: 627e5c31af7Sopenharmony_ci also represent a top field 628e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07263]] 629e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 630e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, 631e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, and the 632e5c31af7Sopenharmony_ci <<decode-h264-output-picture-info,decode output picture>> represents a 633e5c31af7Sopenharmony_ci bottom field, then the <<decode-h264-reconstructed-picture-info, 634e5c31af7Sopenharmony_ci reconstructed picture>> must: also represent a bottom field 635e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07266]] 636e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 637e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and an 638e5c31af7Sopenharmony_ci <<decode-h264-active-reference-picture-info,active reference picture>> 639e5c31af7Sopenharmony_ci corresponding to any element of pname:pDecodeInfo->pReferenceSlots 640e5c31af7Sopenharmony_ci represents a frame, then the DPB slot index of the bound video session 641e5c31af7Sopenharmony_ci specified by the pname:slotIndex member of that element must: be 642e5c31af7Sopenharmony_ci currently associated with a frame picture 643e5c31af7Sopenharmony_ci <<video-picture-resource-matching, matching>> the video picture resource 644e5c31af7Sopenharmony_ci specified by the pname:pPictureResource member of the same element at 645e5c31af7Sopenharmony_ci the time the command is executed on the device 646e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07267]] 647e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 648e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and an 649e5c31af7Sopenharmony_ci <<decode-h264-active-reference-picture-info,active reference picture>> 650e5c31af7Sopenharmony_ci corresponding to any element of pname:pDecodeInfo->pReferenceSlots 651e5c31af7Sopenharmony_ci represents a top field, then the DPB slot index of the bound video 652e5c31af7Sopenharmony_ci session specified by the pname:slotIndex member of that element must: be 653e5c31af7Sopenharmony_ci currently associated with a top field picture 654e5c31af7Sopenharmony_ci <<video-picture-resource-matching, matching>> the video picture resource 655e5c31af7Sopenharmony_ci specified by the pname:pPictureResource member of the same element at 656e5c31af7Sopenharmony_ci the time the command is executed on the device 657e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07268]] 658e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 659e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and an 660e5c31af7Sopenharmony_ci <<decode-h264-active-reference-picture-info,active reference picture>> 661e5c31af7Sopenharmony_ci corresponding to any element of pname:pDecodeInfo->pReferenceSlots 662e5c31af7Sopenharmony_ci represents a bottom field, then the DPB slot index of the bound video 663e5c31af7Sopenharmony_ci session specified by the pname:slotIndex member of that element must: be 664e5c31af7Sopenharmony_ci currently associated with a bottom field picture 665e5c31af7Sopenharmony_ci <<video-picture-resource-matching,matching>> the video picture resource 666e5c31af7Sopenharmony_ci specified by the pname:pPictureResource member of the same element at 667e5c31af7Sopenharmony_ci the time the command is executed on the device 668e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 669e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 670e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pNext-07158]] 671e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 672e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the pname:pNext 673e5c31af7Sopenharmony_ci chain of pname:pDecodeInfo must: include a 674e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265PictureInfoKHR structure 675e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pSliceSegmentOffsets-07159]] 676e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 677e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then all elements of 678e5c31af7Sopenharmony_ci the pname:pSliceSegmentOffsets member of the 679e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265PictureInfoKHR structure included in the 680e5c31af7Sopenharmony_ci pname:pNext chain of pname:pDecodeInfo must: be less than 681e5c31af7Sopenharmony_ci pname:pDecodeInfo->srcBufferRange 682e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-StdVideoH265VideoParameterSet-07160]] 683e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 684e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video 685e5c31af7Sopenharmony_ci session parameters object must: contain a 686e5c31af7Sopenharmony_ci code:StdVideoH265VideoParameterSet entry with 687e5c31af7Sopenharmony_ci pname:vps_video_parameter_set_id matching 688e5c31af7Sopenharmony_ci code:StdVideoDecodeH265PictureInfo::pname:sps_video_parameter_set_id 689e5c31af7Sopenharmony_ci that is provided in the pname:pStdPictureInfo member of the 690e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265PictureInfoKHR structure included in the 691e5c31af7Sopenharmony_ci pname:pNext chain of pname:pDecodeInfo 692e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-StdVideoH265SequenceParameterSet-07161]] 693e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 694e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video 695e5c31af7Sopenharmony_ci session parameters object must: contain a 696e5c31af7Sopenharmony_ci code:StdVideoH265SequenceParameterSet entry with 697e5c31af7Sopenharmony_ci pname:sps_video_parameter_set_id and pname:sps_seq_parameter_set_id 698e5c31af7Sopenharmony_ci matching 699e5c31af7Sopenharmony_ci code:StdVideoDecodeH265PictureInfo::pname:sps_video_parameter_set_id and 700e5c31af7Sopenharmony_ci code:StdVideoDecodeH265PictureInfo::pname:pps_seq_parameter_set_id, 701e5c31af7Sopenharmony_ci respectively, that are provided in the pname:pStdPictureInfo member of 702e5c31af7Sopenharmony_ci the slink:VkVideoDecodeH265PictureInfoKHR structure included in the 703e5c31af7Sopenharmony_ci pname:pNext chain of pname:pDecodeInfo 704e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-StdVideoH265PictureParameterSet-07162]] 705e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 706e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video 707e5c31af7Sopenharmony_ci session parameters object must: contain a 708e5c31af7Sopenharmony_ci code:StdVideoH265PictureParameterSet entry with 709e5c31af7Sopenharmony_ci pname:sps_video_parameter_set_id, pname:pps_seq_parameter_set_id, and 710e5c31af7Sopenharmony_ci pname:pps_pic_parameter_set_id matching 711e5c31af7Sopenharmony_ci code:StdVideoDecodeH265PictureInfo::pname:sps_video_parameter_set_id, 712e5c31af7Sopenharmony_ci code:StdVideoDecodeH265PictureInfo::pname:pps_seq_parameter_set_id, and 713e5c31af7Sopenharmony_ci code:StdVideoDecodeH265PictureInfo::pname:pps_pic_parameter_set_id, 714e5c31af7Sopenharmony_ci respectively, that are provided in the pname:pStdPictureInfo member of 715e5c31af7Sopenharmony_ci the slink:VkVideoDecodeH265PictureInfoKHR structure included in the 716e5c31af7Sopenharmony_ci pname:pNext chain of pname:pDecodeInfo 717e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07163]] 718e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 719e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and 720e5c31af7Sopenharmony_ci pname:pDecodeInfo->pSetupReferenceSlot is not `NULL`, then the 721e5c31af7Sopenharmony_ci pname:pNext chain of pname:pDecodeInfo->pSetupReferenceSlot must: 722e5c31af7Sopenharmony_ci include a slink:VkVideoDecodeH265DpbSlotInfoKHR structure 723e5c31af7Sopenharmony_ci * [[VUID-vkCmdDecodeVideoKHR-pNext-07164]] 724e5c31af7Sopenharmony_ci If the bound video session was created with the video codec operation 725e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the pname:pNext 726e5c31af7Sopenharmony_ci chain of each element of pname:pDecodeInfo->pReferenceSlots must: 727e5c31af7Sopenharmony_ci include a slink:VkVideoDecodeH265DpbSlotInfoKHR structure 728e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 729e5c31af7Sopenharmony_ci**** 730e5c31af7Sopenharmony_ci 731e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdDecodeVideoKHR.adoc[] 732e5c31af7Sopenharmony_ci-- 733e5c31af7Sopenharmony_ci 734e5c31af7Sopenharmony_ci[open,refpage='VkVideoDecodeInfoKHR',desc='Structure specifying video decode parameters',type='structs'] 735e5c31af7Sopenharmony_ci-- 736e5c31af7Sopenharmony_ciThe sname:VkVideoDecodeInfoKHR structure is defined as: 737e5c31af7Sopenharmony_ci 738e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoDecodeInfoKHR.adoc[] 739e5c31af7Sopenharmony_ci 740e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 741e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 742e5c31af7Sopenharmony_ci structure. 743e5c31af7Sopenharmony_ci * pname:flags is reserved for future use. 744e5c31af7Sopenharmony_ci * pname:srcBuffer is the source video bitstream buffer to read the encoded 745e5c31af7Sopenharmony_ci bitstream from. 746e5c31af7Sopenharmony_ci * pname:srcBufferOffset is the starting offset in bytes from the start of 747e5c31af7Sopenharmony_ci pname:srcBuffer to read the encoded bitstream from. 748e5c31af7Sopenharmony_ci * pname:srcBufferRange is the size in bytes of the encoded bitstream to 749e5c31af7Sopenharmony_ci decode from pname:srcBuffer, starting from pname:srcBufferOffset. 750e5c31af7Sopenharmony_ci * pname:dstPictureResource is the video picture resource to use as the 751e5c31af7Sopenharmony_ci <<decode-output-picture,decode output picture>>. 752e5c31af7Sopenharmony_ci * pname:pSetupReferenceSlot is `NULL` or a pointer to a 753e5c31af7Sopenharmony_ci slink:VkVideoReferenceSlotInfoKHR structure describing the DPB slot to 754e5c31af7Sopenharmony_ci <<dpb-slot-states,activate>> and the video picture resource to use as 755e5c31af7Sopenharmony_ci the <<reconstructed-picture,reconstructed picture>> to activate the DPB 756e5c31af7Sopenharmony_ci slot with. 757e5c31af7Sopenharmony_ci * pname:referenceSlotCount is the number of elements in the 758e5c31af7Sopenharmony_ci pname:pReferenceSlots array. 759e5c31af7Sopenharmony_ci * pname:pReferenceSlots is a pointer to an array of 760e5c31af7Sopenharmony_ci slink:VkVideoReferenceSlotInfoKHR structures describing the DPB slots 761e5c31af7Sopenharmony_ci and corresponding <<reference-picture,reference picture>> resources to 762e5c31af7Sopenharmony_ci use in this video decode operation (the set of 763e5c31af7Sopenharmony_ci <<active-reference-pictures, active reference pictures>>). 764e5c31af7Sopenharmony_ci 765e5c31af7Sopenharmony_ci.Valid Usage 766e5c31af7Sopenharmony_ci**** 767e5c31af7Sopenharmony_ci * [[VUID-VkVideoDecodeInfoKHR-srcBuffer-07165]] 768e5c31af7Sopenharmony_ci pname:srcBuffer must: have been created with 769e5c31af7Sopenharmony_ci ename:VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR set 770e5c31af7Sopenharmony_ci * [[VUID-VkVideoDecodeInfoKHR-srcBufferOffset-07166]] 771e5c31af7Sopenharmony_ci pname:srcBufferOffset must: be less than the size of pname:srcBuffer 772e5c31af7Sopenharmony_ci * [[VUID-VkVideoDecodeInfoKHR-srcBufferRange-07167]] 773e5c31af7Sopenharmony_ci pname:srcBufferRange must: be less than or equal to the size of 774e5c31af7Sopenharmony_ci pname:srcBuffer minus pname:srcBufferOffset 775e5c31af7Sopenharmony_ci * [[VUID-VkVideoDecodeInfoKHR-pSetupReferenceSlot-07168]] 776e5c31af7Sopenharmony_ci If pname:pSetupReferenceSlot is not `NULL`, then its pname:slotIndex 777e5c31af7Sopenharmony_ci member must: not be negative 778e5c31af7Sopenharmony_ci * [[VUID-VkVideoDecodeInfoKHR-pSetupReferenceSlot-07169]] 779e5c31af7Sopenharmony_ci If pname:pSetupReferenceSlot is not `NULL`, then its 780e5c31af7Sopenharmony_ci pname:pPictureResource must: not be `NULL` 781e5c31af7Sopenharmony_ci * [[VUID-VkVideoDecodeInfoKHR-slotIndex-07171]] 782e5c31af7Sopenharmony_ci The pname:slotIndex member of each element of pname:pReferenceSlots 783e5c31af7Sopenharmony_ci must: not be negative 784e5c31af7Sopenharmony_ci * [[VUID-VkVideoDecodeInfoKHR-pPictureResource-07172]] 785e5c31af7Sopenharmony_ci The pname:pPictureResource member of each element of 786e5c31af7Sopenharmony_ci pname:pReferenceSlots must: not be `NULL` 787e5c31af7Sopenharmony_ci**** 788e5c31af7Sopenharmony_ci 789e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoDecodeInfoKHR.adoc[] 790e5c31af7Sopenharmony_ci-- 791e5c31af7Sopenharmony_ci 792e5c31af7Sopenharmony_ci[open,refpage='VkVideoDecodeFlagsKHR',desc='Reserved for future use',type='flags'] 793e5c31af7Sopenharmony_ci-- 794e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoDecodeFlagsKHR.adoc[] 795e5c31af7Sopenharmony_ci 796e5c31af7Sopenharmony_citname:VkVideoDecodeFlagsKHR is a bitmask type for setting a mask, but is 797e5c31af7Sopenharmony_cicurrently reserved for future use. 798e5c31af7Sopenharmony_ci-- 799