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