1e5c31af7Sopenharmony_ci// Copyright 2018-2024 The Khronos Group Inc. 2e5c31af7Sopenharmony_ci// 3e5c31af7Sopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0 4e5c31af7Sopenharmony_ci 5e5c31af7Sopenharmony_ci[[video-coding]] 6e5c31af7Sopenharmony_ci= Video Coding 7e5c31af7Sopenharmony_ci 8e5c31af7Sopenharmony_ciVulkan implementations may: expose one or more queue families supporting 9e5c31af7Sopenharmony_civideo coding operations. 10e5c31af7Sopenharmony_ciThese operations are performed by recording them into a command buffer 11e5c31af7Sopenharmony_ciwithin a <<video-coding-scope,video coding scope>>, and submitting them to 12e5c31af7Sopenharmony_ciqueues with compatible video coding capabilities. 13e5c31af7Sopenharmony_ci 14e5c31af7Sopenharmony_ciThe Vulkan video functionalities are designed to be made available through a 15e5c31af7Sopenharmony_ciset of APIs built on top of each other, consisting of: 16e5c31af7Sopenharmony_ci 17e5c31af7Sopenharmony_ci * A core API providing common video coding functionalities, 18e5c31af7Sopenharmony_ci * APIs providing codec-independent video decode and video encode related 19e5c31af7Sopenharmony_ci functionalities, respectively, 20e5c31af7Sopenharmony_ci * Additional codec-specific APIs built on top of those. 21e5c31af7Sopenharmony_ci 22e5c31af7Sopenharmony_ciThis chapter details the fundamental components and operations of these. 23e5c31af7Sopenharmony_ci 24e5c31af7Sopenharmony_ci 25e5c31af7Sopenharmony_ci[[video-picture-resources]] 26e5c31af7Sopenharmony_ci== Video Picture Resources 27e5c31af7Sopenharmony_ci 28e5c31af7Sopenharmony_ciIn the context of video coding, multidimensional arrays of image data that 29e5c31af7Sopenharmony_cican: be used as the source or target of video coding operations are referred 30e5c31af7Sopenharmony_cito as _video picture resources_. 31e5c31af7Sopenharmony_ciThey may: store additional metadata that includes implementation-private 32e5c31af7Sopenharmony_ciinformation used during the execution of video coding operations, as 33e5c31af7Sopenharmony_cidiscussed later. 34e5c31af7Sopenharmony_ci 35e5c31af7Sopenharmony_ciVideo picture resources are backed by slink:VkImage objects. 36e5c31af7Sopenharmony_ciIndividual subregions of slink:VkImageView objects created from such 37e5c31af7Sopenharmony_ciresources can: be used as 38e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 39e5c31af7Sopenharmony_ci<<decode-output-picture,decode output pictures>>, 40e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 41e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 42e5c31af7Sopenharmony_ci<<encode-input-picture,encode input pictures>>, 43e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 44e5c31af7Sopenharmony_ci<<reconstructed-picture,reconstructed pictures>>, and/or 45e5c31af7Sopenharmony_ci<<reference-picture, reference pictures>>. 46e5c31af7Sopenharmony_ci 47e5c31af7Sopenharmony_ciThe parameters of a video picture resource are specified using a 48e5c31af7Sopenharmony_cisname:VkVideoPictureResourceInfoKHR structure. 49e5c31af7Sopenharmony_ci 50e5c31af7Sopenharmony_ci[open,refpage='VkVideoPictureResourceInfoKHR',desc='Structure specifying the parameters of a video picture resource',type='structs'] 51e5c31af7Sopenharmony_ci-- 52e5c31af7Sopenharmony_ciThe sname:VkVideoPictureResourceInfoKHR structure is defined as: 53e5c31af7Sopenharmony_ci 54e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoPictureResourceInfoKHR.adoc[] 55e5c31af7Sopenharmony_ci 56e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 57e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 58e5c31af7Sopenharmony_ci structure. 59e5c31af7Sopenharmony_ci * pname:codedOffset is the offset in texels of the image subregion to use. 60e5c31af7Sopenharmony_ci * pname:codedExtent is the size in pixels of the coded image data. 61e5c31af7Sopenharmony_ci * pname:baseArrayLayer is the array layer of the image view specified in 62e5c31af7Sopenharmony_ci pname:imageViewBinding to use as the video picture resource. 63e5c31af7Sopenharmony_ci * pname:imageViewBinding is an image view representing the video picture 64e5c31af7Sopenharmony_ci resource. 65e5c31af7Sopenharmony_ci 66e5c31af7Sopenharmony_ci[[video-image-subresource-reference]] 67e5c31af7Sopenharmony_ciThe image subresource referred to by such a structure is defined as the 68e5c31af7Sopenharmony_ciimage array layer index specified in pname:baseArrayLayer relative to the 69e5c31af7Sopenharmony_ciimage subresource range the image view specified in pname:imageViewBinding 70e5c31af7Sopenharmony_ciwas created with. 71e5c31af7Sopenharmony_ci 72e5c31af7Sopenharmony_ciThe meaning of the pname:codedOffset and pname:codedExtent depends on the 73e5c31af7Sopenharmony_cicommand and context the video picture resource is used in, as well as on the 74e5c31af7Sopenharmony_ciused <<video-profiles,video profile>> and corresponding codec-specific 75e5c31af7Sopenharmony_cisemantics, as described later. 76e5c31af7Sopenharmony_ci 77e5c31af7Sopenharmony_ci[[video-picture-resource-uniqueness]] 78e5c31af7Sopenharmony_ciA video picture resource is uniquely defined by the image subresource 79e5c31af7Sopenharmony_cireferred to by an instance of this structure, together with the 80e5c31af7Sopenharmony_cipname:codedOffset and pname:codedExtent members that identify the image 81e5c31af7Sopenharmony_cisubregion within the image subresource referenced corresponding to the video 82e5c31af7Sopenharmony_cipicture resource according to the particular codec-specific semantics. 83e5c31af7Sopenharmony_ci 84e5c31af7Sopenharmony_ciAccesses to image data within a video picture resource happen at the 85e5c31af7Sopenharmony_cigranularity indicated by 86e5c31af7Sopenharmony_cislink:VkVideoCapabilitiesKHR::pname:pictureAccessGranularity, as returned by 87e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the used <<video-profiles, 88e5c31af7Sopenharmony_civideo profile>>. 89e5c31af7Sopenharmony_ciAs a result, given an effective image subregion corresponding to a video 90e5c31af7Sopenharmony_cipicture resource, the actual image subregion accessed may: be larger than 91e5c31af7Sopenharmony_cithat as it may: include additional padding texels due to the picture access 92e5c31af7Sopenharmony_cigranularity. 93e5c31af7Sopenharmony_ciAny writes performed by video coding operations to such padding texels will 94e5c31af7Sopenharmony_ciresult in undefined: texel values. 95e5c31af7Sopenharmony_ci 96e5c31af7Sopenharmony_ci[[video-picture-resource-matching]] 97e5c31af7Sopenharmony_ciTwo video picture resources match if they refer to the same image 98e5c31af7Sopenharmony_cisubresource and they specify identical pname:codedOffset and 99e5c31af7Sopenharmony_cipname:codedExtent values. 100e5c31af7Sopenharmony_ci 101e5c31af7Sopenharmony_ci.Valid Usage 102e5c31af7Sopenharmony_ci**** 103e5c31af7Sopenharmony_ci * [[VUID-VkVideoPictureResourceInfoKHR-baseArrayLayer-07175]] 104e5c31af7Sopenharmony_ci pname:baseArrayLayer must: be less than the 105e5c31af7Sopenharmony_ci slink:VkImageViewCreateInfo::pname:subresourceRange.layerCount specified 106e5c31af7Sopenharmony_ci when the image view pname:imageViewBinding was created 107e5c31af7Sopenharmony_ci**** 108e5c31af7Sopenharmony_ci 109e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoPictureResourceInfoKHR.adoc[] 110e5c31af7Sopenharmony_ci-- 111e5c31af7Sopenharmony_ci 112e5c31af7Sopenharmony_ci 113e5c31af7Sopenharmony_ci[[dpb]] 114e5c31af7Sopenharmony_ci== Decoded Picture Buffer 115e5c31af7Sopenharmony_ci 116e5c31af7Sopenharmony_ci[[reconstructed-picture]] 117e5c31af7Sopenharmony_ciAn integral part of video coding pipelines is the reconstruction of pictures 118e5c31af7Sopenharmony_cifrom a compressed video bitstream. 119e5c31af7Sopenharmony_ciA _reconstructed picture_ is a <<video-picture-resources,video picture 120e5c31af7Sopenharmony_ciresource>> resulting from this process. 121e5c31af7Sopenharmony_ci 122e5c31af7Sopenharmony_ci[[reference-picture]] 123e5c31af7Sopenharmony_ciSuch reconstructed pictures can: be used as _reference pictures_ in 124e5c31af7Sopenharmony_cisubsequent video coding operations to provide predictions of the values of 125e5c31af7Sopenharmony_cisamples of subsequently decoded or encoded pictures. 126e5c31af7Sopenharmony_ciThe correct use of such reconstructed pictures as reference pictures is 127e5c31af7Sopenharmony_cidriven by the video compression standard, the implementation, and the 128e5c31af7Sopenharmony_ciapplication-specific use cases. 129e5c31af7Sopenharmony_ci 130e5c31af7Sopenharmony_ci[[active-reference-pictures]] 131e5c31af7Sopenharmony_ciThe list of reference pictures used to provide such predictions within a 132e5c31af7Sopenharmony_cisingle video coding operation is referred to as the list of _active 133e5c31af7Sopenharmony_cireference pictures_. 134e5c31af7Sopenharmony_ci 135e5c31af7Sopenharmony_ciThe _decoded picture buffer (DPB)_ is an indexed data structure that 136e5c31af7Sopenharmony_cimaintains the set of reference pictures available to be used in video coding 137e5c31af7Sopenharmony_cioperations. 138e5c31af7Sopenharmony_ci[[dpb-slot]] Individual indexed entries of the DPB are referred to as the 139e5c31af7Sopenharmony_ci_decoded picture buffer (DPB) slots_. 140e5c31af7Sopenharmony_ci[[dpb-capacity]] The range of valid DPB slot indices is between zero and 141e5c31af7Sopenharmony_ci`N-1`, where `N` is the capacity of the DPB. 142e5c31af7Sopenharmony_ciEach DPB slot can: refer to a reference picture containing a _video frame_ 143e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 144e5c31af7Sopenharmony_cior can: refer to up to two reference pictures containing the top and/or 145e5c31af7Sopenharmony_cibottom _fields_ that, when both present, together represent a full _video 146e5c31af7Sopenharmony_ciframe_ 147e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 148e5c31af7Sopenharmony_ci. 149e5c31af7Sopenharmony_ci 150e5c31af7Sopenharmony_ci[[dpb-state-and-backing-store]] 151e5c31af7Sopenharmony_ciIn Vulkan, the state and the backing store of the DPB is separated as 152e5c31af7Sopenharmony_cifollows: 153e5c31af7Sopenharmony_ci 154e5c31af7Sopenharmony_ci * The state of individual DPB slots is maintained by <<video-session,video 155e5c31af7Sopenharmony_ci session>> objects. 156e5c31af7Sopenharmony_ci * The backing store of DPB slots is provided by subregions of 157e5c31af7Sopenharmony_ci slink:VkImage objects used as <<video-picture-resources,video picture 158e5c31af7Sopenharmony_ci resources>>. 159e5c31af7Sopenharmony_ci 160e5c31af7Sopenharmony_ciIn addition, the implementation may: also maintain opaque metadata 161e5c31af7Sopenharmony_ciassociated with DPB slots, including: 162e5c31af7Sopenharmony_ci 163e5c31af7Sopenharmony_ci * [[reference-metadata]] _Reference picture metadata_ corresponding to the 164e5c31af7Sopenharmony_ci video picture resource associated with the DPB slot. 165e5c31af7Sopenharmony_ci 166e5c31af7Sopenharmony_ciSuch metadata may: be stored by the implementation as part of the DPB slot 167e5c31af7Sopenharmony_cistate maintained by the video session, or as part of the video picture 168e5c31af7Sopenharmony_ciresource backing the DPB slot. 169e5c31af7Sopenharmony_ci 170e5c31af7Sopenharmony_ciAny metadata stored in the video picture resources backing DPB slots are 171e5c31af7Sopenharmony_ciindependent of the video session used to store it, hence such video picture 172e5c31af7Sopenharmony_ciresources can: be shared with other video sessions. 173e5c31af7Sopenharmony_ciCorrespondingly, any metadata that is dependent on the video session will 174e5c31af7Sopenharmony_cialways be stored as part of the DPB slot state maintained by that video 175e5c31af7Sopenharmony_cisession. 176e5c31af7Sopenharmony_ci 177e5c31af7Sopenharmony_ciThe responsibility of managing the DPB is split between the application and 178e5c31af7Sopenharmony_cithe implementation as follows: 179e5c31af7Sopenharmony_ci 180e5c31af7Sopenharmony_ci * The application maintains the association between <<dpb-slot,DPB slot>> 181e5c31af7Sopenharmony_ci indices and corresponding <<video-picture-resources,video picture 182e5c31af7Sopenharmony_ci resources>>. 183e5c31af7Sopenharmony_ci * The implementation maintains global and per-slot opaque 184e5c31af7Sopenharmony_ci <<reference-metadata,reference picture metadata>>. 185e5c31af7Sopenharmony_ci 186e5c31af7Sopenharmony_ciIn addition, the application is also responsible for managing the mapping 187e5c31af7Sopenharmony_cibetween the codec-specific picture IDs and DPB slots, and any other 188e5c31af7Sopenharmony_cicodec-specific states unless otherwise specified. 189e5c31af7Sopenharmony_ci 190e5c31af7Sopenharmony_ci[[dpb-slot-states]] 191e5c31af7Sopenharmony_ci=== DPB Slot States 192e5c31af7Sopenharmony_ci 193e5c31af7Sopenharmony_ciAt a given time, each DPB slot is either in _active_ or _inactive_ state. 194e5c31af7Sopenharmony_ciInitially, all DPB slots managed by a <<video-session,video session>> are in 195e5c31af7Sopenharmony_ci_inactive_ state. 196e5c31af7Sopenharmony_ci 197e5c31af7Sopenharmony_ciA DPB slot can: be _activated_ by using it as the target of picture 198e5c31af7Sopenharmony_cireconstruction in a video coding operation with the reconstructed picture 199e5c31af7Sopenharmony_cirequested to be set up as a reference picture, according to the 200e5c31af7Sopenharmony_cicodec-specific semantics, changing its state to _active_ and associating it 201e5c31af7Sopenharmony_ciwith a _picture reference_ to the <<reconstructed-picture,reconstructed 202e5c31af7Sopenharmony_cipictures>>. 203e5c31af7Sopenharmony_ci 204e5c31af7Sopenharmony_ciSome video coding standards allow multiple picture references to be 205e5c31af7Sopenharmony_ciassociated with a single DPB slot. 206e5c31af7Sopenharmony_ciIn this case the state of the individual picture references can: be 207e5c31af7Sopenharmony_ciindependently updated. 208e5c31af7Sopenharmony_ci 209e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 210e5c31af7Sopenharmony_ci[NOTE] 211e5c31af7Sopenharmony_ci.Note 212e5c31af7Sopenharmony_ci==== 213e5c31af7Sopenharmony_ciAs an example, H.264 decoding allows associating a separate top field and 214e5c31af7Sopenharmony_cibottom field picture with the same DPB slot. 215e5c31af7Sopenharmony_ci==== 216e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 217e5c31af7Sopenharmony_ci 218e5c31af7Sopenharmony_ciAs part of reference picture setup, the implementation may: also generate 219e5c31af7Sopenharmony_ci<<reference-metadata,reference picture metadata>>. 220e5c31af7Sopenharmony_ciSuch reference picture metadata is specific to each picture reference 221e5c31af7Sopenharmony_ciassociated with the DPB slot. 222e5c31af7Sopenharmony_ci 223e5c31af7Sopenharmony_ciIf such a video coding operation completes successfully, the activated DPB 224e5c31af7Sopenharmony_cislot will have a _valid picture reference_ and the <<reconstructed-picture, 225e5c31af7Sopenharmony_cireconstructed picture>> is associated with the DPB slot. 226e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 227e5c31af7Sopenharmony_ciThis is true even if the DPB slot is used as the target of a picture 228e5c31af7Sopenharmony_cireconstruction that only sets up a top field or bottom field reference 229e5c31af7Sopenharmony_cipicture and thus does not yet refer to a complete frame. 230e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 231e5c31af7Sopenharmony_ciHowever, if any data provided as input to such a video coding operation is 232e5c31af7Sopenharmony_cinot compliant to the video compression standard used, that video coding 233e5c31af7Sopenharmony_cioperation may: complete unsuccessfully, in which case the activated DPB slot 234e5c31af7Sopenharmony_ciwill have an _invalid picture reference_. 235e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 236e5c31af7Sopenharmony_ciThis is true even if the DPB slot previously had a valid picture reference 237e5c31af7Sopenharmony_cito a top field or bottom field reference picture, but the reconstruction of 238e5c31af7Sopenharmony_cithe other field corresponding to the DPB slot failed. 239e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 240e5c31af7Sopenharmony_ci 241e5c31af7Sopenharmony_ciThe application can: use <<queries,queries>> to get feedback about the 242e5c31af7Sopenharmony_cioutcome of video coding operations and use the resulting 243e5c31af7Sopenharmony_cielink:VkQueryResultStatusKHR value to determine whether the video coding 244e5c31af7Sopenharmony_cioperation completed successfully (result status is positive) or 245e5c31af7Sopenharmony_ciunsuccessfully (result status is negative). 246e5c31af7Sopenharmony_ci 247e5c31af7Sopenharmony_ciUsing a <<reference-picture,reference picture>> associated with a DPB slot 248e5c31af7Sopenharmony_cithat has an _invalid picture reference_ as an <<active-reference-pictures, 249e5c31af7Sopenharmony_ciactive reference picture>> in subsequent video coding operations is legal, 250e5c31af7Sopenharmony_cihowever, the contents of the outputs of such operations are undefined:, and 251e5c31af7Sopenharmony_ciany DPB slots activated by such video coding operations will also have an 252e5c31af7Sopenharmony_ci_invalid picture reference_. 253e5c31af7Sopenharmony_ciThis is true even if such video coding operations may: otherwise complete 254e5c31af7Sopenharmony_cisuccessfully. 255e5c31af7Sopenharmony_ci 256e5c31af7Sopenharmony_ciA DPB slot can: also be _deactivated_ by the application, changing its state 257e5c31af7Sopenharmony_cito _inactive_ and invalidating any picture references and 258e5c31af7Sopenharmony_ci<<reference-metadata,reference picture metadata>> associated with the DPB 259e5c31af7Sopenharmony_cislot. 260e5c31af7Sopenharmony_ci 261e5c31af7Sopenharmony_ciIf an already active DPB slot is used as the target of picture 262e5c31af7Sopenharmony_cireconstruction in a video coding operation, but the decoded picture is not 263e5c31af7Sopenharmony_cirequested to be set up as a reference picture, according to the 264e5c31af7Sopenharmony_cicodec-specific semantics, no reference picture setup happens and the 265e5c31af7Sopenharmony_cicorresponding picture reference and <<reference-metadata,reference picture 266e5c31af7Sopenharmony_cimetadata>> is invalidated within the DPB slot. 267e5c31af7Sopenharmony_ciIf the DPB slot no longer has any associated picture references after such 268e5c31af7Sopenharmony_cian operation, the DPB slot is implicitly deactivated. 269e5c31af7Sopenharmony_ci 270e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 271e5c31af7Sopenharmony_ciIf an already active DPB slot is used as the target of picture 272e5c31af7Sopenharmony_cireconstruction when decoding a field picture that is not marked as 273e5c31af7Sopenharmony_cireference, then the behavior is as follows: 274e5c31af7Sopenharmony_ci 275e5c31af7Sopenharmony_ci * If the DPB slot is currently associated with a frame, then the DPB slot 276e5c31af7Sopenharmony_ci is deactivated. 277e5c31af7Sopenharmony_ci * If the DPB slot is not currently associated with a top field picture and 278e5c31af7Sopenharmony_ci the decoded picture is a top field picture, or if the DPB slot is not 279e5c31af7Sopenharmony_ci currently associated with a bottom field picture and the decoded picture 280e5c31af7Sopenharmony_ci is a bottom field picture, then the other field picture association of 281e5c31af7Sopenharmony_ci the DPB slot, if any, is not disturbed. 282e5c31af7Sopenharmony_ci * If the DPB slot is currently associated with a top field picture and the 283e5c31af7Sopenharmony_ci decoded picture is a top field picture, or if the DPB slot is currently 284e5c31af7Sopenharmony_ci associated with a bottom field picture and the decoded picture is a 285e5c31af7Sopenharmony_ci bottom field picture, then that picture association is invalidated, 286e5c31af7Sopenharmony_ci without disturbing the other field picture association, if any. 287e5c31af7Sopenharmony_ci If the DPB slot no longer has any associated picture references after 288e5c31af7Sopenharmony_ci such an operation, the DPB slot is implicitly deactivated. 289e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 290e5c31af7Sopenharmony_ci 291e5c31af7Sopenharmony_ciA DPB slot can: be activated with a new frame even if it is already active. 292e5c31af7Sopenharmony_ciIn this case all previous associations of the DPB slots with 293e5c31af7Sopenharmony_ci<<reference-picture,reference pictures>> are replaced with an association 294e5c31af7Sopenharmony_ciwith the <<reconstructed-picture,reconstructed picture>> used to activate 295e5c31af7Sopenharmony_ciit. 296e5c31af7Sopenharmony_ci 297e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 298e5c31af7Sopenharmony_ciIf an already active DPB slot is activated with a reconstructed field 299e5c31af7Sopenharmony_cipicture, then the behavior is as follows: 300e5c31af7Sopenharmony_ci 301e5c31af7Sopenharmony_ci * If the DPB slot is currently associated with a frame, then that 302e5c31af7Sopenharmony_ci association is replaced with an association with the reconstructed field 303e5c31af7Sopenharmony_ci picture used to activate it. 304e5c31af7Sopenharmony_ci * If the DPB slot is not currently associated with a top field picture and 305e5c31af7Sopenharmony_ci the DPB slot is activated with a top field picture, or if the DPB slot 306e5c31af7Sopenharmony_ci is not currently associated with a bottom field picture and the DPB slot 307e5c31af7Sopenharmony_ci is activated with a bottom field picture, then the DPB slot is 308e5c31af7Sopenharmony_ci associated with the reconstructed field picture used to activate it, 309e5c31af7Sopenharmony_ci without disturbing the other field picture association, if any. 310e5c31af7Sopenharmony_ci * If the DPB slot is currently associated with a top field picture and the 311e5c31af7Sopenharmony_ci DPB slot is activated with a new top field picture, or if the DPB slot 312e5c31af7Sopenharmony_ci is currently associated with a bottom field picture and the DPB slot is 313e5c31af7Sopenharmony_ci activated with a new bottom field picture, then that association is 314e5c31af7Sopenharmony_ci replaced with an association with the reconstructed field picture used 315e5c31af7Sopenharmony_ci to activate it, without disturbing the other field picture association, 316e5c31af7Sopenharmony_ci if any. 317e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 318e5c31af7Sopenharmony_ci 319e5c31af7Sopenharmony_ci 320e5c31af7Sopenharmony_ci[[video-profiles]] 321e5c31af7Sopenharmony_ci== Video Profiles 322e5c31af7Sopenharmony_ci 323e5c31af7Sopenharmony_ci[open,refpage='VkVideoProfileInfoKHR',desc='Structure specifying a video profile',type='structs'] 324e5c31af7Sopenharmony_ci-- 325e5c31af7Sopenharmony_ciThe sname:VkVideoProfileInfoKHR structure is defined as follows: 326e5c31af7Sopenharmony_ci 327e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoProfileInfoKHR.adoc[] 328e5c31af7Sopenharmony_ci 329e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 330e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 331e5c31af7Sopenharmony_ci structure. 332e5c31af7Sopenharmony_ci * pname:videoCodecOperation is a elink:VkVideoCodecOperationFlagBitsKHR 333e5c31af7Sopenharmony_ci value specifying a video codec operation. 334e5c31af7Sopenharmony_ci * pname:chromaSubsampling is a bitmask of 335e5c31af7Sopenharmony_ci elink:VkVideoChromaSubsamplingFlagBitsKHR specifying video chroma 336e5c31af7Sopenharmony_ci subsampling information. 337e5c31af7Sopenharmony_ci * pname:lumaBitDepth is a bitmask of 338e5c31af7Sopenharmony_ci elink:VkVideoComponentBitDepthFlagBitsKHR specifying video luma bit 339e5c31af7Sopenharmony_ci depth information. 340e5c31af7Sopenharmony_ci * pname:chromaBitDepth is a bitmask of 341e5c31af7Sopenharmony_ci elink:VkVideoComponentBitDepthFlagBitsKHR specifying video chroma bit 342e5c31af7Sopenharmony_ci depth information. 343e5c31af7Sopenharmony_ci 344e5c31af7Sopenharmony_ciVideo profiles are provided as input to video capability queries such as 345e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceVideoCapabilitiesKHR or 346e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceVideoFormatPropertiesKHR, as well as when creating 347e5c31af7Sopenharmony_ciresources to be used by video coding operations such as images, buffers, 348e5c31af7Sopenharmony_ciquery pools, and video sessions. 349e5c31af7Sopenharmony_ci 350e5c31af7Sopenharmony_ciThe full description of a video profile is specified by an instance of this 351e5c31af7Sopenharmony_cistructure, and the codec-specific and auxiliary structures provided in its 352e5c31af7Sopenharmony_cipname:pNext chain. 353e5c31af7Sopenharmony_ci 354e5c31af7Sopenharmony_ci[[video-profile-error-codes]] 355e5c31af7Sopenharmony_ciWhen this structure is specified as an input parameter to 356e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceVideoCapabilitiesKHR, or through the 357e5c31af7Sopenharmony_cipname:pProfiles member of an slink:VkVideoProfileListInfoKHR structure in 358e5c31af7Sopenharmony_cithe pname:pNext chain of the input parameter of a query command such as 359e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceVideoFormatPropertiesKHR or 360e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceImageFormatProperties2, the following error codes 361e5c31af7Sopenharmony_ciindicate specific causes of the failure of the query operation: 362e5c31af7Sopenharmony_ci 363e5c31af7Sopenharmony_ci * ename:VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR indicates that the 364e5c31af7Sopenharmony_ci requested video picture layout 365e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 366e5c31af7Sopenharmony_ci (e.g. through the pname:pictureLayout member of a 367e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264ProfileInfoKHR structure included in the 368e5c31af7Sopenharmony_ci pname:pNext chain of sname:VkVideoProfileInfoKHR) 369e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 370e5c31af7Sopenharmony_ci is not supported. 371e5c31af7Sopenharmony_ci * ename:VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR indicates that 372e5c31af7Sopenharmony_ci a video profile operation specified by pname:videoCodecOperation is not 373e5c31af7Sopenharmony_ci supported. 374e5c31af7Sopenharmony_ci * ename:VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR indicates that 375e5c31af7Sopenharmony_ci video format parameters specified by pname:chromaSubsampling, 376e5c31af7Sopenharmony_ci pname:lumaBitDepth, or pname:chromaBitDepth are not supported. 377e5c31af7Sopenharmony_ci * ename:VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR indicates that the 378e5c31af7Sopenharmony_ci codec-specific parameters corresponding to the video codec operation are 379e5c31af7Sopenharmony_ci not supported. 380e5c31af7Sopenharmony_ci 381e5c31af7Sopenharmony_ci.Valid Usage 382e5c31af7Sopenharmony_ci**** 383e5c31af7Sopenharmony_ci * [[VUID-VkVideoProfileInfoKHR-chromaSubsampling-07013]] 384e5c31af7Sopenharmony_ci pname:chromaSubsampling must: have a single bit set 385e5c31af7Sopenharmony_ci * [[VUID-VkVideoProfileInfoKHR-lumaBitDepth-07014]] 386e5c31af7Sopenharmony_ci pname:lumaBitDepth must: have a single bit set 387e5c31af7Sopenharmony_ci * [[VUID-VkVideoProfileInfoKHR-chromaSubsampling-07015]] 388e5c31af7Sopenharmony_ci If pname:chromaSubsampling is not 389e5c31af7Sopenharmony_ci ename:VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR, then 390e5c31af7Sopenharmony_ci pname:chromaBitDepth must: have a single bit set 391e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 392e5c31af7Sopenharmony_ci * [[VUID-VkVideoProfileInfoKHR-videoCodecOperation-07179]] 393e5c31af7Sopenharmony_ci If pname:videoCodecOperation is 394e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the pname:pNext 395e5c31af7Sopenharmony_ci chain must: include a slink:VkVideoDecodeH264ProfileInfoKHR structure 396e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 397e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 398e5c31af7Sopenharmony_ci * [[VUID-VkVideoProfileInfoKHR-videoCodecOperation-07180]] 399e5c31af7Sopenharmony_ci If pname:videoCodecOperation is 400e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the pname:pNext 401e5c31af7Sopenharmony_ci chain must: include a slink:VkVideoDecodeH265ProfileInfoKHR structure 402e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 403e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 404e5c31af7Sopenharmony_ci * [[VUID-VkVideoProfileInfoKHR-videoCodecOperation-07181]] 405e5c31af7Sopenharmony_ci If pname:videoCodecOperation is 406e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the pname:pNext 407e5c31af7Sopenharmony_ci chain must: include a slink:VkVideoEncodeH264ProfileInfoKHR structure 408e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 409e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 410e5c31af7Sopenharmony_ci * [[VUID-VkVideoProfileInfoKHR-videoCodecOperation-07182]] 411e5c31af7Sopenharmony_ci If pname:videoCodecOperation is 412e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the pname:pNext 413e5c31af7Sopenharmony_ci chain must: include a slink:VkVideoEncodeH265ProfileInfoKHR structure 414e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 415e5c31af7Sopenharmony_ci**** 416e5c31af7Sopenharmony_ci 417e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoProfileInfoKHR.adoc[] 418e5c31af7Sopenharmony_ci-- 419e5c31af7Sopenharmony_ci 420e5c31af7Sopenharmony_ci[open,refpage='VkVideoCodecOperationFlagBitsKHR',desc='Video codec operation bits',type='enums'] 421e5c31af7Sopenharmony_ci-- 422e5c31af7Sopenharmony_ciPossible values of slink:VkVideoProfileInfoKHR::pname:videoCodecOperation, 423e5c31af7Sopenharmony_cispecifying the type of video coding operation and video compression standard 424e5c31af7Sopenharmony_ciused by a video profile, are: 425e5c31af7Sopenharmony_ci 426e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoCodecOperationFlagBitsKHR.adoc[] 427e5c31af7Sopenharmony_ci 428e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CODEC_OPERATION_NONE_KHR indicates no support for any 429e5c31af7Sopenharmony_ci video codec operations. 430e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 431e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR specifies support for 432e5c31af7Sopenharmony_ci <<decode-h264,H.264 decode operations>>. 433e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 434e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 435e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR specifies support for 436e5c31af7Sopenharmony_ci <<decode-h265,H.265 decode operations>>. 437e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 438e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 439e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR specifies support for 440e5c31af7Sopenharmony_ci <<encode-h264,H.264 encode operations>>. 441e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 442e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 443e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR specifies support for 444e5c31af7Sopenharmony_ci <<encode-h265,H.265 encode operations>>. 445e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 446e5c31af7Sopenharmony_ci-- 447e5c31af7Sopenharmony_ci 448e5c31af7Sopenharmony_ci[open,refpage='VkVideoCodecOperationFlagsKHR',desc='Bitmask of VkVideoCodecOperationFlagBitsKHR',type='flags'] 449e5c31af7Sopenharmony_ci-- 450e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoCodecOperationFlagsKHR.adoc[] 451e5c31af7Sopenharmony_ci 452e5c31af7Sopenharmony_citname:VkVideoCodecOperationFlagsKHR is a bitmask type for setting a mask of 453e5c31af7Sopenharmony_cizero or more elink:VkVideoCodecOperationFlagBitsKHR. 454e5c31af7Sopenharmony_ci-- 455e5c31af7Sopenharmony_ci 456e5c31af7Sopenharmony_ci[open,refpage='VkVideoChromaSubsamplingFlagBitsKHR',desc='Video format chroma subsampling bits',type='enums'] 457e5c31af7Sopenharmony_ci-- 458e5c31af7Sopenharmony_ciThe video format chroma subsampling is defined with the following enums: 459e5c31af7Sopenharmony_ci 460e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoChromaSubsamplingFlagBitsKHR.adoc[] 461e5c31af7Sopenharmony_ci 462e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR specifies that the 463e5c31af7Sopenharmony_ci format is monochrome. 464e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR specified that the format 465e5c31af7Sopenharmony_ci is 4:2:0 chroma subsampled, i.e. the two chroma components are sampled 466e5c31af7Sopenharmony_ci horizontally and vertically at half the sample rate of the luma 467e5c31af7Sopenharmony_ci component. 468e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR - the format is 4:2:2 469e5c31af7Sopenharmony_ci chroma subsampled, i.e. the two chroma components are sampled 470e5c31af7Sopenharmony_ci horizontally at half the sample rate of luma component. 471e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR - the format is 4:4:4 472e5c31af7Sopenharmony_ci chroma sampled, i.e. all three components of the {YCbCr} format are 473e5c31af7Sopenharmony_ci sampled at the same rate, thus there is no chroma subsampling. 474e5c31af7Sopenharmony_ci-- 475e5c31af7Sopenharmony_ci 476e5c31af7Sopenharmony_ciChroma subsampling is described in more detail in the 477e5c31af7Sopenharmony_ci<<textures-chroma-reconstruction,Chroma Reconstruction>> section. 478e5c31af7Sopenharmony_ci 479e5c31af7Sopenharmony_ci[open,refpage='VkVideoChromaSubsamplingFlagsKHR',desc='Bitmask of VkVideoChromaSubsamplingFlagBitsKHR',type='flags'] 480e5c31af7Sopenharmony_ci-- 481e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoChromaSubsamplingFlagsKHR.adoc[] 482e5c31af7Sopenharmony_ci 483e5c31af7Sopenharmony_citname:VkVideoChromaSubsamplingFlagsKHR is a bitmask type for setting a mask 484e5c31af7Sopenharmony_ciof zero or more elink:VkVideoChromaSubsamplingFlagBitsKHR. 485e5c31af7Sopenharmony_ci-- 486e5c31af7Sopenharmony_ci 487e5c31af7Sopenharmony_ci[open,refpage='VkVideoComponentBitDepthFlagBitsKHR',desc='Video format component bit depth',type='enums'] 488e5c31af7Sopenharmony_ci-- 489e5c31af7Sopenharmony_ciPossible values for the video format component bit depth are: 490e5c31af7Sopenharmony_ci 491e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoComponentBitDepthFlagBitsKHR.adoc[] 492e5c31af7Sopenharmony_ci 493e5c31af7Sopenharmony_ci * ename:VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR specifies a component bit 494e5c31af7Sopenharmony_ci depth of 8 bits. 495e5c31af7Sopenharmony_ci * ename:VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR specifies a component bit 496e5c31af7Sopenharmony_ci depth of 10 bits. 497e5c31af7Sopenharmony_ci * ename:VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR specifies a component bit 498e5c31af7Sopenharmony_ci depth of 12 bits. 499e5c31af7Sopenharmony_ci-- 500e5c31af7Sopenharmony_ci 501e5c31af7Sopenharmony_ci[open,refpage='VkVideoComponentBitDepthFlagsKHR',desc='Bitmask of VkVideoComponentBitDepthFlagBitsKHR',type='flags'] 502e5c31af7Sopenharmony_ci-- 503e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoComponentBitDepthFlagsKHR.adoc[] 504e5c31af7Sopenharmony_ci 505e5c31af7Sopenharmony_citname:VkVideoComponentBitDepthFlagsKHR is a bitmask type for setting a mask 506e5c31af7Sopenharmony_ciof zero or more elink:VkVideoComponentBitDepthFlagBitsKHR. 507e5c31af7Sopenharmony_ci-- 508e5c31af7Sopenharmony_ci 509e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 510e5c31af7Sopenharmony_ci[open,refpage='VkVideoDecodeUsageInfoKHR',desc='Structure specifying video decode usage information',type='structs'] 511e5c31af7Sopenharmony_ci-- 512e5c31af7Sopenharmony_ciAdditional information about the video decode use case can: be provided by 513e5c31af7Sopenharmony_ciadding a sname:VkVideoDecodeUsageInfoKHR structure to the pname:pNext chain 514e5c31af7Sopenharmony_ciof slink:VkVideoProfileInfoKHR. 515e5c31af7Sopenharmony_ci 516e5c31af7Sopenharmony_ciThe sname:VkVideoDecodeUsageInfoKHR structure is defined as: 517e5c31af7Sopenharmony_ci 518e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoDecodeUsageInfoKHR.adoc[] 519e5c31af7Sopenharmony_ci 520e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 521e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 522e5c31af7Sopenharmony_ci structure. 523e5c31af7Sopenharmony_ci * pname:videoUsageHints is a bitmask of 524e5c31af7Sopenharmony_ci elink:VkVideoDecodeUsageFlagBitsKHR specifying hints about the intended 525e5c31af7Sopenharmony_ci use of the video decode profile. 526e5c31af7Sopenharmony_ci 527e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoDecodeUsageInfoKHR.adoc[] 528e5c31af7Sopenharmony_ci-- 529e5c31af7Sopenharmony_ci 530e5c31af7Sopenharmony_ci[open,refpage='VkVideoDecodeUsageFlagBitsKHR',desc='Video decode usage flags',type='enums'] 531e5c31af7Sopenharmony_ci-- 532e5c31af7Sopenharmony_ciThe following bits can: be specified in 533e5c31af7Sopenharmony_cislink:VkVideoDecodeUsageInfoKHR::pname:videoUsageHints as a hint about the 534e5c31af7Sopenharmony_civideo decode use case: 535e5c31af7Sopenharmony_ci 536e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoDecodeUsageFlagBitsKHR.adoc[] 537e5c31af7Sopenharmony_ci 538e5c31af7Sopenharmony_ci * ename:VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR specifies that video 539e5c31af7Sopenharmony_ci decoding is intended to be used in conjunction with video encoding to 540e5c31af7Sopenharmony_ci transcode a video bitstream with the same and/or different codecs. 541e5c31af7Sopenharmony_ci * ename:VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR specifies that video 542e5c31af7Sopenharmony_ci decoding is intended to be used to consume a local video bitstream. 543e5c31af7Sopenharmony_ci * ename:VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR specifies that video 544e5c31af7Sopenharmony_ci decoding is intended to be used to consume a video bitstream received as 545e5c31af7Sopenharmony_ci a continuous flow over network. 546e5c31af7Sopenharmony_ci 547e5c31af7Sopenharmony_ci[NOTE] 548e5c31af7Sopenharmony_ci.Note 549e5c31af7Sopenharmony_ci==== 550e5c31af7Sopenharmony_ciThere are no restrictions on the combination of bits that can: be specified 551e5c31af7Sopenharmony_ciby the application. 552e5c31af7Sopenharmony_ciHowever, applications should: use reasonable combinations in order for the 553e5c31af7Sopenharmony_ciimplementation to be able to select the most appropriate mode of operation 554e5c31af7Sopenharmony_cifor the particular use case. 555e5c31af7Sopenharmony_ci==== 556e5c31af7Sopenharmony_ci-- 557e5c31af7Sopenharmony_ci 558e5c31af7Sopenharmony_ci[open,refpage='VkVideoDecodeUsageFlagsKHR',desc='Bitmask specifying the video decode usage flags',type='flags'] 559e5c31af7Sopenharmony_ci-- 560e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoDecodeUsageFlagsKHR.adoc[] 561e5c31af7Sopenharmony_ci 562e5c31af7Sopenharmony_citname:VkVideoDecodeUsageFlagsKHR is a bitmask type for setting a mask of 563e5c31af7Sopenharmony_cizero or more elink:VkVideoDecodeUsageFlagBitsKHR. 564e5c31af7Sopenharmony_ci-- 565e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 566e5c31af7Sopenharmony_ci 567e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 568e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeUsageInfoKHR',desc='Structure specifying video encode usage information',type='structs'] 569e5c31af7Sopenharmony_ci-- 570e5c31af7Sopenharmony_ciAdditional information about the video encode use case can: be provided by 571e5c31af7Sopenharmony_ciadding a sname:VkVideoEncodeUsageInfoKHR structure to the pname:pNext chain 572e5c31af7Sopenharmony_ciof slink:VkVideoProfileInfoKHR. 573e5c31af7Sopenharmony_ci 574e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeUsageInfoKHR structure is defined as: 575e5c31af7Sopenharmony_ci 576e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeUsageInfoKHR.adoc[] 577e5c31af7Sopenharmony_ci 578e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 579e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 580e5c31af7Sopenharmony_ci structure. 581e5c31af7Sopenharmony_ci * pname:videoUsageHints is a bitmask of 582e5c31af7Sopenharmony_ci elink:VkVideoEncodeUsageFlagBitsKHR specifying hints about the intended 583e5c31af7Sopenharmony_ci use of the video encode profile. 584e5c31af7Sopenharmony_ci * pname:videoContentHints is a bitmask of 585e5c31af7Sopenharmony_ci elink:VkVideoEncodeContentFlagBitsKHR specifying hints about the content 586e5c31af7Sopenharmony_ci to be encoded using the video encode profile. 587e5c31af7Sopenharmony_ci * pname:tuningMode is a elink:VkVideoEncodeTuningModeKHR value specifying 588e5c31af7Sopenharmony_ci the tuning mode to use when encoding with the video profile. 589e5c31af7Sopenharmony_ci 590e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeUsageInfoKHR.adoc[] 591e5c31af7Sopenharmony_ci-- 592e5c31af7Sopenharmony_ci 593e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeUsageFlagBitsKHR',desc='Video encode usage flags',type='enums'] 594e5c31af7Sopenharmony_ci-- 595e5c31af7Sopenharmony_ciThe following bits can: be specified in 596e5c31af7Sopenharmony_cislink:VkVideoEncodeUsageInfoKHR::pname:videoUsageHints as a hint about the 597e5c31af7Sopenharmony_civideo encode use case: 598e5c31af7Sopenharmony_ci 599e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoEncodeUsageFlagBitsKHR.adoc[] 600e5c31af7Sopenharmony_ci 601e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR specifies that video 602e5c31af7Sopenharmony_ci encoding is intended to be used in conjunction with video decoding to 603e5c31af7Sopenharmony_ci transcode a video bitstream with the same and/or different codecs. 604e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR specifies that video 605e5c31af7Sopenharmony_ci encoding is intended to be used to produce a video bitstream that is 606e5c31af7Sopenharmony_ci expected to be sent as a continuous flow over network. 607e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR specifies that video 608e5c31af7Sopenharmony_ci encoding is intended to be used for real-time recording for offline 609e5c31af7Sopenharmony_ci consumption. 610e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR specifies that video 611e5c31af7Sopenharmony_ci encoding is intended to be used in a video conferencing scenario. 612e5c31af7Sopenharmony_ci 613e5c31af7Sopenharmony_ci[NOTE] 614e5c31af7Sopenharmony_ci.Note 615e5c31af7Sopenharmony_ci==== 616e5c31af7Sopenharmony_ciThere are no restrictions on the combination of bits that can: be specified 617e5c31af7Sopenharmony_ciby the application. 618e5c31af7Sopenharmony_ciHowever, applications should: use reasonable combinations in order for the 619e5c31af7Sopenharmony_ciimplementation to be able to select the most appropriate mode of operation 620e5c31af7Sopenharmony_cifor the particular use case. 621e5c31af7Sopenharmony_ci==== 622e5c31af7Sopenharmony_ci-- 623e5c31af7Sopenharmony_ci 624e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeUsageFlagsKHR',desc='Bitmask specifying the video encode usage flags',type='flags'] 625e5c31af7Sopenharmony_ci-- 626e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoEncodeUsageFlagsKHR.adoc[] 627e5c31af7Sopenharmony_ci 628e5c31af7Sopenharmony_citname:VkVideoEncodeUsageFlagsKHR is a bitmask type for setting a mask of 629e5c31af7Sopenharmony_cizero or more elink:VkVideoEncodeUsageFlagBitsKHR. 630e5c31af7Sopenharmony_ci-- 631e5c31af7Sopenharmony_ci 632e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeContentFlagBitsKHR',desc='Video encode content flags',type='enums'] 633e5c31af7Sopenharmony_ci-- 634e5c31af7Sopenharmony_ciThe following bits can: be specified in 635e5c31af7Sopenharmony_cislink:VkVideoEncodeUsageInfoKHR::pname:videoContentHints as a hint about the 636e5c31af7Sopenharmony_ciencoded video content: 637e5c31af7Sopenharmony_ci 638e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoEncodeContentFlagBitsKHR.adoc[] 639e5c31af7Sopenharmony_ci 640e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR specifies that video 641e5c31af7Sopenharmony_ci encoding is intended to be used to encode camera content. 642e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR specifies that video 643e5c31af7Sopenharmony_ci encoding is intended to be used to encode desktop content. 644e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR specified that video 645e5c31af7Sopenharmony_ci encoding is intended to be used to encode rendered (e.g. game) content. 646e5c31af7Sopenharmony_ci 647e5c31af7Sopenharmony_ci[NOTE] 648e5c31af7Sopenharmony_ci.Note 649e5c31af7Sopenharmony_ci==== 650e5c31af7Sopenharmony_ciThere are no restrictions on the combination of bits that can: be specified 651e5c31af7Sopenharmony_ciby the application. 652e5c31af7Sopenharmony_ciHowever, applications should: use reasonable combinations in order for the 653e5c31af7Sopenharmony_ciimplementation to be able to select the most appropriate mode of operation 654e5c31af7Sopenharmony_cifor the particular content type. 655e5c31af7Sopenharmony_ci==== 656e5c31af7Sopenharmony_ci-- 657e5c31af7Sopenharmony_ci 658e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeContentFlagsKHR',desc='Bitmask specifying the video encode content flags',type='flags'] 659e5c31af7Sopenharmony_ci-- 660e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoEncodeContentFlagsKHR.adoc[] 661e5c31af7Sopenharmony_ci 662e5c31af7Sopenharmony_citname:VkVideoEncodeContentFlagsKHR is a bitmask type for setting a mask of 663e5c31af7Sopenharmony_cizero or more elink:VkVideoEncodeContentFlagBitsKHR. 664e5c31af7Sopenharmony_ci-- 665e5c31af7Sopenharmony_ci 666e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeTuningModeKHR',desc='Video encode tuning mode',type='enums'] 667e5c31af7Sopenharmony_ci-- 668e5c31af7Sopenharmony_ciPossible video encode tuning mode values are as follows: 669e5c31af7Sopenharmony_ci 670e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoEncodeTuningModeKHR.adoc[] 671e5c31af7Sopenharmony_ci 672e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR specifies the default 673e5c31af7Sopenharmony_ci tuning mode. 674e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR specifies that video 675e5c31af7Sopenharmony_ci encoding is tuned for high quality. 676e5c31af7Sopenharmony_ci When using this tuning mode, the implementation may: compromise the 677e5c31af7Sopenharmony_ci latency of video encoding operations to improve quality. 678e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR specifies that video 679e5c31af7Sopenharmony_ci encoding is tuned for low latency. 680e5c31af7Sopenharmony_ci When using this tuning mode, the implementation may: compromise quality 681e5c31af7Sopenharmony_ci to increase the performance and lower the latency of video encode 682e5c31af7Sopenharmony_ci operations. 683e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR specifies that 684e5c31af7Sopenharmony_ci video encoding is tuned for ultra-low latency. 685e5c31af7Sopenharmony_ci When using this tuning mode, the implementation may: compromise quality 686e5c31af7Sopenharmony_ci to maximize the performance and minimize the latency of video encoding 687e5c31af7Sopenharmony_ci operations. 688e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR specifies that video 689e5c31af7Sopenharmony_ci encoding is tuned for lossless encoding. 690e5c31af7Sopenharmony_ci When using this tuning mode, video encode operations produce lossless 691e5c31af7Sopenharmony_ci output. 692e5c31af7Sopenharmony_ci 693e5c31af7Sopenharmony_ci-- 694e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 695e5c31af7Sopenharmony_ci 696e5c31af7Sopenharmony_ci[open,refpage='VkVideoProfileListInfoKHR',desc='Structure specifying one or more video profiles used in conjunction',type='structs'] 697e5c31af7Sopenharmony_ci-- 698e5c31af7Sopenharmony_ciThe sname:VkVideoProfileListInfoKHR structure is defined as: 699e5c31af7Sopenharmony_ci 700e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoProfileListInfoKHR.adoc[] 701e5c31af7Sopenharmony_ci 702e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 703e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 704e5c31af7Sopenharmony_ci structure. 705e5c31af7Sopenharmony_ci * pname:profileCount is the number of elements in the pname:pProfiles 706e5c31af7Sopenharmony_ci array. 707e5c31af7Sopenharmony_ci * pname:pProfiles is a pointer to an array of slink:VkVideoProfileInfoKHR 708e5c31af7Sopenharmony_ci structures. 709e5c31af7Sopenharmony_ci 710e5c31af7Sopenharmony_ci[NOTE] 711e5c31af7Sopenharmony_ci.Note 712e5c31af7Sopenharmony_ci==== 713e5c31af7Sopenharmony_ciVideo transcoding is an example of a use case that necessitates the 714e5c31af7Sopenharmony_cispecification of multiple profiles in various contexts. 715e5c31af7Sopenharmony_ci==== 716e5c31af7Sopenharmony_ci 717e5c31af7Sopenharmony_ciWhen the application provides a video decode profile and one or more video 718e5c31af7Sopenharmony_ciencode profiles in the profile list, the implementation ensures that any 719e5c31af7Sopenharmony_cicapabilitities returned or resources created are suitable for the video 720e5c31af7Sopenharmony_citranscoding use cases without the need for manual data transformations. 721e5c31af7Sopenharmony_ci 722e5c31af7Sopenharmony_ci.Valid Usage 723e5c31af7Sopenharmony_ci**** 724e5c31af7Sopenharmony_ci * [[VUID-VkVideoProfileListInfoKHR-pProfiles-06813]] 725e5c31af7Sopenharmony_ci pname:pProfiles must: not contain more than one element whose 726e5c31af7Sopenharmony_ci pname:videoCodecOperation member specifies a decode operation 727e5c31af7Sopenharmony_ci**** 728e5c31af7Sopenharmony_ci 729e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoProfileListInfoKHR.adoc[] 730e5c31af7Sopenharmony_ci-- 731e5c31af7Sopenharmony_ci 732e5c31af7Sopenharmony_ci 733e5c31af7Sopenharmony_ci[[video-capabilities]] 734e5c31af7Sopenharmony_ci== Video Capabilities 735e5c31af7Sopenharmony_ci 736e5c31af7Sopenharmony_ci 737e5c31af7Sopenharmony_ci[[video-coding-capabilities]] 738e5c31af7Sopenharmony_ci=== Video Coding Capabilities 739e5c31af7Sopenharmony_ci 740e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceVideoCapabilitiesKHR',desc='Query video coding capabilities',type='protos'] 741e5c31af7Sopenharmony_ci-- 742e5c31af7Sopenharmony_ciTo query video coding capabilities for a specific video profile, call: 743e5c31af7Sopenharmony_ci 744e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceVideoCapabilitiesKHR.adoc[] 745e5c31af7Sopenharmony_ci 746e5c31af7Sopenharmony_ci * pname:physicalDevice is the physical device from which to query the 747e5c31af7Sopenharmony_ci video decode or encode capabilities. 748e5c31af7Sopenharmony_ci * pname:pVideoProfile is a pointer to a slink:VkVideoProfileInfoKHR 749e5c31af7Sopenharmony_ci structure. 750e5c31af7Sopenharmony_ci * pname:pCapabilities is a pointer to a slink:VkVideoCapabilitiesKHR 751e5c31af7Sopenharmony_ci structure in which the capabilities are returned. 752e5c31af7Sopenharmony_ci 753e5c31af7Sopenharmony_ci[[video-profile-support]] 754e5c31af7Sopenharmony_ciIf the <<video-profiles,video profile>> described by pname:pVideoProfile is 755e5c31af7Sopenharmony_cisupported by the implementation, then this command returns ename:VK_SUCCESS 756e5c31af7Sopenharmony_ciand pname:pCapabilities is filled with the capabilities supported with the 757e5c31af7Sopenharmony_cispecified video profile. 758e5c31af7Sopenharmony_ciOtherwise, one of the <<video-profile-error-codes, video-profile-specific 759e5c31af7Sopenharmony_cierror codes>> are returned. 760e5c31af7Sopenharmony_ci 761e5c31af7Sopenharmony_ci.Valid Usage 762e5c31af7Sopenharmony_ci**** 763e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 764e5c31af7Sopenharmony_ci * [[VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07183]] 765e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation specifies a decode 766e5c31af7Sopenharmony_ci operation, then the pname:pNext chain of pname:pCapabilities must: 767e5c31af7Sopenharmony_ci include a slink:VkVideoDecodeCapabilitiesKHR structure 768e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 769e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 770e5c31af7Sopenharmony_ci * [[VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07184]] 771e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation is 772e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the pname:pNext 773e5c31af7Sopenharmony_ci chain of pname:pCapabilities must: include a 774e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264CapabilitiesKHR structure 775e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 776e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 777e5c31af7Sopenharmony_ci * [[VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07185]] 778e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation is 779e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the pname:pNext 780e5c31af7Sopenharmony_ci chain of pname:pCapabilities must: include a 781e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265CapabilitiesKHR structure 782e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 783e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 784e5c31af7Sopenharmony_ci * [[VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07186]] 785e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation specifies an encode 786e5c31af7Sopenharmony_ci operation, then the pname:pNext chain of pname:pCapabilities must: 787e5c31af7Sopenharmony_ci include a slink:VkVideoEncodeCapabilitiesKHR structure 788e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 789e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 790e5c31af7Sopenharmony_ci * [[VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07187]] 791e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation is 792e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the pname:pNext 793e5c31af7Sopenharmony_ci chain of pname:pCapabilities must: include a 794e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264CapabilitiesKHR structure 795e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 796e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 797e5c31af7Sopenharmony_ci * [[VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-pVideoProfile-07188]] 798e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation is 799e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the pname:pNext 800e5c31af7Sopenharmony_ci chain of pname:pCapabilities must: include a 801e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265CapabilitiesKHR structure 802e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 803e5c31af7Sopenharmony_ci**** 804e5c31af7Sopenharmony_ci 805e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceVideoCapabilitiesKHR.adoc[] 806e5c31af7Sopenharmony_ci-- 807e5c31af7Sopenharmony_ci 808e5c31af7Sopenharmony_ci 809e5c31af7Sopenharmony_ci[open,refpage='VkVideoCapabilitiesKHR',desc='Structure describing general video capabilities for a video profile',type='structs'] 810e5c31af7Sopenharmony_ci-- 811e5c31af7Sopenharmony_ciThe sname:VkVideoCapabilitiesKHR structure is defined as: 812e5c31af7Sopenharmony_ci 813e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoCapabilitiesKHR.adoc[] 814e5c31af7Sopenharmony_ci 815e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 816e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 817e5c31af7Sopenharmony_ci structure. 818e5c31af7Sopenharmony_ci * pname:flags is a bitmask of elink:VkVideoCapabilityFlagBitsKHR 819e5c31af7Sopenharmony_ci specifying capability flags. 820e5c31af7Sopenharmony_ci * pname:minBitstreamBufferOffsetAlignment is the minimum alignment for 821e5c31af7Sopenharmony_ci bitstream buffer offsets. 822e5c31af7Sopenharmony_ci * pname:minBitstreamBufferSizeAlignment is the minimum alignment for 823e5c31af7Sopenharmony_ci bitstream buffer range sizes. 824e5c31af7Sopenharmony_ci * pname:pictureAccessGranularity is the granularity at which image access 825e5c31af7Sopenharmony_ci to video picture resources happen. 826e5c31af7Sopenharmony_ci * pname:minCodedExtent is the minimum width and height of the coded 827e5c31af7Sopenharmony_ci frames. 828e5c31af7Sopenharmony_ci * pname:maxCodedExtent is the maximum width and height of the coded 829e5c31af7Sopenharmony_ci frames. 830e5c31af7Sopenharmony_ci * pname:maxDpbSlots is the maximum number of <<dpb-slot,DPB slots>> 831e5c31af7Sopenharmony_ci supported by a single video session. 832e5c31af7Sopenharmony_ci * pname:maxActiveReferencePictures is the maximum number of 833e5c31af7Sopenharmony_ci <<active-reference-pictures,active reference pictures>> a single video 834e5c31af7Sopenharmony_ci coding operation can: use. 835e5c31af7Sopenharmony_ci * [[video-std-header-version]] pname:stdHeaderVersion is a 836e5c31af7Sopenharmony_ci slink:VkExtensionProperties structure reporting the Video Std header 837e5c31af7Sopenharmony_ci name and version supported for the video profile. 838e5c31af7Sopenharmony_ci 839e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 840e5c31af7Sopenharmony_ci[NOTE] 841e5c31af7Sopenharmony_ci.Note 842e5c31af7Sopenharmony_ci==== 843e5c31af7Sopenharmony_ciIt is common for video compression standards to allow using all reference 844e5c31af7Sopenharmony_cipictures associated with active DPB slots as active reference pictures, 845e5c31af7Sopenharmony_cihence for video decode profiles the values returned in pname:maxDpbSlots and 846e5c31af7Sopenharmony_cipname:maxActiveReferencePictures are often equal. 847e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 848e5c31af7Sopenharmony_ciSimilarly, in case of video decode profiles supporting field pictures the 849e5c31af7Sopenharmony_civalue of pname:maxActiveReferencePictures often equals 850e5c31af7Sopenharmony_ci[eq]#pname:maxDpbSlots {times} 2#. 851e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 852e5c31af7Sopenharmony_ci==== 853e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 854e5c31af7Sopenharmony_ci 855e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoCapabilitiesKHR.adoc[] 856e5c31af7Sopenharmony_ci-- 857e5c31af7Sopenharmony_ci 858e5c31af7Sopenharmony_ci[open,refpage='VkVideoCapabilityFlagBitsKHR',desc='Video decode and encode capability bits',type='enums'] 859e5c31af7Sopenharmony_ci-- 860e5c31af7Sopenharmony_ciBits which can: be set in slink:VkVideoCapabilitiesKHR::pname:flags are: 861e5c31af7Sopenharmony_ci 862e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoCapabilityFlagBitsKHR.adoc[] 863e5c31af7Sopenharmony_ci 864e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR indicates that video 865e5c31af7Sopenharmony_ci sessions support producing and consuming protected content. 866e5c31af7Sopenharmony_ci * [[separate-reference-images]] 867e5c31af7Sopenharmony_ci ename:VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR indicates 868e5c31af7Sopenharmony_ci that the <<video-picture-resources,video picture resources>> associated 869e5c31af7Sopenharmony_ci with the <<dpb-slot,DPB slots>> of a video session can: be backed by 870e5c31af7Sopenharmony_ci separate sname:VkImage objects. 871e5c31af7Sopenharmony_ci If this capability flag is not present, then all DPB slots of a video 872e5c31af7Sopenharmony_ci session must: be associated with video picture resources backed by the 873e5c31af7Sopenharmony_ci same sname:VkImage object (e.g. using different layers of the same 874e5c31af7Sopenharmony_ci image). 875e5c31af7Sopenharmony_ci-- 876e5c31af7Sopenharmony_ci 877e5c31af7Sopenharmony_ci[open,refpage='VkVideoCapabilityFlagsKHR',desc='Bitmask of VkVideoCapabilitiesFlagBitsKHR',type='flags'] 878e5c31af7Sopenharmony_ci-- 879e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoCapabilityFlagsKHR.adoc[] 880e5c31af7Sopenharmony_ci 881e5c31af7Sopenharmony_citname:VkVideoCapabilityFlagsKHR is a bitmask type for setting a mask of zero 882e5c31af7Sopenharmony_cior more elink:VkVideoCapabilityFlagBitsKHR. 883e5c31af7Sopenharmony_ci-- 884e5c31af7Sopenharmony_ci 885e5c31af7Sopenharmony_ci 886e5c31af7Sopenharmony_ci[[video-format-capabilities]] 887e5c31af7Sopenharmony_ci=== Video Format Capabilities 888e5c31af7Sopenharmony_ci 889e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceVideoFormatPropertiesKHR',desc='Query supported video decode and encode image formats and capabilities',type='protos'] 890e5c31af7Sopenharmony_ci-- 891e5c31af7Sopenharmony_ciTo enumerate the supported output, input and DPB image formats and 892e5c31af7Sopenharmony_cicorresponding capabilities for a specific video profile, call: 893e5c31af7Sopenharmony_ci 894e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceVideoFormatPropertiesKHR.adoc[] 895e5c31af7Sopenharmony_ci 896e5c31af7Sopenharmony_ci * pname:physicalDevice is the physical device from which to query the 897e5c31af7Sopenharmony_ci video format properties. 898e5c31af7Sopenharmony_ci * pname:pVideoFormatInfo is a pointer to a 899e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceVideoFormatInfoKHR structure specifying the usage 900e5c31af7Sopenharmony_ci and video profiles for which supported image formats and capabilities 901e5c31af7Sopenharmony_ci are returned. 902e5c31af7Sopenharmony_ci * pname:pVideoFormatPropertyCount is a pointer to an integer related to 903e5c31af7Sopenharmony_ci the number of video format properties available or queried, as described 904e5c31af7Sopenharmony_ci below. 905e5c31af7Sopenharmony_ci * pname:pVideoFormatProperties is a pointer to an array of 906e5c31af7Sopenharmony_ci slink:VkVideoFormatPropertiesKHR structures in which supported image 907e5c31af7Sopenharmony_ci formats and capabilities are returned. 908e5c31af7Sopenharmony_ci 909e5c31af7Sopenharmony_ciIf pname:pVideoFormatProperties is `NULL`, then the number of video format 910e5c31af7Sopenharmony_ciproperties supported for the given pname:physicalDevice is returned in 911e5c31af7Sopenharmony_cipname:pVideoFormatPropertyCount. 912e5c31af7Sopenharmony_ciOtherwise, pname:pVideoFormatPropertyCount must: point to a variable set by 913e5c31af7Sopenharmony_cithe user to the number of elements in the pname:pVideoFormatProperties 914e5c31af7Sopenharmony_ciarray, and on return the variable is overwritten with the number of values 915e5c31af7Sopenharmony_ciactually written to pname:pVideoFormatProperties. 916e5c31af7Sopenharmony_ciIf the value of pname:pVideoFormatPropertyCount is less than the number of 917e5c31af7Sopenharmony_civideo format properties supported, at most pname:pVideoFormatPropertyCount 918e5c31af7Sopenharmony_civalues will be written to pname:pVideoFormatProperties, and 919e5c31af7Sopenharmony_ciename:VK_INCOMPLETE will be returned instead of ename:VK_SUCCESS, to 920e5c31af7Sopenharmony_ciindicate that not all the available values were returned. 921e5c31af7Sopenharmony_ci 922e5c31af7Sopenharmony_ciVideo format properties are always queried with respect to a specific set of 923e5c31af7Sopenharmony_civideo profiles. 924e5c31af7Sopenharmony_ciThese are specified by chaining the slink:VkVideoProfileListInfoKHR 925e5c31af7Sopenharmony_cistructure to pname:pVideoFormatInfo. 926e5c31af7Sopenharmony_ci 927e5c31af7Sopenharmony_ciFor most use cases, the images are used by a single video session and a 928e5c31af7Sopenharmony_cisingle video profile is provided. 929e5c31af7Sopenharmony_ciFor a use case such as video transcoding, where a decode session output 930e5c31af7Sopenharmony_ciimage can: be used as encode input in one or more encode sessions, multiple 931e5c31af7Sopenharmony_civideo profiles corresponding to the video sessions that will share the image 932e5c31af7Sopenharmony_cimust: be provided. 933e5c31af7Sopenharmony_ci 934e5c31af7Sopenharmony_ciIf any of the <<video-profiles,video profiles>> specified via 935e5c31af7Sopenharmony_cislink:VkVideoProfileListInfoKHR::pname:pProfiles are not supported, then 936e5c31af7Sopenharmony_cithis command returns one of the <<video-profile-error-codes, 937e5c31af7Sopenharmony_civideo-profile-specific error codes>>. 938e5c31af7Sopenharmony_ciFurthermore, if slink:VkPhysicalDeviceVideoFormatInfoKHR::pname:imageUsage 939e5c31af7Sopenharmony_ciincludes any image usage flags not supported by the specified video 940e5c31af7Sopenharmony_ciprofiles, then this command returns 941e5c31af7Sopenharmony_ciename:VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR. 942e5c31af7Sopenharmony_ci 943e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 944e5c31af7Sopenharmony_ciThis command also returns ename:VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR if 945e5c31af7Sopenharmony_cislink:VkPhysicalDeviceVideoFormatInfoKHR::pname:imageUsage does not include 946e5c31af7Sopenharmony_cithe appropriate flags as dictated by the decode capability flags returned in 947e5c31af7Sopenharmony_cislink:VkVideoDecodeCapabilitiesKHR::pname:flags for any of the profiles 948e5c31af7Sopenharmony_cispecified in the slink:VkVideoProfileListInfoKHR structure provided in the 949e5c31af7Sopenharmony_cipname:pNext chain of pname:pVideoFormatInfo. 950e5c31af7Sopenharmony_ci 951e5c31af7Sopenharmony_ciIf the decode capability flags include 952e5c31af7Sopenharmony_ciename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR but not 953e5c31af7Sopenharmony_ciename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR, then in 954e5c31af7Sopenharmony_ciorder to query video format properties for decode DPB and output usage, 955e5c31af7Sopenharmony_cislink:VkPhysicalDeviceVideoFormatInfoKHR::pname:imageUsage must: include 956e5c31af7Sopenharmony_ciboth ename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR and 957e5c31af7Sopenharmony_ciename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR. 958e5c31af7Sopenharmony_ciOtherwise, the call will fail with 959e5c31af7Sopenharmony_ciename:VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR. 960e5c31af7Sopenharmony_ci 961e5c31af7Sopenharmony_ciIf the decode capability flags include 962e5c31af7Sopenharmony_ciename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR but not 963e5c31af7Sopenharmony_ciename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR, then in 964e5c31af7Sopenharmony_ciorder to query video format properties for decode DPB usage, 965e5c31af7Sopenharmony_cislink:VkPhysicalDeviceVideoFormatInfoKHR::pname:imageUsage must: include 966e5c31af7Sopenharmony_ciename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, but not 967e5c31af7Sopenharmony_ciename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR. 968e5c31af7Sopenharmony_ciOtherwise, the call will fail with 969e5c31af7Sopenharmony_ciename:VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR. 970e5c31af7Sopenharmony_ciSimilarly, to query video format properties for decode output usage, 971e5c31af7Sopenharmony_cislink:VkPhysicalDeviceVideoFormatInfoKHR::pname:imageUsage must: include 972e5c31af7Sopenharmony_ciename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, but not 973e5c31af7Sopenharmony_ciename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR. 974e5c31af7Sopenharmony_ciOtherwise, the call will fail with 975e5c31af7Sopenharmony_ciename:VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR. 976e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 977e5c31af7Sopenharmony_ci 978e5c31af7Sopenharmony_ciThe pname:imageUsage member of the slink:VkPhysicalDeviceVideoFormatInfoKHR 979e5c31af7Sopenharmony_cistructure specifies the expected video usage flags that the returned video 980e5c31af7Sopenharmony_ciformats must: support. 981e5c31af7Sopenharmony_ciCorrespondingly, the pname:imageUsageFlags member of each 982e5c31af7Sopenharmony_cislink:VkVideoFormatPropertiesKHR structure returned will contain at least 983e5c31af7Sopenharmony_cithe same set of image usage flags. 984e5c31af7Sopenharmony_ci 985e5c31af7Sopenharmony_ciIf the implementation supports using video input, output, or DPB images of a 986e5c31af7Sopenharmony_ciparticular format in operations other than video decode/encode then the 987e5c31af7Sopenharmony_cipname:imageUsageFlags member of the corresponding 988e5c31af7Sopenharmony_cislink:VkVideoFormatPropertiesKHR structure returned will include additional 989e5c31af7Sopenharmony_ciimage usage flags indicating that. 990e5c31af7Sopenharmony_ci 991e5c31af7Sopenharmony_ci[NOTE] 992e5c31af7Sopenharmony_ci.Note 993e5c31af7Sopenharmony_ci==== 994e5c31af7Sopenharmony_ciFor most use cases, only decode or encode related usage flags are going to 995e5c31af7Sopenharmony_cibe specified. 996e5c31af7Sopenharmony_ciFor a use case such as transcode, if the image were to be shared between 997e5c31af7Sopenharmony_cidecode and encode session(s), then both decode and encode related usage 998e5c31af7Sopenharmony_ciflags can: be set. 999e5c31af7Sopenharmony_ci==== 1000e5c31af7Sopenharmony_ci 1001e5c31af7Sopenharmony_ciMultiple sname:VkVideoFormatPropertiesKHR entries may: be returned with the 1002e5c31af7Sopenharmony_cisame pname:format member with different pname:componentMapping, 1003e5c31af7Sopenharmony_cipname:imageType, or pname:imageTiling values, as described later. 1004e5c31af7Sopenharmony_ci 1005e5c31af7Sopenharmony_ciIn addition, a different set of sname:VkVideoFormatPropertiesKHR entries 1006e5c31af7Sopenharmony_cimay: be returned depending on the pname:imageUsage member of the 1007e5c31af7Sopenharmony_cisname:VkPhysicalDeviceVideoFormatInfoKHR structure, even for the same set of 1008e5c31af7Sopenharmony_civideo profiles, for example, based on whether encode input, encode DPB, 1009e5c31af7Sopenharmony_cidecode output, and/or decode DPB usage is requested. 1010e5c31af7Sopenharmony_ci 1011e5c31af7Sopenharmony_ciThe application can: select the parameters returned in the 1012e5c31af7Sopenharmony_cisname:VkVideoFormatPropertiesKHR entries and use compatible parameters when 1013e5c31af7Sopenharmony_cicreating the input, output, and DPB images. 1014e5c31af7Sopenharmony_ciThe implementation will report all image creation and usage flags that are 1015e5c31af7Sopenharmony_civalid for images used with the requested video profiles but applications 1016e5c31af7Sopenharmony_cishould: create images only with those that are necessary for the particular 1017e5c31af7Sopenharmony_ciuse case. 1018e5c31af7Sopenharmony_ci 1019e5c31af7Sopenharmony_ciBefore creating an image, the application can: obtain the complete set of 1020e5c31af7Sopenharmony_cisupported image format features by calling 1021e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceImageFormatProperties2 using parameters derived 1022e5c31af7Sopenharmony_cifrom the members of one of the reported sname:VkVideoFormatPropertiesKHR 1023e5c31af7Sopenharmony_cientries and adding the same slink:VkVideoProfileListInfoKHR structure to the 1024e5c31af7Sopenharmony_cipname:pNext chain of slink:VkPhysicalDeviceImageFormatInfo2. 1025e5c31af7Sopenharmony_ci 1026e5c31af7Sopenharmony_ciThe following applies to all sname:VkVideoFormatPropertiesKHR entries 1027e5c31af7Sopenharmony_cireturned by fname:vkGetPhysicalDeviceVideoFormatPropertiesKHR: 1028e5c31af7Sopenharmony_ci 1029e5c31af7Sopenharmony_ci * flink:vkGetPhysicalDeviceFormatProperties2 must: succeed when called 1030e5c31af7Sopenharmony_ci with sname:VkVideoFormatPropertiesKHR::pname:format 1031e5c31af7Sopenharmony_ci * If sname:VkVideoFormatPropertiesKHR::pname:imageTiling is 1032e5c31af7Sopenharmony_ci ename:VK_IMAGE_TILING_OPTIMAL, then the pname:optimalTilingFeatures 1033e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceFormatProperties2 must: include all 1034e5c31af7Sopenharmony_ci format features required by the image usage flags reported in 1035e5c31af7Sopenharmony_ci sname:VkVideoFormatPropertiesKHR::pname:imageUsageFlags for the format, 1036e5c31af7Sopenharmony_ci as indicated in the <<format-feature-dependent-usage-flags,Format 1037e5c31af7Sopenharmony_ci Feature Dependent Usage Flags>> section. 1038e5c31af7Sopenharmony_ci * If sname:VkVideoFormatPropertiesKHR::pname:imageTiling is 1039e5c31af7Sopenharmony_ci ename:VK_IMAGE_TILING_LINEAR, then the pname:linearTilingFeatures 1040e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceFormatProperties2 must: include all 1041e5c31af7Sopenharmony_ci format features required by the image usage flags reported in 1042e5c31af7Sopenharmony_ci sname:VkVideoFormatPropertiesKHR::pname:imageUsageFlags for the format, 1043e5c31af7Sopenharmony_ci as indicated in the <<format-feature-dependent-usage-flags,Format 1044e5c31af7Sopenharmony_ci Feature Dependent Usage Flags>> section. 1045e5c31af7Sopenharmony_ci * flink:vkGetPhysicalDeviceImageFormatProperties2 must: succeed when 1046e5c31af7Sopenharmony_ci called with a slink:VkPhysicalDeviceImageFormatInfo2 structure 1047e5c31af7Sopenharmony_ci containing the following information: 1048e5c31af7Sopenharmony_ci ** The pname:pNext chain including the same 1049e5c31af7Sopenharmony_ci slink:VkVideoProfileListInfoKHR structure used to call 1050e5c31af7Sopenharmony_ci fname:vkGetPhysicalDeviceVideoFormatPropertiesKHR. 1051e5c31af7Sopenharmony_ci ** pname:format set to the value of 1052e5c31af7Sopenharmony_ci sname:VkVideoFormatPropertiesKHR::pname:format. 1053e5c31af7Sopenharmony_ci ** pname:type set to the value of 1054e5c31af7Sopenharmony_ci sname:VkVideoFormatPropertiesKHR::pname:imageType. 1055e5c31af7Sopenharmony_ci ** pname:tiling set to the value of 1056e5c31af7Sopenharmony_ci sname:VkVideoFormatPropertiesKHR::pname:imageTiling. 1057e5c31af7Sopenharmony_ci ** pname:usage set to the value of 1058e5c31af7Sopenharmony_ci sname:VkVideoFormatPropertiesKHR::pname:imageUsageFlags. 1059e5c31af7Sopenharmony_ci ** pname:flags set to the value of 1060e5c31af7Sopenharmony_ci sname:VkVideoFormatPropertiesKHR::pname:imageCreateFlags. 1061e5c31af7Sopenharmony_ci 1062e5c31af7Sopenharmony_ciThe pname:componentMapping member of sname:VkVideoFormatPropertiesKHR 1063e5c31af7Sopenharmony_cidefines the ordering of the {YCbCr} color channels from the perspective of 1064e5c31af7Sopenharmony_cithe video codec operations specified in slink:VkVideoProfileListInfoKHR. 1065e5c31af7Sopenharmony_ciFor example, if the implementation produces video decode output with the 1066e5c31af7Sopenharmony_ciformat ename:VK_FORMAT_G8_B8R8_2PLANE_420_UNORM where the blue and red 1067e5c31af7Sopenharmony_cichrominance channels are swapped then the pname:componentMapping member of 1068e5c31af7Sopenharmony_cithe corresponding sname:VkVideoFormatPropertiesKHR structure will have the 1069e5c31af7Sopenharmony_cifollowing member values: 1070e5c31af7Sopenharmony_ci 1071e5c31af7Sopenharmony_ci[source,c++] 1072e5c31af7Sopenharmony_ci---- 1073e5c31af7Sopenharmony_cicomponents.r = VK_COMPONENT_SWIZZLE_B; // Cb component 1074e5c31af7Sopenharmony_cicomponents.g = VK_COMPONENT_SWIZZLE_IDENTITY; // Y component 1075e5c31af7Sopenharmony_cicomponents.b = VK_COMPONENT_SWIZZLE_R; // Cr component 1076e5c31af7Sopenharmony_cicomponents.a = VK_COMPONENT_SWIZZLE_IDENTITY; // unused, defaults to 1.0 1077e5c31af7Sopenharmony_ci---- 1078e5c31af7Sopenharmony_ci 1079e5c31af7Sopenharmony_ci.Valid Usage 1080e5c31af7Sopenharmony_ci**** 1081e5c31af7Sopenharmony_ci * [[VUID-vkGetPhysicalDeviceVideoFormatPropertiesKHR-pNext-06812]] 1082e5c31af7Sopenharmony_ci The pname:pNext chain of pname:pVideoFormatInfo must: include a 1083e5c31af7Sopenharmony_ci slink:VkVideoProfileListInfoKHR structure with pname:profileCount 1084e5c31af7Sopenharmony_ci greater than `0` 1085e5c31af7Sopenharmony_ci**** 1086e5c31af7Sopenharmony_ci 1087e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceVideoFormatPropertiesKHR.adoc[] 1088e5c31af7Sopenharmony_ci-- 1089e5c31af7Sopenharmony_ci 1090e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceVideoFormatInfoKHR',desc='Structure specifying the codec video format',type='structs'] 1091e5c31af7Sopenharmony_ci-- 1092e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceVideoFormatInfoKHR structure is defined as: 1093e5c31af7Sopenharmony_ci 1094e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceVideoFormatInfoKHR.adoc[] 1095e5c31af7Sopenharmony_ci 1096e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 1097e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1098e5c31af7Sopenharmony_ci structure. 1099e5c31af7Sopenharmony_ci * pname:imageUsage is a bitmask of elink:VkImageUsageFlagBits specifying 1100e5c31af7Sopenharmony_ci the intended usage of the video images. 1101e5c31af7Sopenharmony_ci 1102e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceVideoFormatInfoKHR.adoc[] 1103e5c31af7Sopenharmony_ci-- 1104e5c31af7Sopenharmony_ci 1105e5c31af7Sopenharmony_ci[open,refpage='VkVideoFormatPropertiesKHR',desc='Structure enumerating the video image formats',type='structs'] 1106e5c31af7Sopenharmony_ci-- 1107e5c31af7Sopenharmony_ciThe sname:VkVideoFormatPropertiesKHR structure is defined as: 1108e5c31af7Sopenharmony_ci 1109e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoFormatPropertiesKHR.adoc[] 1110e5c31af7Sopenharmony_ci 1111e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 1112e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1113e5c31af7Sopenharmony_ci structure. 1114e5c31af7Sopenharmony_ci * pname:format is a elink:VkFormat that specifies the format that can: be 1115e5c31af7Sopenharmony_ci used with the specified video profiles and image usages. 1116e5c31af7Sopenharmony_ci * pname:componentMapping defines the color channel order used for the 1117e5c31af7Sopenharmony_ci format. 1118e5c31af7Sopenharmony_ci pname:format along with pname:componentMapping describe how the color 1119e5c31af7Sopenharmony_ci channels are ordered when producing video decoder output or are expected 1120e5c31af7Sopenharmony_ci to be ordered in video encoder input, when applicable. 1121e5c31af7Sopenharmony_ci If the pname:format reported does not require component swizzling then 1122e5c31af7Sopenharmony_ci all members of pname:componentMapping will be set to 1123e5c31af7Sopenharmony_ci ename:VK_COMPONENT_SWIZZLE_IDENTITY. 1124e5c31af7Sopenharmony_ci * pname:imageCreateFlags is a bitmask of elink:VkImageCreateFlagBits 1125e5c31af7Sopenharmony_ci specifying the supported image creation flags for the format. 1126e5c31af7Sopenharmony_ci * pname:imageType is a elink:VkImageType that specifies the image type the 1127e5c31af7Sopenharmony_ci format can: be used with. 1128e5c31af7Sopenharmony_ci * pname:imageTiling is a elink:VkImageTiling that specifies the image 1129e5c31af7Sopenharmony_ci tiling the format can: be used with. 1130e5c31af7Sopenharmony_ci * pname:imageUsageFlags is a bitmask of elink:VkImageUsageFlagBits 1131e5c31af7Sopenharmony_ci specifying the supported image usage flags for the format. 1132e5c31af7Sopenharmony_ci 1133e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoFormatPropertiesKHR.adoc[] 1134e5c31af7Sopenharmony_ci-- 1135e5c31af7Sopenharmony_ci 1136e5c31af7Sopenharmony_ci[[video-session]] 1137e5c31af7Sopenharmony_ci== Video Sessions 1138e5c31af7Sopenharmony_ci 1139e5c31af7Sopenharmony_ci[open,refpage='VkVideoSessionKHR',desc='Opaque handle to a video session object',type='handles'] 1140e5c31af7Sopenharmony_ci-- 1141e5c31af7Sopenharmony_ciVideo sessions are objects that represent and maintain the state needed to 1142e5c31af7Sopenharmony_ciperform video decode or encode operations using a specific video profile. 1143e5c31af7Sopenharmony_ci 1144e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1145e5c31af7Sopenharmony_ciIn case of video encode profiles this includes the current 1146e5c31af7Sopenharmony_ci<<encode-rate-control,rate control>> configuration and the currently set 1147e5c31af7Sopenharmony_ci<<encode-quality-level,video encode quality level>>. 1148e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1149e5c31af7Sopenharmony_ci 1150e5c31af7Sopenharmony_ciVideo sessions are represented by sname:VkVideoSessionKHR handles: 1151e5c31af7Sopenharmony_ci 1152e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkVideoSessionKHR.adoc[] 1153e5c31af7Sopenharmony_ci-- 1154e5c31af7Sopenharmony_ci 1155e5c31af7Sopenharmony_ci 1156e5c31af7Sopenharmony_ci[[video-session-creation]] 1157e5c31af7Sopenharmony_ci=== Creating a Video Session 1158e5c31af7Sopenharmony_ci 1159e5c31af7Sopenharmony_ci[open,refpage='vkCreateVideoSessionKHR',desc='Creates a video session object',type='protos'] 1160e5c31af7Sopenharmony_ci-- 1161e5c31af7Sopenharmony_ciTo create a video session object, call: 1162e5c31af7Sopenharmony_ci 1163e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateVideoSessionKHR.adoc[] 1164e5c31af7Sopenharmony_ci 1165e5c31af7Sopenharmony_ci * pname:device is the logical device that creates the video session. 1166e5c31af7Sopenharmony_ci * pname:pCreateInfo is a pointer to a slink:VkVideoSessionCreateInfoKHR 1167e5c31af7Sopenharmony_ci structure containing parameters to be used to create the video session. 1168e5c31af7Sopenharmony_ci * pname:pAllocator controls host memory allocation as described in the 1169e5c31af7Sopenharmony_ci <<memory-allocation, Memory Allocation>> chapter. 1170e5c31af7Sopenharmony_ci * pname:pVideoSession is a pointer to a slink:VkVideoSessionKHR handle in 1171e5c31af7Sopenharmony_ci which the resulting video session object is returned. 1172e5c31af7Sopenharmony_ci 1173e5c31af7Sopenharmony_ciThe resulting video session object is said to be created with the video 1174e5c31af7Sopenharmony_cicodec operation specified in 1175e5c31af7Sopenharmony_cipname:pCreateInfo->pVideoProfile->videoCodecOperation. 1176e5c31af7Sopenharmony_ci 1177e5c31af7Sopenharmony_ciThe name and version of the codec-specific Video Std header to be used with 1178e5c31af7Sopenharmony_cithe video session is specified by the slink:VkExtensionProperties structure 1179e5c31af7Sopenharmony_cipointed to by pname:pCreateInfo->pStdHeaderVersion. 1180e5c31af7Sopenharmony_ciIf a non-existent or unsupported Video Std header version is specified in 1181e5c31af7Sopenharmony_cipname:pCreateInfo->pStdHeaderVersion->specVersion, then this command returns 1182e5c31af7Sopenharmony_ciename:VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR. 1183e5c31af7Sopenharmony_ci 1184e5c31af7Sopenharmony_ci[[video-session-uninitialized]] 1185e5c31af7Sopenharmony_ciVideo session objects are created in _uninitialized_ state. 1186e5c31af7Sopenharmony_ciIn order to transition the video session into _initial_ state, the 1187e5c31af7Sopenharmony_ciapplication must: issue a flink:vkCmdControlVideoCodingKHR command with 1188e5c31af7Sopenharmony_cislink:VkVideoCodingControlInfoKHR::pname:flags including 1189e5c31af7Sopenharmony_ciename:VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR. 1190e5c31af7Sopenharmony_ci 1191e5c31af7Sopenharmony_ciVideo session objects also maintain the 1192e5c31af7Sopenharmony_ci<<dpb-state-and-backing-store,state>> of the DPB. 1193e5c31af7Sopenharmony_ciThe number of DPB slots usable with the created video session is specified 1194e5c31af7Sopenharmony_ciin pname:pCreateInfo->maxDpbSlots, and each slot is initially in the 1195e5c31af7Sopenharmony_ci<<dpb-slot-states,inactive state>>. 1196e5c31af7Sopenharmony_ci 1197e5c31af7Sopenharmony_ciEach <<dpb-slot,DPB slot>> maintained by the created video session can: 1198e5c31af7Sopenharmony_cirefer to a <<reference-picture,reference picture>> representing a video 1199e5c31af7Sopenharmony_ciframe. 1200e5c31af7Sopenharmony_ci 1201e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 1202e5c31af7Sopenharmony_ci[[decode-h264-interlaced-support]] 1203e5c31af7Sopenharmony_ciIn addition, if the pname:videoCodecOperation member of the 1204e5c31af7Sopenharmony_cislink:VkVideoProfileInfoKHR structure pointed to by 1205e5c31af7Sopenharmony_cipname:pCreateInfo->pVideoProfile is 1206e5c31af7Sopenharmony_ciename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and the 1207e5c31af7Sopenharmony_cipname:pictureLayout member of the slink:VkVideoDecodeH264ProfileInfoKHR 1208e5c31af7Sopenharmony_cistructure provided in the slink:VkVideoProfileInfoKHR::pname:pNext chain is 1209e5c31af7Sopenharmony_cinot ename:VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_KHR, then the 1210e5c31af7Sopenharmony_cicreated video session supports _interlaced_ frames and each <<dpb-slot,DPB 1211e5c31af7Sopenharmony_cislot>> maintained by the created video session can: instead refer to 1212e5c31af7Sopenharmony_ciseparate top field and bottom field <<reference-picture,reference pictures>> 1213e5c31af7Sopenharmony_cithat together can: represent a full video frame. 1214e5c31af7Sopenharmony_ciIn this case, it is up to the application, driven by the video content, 1215e5c31af7Sopenharmony_ciwhether it associates any individual DPB slot with separate top and/or 1216e5c31af7Sopenharmony_cibottom field pictures or a single picture representing a full frame. 1217e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 1218e5c31af7Sopenharmony_ci 1219e5c31af7Sopenharmony_ciThe created video session can: be used to perform video coding operations 1220e5c31af7Sopenharmony_ciusing video frames up to the maximum size specified in 1221e5c31af7Sopenharmony_cipname:pCreateInfo->maxCodedExtent. 1222e5c31af7Sopenharmony_ciThe minimum frame size allowed is implicitly derived from 1223e5c31af7Sopenharmony_cislink:VkVideoCapabilitiesKHR::pname:minCodedExtent, as returned by 1224e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile 1225e5c31af7Sopenharmony_cispecified by pname:pCreateInfo->pVideoProfile. 1226e5c31af7Sopenharmony_ciAccordingly, the created video session is said to be created with a 1227e5c31af7Sopenharmony_cipname:minCodedExtent equal to that. 1228e5c31af7Sopenharmony_ci 1229e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1230e5c31af7Sopenharmony_ciIn case of video session objects created with a video encode operation, 1231e5c31af7Sopenharmony_ciimplementations may: return the 1232e5c31af7Sopenharmony_ciename:VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error if any of the 1233e5c31af7Sopenharmony_cispecified Video Std parameters do not adhere to the syntactic or semantic 1234e5c31af7Sopenharmony_cirequirements of the used video compression standard, or if values derived 1235e5c31af7Sopenharmony_cifrom parameters according to the rules defined by the used video compression 1236e5c31af7Sopenharmony_cistandard do not adhere to the capabilities of the video compression standard 1237e5c31af7Sopenharmony_cior the implementation. 1238e5c31af7Sopenharmony_ci 1239e5c31af7Sopenharmony_ci[NOTE] 1240e5c31af7Sopenharmony_ci.Note 1241e5c31af7Sopenharmony_ci==== 1242e5c31af7Sopenharmony_ciApplications should: not rely on the 1243e5c31af7Sopenharmony_ciename:VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error being returned by any 1244e5c31af7Sopenharmony_cicommand as a means to verify Video Std parameters, as implementations are 1245e5c31af7Sopenharmony_cinot required to report the error in any specific set of cases. 1246e5c31af7Sopenharmony_ci==== 1247e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1248e5c31af7Sopenharmony_ci 1249e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateVideoSessionKHR.adoc[] 1250e5c31af7Sopenharmony_ci-- 1251e5c31af7Sopenharmony_ci 1252e5c31af7Sopenharmony_ci[open,refpage='VkVideoSessionCreateInfoKHR',desc='Structure specifying parameters of a newly created video session',type='structs'] 1253e5c31af7Sopenharmony_ci-- 1254e5c31af7Sopenharmony_ciThe slink:VkVideoSessionCreateInfoKHR structure is defined as: 1255e5c31af7Sopenharmony_ci 1256e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoSessionCreateInfoKHR.adoc[] 1257e5c31af7Sopenharmony_ci 1258e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 1259e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1260e5c31af7Sopenharmony_ci structure. 1261e5c31af7Sopenharmony_ci * pname:queueFamilyIndex is the index of the queue family the created 1262e5c31af7Sopenharmony_ci video session will be used with. 1263e5c31af7Sopenharmony_ci * pname:flags is a bitmask of elink:VkVideoSessionCreateFlagBitsKHR 1264e5c31af7Sopenharmony_ci specifying creation flags. 1265e5c31af7Sopenharmony_ci * pname:pVideoProfile is a pointer to a slink:VkVideoProfileInfoKHR 1266e5c31af7Sopenharmony_ci structure specifying the video profile the created video session will be 1267e5c31af7Sopenharmony_ci used with. 1268e5c31af7Sopenharmony_ci * pname:pictureFormat is the image format the created video session will 1269e5c31af7Sopenharmony_ci be used with. 1270e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 1271e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation specifies a decode 1272e5c31af7Sopenharmony_ci operation, then pname:pictureFormat is the image format of 1273e5c31af7Sopenharmony_ci <<decode-output-picture, decode output pictures>> usable with the 1274e5c31af7Sopenharmony_ci created video session. 1275e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 1276e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1277e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation specifies an encode 1278e5c31af7Sopenharmony_ci operation, then pname:pictureFormat is the image format of 1279e5c31af7Sopenharmony_ci <<encode-input-picture, encode input pictures>> usable with the created 1280e5c31af7Sopenharmony_ci video session. 1281e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1282e5c31af7Sopenharmony_ci * pname:maxCodedExtent is the maximum width and height of the coded frames 1283e5c31af7Sopenharmony_ci the created video session will be used with. 1284e5c31af7Sopenharmony_ci * pname:referencePictureFormat is the image format of 1285e5c31af7Sopenharmony_ci <<reference-picture,reference pictures>> stored in the <<dpb,DPB>> the 1286e5c31af7Sopenharmony_ci created video session will be used with. 1287e5c31af7Sopenharmony_ci * pname:maxDpbSlots is the maximum number of <<dpb-slot,DPB Slots>> that 1288e5c31af7Sopenharmony_ci can: be used with the created video session. 1289e5c31af7Sopenharmony_ci * pname:maxActiveReferencePictures is the maximum number of 1290e5c31af7Sopenharmony_ci <<active-reference-pictures,active reference pictures>> that can: be 1291e5c31af7Sopenharmony_ci used in a single video coding operation using the created video session. 1292e5c31af7Sopenharmony_ci * pname:pStdHeaderVersion is a pointer to a slink:VkExtensionProperties 1293e5c31af7Sopenharmony_ci structure requesting the Video Std header version to use for the 1294e5c31af7Sopenharmony_ci pname:videoCodecOperation specified in pname:pVideoProfile. 1295e5c31af7Sopenharmony_ci 1296e5c31af7Sopenharmony_ci.Valid Usage 1297e5c31af7Sopenharmony_ci**** 1298e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-protectedMemory-07189]] 1299e5c31af7Sopenharmony_ci If the <<features-protectedMemory, pname:protectedMemory>> feature is 1300e5c31af7Sopenharmony_ci not enabled or if slink:VkVideoCapabilitiesKHR::pname:flags does not 1301e5c31af7Sopenharmony_ci include ename:VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR, as returned 1302e5c31af7Sopenharmony_ci by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile 1303e5c31af7Sopenharmony_ci specified by pname:pVideoProfile, then pname:flags must: not include 1304e5c31af7Sopenharmony_ci ename:VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR 1305e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[] 1306e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-flags-08371]] 1307e5c31af7Sopenharmony_ci If pname:flags includes 1308e5c31af7Sopenharmony_ci ename:VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then 1309e5c31af7Sopenharmony_ci <<features-videoMaintenance1,pname:videoMaintenance1>> must: be enabled 1310e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[] 1311e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-04845]] 1312e5c31af7Sopenharmony_ci pname:pVideoProfile must: be a <<video-profile-support, supported video 1313e5c31af7Sopenharmony_ci profile>> 1314e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-maxDpbSlots-04847]] 1315e5c31af7Sopenharmony_ci pname:maxDpbSlots must: be less than or equal to 1316e5c31af7Sopenharmony_ci slink:VkVideoCapabilitiesKHR::pname:maxDpbSlots, as returned by 1317e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile 1318e5c31af7Sopenharmony_ci specified by pname:pVideoProfile 1319e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-maxActiveReferencePictures-04849]] 1320e5c31af7Sopenharmony_ci pname:maxActiveReferencePictures must: be less than or equal to 1321e5c31af7Sopenharmony_ci slink:VkVideoCapabilitiesKHR::pname:maxActiveReferencePictures, as 1322e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video 1323e5c31af7Sopenharmony_ci profile specified by pname:pVideoProfile 1324e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-maxDpbSlots-04850]] 1325e5c31af7Sopenharmony_ci If either pname:maxDpbSlots or pname:maxActiveReferencePictures is `0`, 1326e5c31af7Sopenharmony_ci then both must: be `0` 1327e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-maxCodedExtent-04851]] 1328e5c31af7Sopenharmony_ci pname:maxCodedExtent must: be between 1329e5c31af7Sopenharmony_ci slink:VkVideoCapabilitiesKHR::pname:minCodedExtent and 1330e5c31af7Sopenharmony_ci slink:VkVideoCapabilitiesKHR::pname:maxCodedExtent, inclusive, as 1331e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video 1332e5c31af7Sopenharmony_ci profile specified by pname:pVideoProfile 1333e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 1334e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-referencePictureFormat-04852]] 1335e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation specifies a decode operation 1336e5c31af7Sopenharmony_ci and pname:maxActiveReferencePictures is greater than `0`, then 1337e5c31af7Sopenharmony_ci pname:referencePictureFormat must: be one of the supported decode DPB 1338e5c31af7Sopenharmony_ci formats, as returned by 1339e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoFormatPropertiesKHR in 1340e5c31af7Sopenharmony_ci slink:VkVideoFormatPropertiesKHR::pname:format when called with the 1341e5c31af7Sopenharmony_ci pname:imageUsage member of its pname:pVideoFormatInfo parameter 1342e5c31af7Sopenharmony_ci containing ename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, and with a 1343e5c31af7Sopenharmony_ci slink:VkVideoProfileListInfoKHR structure specified in the pname:pNext 1344e5c31af7Sopenharmony_ci chain of its pname:pVideoFormatInfo parameter whose pname:pProfiles 1345e5c31af7Sopenharmony_ci member contains an element matching pname:pVideoProfile 1346e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 1347e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1348e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-referencePictureFormat-06814]] 1349e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation specifies an encode 1350e5c31af7Sopenharmony_ci operation and pname:maxActiveReferencePictures is greater than `0`, then 1351e5c31af7Sopenharmony_ci pname:referencePictureFormat must: be one of the supported decode DPB 1352e5c31af7Sopenharmony_ci formats, as returned by then pname:referencePictureFormat must: be one 1353e5c31af7Sopenharmony_ci of the supported encode DPB formats, as returned by 1354e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoFormatPropertiesKHR in 1355e5c31af7Sopenharmony_ci slink:VkVideoFormatPropertiesKHR::pname:format when called with the 1356e5c31af7Sopenharmony_ci pname:imageUsage member of its pname:pVideoFormatInfo parameter 1357e5c31af7Sopenharmony_ci containing ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, and with a 1358e5c31af7Sopenharmony_ci slink:VkVideoProfileListInfoKHR structure specified in the pname:pNext 1359e5c31af7Sopenharmony_ci chain of its pname:pVideoFormatInfo parameter whose pname:pProfiles 1360e5c31af7Sopenharmony_ci member contains an element matching pname:pVideoProfile 1361e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1362e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 1363e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-pictureFormat-04853]] 1364e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation specifies a decode 1365e5c31af7Sopenharmony_ci operation, then pname:pictureFormat must: be one of the supported decode 1366e5c31af7Sopenharmony_ci output formats, as returned by 1367e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoFormatPropertiesKHR in 1368e5c31af7Sopenharmony_ci slink:VkVideoFormatPropertiesKHR::pname:format when called with the 1369e5c31af7Sopenharmony_ci pname:imageUsage member of its pname:pVideoFormatInfo parameter 1370e5c31af7Sopenharmony_ci containing ename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, and with a 1371e5c31af7Sopenharmony_ci slink:VkVideoProfileListInfoKHR structure specified in the pname:pNext 1372e5c31af7Sopenharmony_ci chain of its pname:pVideoFormatInfo parameter whose pname:pProfiles 1373e5c31af7Sopenharmony_ci member contains an element matching pname:pVideoProfile 1374e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 1375e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1376e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-pictureFormat-04854]] 1377e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation specifies an encode 1378e5c31af7Sopenharmony_ci operation, then pname:pictureFormat must: be one of the supported encode 1379e5c31af7Sopenharmony_ci input formats, as returned by 1380e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoFormatPropertiesKHR in 1381e5c31af7Sopenharmony_ci slink:VkVideoFormatPropertiesKHR::pname:format when called with the 1382e5c31af7Sopenharmony_ci pname:imageUsage member of its pname:pVideoFormatInfo parameter 1383e5c31af7Sopenharmony_ci containing ename:VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, and with a 1384e5c31af7Sopenharmony_ci slink:VkVideoProfileListInfoKHR structure specified in the pname:pNext 1385e5c31af7Sopenharmony_ci chain of its pname:pVideoFormatInfo parameter whose pname:pProfiles 1386e5c31af7Sopenharmony_ci member contains an element matching pname:pVideoProfile 1387e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1388e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07190]] 1389e5c31af7Sopenharmony_ci pname:pStdHeaderVersion->extensionName must: match 1390e5c31af7Sopenharmony_ci slink:VkVideoCapabilitiesKHR::pname:stdHeaderVersion.extensionName, as 1391e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video 1392e5c31af7Sopenharmony_ci profile specified by pname:pVideoProfile 1393e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07191]] 1394e5c31af7Sopenharmony_ci pname:pStdHeaderVersion->specVersion must: be less than or equal to 1395e5c31af7Sopenharmony_ci slink:VkVideoCapabilitiesKHR::pname:stdHeaderVersion.specVersion, as 1396e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video 1397e5c31af7Sopenharmony_ci profile specified by pname:pVideoProfile 1398e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 1399e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-08251]] 1400e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation is 1401e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the pname:pNext 1402e5c31af7Sopenharmony_ci chain of this structure includes a 1403e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionCreateInfoKHR structure, then its 1404e5c31af7Sopenharmony_ci pname:maxLevelIdc member must: be less than or equal to 1405e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264CapabilitiesKHR::pname:maxLevelIdc, as returned 1406e5c31af7Sopenharmony_ci by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile 1407e5c31af7Sopenharmony_ci specified in pname:pVideoProfile 1408e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 1409e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 1410e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-08252]] 1411e5c31af7Sopenharmony_ci If pname:pVideoProfile->videoCodecOperation is 1412e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the pname:pNext 1413e5c31af7Sopenharmony_ci chain of this structure includes a 1414e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionCreateInfoKHR structure, then its 1415e5c31af7Sopenharmony_ci pname:maxLevelIdc member must: be less than or equal to 1416e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265CapabilitiesKHR::pname:maxLevelIdc, as returned 1417e5c31af7Sopenharmony_ci by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile 1418e5c31af7Sopenharmony_ci specified in pname:pVideoProfile 1419e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 1420e5c31af7Sopenharmony_ci**** 1421e5c31af7Sopenharmony_ci 1422e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoSessionCreateInfoKHR.adoc[] 1423e5c31af7Sopenharmony_ci-- 1424e5c31af7Sopenharmony_ci 1425e5c31af7Sopenharmony_ci[open,refpage='VkVideoSessionCreateFlagBitsKHR',desc='Video session creation flags',type='enums'] 1426e5c31af7Sopenharmony_ci-- 1427e5c31af7Sopenharmony_ciBits which can: be set in slink:VkVideoSessionCreateInfoKHR::pname:flags 1428e5c31af7Sopenharmony_ciare: 1429e5c31af7Sopenharmony_ci 1430e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoSessionCreateFlagBitsKHR.adoc[] 1431e5c31af7Sopenharmony_ci 1432e5c31af7Sopenharmony_ci * ename:VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR specifies that 1433e5c31af7Sopenharmony_ci the video session uses protected video content. 1434e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1435e5c31af7Sopenharmony_ci * [[encode-optimizing-overrides]] 1436e5c31af7Sopenharmony_ci ename:VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR 1437e5c31af7Sopenharmony_ci specifies that the implementation is allowed to 1438e5c31af7Sopenharmony_ci <<encode-overrides,override>> video session parameters and other 1439e5c31af7Sopenharmony_ci codec-specific encoding parameters to optimize video encode operations 1440e5c31af7Sopenharmony_ci based on the use case information specified in the 1441e5c31af7Sopenharmony_ci <<video-profiles,video profile>> and the used 1442e5c31af7Sopenharmony_ci <<encode-quality-level,video encode quality level>>. 1443e5c31af7Sopenharmony_ci+ 1444e5c31af7Sopenharmony_ci[NOTE] 1445e5c31af7Sopenharmony_ci.Note 1446e5c31af7Sopenharmony_ci==== 1447e5c31af7Sopenharmony_ciNot specifying 1448e5c31af7Sopenharmony_ciename:VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR 1449e5c31af7Sopenharmony_cidoes not guarantee that the implementation will not do any codec-specific 1450e5c31af7Sopenharmony_ciparameter overrides, as certain overrides are necessary for the correct 1451e5c31af7Sopenharmony_cioperation of the video encoder implementation due to limitations to the 1452e5c31af7Sopenharmony_ciavailable encoding tools on that implementation. 1453e5c31af7Sopenharmony_ciThis flag, however, enables the implementation to apply further optimizing 1454e5c31af7Sopenharmony_cioverrides. 1455e5c31af7Sopenharmony_ci==== 1456e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1457e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[] 1458e5c31af7Sopenharmony_ci * ename:VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR specifies that 1459e5c31af7Sopenharmony_ci queries within video coding scopes using the created video session are 1460e5c31af7Sopenharmony_ci <<video-inline-queries,executed inline>> with video coding operations. 1461e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[] 1462e5c31af7Sopenharmony_ci-- 1463e5c31af7Sopenharmony_ci 1464e5c31af7Sopenharmony_ci[open,refpage='VkVideoSessionCreateFlagsKHR',desc='Bitmask of VkVideoSessionCreateFlagBitsKHR',type='flags'] 1465e5c31af7Sopenharmony_ci-- 1466e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoSessionCreateFlagsKHR.adoc[] 1467e5c31af7Sopenharmony_ci 1468e5c31af7Sopenharmony_citname:VkVideoSessionCreateFlagsKHR is a bitmask type for setting a mask of 1469e5c31af7Sopenharmony_cizero or more elink:VkVideoSessionCreateFlagBitsKHR. 1470e5c31af7Sopenharmony_ci-- 1471e5c31af7Sopenharmony_ci 1472e5c31af7Sopenharmony_ci 1473e5c31af7Sopenharmony_ci[[video-session-destruction]] 1474e5c31af7Sopenharmony_ci=== Destroying a Video Session 1475e5c31af7Sopenharmony_ci 1476e5c31af7Sopenharmony_ci[open,refpage='vkDestroyVideoSessionKHR',desc='Destroy video session object',type='protos'] 1477e5c31af7Sopenharmony_ci-- 1478e5c31af7Sopenharmony_ciTo destroy a video session, call: 1479e5c31af7Sopenharmony_ci 1480e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyVideoSessionKHR.adoc[] 1481e5c31af7Sopenharmony_ci 1482e5c31af7Sopenharmony_ci * pname:device is the logical device that destroys the video session. 1483e5c31af7Sopenharmony_ci * pname:videoSession is the video session to destroy. 1484e5c31af7Sopenharmony_ci * pname:pAllocator controls host memory allocation as described in the 1485e5c31af7Sopenharmony_ci <<memory-allocation, Memory Allocation>> chapter. 1486e5c31af7Sopenharmony_ci 1487e5c31af7Sopenharmony_ci.Valid Usage 1488e5c31af7Sopenharmony_ci**** 1489e5c31af7Sopenharmony_ci * [[VUID-vkDestroyVideoSessionKHR-videoSession-07192]] 1490e5c31af7Sopenharmony_ci All submitted commands that refer to pname:videoSession must: have 1491e5c31af7Sopenharmony_ci completed execution 1492e5c31af7Sopenharmony_ci * [[VUID-vkDestroyVideoSessionKHR-videoSession-07193]] 1493e5c31af7Sopenharmony_ci If sname:VkAllocationCallbacks were provided when pname:videoSession was 1494e5c31af7Sopenharmony_ci created, a compatible set of callbacks must: be provided here 1495e5c31af7Sopenharmony_ci * [[VUID-vkDestroyVideoSessionKHR-videoSession-07194]] 1496e5c31af7Sopenharmony_ci If no sname:VkAllocationCallbacks were provided when pname:videoSession 1497e5c31af7Sopenharmony_ci was created, pname:pAllocator must: be `NULL` 1498e5c31af7Sopenharmony_ci**** 1499e5c31af7Sopenharmony_ci 1500e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyVideoSessionKHR.adoc[] 1501e5c31af7Sopenharmony_ci-- 1502e5c31af7Sopenharmony_ci 1503e5c31af7Sopenharmony_ci 1504e5c31af7Sopenharmony_ci[[video-session-memory-association]] 1505e5c31af7Sopenharmony_ci=== Video Session Memory Association 1506e5c31af7Sopenharmony_ci 1507e5c31af7Sopenharmony_ciAfter creating a video session object, and before the object can: be used to 1508e5c31af7Sopenharmony_cirecord video coding operations into command buffers using it, the 1509e5c31af7Sopenharmony_ciapplication must: allocate and bind device memory to the video session. 1510e5c31af7Sopenharmony_ciDevice memory is allocated separately (see <<memory-device>>) and then 1511e5c31af7Sopenharmony_ciassociated with the video session. 1512e5c31af7Sopenharmony_ci 1513e5c31af7Sopenharmony_ciVideo sessions may: have multiple memory bindings identified by unique 1514e5c31af7Sopenharmony_ciunsigned integer values. 1515e5c31af7Sopenharmony_ciAppropriate device memory must: be bound to each such memory binding before 1516e5c31af7Sopenharmony_ciusing the video session to record command buffer commands with it. 1517e5c31af7Sopenharmony_ci 1518e5c31af7Sopenharmony_ci[open,refpage='vkGetVideoSessionMemoryRequirementsKHR',desc='Get the memory requirements for a video session',type='protos'] 1519e5c31af7Sopenharmony_ci-- 1520e5c31af7Sopenharmony_ciTo determine the memory requirements for a video session object, call: 1521e5c31af7Sopenharmony_ci 1522e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetVideoSessionMemoryRequirementsKHR.adoc[] 1523e5c31af7Sopenharmony_ci 1524e5c31af7Sopenharmony_ci * pname:device is the logical device that owns the video session. 1525e5c31af7Sopenharmony_ci * pname:videoSession is the video session to query. 1526e5c31af7Sopenharmony_ci * pname:pMemoryRequirementsCount is a pointer to an integer related to the 1527e5c31af7Sopenharmony_ci number of memory binding requirements available or queried, as described 1528e5c31af7Sopenharmony_ci below. 1529e5c31af7Sopenharmony_ci * pname:pMemoryRequirements is `NULL` or a pointer to an array of 1530e5c31af7Sopenharmony_ci slink:VkVideoSessionMemoryRequirementsKHR structures in which the memory 1531e5c31af7Sopenharmony_ci binding requirements of the video session are returned. 1532e5c31af7Sopenharmony_ci 1533e5c31af7Sopenharmony_ciIf pname:pMemoryRequirements is `NULL`, then the number of memory bindings 1534e5c31af7Sopenharmony_cirequired for the video session is returned in 1535e5c31af7Sopenharmony_cipname:pMemoryRequirementsCount. 1536e5c31af7Sopenharmony_ciOtherwise, pname:pMemoryRequirementsCount must: point to a variable set by 1537e5c31af7Sopenharmony_cithe user with the number of elements in the pname:pMemoryRequirements array, 1538e5c31af7Sopenharmony_ciand on return the variable is overwritten with the number of memory binding 1539e5c31af7Sopenharmony_cirequirements actually written to pname:pMemoryRequirements. 1540e5c31af7Sopenharmony_ciIf pname:pMemoryRequirementsCount is less than the number of memory bindings 1541e5c31af7Sopenharmony_cirequired for the video session, then at most pname:pMemoryRequirementsCount 1542e5c31af7Sopenharmony_cielements will be written to pname:pMemoryRequirements, and 1543e5c31af7Sopenharmony_ciename:VK_INCOMPLETE will be returned, instead of ename:VK_SUCCESS, to 1544e5c31af7Sopenharmony_ciindicate that not all required memory binding requirements were returned. 1545e5c31af7Sopenharmony_ci 1546e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetVideoSessionMemoryRequirementsKHR.adoc[] 1547e5c31af7Sopenharmony_ci-- 1548e5c31af7Sopenharmony_ci 1549e5c31af7Sopenharmony_ci 1550e5c31af7Sopenharmony_ci[open,refpage='VkVideoSessionMemoryRequirementsKHR',desc='Structure describing video session memory requirements',type='structs'] 1551e5c31af7Sopenharmony_ci-- 1552e5c31af7Sopenharmony_ciThe sname:VkVideoSessionMemoryRequirementsKHR structure is defined as: 1553e5c31af7Sopenharmony_ci 1554e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoSessionMemoryRequirementsKHR.adoc[] 1555e5c31af7Sopenharmony_ci 1556e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 1557e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1558e5c31af7Sopenharmony_ci structure. 1559e5c31af7Sopenharmony_ci * pname:memoryBindIndex is the index of the memory binding. 1560e5c31af7Sopenharmony_ci * pname:memoryRequirements is a slink:VkMemoryRequirements structure in 1561e5c31af7Sopenharmony_ci which the requested memory binding requirements for the binding index 1562e5c31af7Sopenharmony_ci specified by pname:memoryBindIndex are returned. 1563e5c31af7Sopenharmony_ci 1564e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoSessionMemoryRequirementsKHR.adoc[] 1565e5c31af7Sopenharmony_ci-- 1566e5c31af7Sopenharmony_ci 1567e5c31af7Sopenharmony_ci 1568e5c31af7Sopenharmony_ci[open,refpage='vkBindVideoSessionMemoryKHR',desc='Bind Video Memory',type='protos'] 1569e5c31af7Sopenharmony_ci-- 1570e5c31af7Sopenharmony_ciTo attach memory to a video session object, call: 1571e5c31af7Sopenharmony_ci 1572e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkBindVideoSessionMemoryKHR.adoc[] 1573e5c31af7Sopenharmony_ci 1574e5c31af7Sopenharmony_ci * pname:device is the logical device that owns the video session. 1575e5c31af7Sopenharmony_ci * pname:videoSession is the video session to be bound with device memory. 1576e5c31af7Sopenharmony_ci * pname:bindSessionMemoryInfoCount is the number of elements in 1577e5c31af7Sopenharmony_ci pname:pBindSessionMemoryInfos. 1578e5c31af7Sopenharmony_ci * pname:pBindSessionMemoryInfos is a pointer to an array of 1579e5c31af7Sopenharmony_ci pname:bindSessionMemoryInfoCount slink:VkBindVideoSessionMemoryInfoKHR 1580e5c31af7Sopenharmony_ci structures specifying memory regions to be bound to specific memory 1581e5c31af7Sopenharmony_ci bindings of the video session. 1582e5c31af7Sopenharmony_ci 1583e5c31af7Sopenharmony_ciThe valid usage statements below refer to the slink:VkMemoryRequirements 1584e5c31af7Sopenharmony_cistructure corresponding to a specific element of 1585e5c31af7Sopenharmony_cipname:pBindSessionMemoryInfos, which is defined as follows: 1586e5c31af7Sopenharmony_ci 1587e5c31af7Sopenharmony_ci * If the pname:memoryBindIndex member of the element of 1588e5c31af7Sopenharmony_ci pname:pBindSessionMemoryInfos in question matches the 1589e5c31af7Sopenharmony_ci pname:memoryBindIndex member of one of the elements returned in 1590e5c31af7Sopenharmony_ci pname:pMemoryRequirements when 1591e5c31af7Sopenharmony_ci flink:vkGetVideoSessionMemoryRequirementsKHR is called with the same 1592e5c31af7Sopenharmony_ci pname:videoSession and with pname:pMemoryRequirementsCount equal to 1593e5c31af7Sopenharmony_ci pname:bindSessionMemoryInfoCount, then the pname:memoryRequirements 1594e5c31af7Sopenharmony_ci member of that element of pname:pMemoryRequirements is the 1595e5c31af7Sopenharmony_ci slink:VkMemoryRequirements structure corresponding to the element of 1596e5c31af7Sopenharmony_ci pname:pBindSessionMemoryInfos in question. 1597e5c31af7Sopenharmony_ci * Otherwise the element of pname:pBindSessionMemoryInfos in question is 1598e5c31af7Sopenharmony_ci said to not have a corresponding slink:VkMemoryRequirements structure. 1599e5c31af7Sopenharmony_ci 1600e5c31af7Sopenharmony_ci.Valid Usage 1601e5c31af7Sopenharmony_ci**** 1602e5c31af7Sopenharmony_ci * [[VUID-vkBindVideoSessionMemoryKHR-videoSession-07195]] 1603e5c31af7Sopenharmony_ci The memory binding of pname:videoSession identified by the 1604e5c31af7Sopenharmony_ci pname:memoryBindIndex member of any element of 1605e5c31af7Sopenharmony_ci pname:pBindSessionMemoryInfos must: not already be backed by a memory 1606e5c31af7Sopenharmony_ci object 1607e5c31af7Sopenharmony_ci * [[VUID-vkBindVideoSessionMemoryKHR-memoryBindIndex-07196]] 1608e5c31af7Sopenharmony_ci The pname:memoryBindIndex member of each element of 1609e5c31af7Sopenharmony_ci pname:pBindSessionMemoryInfos must: be unique within 1610e5c31af7Sopenharmony_ci pname:pBindSessionMemoryInfos 1611e5c31af7Sopenharmony_ci * [[VUID-vkBindVideoSessionMemoryKHR-pBindSessionMemoryInfos-07197]] 1612e5c31af7Sopenharmony_ci Each element of pname:pBindSessionMemoryInfos must: have a corresponding 1613e5c31af7Sopenharmony_ci slink:VkMemoryRequirements structure 1614e5c31af7Sopenharmony_ci * [[VUID-vkBindVideoSessionMemoryKHR-pBindSessionMemoryInfos-07198]] 1615e5c31af7Sopenharmony_ci If an element of pname:pBindSessionMemoryInfos has a corresponding 1616e5c31af7Sopenharmony_ci slink:VkMemoryRequirements structure, then the pname:memory member of 1617e5c31af7Sopenharmony_ci that element of pname:pBindSessionMemoryInfos must: have been allocated 1618e5c31af7Sopenharmony_ci using one of the memory types allowed in the pname:memoryTypeBits member 1619e5c31af7Sopenharmony_ci of the corresponding slink:VkMemoryRequirements structure 1620e5c31af7Sopenharmony_ci * [[VUID-vkBindVideoSessionMemoryKHR-pBindSessionMemoryInfos-07199]] 1621e5c31af7Sopenharmony_ci If an element of pname:pBindSessionMemoryInfos has a corresponding 1622e5c31af7Sopenharmony_ci slink:VkMemoryRequirements structure, then the pname:memoryOffset member 1623e5c31af7Sopenharmony_ci of that element of pname:pBindSessionMemoryInfos must: be an integer 1624e5c31af7Sopenharmony_ci multiple of the pname:alignment member of the corresponding 1625e5c31af7Sopenharmony_ci slink:VkMemoryRequirements structure 1626e5c31af7Sopenharmony_ci * [[VUID-vkBindVideoSessionMemoryKHR-pBindSessionMemoryInfos-07200]] 1627e5c31af7Sopenharmony_ci If an element of pname:pBindSessionMemoryInfos has a corresponding 1628e5c31af7Sopenharmony_ci slink:VkMemoryRequirements structure, then the pname:memorySize member 1629e5c31af7Sopenharmony_ci of that element of pname:pBindSessionMemoryInfos must: equal the 1630e5c31af7Sopenharmony_ci pname:size member of the corresponding slink:VkMemoryRequirements 1631e5c31af7Sopenharmony_ci structure 1632e5c31af7Sopenharmony_ci**** 1633e5c31af7Sopenharmony_ci 1634e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkBindVideoSessionMemoryKHR.adoc[] 1635e5c31af7Sopenharmony_ci-- 1636e5c31af7Sopenharmony_ci 1637e5c31af7Sopenharmony_ci[open,refpage='VkBindVideoSessionMemoryInfoKHR',desc='Structure specifying memory bindings for a video session object',type='structs'] 1638e5c31af7Sopenharmony_ci-- 1639e5c31af7Sopenharmony_ciThe sname:VkBindVideoSessionMemoryInfoKHR structure is defined as: 1640e5c31af7Sopenharmony_ci 1641e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindVideoSessionMemoryInfoKHR.adoc[] 1642e5c31af7Sopenharmony_ci 1643e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 1644e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1645e5c31af7Sopenharmony_ci structure. 1646e5c31af7Sopenharmony_ci * pname:memoryBindIndex is the memory binding index to bind memory to. 1647e5c31af7Sopenharmony_ci * pname:memory is the allocated device memory to be bound to the video 1648e5c31af7Sopenharmony_ci session's memory binding with index pname:memoryBindIndex. 1649e5c31af7Sopenharmony_ci * pname:memoryOffset is the start offset of the region of pname:memory 1650e5c31af7Sopenharmony_ci which is to be bound. 1651e5c31af7Sopenharmony_ci * pname:memorySize is the size in bytes of the region of pname:memory, 1652e5c31af7Sopenharmony_ci starting from pname:memoryOffset bytes, to be bound. 1653e5c31af7Sopenharmony_ci 1654e5c31af7Sopenharmony_ci.Valid Usage 1655e5c31af7Sopenharmony_ci**** 1656e5c31af7Sopenharmony_ci * [[VUID-VkBindVideoSessionMemoryInfoKHR-memoryOffset-07201]] 1657e5c31af7Sopenharmony_ci pname:memoryOffset must: be less than the size of pname:memory 1658e5c31af7Sopenharmony_ci * [[VUID-VkBindVideoSessionMemoryInfoKHR-memorySize-07202]] 1659e5c31af7Sopenharmony_ci pname:memorySize must: be less than or equal to the size of pname:memory 1660e5c31af7Sopenharmony_ci minus pname:memoryOffset 1661e5c31af7Sopenharmony_ci**** 1662e5c31af7Sopenharmony_ci 1663e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBindVideoSessionMemoryInfoKHR.adoc[] 1664e5c31af7Sopenharmony_ci-- 1665e5c31af7Sopenharmony_ci 1666e5c31af7Sopenharmony_ci 1667e5c31af7Sopenharmony_ci[[video-profile-compatibility]] 1668e5c31af7Sopenharmony_ci== Video Profile Compatibility 1669e5c31af7Sopenharmony_ci 1670e5c31af7Sopenharmony_ciResources and query pools used with a particular video session must: be 1671e5c31af7Sopenharmony_cicompatible with the <<video-profiles,video profile>> the video session was 1672e5c31af7Sopenharmony_cicreated with. 1673e5c31af7Sopenharmony_ci 1674e5c31af7Sopenharmony_ciA slink:VkBuffer is compatible with a video profile if it was created with 1675e5c31af7Sopenharmony_cithe slink:VkBufferCreateInfo::pname:pNext chain including a 1676e5c31af7Sopenharmony_cislink:VkVideoProfileListInfoKHR structure with its pname:pProfiles member 1677e5c31af7Sopenharmony_cicontaining an element matching the slink:VkVideoProfileInfoKHR structure 1678e5c31af7Sopenharmony_cichain describing the video profile, and 1679e5c31af7Sopenharmony_cislink:VkBufferCreateInfo::pname:usage including at least one bit specific to 1680e5c31af7Sopenharmony_civideo coding usage. 1681e5c31af7Sopenharmony_ci 1682e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 1683e5c31af7Sopenharmony_ci * ename:VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR 1684e5c31af7Sopenharmony_ci * ename:VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR 1685e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 1686e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1687e5c31af7Sopenharmony_ci * ename:VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR 1688e5c31af7Sopenharmony_ci * ename:VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR 1689e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1690e5c31af7Sopenharmony_ci 1691e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[] 1692e5c31af7Sopenharmony_ciA slink:VkBuffer is also compatible with a video profile if it was created 1693e5c31af7Sopenharmony_ciwith slink:VkBufferCreateInfo::pname:flags including 1694e5c31af7Sopenharmony_ciename:VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR. 1695e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[] 1696e5c31af7Sopenharmony_ci 1697e5c31af7Sopenharmony_ciA slink:VkImage is compatible with a video profile if it was created with 1698e5c31af7Sopenharmony_cithe slink:VkImageCreateInfo::pname:pNext chain including a 1699e5c31af7Sopenharmony_cislink:VkVideoProfileListInfoKHR structure with its pname:pProfiles member 1700e5c31af7Sopenharmony_cicontaining an element matching the slink:VkVideoProfileInfoKHR structure 1701e5c31af7Sopenharmony_cichain describing the video profile, and slink:VkImageCreateInfo::pname:usage 1702e5c31af7Sopenharmony_ciincluding at least one bit specific to video coding usage. 1703e5c31af7Sopenharmony_ci 1704e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 1705e5c31af7Sopenharmony_ci * ename:VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR 1706e5c31af7Sopenharmony_ci * ename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR 1707e5c31af7Sopenharmony_ci * ename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR 1708e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 1709e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1710e5c31af7Sopenharmony_ci * ename:VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR 1711e5c31af7Sopenharmony_ci * ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR 1712e5c31af7Sopenharmony_ci * ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR 1713e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1714e5c31af7Sopenharmony_ci 1715e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[] 1716e5c31af7Sopenharmony_ciA slink:VkImage is also compatible with a video profile if all of the 1717e5c31af7Sopenharmony_cifollowing conditions are true for the slink:VkImageCreateInfo structure the 1718e5c31af7Sopenharmony_ciimage was created with: 1719e5c31af7Sopenharmony_ci 1720e5c31af7Sopenharmony_ci * slink:VkImageCreateInfo::pname:flags included 1721e5c31af7Sopenharmony_ci ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR. 1722e5c31af7Sopenharmony_ci * The list of slink:VkVideoFormatPropertiesKHR structures, obtained by 1723e5c31af7Sopenharmony_ci calling flink:vkGetPhysicalDeviceVideoFormatPropertiesKHR with 1724e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceVideoFormatInfoKHR::pname:imageUsage equal to the 1725e5c31af7Sopenharmony_ci slink:VkImageCreateInfo::pname:usage the image was created with and the 1726e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceVideoFormatInfoKHR::pname:pNext chain including a 1727e5c31af7Sopenharmony_ci slink:VkVideoProfileListInfoKHR structure with its pname:pProfiles 1728e5c31af7Sopenharmony_ci member containing a single array element specifying the 1729e5c31af7Sopenharmony_ci slink:VkVideoProfileInfoKHR structure chain describing the video profile 1730e5c31af7Sopenharmony_ci in question, contains an element for which all of the following 1731e5c31af7Sopenharmony_ci conditions are true with respect to the slink:VkImageCreateInfo 1732e5c31af7Sopenharmony_ci structure the image was created with: 1733e5c31af7Sopenharmony_ci ** slink:VkImageCreateInfo::pname:format equals 1734e5c31af7Sopenharmony_ci slink:VkVideoFormatPropertiesKHR::pname:format. 1735e5c31af7Sopenharmony_ci ** slink:VkImageCreateInfo::pname:flags only contains bits also set in 1736e5c31af7Sopenharmony_ci slink:VkVideoFormatPropertiesKHR::pname:imageCreateFlags. 1737e5c31af7Sopenharmony_ci ** slink:VkImageCreateInfo::pname:imageType equals 1738e5c31af7Sopenharmony_ci slink:VkVideoFormatPropertiesKHR::pname:imageType. 1739e5c31af7Sopenharmony_ci ** slink:VkImageCreateInfo::pname:tiling equals 1740e5c31af7Sopenharmony_ci slink:VkVideoFormatPropertiesKHR::pname:imageTiling. 1741e5c31af7Sopenharmony_ci ** slink:VkImageCreateInfo::pname:usage only contains bits also set in 1742e5c31af7Sopenharmony_ci slink:VkVideoFormatPropertiesKHR::pname:imageUsageFlags. 1743e5c31af7Sopenharmony_ci 1744e5c31af7Sopenharmony_ci[NOTE] 1745e5c31af7Sopenharmony_ci.Note 1746e5c31af7Sopenharmony_ci==== 1747e5c31af7Sopenharmony_ciWhile some of these rules allow creating buffer or image resources that may: 1748e5c31af7Sopenharmony_cibe compatible with any video profile, applications should: still prefer to 1749e5c31af7Sopenharmony_ciinclude the specific video profiles the buffer or image resource is expected 1750e5c31af7Sopenharmony_cito be used with (through a slink:VkVideoProfileListInfoKHR structure 1751e5c31af7Sopenharmony_ciincluded in the pname:pNext chain of the corresponding create info 1752e5c31af7Sopenharmony_cistructure) whenever the information about the complete set of video profiles 1753e5c31af7Sopenharmony_ciis available at resource creation time, to enable the implementation to 1754e5c31af7Sopenharmony_cioptimize the created resource for the specific use case. 1755e5c31af7Sopenharmony_ciIn the absence of that information, the implementation may: have to make 1756e5c31af7Sopenharmony_ciconservative decisions about the memory requirements or representation of 1757e5c31af7Sopenharmony_cithe resource. 1758e5c31af7Sopenharmony_ci==== 1759e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[] 1760e5c31af7Sopenharmony_ci 1761e5c31af7Sopenharmony_ciA slink:VkImageView is compatible with a video profile if the slink:VkImage 1762e5c31af7Sopenharmony_ciit was created from is also compatible with that video profile. 1763e5c31af7Sopenharmony_ci 1764e5c31af7Sopenharmony_ciA slink:VkQueryPool is compatible with a video profile if it was created 1765e5c31af7Sopenharmony_ciwith the slink:VkQueryPoolCreateInfo::pname:pNext chain including a 1766e5c31af7Sopenharmony_cislink:VkVideoProfileInfoKHR structure chain describing the same video 1767e5c31af7Sopenharmony_ciprofile, and slink:VkQueryPoolCreateInfo::pname:queryType having one of the 1768e5c31af7Sopenharmony_cifollowing values: 1769e5c31af7Sopenharmony_ci 1770e5c31af7Sopenharmony_ci * ename:VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR 1771e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1772e5c31af7Sopenharmony_ci * ename:VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR 1773e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1774e5c31af7Sopenharmony_ci 1775e5c31af7Sopenharmony_ci 1776e5c31af7Sopenharmony_ci[[video-session-parameters]] 1777e5c31af7Sopenharmony_ci== Video Session Parameters 1778e5c31af7Sopenharmony_ci 1779e5c31af7Sopenharmony_ciVideo session parameters objects can: store preprocessed codec-specific 1780e5c31af7Sopenharmony_ciparameters used with a compatible video session, and enable reducing the 1781e5c31af7Sopenharmony_cinumber of parameters needed to be provided and processed by the 1782e5c31af7Sopenharmony_ciimplementation while recording video coding operations into command buffers. 1783e5c31af7Sopenharmony_ci 1784e5c31af7Sopenharmony_ciParameters stored in such objects are _immutable_ to facilitate the 1785e5c31af7Sopenharmony_ciconcurrent use of the stored parameters in multiple threads. 1786e5c31af7Sopenharmony_ciAt the same time, new parameters can: be added to existing objects using the 1787e5c31af7Sopenharmony_ciflink:vkUpdateVideoSessionParametersKHR command. 1788e5c31af7Sopenharmony_ci 1789e5c31af7Sopenharmony_ciIn order to support concurrent use of the stored immutable parameters while 1790e5c31af7Sopenharmony_cialso allowing the video session parameters object to be extended with new 1791e5c31af7Sopenharmony_ciparameters, each video session parameters object maintains an _update 1792e5c31af7Sopenharmony_cisequence counter_ that is set to `0` at object creation time and must: be 1793e5c31af7Sopenharmony_ciincremented by each subsequent update operation. 1794e5c31af7Sopenharmony_ci 1795e5c31af7Sopenharmony_ciCertain video sequences that adhere to particular video compression 1796e5c31af7Sopenharmony_cistandards permit updating previously supplied parameters. 1797e5c31af7Sopenharmony_ciIf a parameter update is necessary, the application has the following 1798e5c31af7Sopenharmony_cioptions: 1799e5c31af7Sopenharmony_ci 1800e5c31af7Sopenharmony_ci * Cache the set of parameters on the application side and create a new 1801e5c31af7Sopenharmony_ci video session parameters object adding all the parameters with 1802e5c31af7Sopenharmony_ci appropriate changes, as necessary; or 1803e5c31af7Sopenharmony_ci * Create a new video session parameters object providing only the updated 1804e5c31af7Sopenharmony_ci parameters and the previously used object as the template, which ensures 1805e5c31af7Sopenharmony_ci that parameters not specified at creation time will be copied unmodified 1806e5c31af7Sopenharmony_ci from the template object. 1807e5c31af7Sopenharmony_ci 1808e5c31af7Sopenharmony_ciThe actual types of parameters that can: be stored and the capacity for 1809e5c31af7Sopenharmony_ciindividual parameter types, and the methods of initializing, updating, and 1810e5c31af7Sopenharmony_cireferring to individual parameters are specific to the video codec operation 1811e5c31af7Sopenharmony_cithe video session parameters object was created with. 1812e5c31af7Sopenharmony_ci 1813e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 1814e5c31af7Sopenharmony_ci * For ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR these are defined 1815e5c31af7Sopenharmony_ci in the <<decode-h264-parameter-sets,H.264 Decode Parameter Sets>> 1816e5c31af7Sopenharmony_ci section. 1817e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 1818e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 1819e5c31af7Sopenharmony_ci * For ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR these are defined 1820e5c31af7Sopenharmony_ci in the <<decode-h265-parameter-sets,H.265 Decode Parameter Sets>> 1821e5c31af7Sopenharmony_ci section. 1822e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 1823e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 1824e5c31af7Sopenharmony_ci * For ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR these are defined 1825e5c31af7Sopenharmony_ci in the <<encode-h264-parameter-sets,H.264 Encode Parameter Sets>> 1826e5c31af7Sopenharmony_ci section. 1827e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 1828e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 1829e5c31af7Sopenharmony_ci * For ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR these are defined 1830e5c31af7Sopenharmony_ci in the <<encode-h265-parameter-sets,H.265 Encode Parameter Sets>> 1831e5c31af7Sopenharmony_ci section. 1832e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 1833e5c31af7Sopenharmony_ci 1834e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1835e5c31af7Sopenharmony_ciVideo session parameters objects created with an encode operation are 1836e5c31af7Sopenharmony_cifurther specialized based on the <<encode-quality-level,video encode quality 1837e5c31af7Sopenharmony_cilevel>> the video session parameters are used with, as implementations may: 1838e5c31af7Sopenharmony_ciapply different sets of <<encode-overrides,parameter overrides>> depending 1839e5c31af7Sopenharmony_cion the used quality level. 1840e5c31af7Sopenharmony_ciThis enables implementations to store the potentially optimized set of 1841e5c31af7Sopenharmony_ciparameters in these objects, further limiting the necessary processing 1842e5c31af7Sopenharmony_cirequired while recording video encode operations into command buffers. 1843e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1844e5c31af7Sopenharmony_ci 1845e5c31af7Sopenharmony_ci 1846e5c31af7Sopenharmony_ci[open,refpage='VkVideoSessionParametersKHR',desc='Opaque handle to a video session parameters object',type='handles'] 1847e5c31af7Sopenharmony_ci-- 1848e5c31af7Sopenharmony_ciVideo session parameters are represented by 1849e5c31af7Sopenharmony_cisname:VkVideoSessionParametersKHR handles: 1850e5c31af7Sopenharmony_ci 1851e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkVideoSessionParametersKHR.adoc[] 1852e5c31af7Sopenharmony_ci-- 1853e5c31af7Sopenharmony_ci 1854e5c31af7Sopenharmony_ci 1855e5c31af7Sopenharmony_ci[[creating-video-session-parameters]] 1856e5c31af7Sopenharmony_ci=== Creating Video Session Parameters 1857e5c31af7Sopenharmony_ci 1858e5c31af7Sopenharmony_ci[open,refpage='vkCreateVideoSessionParametersKHR',desc='Creates video session parameters object',type='protos'] 1859e5c31af7Sopenharmony_ci-- 1860e5c31af7Sopenharmony_ciTo create a video session parameters object, call: 1861e5c31af7Sopenharmony_ci 1862e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateVideoSessionParametersKHR.adoc[] 1863e5c31af7Sopenharmony_ci 1864e5c31af7Sopenharmony_ci * pname:device is the logical device that creates the video session 1865e5c31af7Sopenharmony_ci parameters object. 1866e5c31af7Sopenharmony_ci * pname:pCreateInfo is a pointer to 1867e5c31af7Sopenharmony_ci slink:VkVideoSessionParametersCreateInfoKHR structure containing 1868e5c31af7Sopenharmony_ci parameters to be used to create the video session parameters object. 1869e5c31af7Sopenharmony_ci * pname:pAllocator controls host memory allocation as described in the 1870e5c31af7Sopenharmony_ci <<memory-allocation, Memory Allocation>> chapter. 1871e5c31af7Sopenharmony_ci * pname:pVideoSessionParameters is a pointer to a 1872e5c31af7Sopenharmony_ci slink:VkVideoSessionParametersKHR handle in which the resulting video 1873e5c31af7Sopenharmony_ci session parameters object is returned. 1874e5c31af7Sopenharmony_ci 1875e5c31af7Sopenharmony_ciThe resulting video session parameters object is said to be created with the 1876e5c31af7Sopenharmony_civideo codec operation pname:pCreateInfo->videoSession was created with. 1877e5c31af7Sopenharmony_ci 1878e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1879e5c31af7Sopenharmony_ciVideo session parameters objects created with an encode operation are always 1880e5c31af7Sopenharmony_cicreated with respect to a <<encode-quality-level,video encode quality 1881e5c31af7Sopenharmony_cilevel>>. 1882e5c31af7Sopenharmony_ciBy default, the created video session parameters objects are created with 1883e5c31af7Sopenharmony_ciquality level zero, unless otherwise specified by including a 1884e5c31af7Sopenharmony_cislink:VkVideoEncodeQualityLevelInfoKHR structure in the 1885e5c31af7Sopenharmony_cipname:pCreateInfo->pNext chain, in which case the video session parameters 1886e5c31af7Sopenharmony_ciobject is created with the quality level specified in 1887e5c31af7Sopenharmony_cislink:VkVideoEncodeQualityLevelInfoKHR::pname:qualityLevel. 1888e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1889e5c31af7Sopenharmony_ci 1890e5c31af7Sopenharmony_ciIf pname:pCreateInfo->videoSessionParametersTemplate is not 1891e5c31af7Sopenharmony_cidname:VK_NULL_HANDLE, then it will be used as a template for constructing 1892e5c31af7Sopenharmony_cithe new video session parameters object. 1893e5c31af7Sopenharmony_ciThis happens by first adding any parameters according to the additional 1894e5c31af7Sopenharmony_cicreation parameters provided in the pname:pCreateInfo->pNext chain, followed 1895e5c31af7Sopenharmony_ciby adding any parameters from the template object that have a key that does 1896e5c31af7Sopenharmony_cinot match the key of any of the already added parameters. 1897e5c31af7Sopenharmony_ci 1898e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1899e5c31af7Sopenharmony_ciFor video session parameters objects created with an encode operation, the 1900e5c31af7Sopenharmony_citemplate object specified in 1901e5c31af7Sopenharmony_cipname:pCreateInfo->videoSessionParametersTemplate must: have been created 1902e5c31af7Sopenharmony_ciwith the same <<encode-quality-level,video encode quality level>> as the 1903e5c31af7Sopenharmony_cinewly created object. 1904e5c31af7Sopenharmony_ci 1905e5c31af7Sopenharmony_ci[NOTE] 1906e5c31af7Sopenharmony_ci.Note 1907e5c31af7Sopenharmony_ci==== 1908e5c31af7Sopenharmony_ciThis means that codec-specific parameters stored in video session parameters 1909e5c31af7Sopenharmony_ciobjects can: only be reused across different video encode quality levels by 1910e5c31af7Sopenharmony_cire-specifying them, as previously created video session parameters against 1911e5c31af7Sopenharmony_ciother quality levels cannot: be used as template because the original 1912e5c31af7Sopenharmony_cicodec-specific parameters (before the implementation may: have applied 1913e5c31af7Sopenharmony_ci<<encode-overrides,parameter overrides>>) may: no longer be available in 1914e5c31af7Sopenharmony_cithem for the purposes of constructing the derived object. 1915e5c31af7Sopenharmony_ci==== 1916e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1917e5c31af7Sopenharmony_ci 1918e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 1919e5c31af7Sopenharmony_ciIf pname:pCreateInfo->videoSession was created with the video codec 1920e5c31af7Sopenharmony_cioperation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the 1921e5c31af7Sopenharmony_cicreated video session parameters object will initially contain the following 1922e5c31af7Sopenharmony_cisets of parameter entries: 1923e5c31af7Sopenharmony_ci 1924e5c31af7Sopenharmony_ci * code:StdVideoH264SequenceParameterSet structures representing 1925e5c31af7Sopenharmony_ci <<decode-h264-sps,H.264 SPS>> entries, as follows: 1926e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 1927e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersCreateInfoKHR structure 1928e5c31af7Sopenharmony_ci provided in the pname:pCreateInfo->pNext chain is not `NULL`, then the 1929e5c31af7Sopenharmony_ci set of code:StdVideoH264SequenceParameterSet entries specified in 1930e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdSPSs are added first; 1931e5c31af7Sopenharmony_ci ** If pname:pCreateInfo->videoSessionParametersTemplate is not 1932e5c31af7Sopenharmony_ci dname:VK_NULL_HANDLE, then each code:StdVideoH264SequenceParameterSet 1933e5c31af7Sopenharmony_ci entry stored in it is copied to the created video session parameters 1934e5c31af7Sopenharmony_ci object if the created object does not already contain such an entry 1935e5c31af7Sopenharmony_ci with the same pname:seq_parameter_set_id. 1936e5c31af7Sopenharmony_ci * code:StdVideoH264PictureParameterSet structures representing 1937e5c31af7Sopenharmony_ci <<decode-h264-pps,H.264 PPS>> entries, as follows: 1938e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 1939e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersCreateInfoKHR structure 1940e5c31af7Sopenharmony_ci provided in the pname:pCreateInfo->pNext chain is not `NULL`, then the 1941e5c31af7Sopenharmony_ci set of code:StdVideoH264PictureParameterSet entries specified in 1942e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdPPSs are added first; 1943e5c31af7Sopenharmony_ci ** If pname:pCreateInfo->videoSessionParametersTemplate is not 1944e5c31af7Sopenharmony_ci dname:VK_NULL_HANDLE, then each code:StdVideoH264PictureParameterSet 1945e5c31af7Sopenharmony_ci entry stored in it is copied to the created video session parameters 1946e5c31af7Sopenharmony_ci object if the created object does not already contain such an entry 1947e5c31af7Sopenharmony_ci with the same pname:seq_parameter_set_id and 1948e5c31af7Sopenharmony_ci pname:pic_parameter_set_id. 1949e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 1950e5c31af7Sopenharmony_ci 1951e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 1952e5c31af7Sopenharmony_ciIf pname:pCreateInfo->videoSession was created with the video codec 1953e5c31af7Sopenharmony_cioperation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the 1954e5c31af7Sopenharmony_cicreated video session parameters object will initially contain the following 1955e5c31af7Sopenharmony_cisets of parameter entries: 1956e5c31af7Sopenharmony_ci 1957e5c31af7Sopenharmony_ci * code:StdVideoH265VideoParameterSet structures representing 1958e5c31af7Sopenharmony_ci <<decode-h265-vps,H.265 VPS>> entries, as follows: 1959e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 1960e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR structure 1961e5c31af7Sopenharmony_ci provided in the pname:pCreateInfo->pNext chain is not `NULL`, then the 1962e5c31af7Sopenharmony_ci set of code:StdVideoH265VideoParameterSet entries specified in 1963e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdVPSs are added first; 1964e5c31af7Sopenharmony_ci ** If pname:pCreateInfo->videoSessionParametersTemplate is not 1965e5c31af7Sopenharmony_ci dname:VK_NULL_HANDLE, then each code:StdVideoH265VideoParameterSet 1966e5c31af7Sopenharmony_ci entry stored in it is copied to the created video session parameters 1967e5c31af7Sopenharmony_ci object if the created object does not already contain such an entry 1968e5c31af7Sopenharmony_ci with the same pname:vps_video_parameter_set_id. 1969e5c31af7Sopenharmony_ci * code:StdVideoH265SequenceParameterSet structures representing 1970e5c31af7Sopenharmony_ci <<decode-h265-sps,H.265 SPS>> entries, as follows: 1971e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 1972e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR structure 1973e5c31af7Sopenharmony_ci provided in the pname:pCreateInfo->pNext chain is not `NULL`, then the 1974e5c31af7Sopenharmony_ci set of code:StdVideoH265SequenceParameterSet entries specified in 1975e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdSPSs are added first; 1976e5c31af7Sopenharmony_ci ** If pname:pCreateInfo->videoSessionParametersTemplate is not 1977e5c31af7Sopenharmony_ci dname:VK_NULL_HANDLE, then each code:StdVideoH265SequenceParameterSet 1978e5c31af7Sopenharmony_ci entry stored in it is copied to the created video session parameters 1979e5c31af7Sopenharmony_ci object if the created object does not already contain such an entry 1980e5c31af7Sopenharmony_ci with the same pname:sps_video_parameter_set_id and 1981e5c31af7Sopenharmony_ci pname:sps_seq_parameter_set_id. 1982e5c31af7Sopenharmony_ci * code:StdVideoH265PictureParameterSet structures representing 1983e5c31af7Sopenharmony_ci <<decode-h265-pps,H.265 PPS>> entries, as follows: 1984e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 1985e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR structure 1986e5c31af7Sopenharmony_ci provided in the pname:pCreateInfo->pNext chain is not `NULL`, then the 1987e5c31af7Sopenharmony_ci set of code:StdVideoH265PictureParameterSet entries specified in 1988e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdPPSs are added first; 1989e5c31af7Sopenharmony_ci ** If pname:pCreateInfo->videoSessionParametersTemplate is not 1990e5c31af7Sopenharmony_ci dname:VK_NULL_HANDLE, then each code:StdVideoH265PictureParameterSet 1991e5c31af7Sopenharmony_ci entry stored in it is copied to the created video session parameters 1992e5c31af7Sopenharmony_ci object if the created object does not already contain such an entry 1993e5c31af7Sopenharmony_ci with the same pname:sps_video_parameter_set_id, 1994e5c31af7Sopenharmony_ci pname:pps_seq_parameter_set_id, and pname:pps_pic_parameter_set_id. 1995e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 1996e5c31af7Sopenharmony_ci 1997e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 1998e5c31af7Sopenharmony_ciIf pname:pCreateInfo->videoSession was created with the video codec 1999e5c31af7Sopenharmony_cioperation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the 2000e5c31af7Sopenharmony_cicreated video session parameters object will initially contain the following 2001e5c31af7Sopenharmony_cisets of parameter entries: 2002e5c31af7Sopenharmony_ci 2003e5c31af7Sopenharmony_ci * code:StdVideoH264SequenceParameterSet structures representing 2004e5c31af7Sopenharmony_ci <<encode-h264-sps,H.264 SPS>> entries, as follows: 2005e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2006e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersCreateInfoKHR structure 2007e5c31af7Sopenharmony_ci provided in the pname:pCreateInfo->pNext chain is not `NULL`, then the 2008e5c31af7Sopenharmony_ci set of code:StdVideoH264SequenceParameterSet entries specified in 2009e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdSPSs are added first; 2010e5c31af7Sopenharmony_ci ** If pname:pCreateInfo->videoSessionParametersTemplate is not 2011e5c31af7Sopenharmony_ci dname:VK_NULL_HANDLE, then each code:StdVideoH264SequenceParameterSet 2012e5c31af7Sopenharmony_ci entry stored in it is copied to the created video session parameters 2013e5c31af7Sopenharmony_ci object if the created object does not already contain such an entry 2014e5c31af7Sopenharmony_ci with the same pname:seq_parameter_set_id. 2015e5c31af7Sopenharmony_ci * code:StdVideoH264PictureParameterSet structures representing 2016e5c31af7Sopenharmony_ci <<encode-h264-pps,H.264 PPS>> entries, as follows: 2017e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2018e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersCreateInfoKHR structure 2019e5c31af7Sopenharmony_ci provided in the pname:pCreateInfo->pNext chain is not `NULL`, then the 2020e5c31af7Sopenharmony_ci set of code:StdVideoH264PictureParameterSet entries specified in 2021e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdPPSs are added first; 2022e5c31af7Sopenharmony_ci ** If pname:pCreateInfo->videoSessionParametersTemplate is not 2023e5c31af7Sopenharmony_ci dname:VK_NULL_HANDLE, then each code:StdVideoH264PictureParameterSet 2024e5c31af7Sopenharmony_ci entry stored in it is copied to the created video session parameters 2025e5c31af7Sopenharmony_ci object if the created object does not already contain such an entry 2026e5c31af7Sopenharmony_ci with the same pname:seq_parameter_set_id and 2027e5c31af7Sopenharmony_ci pname:pic_parameter_set_id. 2028e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 2029e5c31af7Sopenharmony_ci 2030e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 2031e5c31af7Sopenharmony_ciIf pname:pCreateInfo->videoSession was created with the video codec 2032e5c31af7Sopenharmony_cioperation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the 2033e5c31af7Sopenharmony_cicreated video session parameters object will initially contain the following 2034e5c31af7Sopenharmony_cisets of parameter entries: 2035e5c31af7Sopenharmony_ci 2036e5c31af7Sopenharmony_ci * code:StdVideoH265VideoParameterSet structures representing 2037e5c31af7Sopenharmony_ci <<encode-h265-vps,H.265 VPS>> entries, as follows: 2038e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2039e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR structure 2040e5c31af7Sopenharmony_ci provided in the pname:pCreateInfo->pNext chain is not `NULL`, then the 2041e5c31af7Sopenharmony_ci set of code:StdVideoH265VideoParameterSet entries specified in 2042e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdVPSs are added first; 2043e5c31af7Sopenharmony_ci ** If pname:pCreateInfo->videoSessionParametersTemplate is not 2044e5c31af7Sopenharmony_ci dname:VK_NULL_HANDLE, then each code:StdVideoH265VideoParameterSet 2045e5c31af7Sopenharmony_ci entry stored in it is copied to the created video session parameters 2046e5c31af7Sopenharmony_ci object if the created object does not already contain such an entry 2047e5c31af7Sopenharmony_ci with the same pname:vps_video_parameter_set_id. 2048e5c31af7Sopenharmony_ci * code:StdVideoH265SequenceParameterSet structures representing 2049e5c31af7Sopenharmony_ci <<encode-h265-sps,H.265 SPS>> entries, as follows: 2050e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2051e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR structure 2052e5c31af7Sopenharmony_ci provided in the pname:pCreateInfo->pNext chain is not `NULL`, then the 2053e5c31af7Sopenharmony_ci set of code:StdVideoH265SequenceParameterSet entries specified in 2054e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdSPSs are added first; 2055e5c31af7Sopenharmony_ci ** If pname:pCreateInfo->videoSessionParametersTemplate is not 2056e5c31af7Sopenharmony_ci dname:VK_NULL_HANDLE, then each code:StdVideoH265SequenceParameterSet 2057e5c31af7Sopenharmony_ci entry stored in it is copied to the created video session parameters 2058e5c31af7Sopenharmony_ci object if the created object does not already contain such an entry 2059e5c31af7Sopenharmony_ci with the same pname:sps_video_parameter_set_id and 2060e5c31af7Sopenharmony_ci pname:sps_seq_parameter_set_id. 2061e5c31af7Sopenharmony_ci * code:StdVideoH265PictureParameterSet structures representing 2062e5c31af7Sopenharmony_ci <<encode-h265-pps,H.265 PPS>> entries, as follows: 2063e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2064e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR structure 2065e5c31af7Sopenharmony_ci provided in the pname:pCreateInfo->pNext chain is not `NULL`, then the 2066e5c31af7Sopenharmony_ci set of code:StdVideoH265PictureParameterSet entries specified in 2067e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdPPSs are added first; 2068e5c31af7Sopenharmony_ci ** If pname:pCreateInfo->videoSessionParametersTemplate is not 2069e5c31af7Sopenharmony_ci dname:VK_NULL_HANDLE, then each code:StdVideoH265PictureParameterSet 2070e5c31af7Sopenharmony_ci entry stored in it is copied to the created video session parameters 2071e5c31af7Sopenharmony_ci object if the created object does not already contain such an entry 2072e5c31af7Sopenharmony_ci with the same pname:sps_video_parameter_set_id, 2073e5c31af7Sopenharmony_ci pname:pps_seq_parameter_set_id, and pname:pps_pic_parameter_set_id. 2074e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 2075e5c31af7Sopenharmony_ci 2076e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 2077e5c31af7Sopenharmony_ciIn case of video session parameters objects created with a video encode 2078e5c31af7Sopenharmony_cioperation, implementations may: return the 2079e5c31af7Sopenharmony_ciename:VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error if any of the 2080e5c31af7Sopenharmony_cispecified Video Std parameters do not adhere to the syntactic or semantic 2081e5c31af7Sopenharmony_cirequirements of the used video compression standard, or if values derived 2082e5c31af7Sopenharmony_cifrom parameters according to the rules defined by the used video compression 2083e5c31af7Sopenharmony_cistandard do not adhere to the capabilities of the video compression standard 2084e5c31af7Sopenharmony_cior the implementation. 2085e5c31af7Sopenharmony_ci 2086e5c31af7Sopenharmony_ci[NOTE] 2087e5c31af7Sopenharmony_ci.Note 2088e5c31af7Sopenharmony_ci==== 2089e5c31af7Sopenharmony_ciApplications should: not rely on the 2090e5c31af7Sopenharmony_ciename:VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error being returned by any 2091e5c31af7Sopenharmony_cicommand as a means to verify Video Std parameters, as implementations are 2092e5c31af7Sopenharmony_cinot required to report the error in any specific set of cases. 2093e5c31af7Sopenharmony_ci==== 2094e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 2095e5c31af7Sopenharmony_ci 2096e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateVideoSessionParametersKHR.adoc[] 2097e5c31af7Sopenharmony_ci-- 2098e5c31af7Sopenharmony_ci 2099e5c31af7Sopenharmony_ci[open,refpage='VkVideoSessionParametersCreateInfoKHR',desc='Structure specifying parameters of a newly created video session parameters object',type='structs'] 2100e5c31af7Sopenharmony_ci-- 2101e5c31af7Sopenharmony_ciThe sname:VkVideoSessionParametersCreateInfoKHR structure is defined as: 2102e5c31af7Sopenharmony_ci 2103e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoSessionParametersCreateInfoKHR.adoc[] 2104e5c31af7Sopenharmony_ci 2105e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 2106e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 2107e5c31af7Sopenharmony_ci structure. 2108e5c31af7Sopenharmony_ci * pname:flags is reserved for future use. 2109e5c31af7Sopenharmony_ci * pname:videoSessionParametersTemplate is dname:VK_NULL_HANDLE or a valid 2110e5c31af7Sopenharmony_ci handle to a slink:VkVideoSessionParametersKHR object used as a template 2111e5c31af7Sopenharmony_ci for constructing the new video session parameters object. 2112e5c31af7Sopenharmony_ci * pname:videoSession is the video session object against which the video 2113e5c31af7Sopenharmony_ci session parameters object is going to be created. 2114e5c31af7Sopenharmony_ci 2115e5c31af7Sopenharmony_ciLimiting values are defined below that are referenced by the relevant valid 2116e5c31af7Sopenharmony_ciusage statements of this structure. 2117e5c31af7Sopenharmony_ci 2118e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 2119e5c31af7Sopenharmony_ci * If pname:videoSession was created with the codec operation 2120e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then let 2121e5c31af7Sopenharmony_ci `StdVideoH264SequenceParameterSet spsAddList[]` be the list of 2122e5c31af7Sopenharmony_ci <<decode-h264-sps,H.264 SPS>> entries to add to the created video 2123e5c31af7Sopenharmony_ci session parameters object, defined as follows: 2124e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2125e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersCreateInfoKHR structure 2126e5c31af7Sopenharmony_ci provided in the pname:pNext chain is not `NULL`, then the set of 2127e5c31af7Sopenharmony_ci code:StdVideoH264SequenceParameterSet entries specified in 2128e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdSPSs are added to pname:spsAddList; 2129e5c31af7Sopenharmony_ci ** If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE, 2130e5c31af7Sopenharmony_ci then each code:StdVideoH264SequenceParameterSet entry stored in it with 2131e5c31af7Sopenharmony_ci pname:seq_parameter_set_id not matching any of the entries already in 2132e5c31af7Sopenharmony_ci pname:spsAddList is added to pname:spsAddList. 2133e5c31af7Sopenharmony_ci * If pname:videoSession was created with the codec operation 2134e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then let 2135e5c31af7Sopenharmony_ci `StdVideoH264PictureParameterSet ppsAddList[]` be the list of 2136e5c31af7Sopenharmony_ci <<decode-h264-pps,H.264 PPS>> entries to add to the created video 2137e5c31af7Sopenharmony_ci session parameters object, defined as follows: 2138e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2139e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersCreateInfoKHR structure 2140e5c31af7Sopenharmony_ci provided in the pname:pNext chain is not `NULL`, then the set of 2141e5c31af7Sopenharmony_ci code:StdVideoH264PictureParameterSet entries specified in 2142e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdPPSs are added to pname:ppsAddList; 2143e5c31af7Sopenharmony_ci ** If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE, 2144e5c31af7Sopenharmony_ci then each code:StdVideoH264PictureParameterSet entry stored in it with 2145e5c31af7Sopenharmony_ci pname:seq_parameter_set_id or pname:pic_parameter_set_id not matching 2146e5c31af7Sopenharmony_ci any of the entries already in pname:ppsAddList is added to 2147e5c31af7Sopenharmony_ci pname:ppsAddList. 2148e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 2149e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 2150e5c31af7Sopenharmony_ci * If pname:videoSession was created with the codec operation 2151e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then let 2152e5c31af7Sopenharmony_ci `StdVideoH265VideoParameterSet vpsAddList[]` be the list of 2153e5c31af7Sopenharmony_ci <<decode-h265-vps,H.265 VPS>> entries to add to the created video 2154e5c31af7Sopenharmony_ci session parameters object, defined as follows: 2155e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2156e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR structure 2157e5c31af7Sopenharmony_ci provided in the pname:pNext chain is not `NULL`, then the set of 2158e5c31af7Sopenharmony_ci code:StdVideoH265VideoParameterSet entries specified in 2159e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdVPSs are added to pname:vpsAddList; 2160e5c31af7Sopenharmony_ci ** If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE, 2161e5c31af7Sopenharmony_ci then each code:StdVideoH265VideoParameterSet entry stored in it with 2162e5c31af7Sopenharmony_ci pname:vps_video_parameter_set_id not matching any of the entries 2163e5c31af7Sopenharmony_ci already in pname:vpsAddList is added to pname:vpsAddList. 2164e5c31af7Sopenharmony_ci * If pname:videoSession was created with the codec operation 2165e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then let 2166e5c31af7Sopenharmony_ci `StdVideoH265SequenceParameterSet spsAddList[]` be the list of 2167e5c31af7Sopenharmony_ci <<decode-h265-sps,H.265 SPS>> entries to add to the created video 2168e5c31af7Sopenharmony_ci session parameters object, defined as follows: 2169e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2170e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR structure 2171e5c31af7Sopenharmony_ci provided in the pname:pNext chain is not `NULL`, then the set of 2172e5c31af7Sopenharmony_ci code:StdVideoH265SequenceParameterSet entries specified in 2173e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdSPSs are added to pname:spsAddList; 2174e5c31af7Sopenharmony_ci ** If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE, 2175e5c31af7Sopenharmony_ci then each code:StdVideoH265SequenceParameterSet entry stored in it with 2176e5c31af7Sopenharmony_ci pname:sps_video_parameter_set_id or pname:sps_seq_parameter_set_id not 2177e5c31af7Sopenharmony_ci matching any of the entries already in pname:spsAddList is added to 2178e5c31af7Sopenharmony_ci pname:spsAddList. 2179e5c31af7Sopenharmony_ci * If pname:videoSession was created with the codec operation 2180e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then let 2181e5c31af7Sopenharmony_ci `StdVideoH265PictureParameterSet ppsAddList[]` be the list of 2182e5c31af7Sopenharmony_ci <<decode-h265-pps,H.265 PPS>> entries to add to the created video 2183e5c31af7Sopenharmony_ci session parameters object, defined as follows: 2184e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2185e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR structure 2186e5c31af7Sopenharmony_ci provided in the pname:pNext chain is not `NULL`, then the set of 2187e5c31af7Sopenharmony_ci code:StdVideoH265PictureParameterSet entries specified in 2188e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdPPSs are added to pname:ppsAddList; 2189e5c31af7Sopenharmony_ci ** If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE, 2190e5c31af7Sopenharmony_ci then each code:StdVideoH265PictureParameterSet entry stored in it with 2191e5c31af7Sopenharmony_ci pname:sps_video_parameter_set_id, pname:pps_seq_parameter_set_id, or 2192e5c31af7Sopenharmony_ci pname:pps_pic_parameter_set_id not matching any of the entries already 2193e5c31af7Sopenharmony_ci in pname:ppsAddList is added to pname:ppsAddList. 2194e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 2195e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 2196e5c31af7Sopenharmony_ci * If pname:videoSession was created with an encode operation, then let 2197e5c31af7Sopenharmony_ci `uint32_t qualityLevel` be the <<encode-quality-level,video encode 2198e5c31af7Sopenharmony_ci quality level>> of the created video session parameters object, defined 2199e5c31af7Sopenharmony_ci as follows: 2200e5c31af7Sopenharmony_ci ** If the pname:pNext chain of this structure includes a 2201e5c31af7Sopenharmony_ci slink:VkVideoEncodeQualityLevelInfoKHR structure, then 2202e5c31af7Sopenharmony_ci pname:qualityLevel is equal to 2203e5c31af7Sopenharmony_ci slink:VkVideoEncodeQualityLevelInfoKHR::pname:qualityLevel. 2204e5c31af7Sopenharmony_ci ** Otherwise pname:qualityLevel is `0` 2205e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 2206e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 2207e5c31af7Sopenharmony_ci * If pname:videoSession was created with the codec operation 2208e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then let 2209e5c31af7Sopenharmony_ci `StdVideoH264SequenceParameterSet spsAddList[]` be the list of 2210e5c31af7Sopenharmony_ci <<encode-h264-sps,H.264 SPS>> entries to add to the created video 2211e5c31af7Sopenharmony_ci session parameters object, defined as follows: 2212e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2213e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersCreateInfoKHR structure 2214e5c31af7Sopenharmony_ci provided in the pname:pNext chain is not `NULL`, then the set of 2215e5c31af7Sopenharmony_ci code:StdVideoH264SequenceParameterSet entries specified in 2216e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdSPSs are added to pname:spsAddList; 2217e5c31af7Sopenharmony_ci ** If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE, 2218e5c31af7Sopenharmony_ci then each code:StdVideoH264SequenceParameterSet entry stored in it with 2219e5c31af7Sopenharmony_ci pname:seq_parameter_set_id not matching any of the entries already in 2220e5c31af7Sopenharmony_ci pname:spsAddList is added to pname:spsAddList. 2221e5c31af7Sopenharmony_ci * If pname:videoSession was created with the codec operation 2222e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then let 2223e5c31af7Sopenharmony_ci `StdVideoH264PictureParameterSet ppsAddList[]` be the list of 2224e5c31af7Sopenharmony_ci <<encode-h264-pps,H.264 PPS>> entries to add to the created video 2225e5c31af7Sopenharmony_ci session parameters object, defined as follows: 2226e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2227e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersCreateInfoKHR structure 2228e5c31af7Sopenharmony_ci provided in the pname:pNext chain is not `NULL`, then the set of 2229e5c31af7Sopenharmony_ci code:StdVideoH264PictureParameterSet entries specified in 2230e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdPPSs are added to pname:ppsAddList; 2231e5c31af7Sopenharmony_ci ** If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE, 2232e5c31af7Sopenharmony_ci then each code:StdVideoH264PictureParameterSet entry stored in it with 2233e5c31af7Sopenharmony_ci pname:seq_parameter_set_id or pname:pic_parameter_set_id not matching 2234e5c31af7Sopenharmony_ci any of the entries already in pname:ppsAddList is added to 2235e5c31af7Sopenharmony_ci pname:ppsAddList. 2236e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 2237e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 2238e5c31af7Sopenharmony_ci * If pname:videoSession was created with the codec operation 2239e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then let 2240e5c31af7Sopenharmony_ci `StdVideoH265VideoParameterSet vpsAddList[]` be the list of 2241e5c31af7Sopenharmony_ci <<encode-h265-vps,H.265 VPS>> entries to add to the created video 2242e5c31af7Sopenharmony_ci session parameters object, defined as follows: 2243e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2244e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR structure 2245e5c31af7Sopenharmony_ci provided in the pname:pNext chain is not `NULL`, then the set of 2246e5c31af7Sopenharmony_ci code:StdVideoH265VideoParameterSet entries specified in 2247e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdVPSs are added to pname:vpsAddList; 2248e5c31af7Sopenharmony_ci ** If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE, 2249e5c31af7Sopenharmony_ci then each code:StdVideoH265VideoParameterSet entry stored in it with 2250e5c31af7Sopenharmony_ci pname:vps_video_parameter_set_id not matching any of the entries 2251e5c31af7Sopenharmony_ci already in pname:vpsAddList is added to pname:vpsAddList. 2252e5c31af7Sopenharmony_ci * If pname:videoSession was created with the codec operation 2253e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then let 2254e5c31af7Sopenharmony_ci `StdVideoH265SequenceParameterSet spsAddList[]` be the list of 2255e5c31af7Sopenharmony_ci <<encode-h265-sps,H.265 SPS>> entries to add to the created video 2256e5c31af7Sopenharmony_ci session parameters object, defined as follows: 2257e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2258e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR structure 2259e5c31af7Sopenharmony_ci provided in the pname:pNext chain is not `NULL`, then the set of 2260e5c31af7Sopenharmony_ci code:StdVideoH265SequenceParameterSet entries specified in 2261e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdSPSs are added to pname:spsAddList; 2262e5c31af7Sopenharmony_ci ** If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE, 2263e5c31af7Sopenharmony_ci then each code:StdVideoH265SequenceParameterSet entry stored in it with 2264e5c31af7Sopenharmony_ci pname:sps_video_parameter_set_id or pname:sps_seq_parameter_set_id not 2265e5c31af7Sopenharmony_ci matching any of the entries already in pname:spsAddList is added to 2266e5c31af7Sopenharmony_ci pname:spsAddList. 2267e5c31af7Sopenharmony_ci * If pname:videoSession was created with the codec operation 2268e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then let 2269e5c31af7Sopenharmony_ci `StdVideoH265PictureParameterSet ppsAddList[]` be the list of 2270e5c31af7Sopenharmony_ci <<encode-h265-pps,H.265 PPS>> entries to add to the created video 2271e5c31af7Sopenharmony_ci session parameters object, defined as follows: 2272e5c31af7Sopenharmony_ci ** If the pname:pParametersAddInfo member of the 2273e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR structure 2274e5c31af7Sopenharmony_ci provided in the pname:pNext chain is not `NULL`, then the set of 2275e5c31af7Sopenharmony_ci code:StdVideoH265PictureParameterSet entries specified in 2276e5c31af7Sopenharmony_ci pname:pParametersAddInfo->pStdPPSs are added to pname:ppsAddList; 2277e5c31af7Sopenharmony_ci ** If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE, 2278e5c31af7Sopenharmony_ci then each code:StdVideoH265PictureParameterSet entry stored in it with 2279e5c31af7Sopenharmony_ci pname:sps_video_parameter_set_id, pname:pps_seq_parameter_set_id, or 2280e5c31af7Sopenharmony_ci pname:pps_pic_parameter_set_id not matching any of the entries already 2281e5c31af7Sopenharmony_ci in pname:ppsAddList is added to pname:ppsAddList. 2282e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 2283e5c31af7Sopenharmony_ci 2284e5c31af7Sopenharmony_ci.Valid Usage 2285e5c31af7Sopenharmony_ci**** 2286e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSessionParametersTemplate-04855]] 2287e5c31af7Sopenharmony_ci If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE, it 2288e5c31af7Sopenharmony_ci must: have been created against pname:videoSession 2289e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 2290e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSessionParametersTemplate-08310]] 2291e5c31af7Sopenharmony_ci If pname:videoSessionParametersTemplate is not dname:VK_NULL_HANDLE and 2292e5c31af7Sopenharmony_ci pname:videoSession was created with an encode operation, then 2293e5c31af7Sopenharmony_ci pname:qualityLevel must: equal the <<encode-quality-level,video encode 2294e5c31af7Sopenharmony_ci quality>> level pname:videoSessionParametersTemplate was created with 2295e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 2296e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 2297e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07203]] 2298e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2299e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the pname:pNext 2300e5c31af7Sopenharmony_ci chain must: include a 2301e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersCreateInfoKHR structure 2302e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07204]] 2303e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2304e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the number of 2305e5c31af7Sopenharmony_ci elements of pname:spsAddList must: be less than or equal to the 2306e5c31af7Sopenharmony_ci pname:maxStdSPSCount specified in the 2307e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersCreateInfoKHR structure included 2308e5c31af7Sopenharmony_ci in the pname:pNext chain 2309e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07205]] 2310e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2311e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the number of 2312e5c31af7Sopenharmony_ci elements of pname:ppsAddList must: be less than or equal to the 2313e5c31af7Sopenharmony_ci pname:maxStdPPSCount specified in the 2314e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersCreateInfoKHR structure included 2315e5c31af7Sopenharmony_ci in the pname:pNext chain 2316e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 2317e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 2318e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07206]] 2319e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2320e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the pname:pNext 2321e5c31af7Sopenharmony_ci chain must: include a 2322e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR structure 2323e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07207]] 2324e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2325e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the number of 2326e5c31af7Sopenharmony_ci elements of pname:vpsAddList must: be less than or equal to the 2327e5c31af7Sopenharmony_ci pname:maxStdVPSCount specified in the 2328e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR structure included 2329e5c31af7Sopenharmony_ci in the pname:pNext chain 2330e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07208]] 2331e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2332e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the number of 2333e5c31af7Sopenharmony_ci elements of pname:spsAddList must: be less than or equal to the 2334e5c31af7Sopenharmony_ci pname:maxStdSPSCount specified in the 2335e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR structure included 2336e5c31af7Sopenharmony_ci in the pname:pNext chain 2337e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07209]] 2338e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2339e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the number of 2340e5c31af7Sopenharmony_ci elements of pname:ppsAddList must: be less than or equal to the 2341e5c31af7Sopenharmony_ci pname:maxStdPPSCount specified in the 2342e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR structure included 2343e5c31af7Sopenharmony_ci in the pname:pNext chain 2344e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 2345e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 2346e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07210]] 2347e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2348e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the pname:pNext 2349e5c31af7Sopenharmony_ci chain must: include a 2350e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersCreateInfoKHR structure 2351e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-04839]] 2352e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2353e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the number of 2354e5c31af7Sopenharmony_ci elements of pname:spsAddList must: be less than or equal to the 2355e5c31af7Sopenharmony_ci pname:maxStdSPSCount specified in the 2356e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersCreateInfoKHR structure included 2357e5c31af7Sopenharmony_ci in the pname:pNext chain 2358e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-04840]] 2359e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2360e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the number of 2361e5c31af7Sopenharmony_ci elements of pname:ppsAddList must: be less than or equal to the 2362e5c31af7Sopenharmony_ci pname:maxStdPPSCount specified in the 2363e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersCreateInfoKHR structure included 2364e5c31af7Sopenharmony_ci in the pname:pNext chain 2365e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 2366e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 2367e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-07211]] 2368e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2369e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the pname:pNext 2370e5c31af7Sopenharmony_ci chain must: include a 2371e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR structure 2372e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-04841]] 2373e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2374e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the number of 2375e5c31af7Sopenharmony_ci elements of pname:vpsAddList must: be less than or equal to the 2376e5c31af7Sopenharmony_ci pname:maxStdVPSCount specified in the 2377e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR structure included 2378e5c31af7Sopenharmony_ci in the pname:pNext chain 2379e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-04842]] 2380e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2381e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the number of 2382e5c31af7Sopenharmony_ci elements of pname:spsAddList must: be less than or equal to the 2383e5c31af7Sopenharmony_ci pname:maxStdSPSCount specified in the 2384e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR structure included 2385e5c31af7Sopenharmony_ci in the pname:pNext chain 2386e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-04843]] 2387e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2388e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the number of 2389e5c31af7Sopenharmony_ci elements of pname:ppsAddList must: be less than or equal to the 2390e5c31af7Sopenharmony_ci pname:maxStdPPSCount specified in the 2391e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR structure included 2392e5c31af7Sopenharmony_ci in the pname:pNext chain 2393e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-08319]] 2394e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2395e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then 2396e5c31af7Sopenharmony_ci code:num_tile_columns_minus1 must: be less than 2397e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265CapabilitiesKHR::pname:maxTiles.width, as 2398e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video 2399e5c31af7Sopenharmony_ci profile pname:videoSession was created with, for each element of 2400e5c31af7Sopenharmony_ci pname:ppsAddList 2401e5c31af7Sopenharmony_ci * [[VUID-VkVideoSessionParametersCreateInfoKHR-videoSession-08320]] 2402e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 2403e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then 2404e5c31af7Sopenharmony_ci code:num_tile_rows_minus1 must: be less than 2405e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265CapabilitiesKHR::pname:maxTiles.height, as 2406e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video 2407e5c31af7Sopenharmony_ci profile pname:videoSession was created with, for each element of 2408e5c31af7Sopenharmony_ci pname:ppsAddList 2409e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 2410e5c31af7Sopenharmony_ci**** 2411e5c31af7Sopenharmony_ci 2412e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoSessionParametersCreateInfoKHR.adoc[] 2413e5c31af7Sopenharmony_ci-- 2414e5c31af7Sopenharmony_ci 2415e5c31af7Sopenharmony_ci[open,refpage='VkVideoSessionParametersCreateFlagsKHR',desc='Reserved for future use',type='flags'] 2416e5c31af7Sopenharmony_ci-- 2417e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoSessionParametersCreateFlagsKHR.adoc[] 2418e5c31af7Sopenharmony_ci 2419e5c31af7Sopenharmony_citname:VkVideoSessionParametersCreateFlagsKHR is a bitmask type for setting a 2420e5c31af7Sopenharmony_cimask, but is currently reserved for future use. 2421e5c31af7Sopenharmony_ci-- 2422e5c31af7Sopenharmony_ci 2423e5c31af7Sopenharmony_ci 2424e5c31af7Sopenharmony_ci[[destroying-video-session-parameters]] 2425e5c31af7Sopenharmony_ci=== Destroying Video Session Parameters 2426e5c31af7Sopenharmony_ci 2427e5c31af7Sopenharmony_ci[open,refpage='vkDestroyVideoSessionParametersKHR',desc='Destroy video session parameters object',type='protos'] 2428e5c31af7Sopenharmony_ci-- 2429e5c31af7Sopenharmony_ciTo destroy a video session parameters object, call: 2430e5c31af7Sopenharmony_ci 2431e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyVideoSessionParametersKHR.adoc[] 2432e5c31af7Sopenharmony_ci 2433e5c31af7Sopenharmony_ci * pname:device is the logical device that destroys the video session 2434e5c31af7Sopenharmony_ci parameters object. 2435e5c31af7Sopenharmony_ci * pname:videoSessionParameters is the video session parameters object to 2436e5c31af7Sopenharmony_ci destroy. 2437e5c31af7Sopenharmony_ci * pname:pAllocator controls host memory allocation as described in the 2438e5c31af7Sopenharmony_ci <<memory-allocation, Memory Allocation>> chapter. 2439e5c31af7Sopenharmony_ci 2440e5c31af7Sopenharmony_ci.Valid Usage 2441e5c31af7Sopenharmony_ci**** 2442e5c31af7Sopenharmony_ci * [[VUID-vkDestroyVideoSessionParametersKHR-videoSessionParameters-07212]] 2443e5c31af7Sopenharmony_ci All submitted commands that refer to pname:videoSessionParameters must: 2444e5c31af7Sopenharmony_ci have completed execution 2445e5c31af7Sopenharmony_ci * [[VUID-vkDestroyVideoSessionParametersKHR-videoSessionParameters-07213]] 2446e5c31af7Sopenharmony_ci If sname:VkAllocationCallbacks were provided when 2447e5c31af7Sopenharmony_ci pname:videoSessionParameters was created, a compatible set of callbacks 2448e5c31af7Sopenharmony_ci must: be provided here 2449e5c31af7Sopenharmony_ci * [[VUID-vkDestroyVideoSessionParametersKHR-videoSessionParameters-07214]] 2450e5c31af7Sopenharmony_ci If no sname:VkAllocationCallbacks were provided when 2451e5c31af7Sopenharmony_ci pname:videoSessionParameters was created, pname:pAllocator must: be 2452e5c31af7Sopenharmony_ci `NULL` 2453e5c31af7Sopenharmony_ci**** 2454e5c31af7Sopenharmony_ci 2455e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyVideoSessionParametersKHR.adoc[] 2456e5c31af7Sopenharmony_ci-- 2457e5c31af7Sopenharmony_ci 2458e5c31af7Sopenharmony_ci 2459e5c31af7Sopenharmony_ci[[video-session-parameters-update]] 2460e5c31af7Sopenharmony_ci=== Updating Video Session Parameters 2461e5c31af7Sopenharmony_ci 2462e5c31af7Sopenharmony_ci[open,refpage='vkUpdateVideoSessionParametersKHR',desc='Update video session parameters object',type='protos'] 2463e5c31af7Sopenharmony_ci-- 2464e5c31af7Sopenharmony_ciTo update video session parameters object with new parameters, call: 2465e5c31af7Sopenharmony_ci 2466e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkUpdateVideoSessionParametersKHR.adoc[] 2467e5c31af7Sopenharmony_ci 2468e5c31af7Sopenharmony_ci * pname:device is the logical device that updates the video session 2469e5c31af7Sopenharmony_ci parameters. 2470e5c31af7Sopenharmony_ci * pname:videoSessionParameters is the video session parameters object to 2471e5c31af7Sopenharmony_ci update. 2472e5c31af7Sopenharmony_ci * pname:pUpdateInfo is a pointer to a 2473e5c31af7Sopenharmony_ci slink:VkVideoSessionParametersUpdateInfoKHR structure specifying the 2474e5c31af7Sopenharmony_ci parameter update information. 2475e5c31af7Sopenharmony_ci 2476e5c31af7Sopenharmony_ciAfter a successful call to this command, the 2477e5c31af7Sopenharmony_ci<<video-session-parameters,update sequence counter>> of 2478e5c31af7Sopenharmony_cipname:videoSessionParameters is changed to the value specified in 2479e5c31af7Sopenharmony_cipname:pUpdateInfo->updateSequenceCount. 2480e5c31af7Sopenharmony_ci 2481e5c31af7Sopenharmony_ci[NOTE] 2482e5c31af7Sopenharmony_ci.Note 2483e5c31af7Sopenharmony_ci==== 2484e5c31af7Sopenharmony_ciAs each update issued to a video session parameters object needs to specify 2485e5c31af7Sopenharmony_cithe next available update sequence count value, concurrent updates of the 2486e5c31af7Sopenharmony_cisame video session parameters object are inherently disallowed. 2487e5c31af7Sopenharmony_ciHowever, recording video coding operations to command buffers referring to 2488e5c31af7Sopenharmony_ciparameters previously added to the video session parameters object is 2489e5c31af7Sopenharmony_ciallowed, even if there is a concurrent update in progress adding some new 2490e5c31af7Sopenharmony_cientries to the object. 2491e5c31af7Sopenharmony_ci==== 2492e5c31af7Sopenharmony_ci 2493e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 2494e5c31af7Sopenharmony_ciIf pname:videoSessionParameters was created with the video codec operation 2495e5c31af7Sopenharmony_ciename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and the 2496e5c31af7Sopenharmony_cipname:pUpdateInfo->pNext chain includes a 2497e5c31af7Sopenharmony_cislink:VkVideoDecodeH264SessionParametersAddInfoKHR structure, then this 2498e5c31af7Sopenharmony_cicommand adds the following parameter entries to 2499e5c31af7Sopenharmony_cipname:videoSessionParameters: 2500e5c31af7Sopenharmony_ci 2501e5c31af7Sopenharmony_ci * The <<decode-h264-sps,H.264 SPS>> entries specified in 2502e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersAddInfoKHR::pname:pStdSPSs. 2503e5c31af7Sopenharmony_ci * The <<decode-h264-pps,H.264 PPS>> entries specified in 2504e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersAddInfoKHR::pname:pStdPPSs. 2505e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 2506e5c31af7Sopenharmony_ci 2507e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 2508e5c31af7Sopenharmony_ciIf pname:videoSessionParameters was created with the video codec operation 2509e5c31af7Sopenharmony_ciename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and the 2510e5c31af7Sopenharmony_cipname:pUpdateInfo->pNext chain includes a 2511e5c31af7Sopenharmony_cislink:VkVideoDecodeH265SessionParametersAddInfoKHR structure, then this 2512e5c31af7Sopenharmony_cicommand adds the following parameter entries to 2513e5c31af7Sopenharmony_cipname:videoSessionParameters: 2514e5c31af7Sopenharmony_ci 2515e5c31af7Sopenharmony_ci * The <<decode-h265-vps,H.265 VPS>> entries specified in 2516e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR::pname:pStdVPSs. 2517e5c31af7Sopenharmony_ci * The <<decode-h265-sps,H.265 SPS>> entries specified in 2518e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR::pname:pStdSPSs. 2519e5c31af7Sopenharmony_ci * The <<decode-h265-pps,H.265 PPS>> entries specified in 2520e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR::pname:pStdPPSs. 2521e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 2522e5c31af7Sopenharmony_ci 2523e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 2524e5c31af7Sopenharmony_ciIf pname:videoSessionParameters was created with the video codec operation 2525e5c31af7Sopenharmony_ciename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the 2526e5c31af7Sopenharmony_cipname:pUpdateInfo->pNext chain includes a 2527e5c31af7Sopenharmony_cislink:VkVideoEncodeH264SessionParametersAddInfoKHR structure, then this 2528e5c31af7Sopenharmony_cicommand adds the following parameter entries to 2529e5c31af7Sopenharmony_cipname:videoSessionParameters: 2530e5c31af7Sopenharmony_ci 2531e5c31af7Sopenharmony_ci * The <<encode-h264-sps,H.264 SPS>> entries specified in 2532e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersAddInfoKHR::pname:pStdSPSs. 2533e5c31af7Sopenharmony_ci * The <<encode-h264-pps,H.264 PPS>> entries specified in 2534e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersAddInfoKHR::pname:pStdPPSs. 2535e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 2536e5c31af7Sopenharmony_ci 2537e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 2538e5c31af7Sopenharmony_ciIf pname:videoSessionParameters was created with the video codec operation 2539e5c31af7Sopenharmony_ciename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the 2540e5c31af7Sopenharmony_cipname:pUpdateInfo->pNext chain includes a 2541e5c31af7Sopenharmony_cislink:VkVideoEncodeH265SessionParametersAddInfoKHR structure, then this 2542e5c31af7Sopenharmony_cicommand adds the following parameter entries to 2543e5c31af7Sopenharmony_cipname:videoSessionParameters: 2544e5c31af7Sopenharmony_ci 2545e5c31af7Sopenharmony_ci * The <<encode-h265-vps,H.265 VPS>> entries specified in 2546e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR::pname:pStdVPSs. 2547e5c31af7Sopenharmony_ci * The <<encode-h265-sps,H.265 SPS>> entries specified in 2548e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR::pname:pStdSPSs. 2549e5c31af7Sopenharmony_ci * The <<encode-h265-pps,H.265 PPS>> entries specified in 2550e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR::pname:pStdPPSs. 2551e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 2552e5c31af7Sopenharmony_ci 2553e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 2554e5c31af7Sopenharmony_ciIn case of video session parameters objects created with a video encode 2555e5c31af7Sopenharmony_cioperation, implementations may: return the 2556e5c31af7Sopenharmony_ciename:VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error if any of the 2557e5c31af7Sopenharmony_cispecified Video Std parameters do not adhere to the syntactic or semantic 2558e5c31af7Sopenharmony_cirequirements of the used video compression standard, or if values derived 2559e5c31af7Sopenharmony_cifrom parameters according to the rules defined by the used video compression 2560e5c31af7Sopenharmony_cistandard do not adhere to the capabilities of the video compression standard 2561e5c31af7Sopenharmony_cior the implementation. 2562e5c31af7Sopenharmony_ci 2563e5c31af7Sopenharmony_ci[NOTE] 2564e5c31af7Sopenharmony_ci.Note 2565e5c31af7Sopenharmony_ci==== 2566e5c31af7Sopenharmony_ciApplications should: not rely on the 2567e5c31af7Sopenharmony_ciename:VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error being returned by any 2568e5c31af7Sopenharmony_cicommand as a means to verify Video Std parameters, as implementations are 2569e5c31af7Sopenharmony_cinot required to report the error in any specific set of cases. 2570e5c31af7Sopenharmony_ci==== 2571e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 2572e5c31af7Sopenharmony_ci 2573e5c31af7Sopenharmony_ci.Valid Usage 2574e5c31af7Sopenharmony_ci**** 2575e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-pUpdateInfo-07215]] 2576e5c31af7Sopenharmony_ci pname:pUpdateInfo->updateSequenceCount must: equal the current 2577e5c31af7Sopenharmony_ci <<video-session-parameters,update sequence counter>> of 2578e5c31af7Sopenharmony_ci pname:videoSessionParameters plus one 2579e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 2580e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07216]] 2581e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2582e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and the 2583e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2584e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersAddInfoKHR structure, then 2585e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not already contain a 2586e5c31af7Sopenharmony_ci code:StdVideoH264SequenceParameterSet entry with 2587e5c31af7Sopenharmony_ci pname:seq_parameter_set_id matching any of the elements of 2588e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersAddInfoKHR::pname:pStdSPSs 2589e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07217]] 2590e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2591e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the 2592e5c31af7Sopenharmony_ci number of code:StdVideoH264SequenceParameterSet entries already stored 2593e5c31af7Sopenharmony_ci in it plus the value of the pname:stdSPSCount member of the 2594e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersAddInfoKHR structure included in 2595e5c31af7Sopenharmony_ci the pname:pUpdateInfo->pNext chain must: be less than or equal to the 2596e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersCreateInfoKHR::pname:maxStdSPSCount 2597e5c31af7Sopenharmony_ci pname:videoSessionParameters was created with 2598e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07218]] 2599e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2600e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and the 2601e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2602e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersAddInfoKHR structure, then 2603e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not already contain a 2604e5c31af7Sopenharmony_ci code:StdVideoH264PictureParameterSet entry with both 2605e5c31af7Sopenharmony_ci pname:seq_parameter_set_id and pname:pic_parameter_set_id matching any 2606e5c31af7Sopenharmony_ci of the elements of 2607e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersAddInfoKHR::pname:pStdPPSs 2608e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07219]] 2609e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2610e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the 2611e5c31af7Sopenharmony_ci number of code:StdVideoH264PictureParameterSet entries already stored in 2612e5c31af7Sopenharmony_ci it plus the value of the pname:stdPPSCount member of the 2613e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersAddInfoKHR structure included in 2614e5c31af7Sopenharmony_ci the pname:pUpdateInfo->pNext chain must: be less than or equal to the 2615e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264SessionParametersCreateInfoKHR::pname:maxStdPPSCount 2616e5c31af7Sopenharmony_ci pname:videoSessionParameters was created with 2617e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 2618e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 2619e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07220]] 2620e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2621e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and the 2622e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2623e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR structure, then 2624e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not already contain a 2625e5c31af7Sopenharmony_ci code:StdVideoH265VideoParameterSet entry with 2626e5c31af7Sopenharmony_ci pname:vps_video_parameter_set_id matching any of the elements of 2627e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR::pname:pStdVPSs 2628e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07221]] 2629e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2630e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the 2631e5c31af7Sopenharmony_ci number of code:StdVideoH265VideoParameterSet entries already stored in 2632e5c31af7Sopenharmony_ci it plus the value of the pname:stdVPSCount member of the 2633e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR structure included in 2634e5c31af7Sopenharmony_ci the pname:pUpdateInfo->pNext chain must: be less than or equal to the 2635e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR::pname:maxStdVPSCount 2636e5c31af7Sopenharmony_ci pname:videoSessionParameters was created with 2637e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07222]] 2638e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2639e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and the 2640e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2641e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR structure, then 2642e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not already contain a 2643e5c31af7Sopenharmony_ci code:StdVideoH265SequenceParameterSet entry with both 2644e5c31af7Sopenharmony_ci pname:sps_video_parameter_set_id and pname:sps_seq_parameter_set_id 2645e5c31af7Sopenharmony_ci matching any of the elements of 2646e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR::pname:pStdSPSs 2647e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07223]] 2648e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2649e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the 2650e5c31af7Sopenharmony_ci number of code:StdVideoH265SequenceParameterSet entries already stored 2651e5c31af7Sopenharmony_ci in it plus the value of the pname:stdSPSCount member of the 2652e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR structure included in 2653e5c31af7Sopenharmony_ci the pname:pUpdateInfo->pNext chain must: be less than or equal to the 2654e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR::pname:maxStdSPSCount 2655e5c31af7Sopenharmony_ci pname:videoSessionParameters was created with 2656e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07224]] 2657e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2658e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and the 2659e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2660e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR structure, then 2661e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not already contain a 2662e5c31af7Sopenharmony_ci code:StdVideoH265PictureParameterSet entry with 2663e5c31af7Sopenharmony_ci pname:sps_video_parameter_set_id, pname:pps_seq_parameter_set_id, and 2664e5c31af7Sopenharmony_ci pname:pps_pic_parameter_set_id all matching any of the elements of 2665e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR::pname:pStdPPSs 2666e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07225]] 2667e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2668e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the 2669e5c31af7Sopenharmony_ci number of code:StdVideoH265PictureParameterSet entries already stored in 2670e5c31af7Sopenharmony_ci it plus the value of the pname:stdPPSCount member of the 2671e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersAddInfoKHR structure included in 2672e5c31af7Sopenharmony_ci the pname:pUpdateInfo->pNext chain must: be less than or equal to the 2673e5c31af7Sopenharmony_ci slink:VkVideoDecodeH265SessionParametersCreateInfoKHR::pname:maxStdPPSCount 2674e5c31af7Sopenharmony_ci pname:videoSessionParameters was created with 2675e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 2676e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 2677e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07226]] 2678e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2679e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the 2680e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2681e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersAddInfoKHR structure, then 2682e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not already contain a 2683e5c31af7Sopenharmony_ci code:StdVideoH264SequenceParameterSet entry with 2684e5c31af7Sopenharmony_ci pname:seq_parameter_set_id matching any of the elements of 2685e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersAddInfoKHR::pname:pStdSPSs 2686e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-06441]] 2687e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2688e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the 2689e5c31af7Sopenharmony_ci number of code:StdVideoH264SequenceParameterSet entries already stored 2690e5c31af7Sopenharmony_ci in it plus the value of the pname:stdSPSCount member of the 2691e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersAddInfoKHR structure included in 2692e5c31af7Sopenharmony_ci the pname:pUpdateInfo->pNext chain must: be less than or equal to the 2693e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersCreateInfoKHR::pname:maxStdSPSCount 2694e5c31af7Sopenharmony_ci pname:videoSessionParameters was created with 2695e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07227]] 2696e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2697e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the 2698e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2699e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersAddInfoKHR structure, then 2700e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not already contain a 2701e5c31af7Sopenharmony_ci code:StdVideoH264PictureParameterSet entry with both 2702e5c31af7Sopenharmony_ci pname:seq_parameter_set_id and pname:pic_parameter_set_id matching any 2703e5c31af7Sopenharmony_ci of the elements of 2704e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersAddInfoKHR::pname:pStdPPSs 2705e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-06442]] 2706e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2707e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then the 2708e5c31af7Sopenharmony_ci number of code:StdVideoH264PictureParameterSet entries already stored in 2709e5c31af7Sopenharmony_ci it plus the value of the pname:stdPPSCount member of the 2710e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersAddInfoKHR structure included in 2711e5c31af7Sopenharmony_ci the pname:pUpdateInfo->pNext chain must: be less than or equal to the 2712e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersCreateInfoKHR::pname:maxStdPPSCount 2713e5c31af7Sopenharmony_ci pname:videoSessionParameters was created with 2714e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 2715e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 2716e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07228]] 2717e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2718e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the 2719e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2720e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR structure, then 2721e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not already contain a 2722e5c31af7Sopenharmony_ci code:StdVideoH265VideoParameterSet entry with 2723e5c31af7Sopenharmony_ci pname:vps_video_parameter_set_id matching any of the elements of 2724e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR::pname:pStdVPSs 2725e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-06443]] 2726e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2727e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the 2728e5c31af7Sopenharmony_ci number of code:StdVideoH265VideoParameterSet entries already stored in 2729e5c31af7Sopenharmony_ci it plus the value of the pname:stdVPSCount member of the 2730e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR structure included in 2731e5c31af7Sopenharmony_ci the pname:pUpdateInfo->pNext chain must: be less than or equal to the 2732e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR::pname:maxStdVPSCount 2733e5c31af7Sopenharmony_ci pname:videoSessionParameters was created with 2734e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07229]] 2735e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2736e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the 2737e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2738e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR structure, then 2739e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not already contain a 2740e5c31af7Sopenharmony_ci code:StdVideoH265SequenceParameterSet entry with both 2741e5c31af7Sopenharmony_ci pname:sps_video_parameter_set_id and pname:sps_seq_parameter_set_id 2742e5c31af7Sopenharmony_ci matching any of the elements of 2743e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR::pname:pStdSPSs 2744e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-06444]] 2745e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2746e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the 2747e5c31af7Sopenharmony_ci number of code:StdVideoH265SequenceParameterSet entries already stored 2748e5c31af7Sopenharmony_ci in it plus the value of the pname:stdSPSCount member of the 2749e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR structure included in 2750e5c31af7Sopenharmony_ci the pname:pUpdateInfo->pNext chain must: be less than or equal to the 2751e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR::pname:maxStdSPSCount 2752e5c31af7Sopenharmony_ci pname:videoSessionParameters was created with 2753e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-07230]] 2754e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2755e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the 2756e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2757e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR structure, then 2758e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not already contain a 2759e5c31af7Sopenharmony_ci code:StdVideoH265PictureParameterSet entry with 2760e5c31af7Sopenharmony_ci pname:sps_video_parameter_set_id, pname:pps_seq_parameter_set_id, and 2761e5c31af7Sopenharmony_ci pname:pps_pic_parameter_set_id all matching any of the elements of 2762e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR::pname:pStdPPSs 2763e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-06445]] 2764e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2765e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then the 2766e5c31af7Sopenharmony_ci number of code:StdVideoH265PictureParameterSet entries already stored in 2767e5c31af7Sopenharmony_ci it plus the value of the pname:stdPPSCount member of the 2768e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR structure included in 2769e5c31af7Sopenharmony_ci the pname:pUpdateInfo->pNext chain must: be less than or equal to the 2770e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersCreateInfoKHR::pname:maxStdPPSCount 2771e5c31af7Sopenharmony_ci pname:videoSessionParameters was created with 2772e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-08321]] 2773e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2774e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the 2775e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2776e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR structure, then 2777e5c31af7Sopenharmony_ci code:num_tile_columns_minus1 must: be less than 2778e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265CapabilitiesKHR::pname:maxTiles.width, as 2779e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video 2780e5c31af7Sopenharmony_ci profile pname:videoSessionParameters was created with, for each element 2781e5c31af7Sopenharmony_ci of slink:VkVideoEncodeH265SessionParametersAddInfoKHR::pname:pStdPPSs 2782e5c31af7Sopenharmony_ci * [[VUID-vkUpdateVideoSessionParametersKHR-videoSessionParameters-08322]] 2783e5c31af7Sopenharmony_ci If pname:videoSessionParameters was created with the video codec 2784e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the 2785e5c31af7Sopenharmony_ci pname:pNext chain of pname:pUpdateInfo includes a 2786e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265SessionParametersAddInfoKHR structure, then 2787e5c31af7Sopenharmony_ci code:num_tile_rows_minus1 must: be less than 2788e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265CapabilitiesKHR::pname:maxTiles.height, as 2789e5c31af7Sopenharmony_ci returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video 2790e5c31af7Sopenharmony_ci profile pname:videoSessionParameters was created with, for each element 2791e5c31af7Sopenharmony_ci of slink:VkVideoEncodeH265SessionParametersAddInfoKHR::pname:pStdPPSs 2792e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 2793e5c31af7Sopenharmony_ci**** 2794e5c31af7Sopenharmony_ci 2795e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkUpdateVideoSessionParametersKHR.adoc[] 2796e5c31af7Sopenharmony_ci-- 2797e5c31af7Sopenharmony_ci 2798e5c31af7Sopenharmony_ci[open,refpage='VkVideoSessionParametersUpdateInfoKHR',desc='Structure specifying video session parameters update information',type='structs'] 2799e5c31af7Sopenharmony_ci-- 2800e5c31af7Sopenharmony_ciThe sname:VkVideoSessionParametersUpdateInfoKHR structure is defined as: 2801e5c31af7Sopenharmony_ci 2802e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoSessionParametersUpdateInfoKHR.adoc[] 2803e5c31af7Sopenharmony_ci 2804e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 2805e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 2806e5c31af7Sopenharmony_ci structure. 2807e5c31af7Sopenharmony_ci * pname:updateSequenceCount is the new <<video-session-parameters,update 2808e5c31af7Sopenharmony_ci sequence count>> to set for the video session parameters object. 2809e5c31af7Sopenharmony_ci 2810e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoSessionParametersUpdateInfoKHR.adoc[] 2811e5c31af7Sopenharmony_ci-- 2812e5c31af7Sopenharmony_ci 2813e5c31af7Sopenharmony_ci 2814e5c31af7Sopenharmony_ci[[video-coding-scope]] 2815e5c31af7Sopenharmony_ci== Video Coding Scope 2816e5c31af7Sopenharmony_ci 2817e5c31af7Sopenharmony_ciApplications can: record video coding commands for a video session only 2818e5c31af7Sopenharmony_ciwithin a video coding scope. 2819e5c31af7Sopenharmony_ci 2820e5c31af7Sopenharmony_ci[open,refpage='vkCmdBeginVideoCodingKHR',desc='Begin video coding scope',type='protos'] 2821e5c31af7Sopenharmony_ci-- 2822e5c31af7Sopenharmony_ciTo begin a video coding scope, call: 2823e5c31af7Sopenharmony_ci 2824e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdBeginVideoCodingKHR.adoc[] 2825e5c31af7Sopenharmony_ci 2826e5c31af7Sopenharmony_ci * pname:commandBuffer is the command buffer in which to record the 2827e5c31af7Sopenharmony_ci command. 2828e5c31af7Sopenharmony_ci * pname:pBeginInfo is a pointer to a slink:VkVideoBeginCodingInfoKHR 2829e5c31af7Sopenharmony_ci structure specifying the parameters of the video coding scope, including 2830e5c31af7Sopenharmony_ci the video session and video session parameters object to use. 2831e5c31af7Sopenharmony_ci 2832e5c31af7Sopenharmony_ciAfter beginning a video coding scope, the video session object specified in 2833e5c31af7Sopenharmony_cipname:pBeginInfo->videoSession is _bound_ to the command buffer, and the 2834e5c31af7Sopenharmony_cicommand buffer is ready to record video coding operations. 2835e5c31af7Sopenharmony_ciSimilarly, if pname:pBeginInfo->videoSessionParameters is not 2836e5c31af7Sopenharmony_cidname:VK_NULL_HANDLE, it is also _bound_ to the command buffer, and video 2837e5c31af7Sopenharmony_cicoding operations can: refer to the codec-specific parameters stored in it. 2838e5c31af7Sopenharmony_ci 2839e5c31af7Sopenharmony_ci[[bound-reference-picture-resources]] 2840e5c31af7Sopenharmony_ciThis command also establishes the set of _bound reference picture resources_ 2841e5c31af7Sopenharmony_cithat can: be used as <<reconstructed-picture,reconstructed pictures>> or 2842e5c31af7Sopenharmony_ci<<reference-picture,reference pictures>> within the video coding scope. 2843e5c31af7Sopenharmony_ciEach element of this set consists of a <<video-picture-resources,video 2844e5c31af7Sopenharmony_cipicture resource>> and the <<dpb-slot,DPB slot>> index associated with it, 2845e5c31af7Sopenharmony_ciif there is one. 2846e5c31af7Sopenharmony_ci 2847e5c31af7Sopenharmony_ciThe set of bound reference picture resources is immutable within a video 2848e5c31af7Sopenharmony_cicoding scope, however, the DPB slot index associated with any of the bound 2849e5c31af7Sopenharmony_cireference picture resources can: change during the video coding scope in 2850e5c31af7Sopenharmony_ciresponse to video coding operations. 2851e5c31af7Sopenharmony_ci 2852e5c31af7Sopenharmony_ciThe slink:VkVideoReferenceSlotInfoKHR structures provided as the elements of 2853e5c31af7Sopenharmony_cipname:pBeginInfo->pReferenceSlots are interpreted by this command as 2854e5c31af7Sopenharmony_cifollows: 2855e5c31af7Sopenharmony_ci 2856e5c31af7Sopenharmony_ci * If pname:slotIndex is non-negative and pname:pPictureResource is not 2857e5c31af7Sopenharmony_ci `NULL`, then the <<video-picture-resources,video picture resource>> 2858e5c31af7Sopenharmony_ci defined by the slink:VkVideoPictureResourceInfoKHR structure pointed to 2859e5c31af7Sopenharmony_ci by pname:pPictureResource is added to the set of bound reference picture 2860e5c31af7Sopenharmony_ci resources and is associated with the DPB slot index specified in 2861e5c31af7Sopenharmony_ci pname:slotIndex. 2862e5c31af7Sopenharmony_ci * If pname:slotIndex is non-negative and pname:pPictureResource is `NULL`, 2863e5c31af7Sopenharmony_ci then the DPB slot with index pname:slotIndex is <<dpb-slot-states, 2864e5c31af7Sopenharmony_ci deactivated>> by this command. 2865e5c31af7Sopenharmony_ci * If pname:slotIndex is negative and pname:pPictureResource is not `NULL`, 2866e5c31af7Sopenharmony_ci then the <<video-picture-resources,video picture resource>> defined by 2867e5c31af7Sopenharmony_ci the slink:VkVideoPictureResourceInfoKHR structure pointed to by 2868e5c31af7Sopenharmony_ci pname:pPictureResource is added to the set of bound reference picture 2869e5c31af7Sopenharmony_ci resources without an associated DPB slot. 2870e5c31af7Sopenharmony_ci Such a picture resource can: be subsequently used as a 2871e5c31af7Sopenharmony_ci <<reconstructed-picture,reconstructed picture>> to associate it with a 2872e5c31af7Sopenharmony_ci DPB slot. 2873e5c31af7Sopenharmony_ci * If pname:slotIndex is negative and pname:pPictureResource is `NULL`, 2874e5c31af7Sopenharmony_ci then the element is ignored. 2875e5c31af7Sopenharmony_ci 2876e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 2877e5c31af7Sopenharmony_ci[NOTE] 2878e5c31af7Sopenharmony_ci.Note 2879e5c31af7Sopenharmony_ci==== 2880e5c31af7Sopenharmony_ciIt is possible for multiple bound reference picture resources to be 2881e5c31af7Sopenharmony_ciassociated with the same DPB slot index, or for a single bound reference 2882e5c31af7Sopenharmony_cipicture to refer to multiple separate reference pictures. 2883e5c31af7Sopenharmony_ciFor example, in case of an <<decode-h264-profile,H.264 decode profile>> with 2884e5c31af7Sopenharmony_ci<<decode-h264-interlaced-support,interlaced frame support>> a single DPB 2885e5c31af7Sopenharmony_cislot can refer to two separate pictures for the top and bottom fields. 2886e5c31af7Sopenharmony_ciDepending on the picture layout used by the <<decode-h264-profile,H.264 2887e5c31af7Sopenharmony_cidecode profile>>, the following special cases may: arise: 2888e5c31af7Sopenharmony_ci 2889e5c31af7Sopenharmony_ci * If the picture layout is 2890e5c31af7Sopenharmony_ci ename:VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR, 2891e5c31af7Sopenharmony_ci then the top and bottom field pictures are physically co-located in the 2892e5c31af7Sopenharmony_ci same video picture resource with even scanlines corresponding to the top 2893e5c31af7Sopenharmony_ci field and odd scanlines corresponding to the bottom field, respectively. 2894e5c31af7Sopenharmony_ci * If the picture layout is 2895e5c31af7Sopenharmony_ci ename:VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR, 2896e5c31af7Sopenharmony_ci then the top and bottom field pictures are stored in separate video 2897e5c31af7Sopenharmony_ci picture resources (in separate subregions of the same image layer, in 2898e5c31af7Sopenharmony_ci separate layers of the same image, or in entirely separate images), 2899e5c31af7Sopenharmony_ci hence two elements of 2900e5c31af7Sopenharmony_ci slink:VkVideoBeginCodingInfoKHR::pname:pReferenceSlots can: contain the 2901e5c31af7Sopenharmony_ci same pname:slotIndex but specify different video picture resources in 2902e5c31af7Sopenharmony_ci their pname:pPictureResource members. 2903e5c31af7Sopenharmony_ci 2904e5c31af7Sopenharmony_ci==== 2905e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 2906e5c31af7Sopenharmony_ci 2907e5c31af7Sopenharmony_ciAll non-negative pname:slotIndex values specified in the elements of 2908e5c31af7Sopenharmony_cipname:pBeginInfo->pReferenceSlots must: identify DPB slots of the video 2909e5c31af7Sopenharmony_cisession that are in the <<dpb-slot-states,active state>> at the time this 2910e5c31af7Sopenharmony_cicommand is executed on the device. 2911e5c31af7Sopenharmony_ci 2912e5c31af7Sopenharmony_ci[NOTE] 2913e5c31af7Sopenharmony_ci.Note 2914e5c31af7Sopenharmony_ci==== 2915e5c31af7Sopenharmony_ciThe application does not have to specify an entry in 2916e5c31af7Sopenharmony_cipname:pBeginInfo->pReferenceSlots corresponding to all active DPB slots of 2917e5c31af7Sopenharmony_cithe video session, but only for those which are intended to be used in the 2918e5c31af7Sopenharmony_civideo coding scope. 2919e5c31af7Sopenharmony_ciThis way the application can avoid any potential runtime cost associated 2920e5c31af7Sopenharmony_ciwith binding the corresponding picture resources to the command buffer. 2921e5c31af7Sopenharmony_ci==== 2922e5c31af7Sopenharmony_ci 2923e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 2924e5c31af7Sopenharmony_ciIn case of a video encode session, the application is also responsible for 2925e5c31af7Sopenharmony_ciproviding information about the current <<encode-rate-control-state,rate 2926e5c31af7Sopenharmony_cicontrol state>> configured for the video session by including an instance of 2927e5c31af7Sopenharmony_cithe slink:VkVideoEncodeRateControlInfoKHR structure in the pname:pNext chain 2928e5c31af7Sopenharmony_ciof pname:pBeginInfo. 2929e5c31af7Sopenharmony_ciIf no slink:VkVideoEncodeRateControlInfoKHR is included, then the presence 2930e5c31af7Sopenharmony_ciof an empty slink:VkVideoEncodeRateControlInfoKHR structure is implied which 2931e5c31af7Sopenharmony_ciindicates that the current <<encode-rate-control-modes,rate control mode>> 2932e5c31af7Sopenharmony_ciis ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR. 2933e5c31af7Sopenharmony_ciThe specified state must: <<encode-rate-control-state-matching,match>> the 2934e5c31af7Sopenharmony_cieffective rate control state configured for the video session at the time 2935e5c31af7Sopenharmony_cithe recorded command is executed on the device. 2936e5c31af7Sopenharmony_ci 2937e5c31af7Sopenharmony_ci[NOTE] 2938e5c31af7Sopenharmony_ci.Note 2939e5c31af7Sopenharmony_ci==== 2940e5c31af7Sopenharmony_ciIncluding an instance of the slink:VkVideoEncodeRateControlInfoKHR structure 2941e5c31af7Sopenharmony_ciin the pname:pNext chain of pname:pBeginInfo does not change the rate 2942e5c31af7Sopenharmony_cicontrol state configured for the video session, but only specifies the 2943e5c31af7Sopenharmony_ciexpected rate control state configured at the time the recorded command is 2944e5c31af7Sopenharmony_ciexecuted on the device which allows the implementation to have information 2945e5c31af7Sopenharmony_ciabout the configured rate control state at command buffer recording time. 2946e5c31af7Sopenharmony_ciIn order to change the current rate control state of a video session, the 2947e5c31af7Sopenharmony_ciapplication has to issue an appropriate flink:vkCmdControlVideoCodingKHR 2948e5c31af7Sopenharmony_cicommand as described in the <<video-coding-control,Video Coding Control>> 2949e5c31af7Sopenharmony_ciand <<encode-rate-control-state,Rate Control State>> sections. 2950e5c31af7Sopenharmony_ci==== 2951e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 2952e5c31af7Sopenharmony_ci 2953e5c31af7Sopenharmony_ci.Valid Usage 2954e5c31af7Sopenharmony_ci**** 2955e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-commandBuffer-07231]] 2956e5c31af7Sopenharmony_ci The sname:VkCommandPool that pname:commandBuffer was allocated from 2957e5c31af7Sopenharmony_ci must: support the video codec operation pname:pBeginInfo->videoSession 2958e5c31af7Sopenharmony_ci was created with, as returned by 2959e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceQueueFamilyProperties2 in 2960e5c31af7Sopenharmony_ci slink:VkQueueFamilyVideoPropertiesKHR::pname:videoCodecOperations 2961e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-None-07232]] 2962e5c31af7Sopenharmony_ci There must: be no <<queries-operation-active,active>> queries 2963e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-commandBuffer-07233]] 2964e5c31af7Sopenharmony_ci If pname:commandBuffer is an unprotected command buffer and 2965e5c31af7Sopenharmony_ci <<limits-protectedNoFault, pname:protectedNoFault>> is not supported, 2966e5c31af7Sopenharmony_ci then pname:pBeginInfo->videoSession must: not have been created with 2967e5c31af7Sopenharmony_ci ename:VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR 2968e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-commandBuffer-07234]] 2969e5c31af7Sopenharmony_ci If pname:commandBuffer is a protected command buffer and 2970e5c31af7Sopenharmony_ci <<limits-protectedNoFault, pname:protectedNoFault>> is not supported, 2971e5c31af7Sopenharmony_ci then pname:pBeginInfo->videoSession must: have been created with 2972e5c31af7Sopenharmony_ci ename:VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR 2973e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-commandBuffer-07235]] 2974e5c31af7Sopenharmony_ci If pname:commandBuffer is an unprotected command buffer, 2975e5c31af7Sopenharmony_ci <<limits-protectedNoFault, pname:protectedNoFault>> is not supported, 2976e5c31af7Sopenharmony_ci and the pname:pPictureResource member of any element of 2977e5c31af7Sopenharmony_ci pname:pBeginInfo->pReferenceSlots is not `NULL`, then 2978e5c31af7Sopenharmony_ci pname:pPictureResource->imageViewBinding for that element must: not 2979e5c31af7Sopenharmony_ci specify an image view created from a protected image 2980e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-commandBuffer-07236]] 2981e5c31af7Sopenharmony_ci If pname:commandBuffer is a protected command buffer 2982e5c31af7Sopenharmony_ci <<limits-protectedNoFault, pname:protectedNoFault>> is not supported, 2983e5c31af7Sopenharmony_ci and the pname:pPictureResource member of any element of 2984e5c31af7Sopenharmony_ci pname:pBeginInfo->pReferenceSlots is not `NULL`, then 2985e5c31af7Sopenharmony_ci pname:pPictureResource->imageViewBinding for that element must: specify 2986e5c31af7Sopenharmony_ci an image view created from a protected image 2987e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-slotIndex-07239]] 2988e5c31af7Sopenharmony_ci If the pname:slotIndex member of any element of 2989e5c31af7Sopenharmony_ci pname:pBeginInfo->pReferenceSlots is not negative, then it must: specify 2990e5c31af7Sopenharmony_ci the index of a DPB slot that is in the <<dpb-slot-states,active state>> 2991e5c31af7Sopenharmony_ci in pname:pBeginInfo->videoSession at the time the command is executed on 2992e5c31af7Sopenharmony_ci the device 2993e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-pPictureResource-07265]] 2994e5c31af7Sopenharmony_ci Each video picture resource specified by any non-`NULL` 2995e5c31af7Sopenharmony_ci pname:pPictureResource member specified in the elements of 2996e5c31af7Sopenharmony_ci pname:pBeginInfo->pReferenceSlots for which pname:slotIndex is not 2997e5c31af7Sopenharmony_ci negative must: <<video-picture-resource-matching,match>> one of the 2998e5c31af7Sopenharmony_ci video picture resources currently associated with the DPB slot index of 2999e5c31af7Sopenharmony_ci pname:pBeginInfo->videoSession specified by pname:slotIndex at the time 3000e5c31af7Sopenharmony_ci the command is executed on the device 3001e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 3002e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-pBeginInfo-08253]] 3003e5c31af7Sopenharmony_ci If pname:pBeginInfo->videoSession was created with a video encode 3004e5c31af7Sopenharmony_ci operation and the pname:pNext chain of pname:pBeginInfo does not include 3005e5c31af7Sopenharmony_ci an instance of the slink:VkVideoEncodeRateControlInfoKHR structure, then 3006e5c31af7Sopenharmony_ci the <<encode-rate-control-modes,rate control mode>> configured for 3007e5c31af7Sopenharmony_ci pname:pBeginInfo->videoSession at the time the command is executed on 3008e5c31af7Sopenharmony_ci the device must: be ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR 3009e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-pBeginInfo-08254]] 3010e5c31af7Sopenharmony_ci If pname:pBeginInfo->videoSession was created with a video encode 3011e5c31af7Sopenharmony_ci operation and the pname:pNext chain of pname:pBeginInfo includes an 3012e5c31af7Sopenharmony_ci instance of the slink:VkVideoEncodeRateControlInfoKHR structure, then it 3013e5c31af7Sopenharmony_ci must: <<encode-rate-control-state-matching,match>> the rate control 3014e5c31af7Sopenharmony_ci state configured for pname:pBeginInfo->videoSession at the time the 3015e5c31af7Sopenharmony_ci command is executed on the device 3016e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 3017e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 3018e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-pBeginInfo-08255]] 3019e5c31af7Sopenharmony_ci If pname:pBeginInfo->videoSession was created with the video codec 3020e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the 3021e5c31af7Sopenharmony_ci current <<encode-rate-control-modes,rate control mode>> is not 3022e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR or 3023e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, and 3024e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264CapabilitiesKHR::pname:requiresGopRemainingFrames 3025e5c31af7Sopenharmony_ci is ename:VK_TRUE, as returned by 3026e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the 3027e5c31af7Sopenharmony_ci pname:pBeginInfo->videoSession was created with, then the pname:pNext 3028e5c31af7Sopenharmony_ci chain of pname:pBeginInfo must: include an instance of the 3029e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264GopRemainingFrameInfoKHR with its 3030e5c31af7Sopenharmony_ci pname:useGopRemainingFrames member set to ename:VK_TRUE 3031e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 3032e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 3033e5c31af7Sopenharmony_ci * [[VUID-vkCmdBeginVideoCodingKHR-pBeginInfo-08256]] 3034e5c31af7Sopenharmony_ci If pname:pBeginInfo->videoSession was created with the video codec 3035e5c31af7Sopenharmony_ci operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, the 3036e5c31af7Sopenharmony_ci current <<encode-rate-control-modes,rate control mode>> is not 3037e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR or 3038e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, and 3039e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265CapabilitiesKHR::pname:requiresGopRemainingFrames 3040e5c31af7Sopenharmony_ci is ename:VK_TRUE, as returned by 3041e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile the 3042e5c31af7Sopenharmony_ci pname:pBeginInfo->videoSession was created with, then the pname:pNext 3043e5c31af7Sopenharmony_ci chain of pname:pBeginInfo must: include an instance of the 3044e5c31af7Sopenharmony_ci slink:VkVideoEncodeH265GopRemainingFrameInfoKHR with its 3045e5c31af7Sopenharmony_ci pname:useGopRemainingFrames member set to ename:VK_TRUE 3046e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 3047e5c31af7Sopenharmony_ci**** 3048e5c31af7Sopenharmony_ci 3049e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdBeginVideoCodingKHR.adoc[] 3050e5c31af7Sopenharmony_ci-- 3051e5c31af7Sopenharmony_ci 3052e5c31af7Sopenharmony_ci[open,refpage='VkVideoBeginCodingInfoKHR',desc='Structure specifying video coding scope begin information',type='structs'] 3053e5c31af7Sopenharmony_ci-- 3054e5c31af7Sopenharmony_ciThe slink:VkVideoBeginCodingInfoKHR structure is defined as: 3055e5c31af7Sopenharmony_ci 3056e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoBeginCodingInfoKHR.adoc[] 3057e5c31af7Sopenharmony_ci 3058e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 3059e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 3060e5c31af7Sopenharmony_ci structure. 3061e5c31af7Sopenharmony_ci * pname:flags is reserved for future use. 3062e5c31af7Sopenharmony_ci * pname:videoSession is the video session object to be bound for the 3063e5c31af7Sopenharmony_ci processing of the video commands. 3064e5c31af7Sopenharmony_ci * pname:videoSessionParameters is dname:VK_NULL_HANDLE or a handle of a 3065e5c31af7Sopenharmony_ci slink:VkVideoSessionParametersKHR object to be used for the processing 3066e5c31af7Sopenharmony_ci of the video commands. 3067e5c31af7Sopenharmony_ci If dname:VK_NULL_HANDLE, then no video session parameters object is 3068e5c31af7Sopenharmony_ci bound for the duration of the video coding scope. 3069e5c31af7Sopenharmony_ci * pname:referenceSlotCount is the number of elements in the 3070e5c31af7Sopenharmony_ci pname:pReferenceSlots array. 3071e5c31af7Sopenharmony_ci * pname:pReferenceSlots is a pointer to an array of 3072e5c31af7Sopenharmony_ci slink:VkVideoReferenceSlotInfoKHR structures specifying the information 3073e5c31af7Sopenharmony_ci used to determine the set of <<bound-reference-picture-resources,bound 3074e5c31af7Sopenharmony_ci reference picture resources>> for the video coding scope and their 3075e5c31af7Sopenharmony_ci initial association with <<dpb-slot,DPB slot>> indices. 3076e5c31af7Sopenharmony_ci 3077e5c31af7Sopenharmony_ciLimiting values are defined below that are referenced by the relevant valid 3078e5c31af7Sopenharmony_ciusage statements of this structure. 3079e5c31af7Sopenharmony_ci 3080e5c31af7Sopenharmony_ci * Let `VkOffset2D codedOffsetGranularity` be the minimum alignment 3081e5c31af7Sopenharmony_ci requirement for the coded offset of video picture resources. 3082e5c31af7Sopenharmony_ci Unless otherwise defined, the value of the pname:x and pname:y members 3083e5c31af7Sopenharmony_ci of pname:codedOffsetGranularity are `0`. 3084e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 3085e5c31af7Sopenharmony_ci ** If pname:videoSession was created with an <<decode-h264-profile,H.264 3086e5c31af7Sopenharmony_ci decode profile>> with a 3087e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264ProfileInfoKHR::pname:pictureLayout of 3088e5c31af7Sopenharmony_ci ename:VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR, 3089e5c31af7Sopenharmony_ci then pname:codedOffsetGranularity is equal to 3090e5c31af7Sopenharmony_ci slink:VkVideoDecodeH264CapabilitiesKHR::pname:fieldOffsetGranularity, 3091e5c31af7Sopenharmony_ci as returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for that 3092e5c31af7Sopenharmony_ci video profile. 3093e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 3094e5c31af7Sopenharmony_ci 3095e5c31af7Sopenharmony_ci.Valid Usage 3096e5c31af7Sopenharmony_ci**** 3097e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-videoSession-07237]] 3098e5c31af7Sopenharmony_ci pname:videoSession must: have memory bound to all of its memory bindings 3099e5c31af7Sopenharmony_ci returned by flink:vkGetVideoSessionMemoryRequirementsKHR for 3100e5c31af7Sopenharmony_ci pname:videoSession 3101e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-slotIndex-04856]] 3102e5c31af7Sopenharmony_ci Each non-negative slink:VkVideoReferenceSlotInfoKHR::pname:slotIndex 3103e5c31af7Sopenharmony_ci specified in the elements of pname:pReferenceSlots must: be less than 3104e5c31af7Sopenharmony_ci the slink:VkVideoSessionCreateInfoKHR::pname:maxDpbSlots specified when 3105e5c31af7Sopenharmony_ci pname:videoSession was created 3106e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07238]] 3107e5c31af7Sopenharmony_ci Each video picture resource corresponding to any non-`NULL` 3108e5c31af7Sopenharmony_ci pname:pPictureResource member specified in the elements of 3109e5c31af7Sopenharmony_ci pname:pReferenceSlots must: be <<video-picture-resource-uniqueness, 3110e5c31af7Sopenharmony_ci unique>> within pname:pReferenceSlots 3111e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07240]] 3112e5c31af7Sopenharmony_ci If the pname:pPictureResource member of any element of 3113e5c31af7Sopenharmony_ci pname:pReferenceSlots is not `NULL`, then the image view specified in 3114e5c31af7Sopenharmony_ci pname:pPictureResource->imageViewBinding for that element must: be 3115e5c31af7Sopenharmony_ci <<video-profile-compatibility,compatible>> with the video profile 3116e5c31af7Sopenharmony_ci pname:videoSession was created with 3117e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07241]] 3118e5c31af7Sopenharmony_ci If the pname:pPictureResource member of any element of 3119e5c31af7Sopenharmony_ci pname:pReferenceSlots is not `NULL`, then the format of the image view 3120e5c31af7Sopenharmony_ci specified in pname:pPictureResource->imageViewBinding for that element 3121e5c31af7Sopenharmony_ci must: match the 3122e5c31af7Sopenharmony_ci slink:VkVideoSessionCreateInfoKHR::pname:referencePictureFormat 3123e5c31af7Sopenharmony_ci pname:videoSession was created with 3124e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07242]] 3125e5c31af7Sopenharmony_ci If the pname:pPictureResource member of any element of 3126e5c31af7Sopenharmony_ci pname:pReferenceSlots is not `NULL`, then its pname:codedOffset member 3127e5c31af7Sopenharmony_ci must: be an integer multiple of pname:codedOffsetGranularity 3128e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07243]] 3129e5c31af7Sopenharmony_ci If the pname:pPictureResource member of any element of 3130e5c31af7Sopenharmony_ci pname:pReferenceSlots is not `NULL`, then its pname:codedExtent member 3131e5c31af7Sopenharmony_ci must: be between pname:minCodedExtent and pname:maxCodedExtent, 3132e5c31af7Sopenharmony_ci inclusive, pname:videoSession was created with 3133e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-flags-07244]] 3134e5c31af7Sopenharmony_ci If slink:VkVideoCapabilitiesKHR::pname:flags does not include 3135e5c31af7Sopenharmony_ci ename:VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR, as returned 3136e5c31af7Sopenharmony_ci by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile 3137e5c31af7Sopenharmony_ci pname:videoSession was created with, then 3138e5c31af7Sopenharmony_ci pname:pPictureResource->imageViewBinding of all elements of 3139e5c31af7Sopenharmony_ci pname:pReferenceSlots with a non-`NULL` pname:pPictureResource member 3140e5c31af7Sopenharmony_ci must: specify image views created from the same image 3141e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 3142e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-slotIndex-07245]] 3143e5c31af7Sopenharmony_ci If pname:videoSession was created with a decode operation and the 3144e5c31af7Sopenharmony_ci pname:slotIndex member of any element of pname:pReferenceSlots is not 3145e5c31af7Sopenharmony_ci negative, then the image view specified in 3146e5c31af7Sopenharmony_ci pname:pPictureResource->imageViewBinding for that element must: have 3147e5c31af7Sopenharmony_ci been created with ename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR 3148e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 3149e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 3150e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-slotIndex-07246]] 3151e5c31af7Sopenharmony_ci If pname:videoSession was created with an encode operation and the 3152e5c31af7Sopenharmony_ci pname:slotIndex member of any element of pname:pReferenceSlots is not 3153e5c31af7Sopenharmony_ci negative, then the image view specified in 3154e5c31af7Sopenharmony_ci pname:pPictureResource->imageViewBinding for that element must: have 3155e5c31af7Sopenharmony_ci been created with ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR 3156e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 3157e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 3158e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-videoSession-07247]] 3159e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 3160e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then 3161e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not be dname:VK_NULL_HANDLE 3162e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 3163e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 3164e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-videoSession-07248]] 3165e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 3166e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then 3167e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not be dname:VK_NULL_HANDLE 3168e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 3169e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 3170e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-videoSession-07249]] 3171e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 3172e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then 3173e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not be dname:VK_NULL_HANDLE 3174e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 3175e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 3176e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-videoSession-07250]] 3177e5c31af7Sopenharmony_ci If pname:videoSession was created with the video codec operation 3178e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then 3179e5c31af7Sopenharmony_ci pname:videoSessionParameters must: not be dname:VK_NULL_HANDLE 3180e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 3181e5c31af7Sopenharmony_ci * [[VUID-VkVideoBeginCodingInfoKHR-videoSessionParameters-04857]] 3182e5c31af7Sopenharmony_ci If pname:videoSessionParameters is not dname:VK_NULL_HANDLE, it must: 3183e5c31af7Sopenharmony_ci have been created with pname:videoSession specified in 3184e5c31af7Sopenharmony_ci slink:VkVideoSessionParametersCreateInfoKHR::pname:videoSession 3185e5c31af7Sopenharmony_ci**** 3186e5c31af7Sopenharmony_ci 3187e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoBeginCodingInfoKHR.adoc[] 3188e5c31af7Sopenharmony_ci-- 3189e5c31af7Sopenharmony_ci 3190e5c31af7Sopenharmony_ci[open,refpage='VkVideoBeginCodingFlagsKHR',desc='Reserved for future use',type='flags'] 3191e5c31af7Sopenharmony_ci-- 3192e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoBeginCodingFlagsKHR.adoc[] 3193e5c31af7Sopenharmony_ci 3194e5c31af7Sopenharmony_citname:VkVideoBeginCodingFlagsKHR is a bitmask type for setting a mask, but 3195e5c31af7Sopenharmony_ciis currently reserved for future use. 3196e5c31af7Sopenharmony_ci-- 3197e5c31af7Sopenharmony_ci 3198e5c31af7Sopenharmony_ci[open,refpage='VkVideoReferenceSlotInfoKHR',desc='Structure specifying information about a reference picture slot',type='structs'] 3199e5c31af7Sopenharmony_ci-- 3200e5c31af7Sopenharmony_ciThe sname:VkVideoReferenceSlotInfoKHR structure is defined as: 3201e5c31af7Sopenharmony_ci 3202e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoReferenceSlotInfoKHR.adoc[] 3203e5c31af7Sopenharmony_ci 3204e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 3205e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 3206e5c31af7Sopenharmony_ci structure. 3207e5c31af7Sopenharmony_ci * pname:slotIndex is the index of the <<dpb-slot, DPB slot>> or a negative 3208e5c31af7Sopenharmony_ci integer value. 3209e5c31af7Sopenharmony_ci * pname:pPictureResource is `NULL` or a pointer to a 3210e5c31af7Sopenharmony_ci slink:VkVideoPictureResourceInfoKHR structure describing the 3211e5c31af7Sopenharmony_ci <<video-picture-resources,video picture resource>> associated with the 3212e5c31af7Sopenharmony_ci DPB slot index specified by pname:slotIndex. 3213e5c31af7Sopenharmony_ci 3214e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoReferenceSlotInfoKHR.adoc[] 3215e5c31af7Sopenharmony_ci-- 3216e5c31af7Sopenharmony_ci 3217e5c31af7Sopenharmony_ci[open,refpage='vkCmdEndVideoCodingKHR',desc='End video coding scope',type='protos'] 3218e5c31af7Sopenharmony_ci-- 3219e5c31af7Sopenharmony_ciTo end a video coding scope, call: 3220e5c31af7Sopenharmony_ci 3221e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdEndVideoCodingKHR.adoc[] 3222e5c31af7Sopenharmony_ci 3223e5c31af7Sopenharmony_ci * pname:commandBuffer is the command buffer in which to record the 3224e5c31af7Sopenharmony_ci command. 3225e5c31af7Sopenharmony_ci * pname:pEndCodingInfo is a pointer to a slink:VkVideoEndCodingInfoKHR 3226e5c31af7Sopenharmony_ci structure specifying the parameters for ending the video coding scope. 3227e5c31af7Sopenharmony_ci 3228e5c31af7Sopenharmony_ciAfter ending a video coding scope, the video session object, the optional 3229e5c31af7Sopenharmony_civideo session parameters object, and all 3230e5c31af7Sopenharmony_ci<<bound-reference-picture-resources, reference picture resources>> 3231e5c31af7Sopenharmony_cipreviously bound by the corresponding flink:vkCmdBeginVideoCodingKHR command 3232e5c31af7Sopenharmony_ciare _unbound_. 3233e5c31af7Sopenharmony_ci 3234e5c31af7Sopenharmony_ci.Valid Usage 3235e5c31af7Sopenharmony_ci**** 3236e5c31af7Sopenharmony_ci * [[VUID-vkCmdEndVideoCodingKHR-None-07251]] 3237e5c31af7Sopenharmony_ci There must: be no <<queries-operation-active,active>> queries 3238e5c31af7Sopenharmony_ci**** 3239e5c31af7Sopenharmony_ci 3240e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdEndVideoCodingKHR.adoc[] 3241e5c31af7Sopenharmony_ci-- 3242e5c31af7Sopenharmony_ci 3243e5c31af7Sopenharmony_ci[open,refpage='VkVideoEndCodingInfoKHR',desc='Structure specifying video coding scope end information',type='structs'] 3244e5c31af7Sopenharmony_ci-- 3245e5c31af7Sopenharmony_ciThe sname:VkVideoEndCodingInfoKHR structure is defined as: 3246e5c31af7Sopenharmony_ci 3247e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEndCodingInfoKHR.adoc[] 3248e5c31af7Sopenharmony_ci 3249e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 3250e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 3251e5c31af7Sopenharmony_ci structure. 3252e5c31af7Sopenharmony_ci * pname:flags is reserved for future use. 3253e5c31af7Sopenharmony_ci 3254e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEndCodingInfoKHR.adoc[] 3255e5c31af7Sopenharmony_ci-- 3256e5c31af7Sopenharmony_ci 3257e5c31af7Sopenharmony_ci[open,refpage='VkVideoEndCodingFlagsKHR',desc='Reserved for future use',type='flags'] 3258e5c31af7Sopenharmony_ci-- 3259e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoEndCodingFlagsKHR.adoc[] 3260e5c31af7Sopenharmony_ci 3261e5c31af7Sopenharmony_citname:VkVideoEndCodingFlagsKHR is a bitmask type for setting a mask, but is 3262e5c31af7Sopenharmony_cicurrently reserved for future use. 3263e5c31af7Sopenharmony_ci-- 3264e5c31af7Sopenharmony_ci 3265e5c31af7Sopenharmony_ci 3266e5c31af7Sopenharmony_ci[[video-coding-control]] 3267e5c31af7Sopenharmony_ci== Video Coding Control 3268e5c31af7Sopenharmony_ci 3269e5c31af7Sopenharmony_ci[open,refpage='vkCmdControlVideoCodingKHR',desc='Control video coding parameters',type='protos'] 3270e5c31af7Sopenharmony_ci-- 3271e5c31af7Sopenharmony_ciTo apply dynamic controls to the currently bound video session object, call: 3272e5c31af7Sopenharmony_ci 3273e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCmdControlVideoCodingKHR.adoc[] 3274e5c31af7Sopenharmony_ci 3275e5c31af7Sopenharmony_ci * pname:commandBuffer is the command buffer in which to record the 3276e5c31af7Sopenharmony_ci command. 3277e5c31af7Sopenharmony_ci * pname:pCodingControlInfo is a pointer to a 3278e5c31af7Sopenharmony_ci slink:VkVideoCodingControlInfoKHR structure specifying the control 3279e5c31af7Sopenharmony_ci parameters. 3280e5c31af7Sopenharmony_ci 3281e5c31af7Sopenharmony_ciThe control parameters provided in this call are applied to the video 3282e5c31af7Sopenharmony_cisession at the time the command executes on the device and are in effect 3283e5c31af7Sopenharmony_ciuntil a subsequent call to this command with the same video session bound 3284e5c31af7Sopenharmony_cichanges the corresponding control parameters. 3285e5c31af7Sopenharmony_ci 3286e5c31af7Sopenharmony_ciA newly created video session must: be reset before performing video coding 3287e5c31af7Sopenharmony_cioperations using it by including ename:VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR 3288e5c31af7Sopenharmony_ciin pname:pCodingControlInfo->flags. 3289e5c31af7Sopenharmony_ciThe reset operation also returns all DPB slots of the video session to the 3290e5c31af7Sopenharmony_ci<<dpb-slot-states,inactive state>>. 3291e5c31af7Sopenharmony_ciCorrespondingly, any DPB slot index associated with the 3292e5c31af7Sopenharmony_ci<<bound-reference-picture-resources,bound reference picture resources>> is 3293e5c31af7Sopenharmony_ciremoved. 3294e5c31af7Sopenharmony_ci 3295e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 3296e5c31af7Sopenharmony_ciFor encode sessions, the reset operation returns <<encode-rate-control,rate 3297e5c31af7Sopenharmony_cicontrol>> configuration to implementation default settings and sets the 3298e5c31af7Sopenharmony_ci<<encode-quality-level,video encode quality level>> to zero. 3299e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 3300e5c31af7Sopenharmony_ci 3301e5c31af7Sopenharmony_ciAfter video coding operations are performed using a video session, the reset 3302e5c31af7Sopenharmony_cioperation can: be used to return the video session to the same _initial_ 3303e5c31af7Sopenharmony_cistate as after the reset of a newly created video session. 3304e5c31af7Sopenharmony_ciThis can: be used, for example, when different video sequences are needed to 3305e5c31af7Sopenharmony_cibe processed with the same video session object. 3306e5c31af7Sopenharmony_ci 3307e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 3308e5c31af7Sopenharmony_ciIf pname:pCodingControlInfo->flags includes 3309e5c31af7Sopenharmony_ciename:VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, then the command 3310e5c31af7Sopenharmony_cireplaces the <<encode-rate-control,rate control>> configuration maintained 3311e5c31af7Sopenharmony_ciby the video session with the configuration specified in the 3312e5c31af7Sopenharmony_cislink:VkVideoEncodeRateControlInfoKHR structure included in the 3313e5c31af7Sopenharmony_cipname:pCodingControlInfo->pNext chain. 3314e5c31af7Sopenharmony_ci 3315e5c31af7Sopenharmony_ciIf pname:pCodingControlInfo->flags includes 3316e5c31af7Sopenharmony_ciename:VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR, then the command 3317e5c31af7Sopenharmony_cichanges the current <<encode-quality-level,video encode quality level>> to 3318e5c31af7Sopenharmony_cithe value specified in the pname:qualityLevel member of the 3319e5c31af7Sopenharmony_cislink:VkVideoEncodeQualityLevelInfoKHR structure included in the 3320e5c31af7Sopenharmony_cipname:pCodingControlInfo->pNext chain. 3321e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 3322e5c31af7Sopenharmony_ci 3323e5c31af7Sopenharmony_ci.Valid Usage 3324e5c31af7Sopenharmony_ci**** 3325e5c31af7Sopenharmony_ci * [[VUID-vkCmdControlVideoCodingKHR-flags-07017]] 3326e5c31af7Sopenharmony_ci If pname:pCodingControlInfo->flags does not include 3327e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR, then the bound video 3328e5c31af7Sopenharmony_ci session must: not be in <<video-session-uninitialized,uninitialized>> 3329e5c31af7Sopenharmony_ci state at the time the command is executed on the device 3330e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 3331e5c31af7Sopenharmony_ci * [[VUID-vkCmdControlVideoCodingKHR-pCodingControlInfo-08243]] 3332e5c31af7Sopenharmony_ci If the bound video session was not created with an encode operation, 3333e5c31af7Sopenharmony_ci then pname:pCodingControlInfo->pNext must: not include 3334e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR or 3335e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR 3336e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 3337e5c31af7Sopenharmony_ci**** 3338e5c31af7Sopenharmony_ci 3339e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCmdControlVideoCodingKHR.adoc[] 3340e5c31af7Sopenharmony_ci-- 3341e5c31af7Sopenharmony_ci 3342e5c31af7Sopenharmony_ci[open,refpage='VkVideoCodingControlInfoKHR',desc='Structure specifying video coding control parameters',type='structs'] 3343e5c31af7Sopenharmony_ci-- 3344e5c31af7Sopenharmony_ciThe sname:VkVideoCodingControlInfoKHR structure is defined as: 3345e5c31af7Sopenharmony_ci 3346e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoCodingControlInfoKHR.adoc[] 3347e5c31af7Sopenharmony_ci 3348e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 3349e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 3350e5c31af7Sopenharmony_ci structure. 3351e5c31af7Sopenharmony_ci * pname:flags is a bitmask of tlink:VkVideoCodingControlFlagsKHR 3352e5c31af7Sopenharmony_ci specifying control flags. 3353e5c31af7Sopenharmony_ci 3354e5c31af7Sopenharmony_ci.Valid Usage 3355e5c31af7Sopenharmony_ci**** 3356e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 3357e5c31af7Sopenharmony_ci * [[VUID-VkVideoCodingControlInfoKHR-flags-07018]] 3358e5c31af7Sopenharmony_ci If pname:flags includes 3359e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, then the 3360e5c31af7Sopenharmony_ci pname:pNext chain must: include a slink:VkVideoEncodeRateControlInfoKHR 3361e5c31af7Sopenharmony_ci structure 3362e5c31af7Sopenharmony_ci * [[VUID-VkVideoCodingControlInfoKHR-flags-08349]] 3363e5c31af7Sopenharmony_ci If pname:flags includes 3364e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR, then the 3365e5c31af7Sopenharmony_ci pname:pNext chain must: include a slink:VkVideoEncodeQualityLevelInfoKHR 3366e5c31af7Sopenharmony_ci structure 3367e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 3368e5c31af7Sopenharmony_ci**** 3369e5c31af7Sopenharmony_ci 3370e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoCodingControlInfoKHR.adoc[] 3371e5c31af7Sopenharmony_ci-- 3372e5c31af7Sopenharmony_ci 3373e5c31af7Sopenharmony_ci[open,refpage='VkVideoCodingControlFlagBitsKHR',desc='Video coding control flags',type='enums'] 3374e5c31af7Sopenharmony_ci-- 3375e5c31af7Sopenharmony_ciBits which can: be set in slink:VkVideoCodingControlInfoKHR::pname:flags, 3376e5c31af7Sopenharmony_cispecifying the video coding control parameters to be modified, are: 3377e5c31af7Sopenharmony_ci 3378e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoCodingControlFlagBitsKHR.adoc[] 3379e5c31af7Sopenharmony_ci 3380e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR indicates a request for the 3381e5c31af7Sopenharmony_ci bound video session to be reset before other coding control parameters 3382e5c31af7Sopenharmony_ci are applied. 3383e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 3384e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR indicates that 3385e5c31af7Sopenharmony_ci the coding control parameters include video encode rate control 3386e5c31af7Sopenharmony_ci parameters (see slink:VkVideoEncodeRateControlInfoKHR). 3387e5c31af7Sopenharmony_ci * ename:VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR indicates 3388e5c31af7Sopenharmony_ci that the coding control parameters include video encode quality level 3389e5c31af7Sopenharmony_ci parameters (see slink:VkVideoEncodeQualityLevelInfoKHR). 3390e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 3391e5c31af7Sopenharmony_ci-- 3392e5c31af7Sopenharmony_ci 3393e5c31af7Sopenharmony_ci[open,refpage='VkVideoCodingControlFlagsKHR',desc='Bitmask of VkVideoCodingControlFlagBitsKHR',type='flags'] 3394e5c31af7Sopenharmony_ci-- 3395e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoCodingControlFlagsKHR.adoc[] 3396e5c31af7Sopenharmony_ci 3397e5c31af7Sopenharmony_citname:VkVideoCodingControlFlagsKHR is a bitmask type for setting a mask of 3398e5c31af7Sopenharmony_cizero or more elink:VkVideoCodingControlFlagBitsKHR. 3399e5c31af7Sopenharmony_ci-- 3400e5c31af7Sopenharmony_ci 3401e5c31af7Sopenharmony_ci 3402e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[] 3403e5c31af7Sopenharmony_ci[[video-inline-queries]] 3404e5c31af7Sopenharmony_ci== Inline Queries 3405e5c31af7Sopenharmony_ci 3406e5c31af7Sopenharmony_ciIf a video session was created with 3407e5c31af7Sopenharmony_ciename:VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, beginning queries 3408e5c31af7Sopenharmony_ciusing commands such as flink:vkCmdBeginQuery within a video coding scope is 3409e5c31af7Sopenharmony_cinot allowed. 3410e5c31af7Sopenharmony_ciInstead, queries are executed inline by including an instance of the 3411e5c31af7Sopenharmony_cislink:VkVideoInlineQueryInfoKHR structure in the pname:pNext chain of the 3412e5c31af7Sopenharmony_ciparameters of one of the video coding commands, with its pname:queryPool 3413e5c31af7Sopenharmony_cimember set to a valid sname:VkQueryPool handle. 3414e5c31af7Sopenharmony_ci 3415e5c31af7Sopenharmony_ci[open,refpage='VkVideoInlineQueryInfoKHR',desc='Structure specifying inline query information for video coding commands',type='structs'] 3416e5c31af7Sopenharmony_ci-- 3417e5c31af7Sopenharmony_ciThe sname:VkVideoInlineQueryInfoKHR structure is defined as: 3418e5c31af7Sopenharmony_ci 3419e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoInlineQueryInfoKHR.adoc[] 3420e5c31af7Sopenharmony_ci 3421e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 3422e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 3423e5c31af7Sopenharmony_ci structure. 3424e5c31af7Sopenharmony_ci * pname:queryPool is dname:VK_NULL_HANDLE or a valid handle to a 3425e5c31af7Sopenharmony_ci slink:VkQueryPool object that will manage the results of the queries. 3426e5c31af7Sopenharmony_ci * pname:firstQuery is the query index within the query pool that will 3427e5c31af7Sopenharmony_ci contain the query results for the first video coding operation. 3428e5c31af7Sopenharmony_ci The query results of subsequent video coding operations will be 3429e5c31af7Sopenharmony_ci contained by subsequent query indices. 3430e5c31af7Sopenharmony_ci * pname:queryCount is the number of queries to execute. 3431e5c31af7Sopenharmony_ci+ 3432e5c31af7Sopenharmony_ci[NOTE] 3433e5c31af7Sopenharmony_ci.Note 3434e5c31af7Sopenharmony_ci==== 3435e5c31af7Sopenharmony_ciIn practice, if pname:queryPool is not dname:VK_NULL_HANDLE, then 3436e5c31af7Sopenharmony_cipname:queryCount will always have to match the number of video coding 3437e5c31af7Sopenharmony_cioperations issued by the video coding command this structure is specified 3438e5c31af7Sopenharmony_cito, meaning that using inline queries in a video coding command will always 3439e5c31af7Sopenharmony_ciexecute a query for each issued video coding operation. 3440e5c31af7Sopenharmony_ci==== 3441e5c31af7Sopenharmony_ci 3442e5c31af7Sopenharmony_ciThis structure can: be included in the pname:pNext chain of the input 3443e5c31af7Sopenharmony_ciparameter structure of video coding commands. 3444e5c31af7Sopenharmony_ci 3445e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 3446e5c31af7Sopenharmony_ci * In the pname:pNext chain of the pname:pDecodeInfo parameter of the 3447e5c31af7Sopenharmony_ci flink:vkCmdDecodeVideoKHR command to execute a query for each video 3448e5c31af7Sopenharmony_ci decode operation issued by the command. 3449e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 3450e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 3451e5c31af7Sopenharmony_ci * In the pname:pNext chain of the pname:pEncodeInfo parameter of the 3452e5c31af7Sopenharmony_ci flink:vkCmdEncodeVideoKHR command to execute a query for each video 3453e5c31af7Sopenharmony_ci encode operation issued by the command. 3454e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 3455e5c31af7Sopenharmony_ci 3456e5c31af7Sopenharmony_ci.Valid Usage 3457e5c31af7Sopenharmony_ci**** 3458e5c31af7Sopenharmony_ci * [[VUID-VkVideoInlineQueryInfoKHR-queryPool-08372]] 3459e5c31af7Sopenharmony_ci If pname:queryPool is not dname:VK_NULL_HANDLE, then pname:firstQuery 3460e5c31af7Sopenharmony_ci must: be less than the number of queries in pname:queryPool 3461e5c31af7Sopenharmony_ci * [[VUID-VkVideoInlineQueryInfoKHR-queryPool-08373]] 3462e5c31af7Sopenharmony_ci If pname:queryPool is not dname:VK_NULL_HANDLE, then the sum of 3463e5c31af7Sopenharmony_ci pname:firstQuery and pname:queryCount must: be less than or equal to the 3464e5c31af7Sopenharmony_ci number of queries in pname:queryPool 3465e5c31af7Sopenharmony_ci**** 3466e5c31af7Sopenharmony_ci 3467e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoInlineQueryInfoKHR.adoc[] 3468e5c31af7Sopenharmony_ci-- 3469e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[] 3470e5c31af7Sopenharmony_ci 3471e5c31af7Sopenharmony_ci 3472e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 3473e5c31af7Sopenharmony_ciinclude::{chapters}/video/decode.adoc[] 3474e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 3475e5c31af7Sopenharmony_ci 3476e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h264[] 3477e5c31af7Sopenharmony_ciinclude::{chapters}/video/h264_decode.adoc[] 3478e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h264[] 3479e5c31af7Sopenharmony_ci 3480e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_h265[] 3481e5c31af7Sopenharmony_ciinclude::{chapters}/video/h265_decode.adoc[] 3482e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_h265[] 3483e5c31af7Sopenharmony_ci 3484e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 3485e5c31af7Sopenharmony_ciinclude::{chapters}/video/encode.adoc[] 3486e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 3487e5c31af7Sopenharmony_ci 3488e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h264[] 3489e5c31af7Sopenharmony_ciinclude::{chapters}/video/h264_encode.adoc[] 3490e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h264[] 3491e5c31af7Sopenharmony_ci 3492e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_h265[] 3493e5c31af7Sopenharmony_ciinclude::{chapters}/video/h265_encode.adoc[] 3494e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_h265[] 3495