1e5c31af7Sopenharmony_ci// Copyright 2018-2024 The Khronos Group Inc. 2e5c31af7Sopenharmony_ci// 3e5c31af7Sopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0 4e5c31af7Sopenharmony_ci 5e5c31af7Sopenharmony_ci[[encode-h264]] 6e5c31af7Sopenharmony_ci== H.264 Encode Operations 7e5c31af7Sopenharmony_ci 8e5c31af7Sopenharmony_ciVideo encode operations using an <<encode-h264-profile,H.264 encode 9e5c31af7Sopenharmony_ciprofile>> can: be used to encode elementary video stream sequences compliant 10e5c31af7Sopenharmony_cito the <<itu-t-h264,ITU-T H.264 Specification>>. 11e5c31af7Sopenharmony_ci 12e5c31af7Sopenharmony_ci[NOTE] 13e5c31af7Sopenharmony_ci.Note 14e5c31af7Sopenharmony_ci==== 15e5c31af7Sopenharmony_ciRefer to the <<preamble, Preamble>> for information on how the Khronos 16e5c31af7Sopenharmony_ciIntellectual Property Rights Policy relates to normative references to 17e5c31af7Sopenharmony_ciexternal materials not created by Khronos. 18e5c31af7Sopenharmony_ci==== 19e5c31af7Sopenharmony_ci 20e5c31af7Sopenharmony_ciThis process is performed according to the <<encode-operation-steps,video 21e5c31af7Sopenharmony_ciencode operation steps>> with the codec-specific semantics defined in 22e5c31af7Sopenharmony_cisection 8 of the <<itu-t-h264,ITU-T H.264 Specification>> as follows: 23e5c31af7Sopenharmony_ci 24e5c31af7Sopenharmony_ci * Syntax elements, derived values, and other parameters are applied from 25e5c31af7Sopenharmony_ci the following structures: 26e5c31af7Sopenharmony_ci ** The code:StdVideoH264SequenceParameterSet structure corresponding to 27e5c31af7Sopenharmony_ci the <<encode-h264-active-sps,active SPS>> specifying the 28e5c31af7Sopenharmony_ci <<encode-h264-sps, H.264 sequence parameter set>>. 29e5c31af7Sopenharmony_ci ** The code:StdVideoH264PictureParameterSet structure corresponding to the 30e5c31af7Sopenharmony_ci <<encode-h264-active-pps,active PPS>> specifying the <<encode-h264-pps, 31e5c31af7Sopenharmony_ci H.264 picture parameter set>>. 32e5c31af7Sopenharmony_ci ** The code:StdVideoEncodeH264PictureInfo structure specifying the 33e5c31af7Sopenharmony_ci <<encode-h264-picture-info,H.264 picture information>>. 34e5c31af7Sopenharmony_ci ** The code:StdVideoEncodeH264SliceHeader structures specifying the 35e5c31af7Sopenharmony_ci <<encode-h264-slice-header-params,H.264 slice header parameters>> for 36e5c31af7Sopenharmony_ci each encoded H.264 slice. 37e5c31af7Sopenharmony_ci ** The code:StdVideoEncodeH264ReferenceInfo structures specifying the 38e5c31af7Sopenharmony_ci <<encode-h264-reference-info,H.264 reference information>> 39e5c31af7Sopenharmony_ci corresponding to the optional <<reconstructed-picture,reconstructed 40e5c31af7Sopenharmony_ci picture>> and any <<active-reference-pictures,active reference 41e5c31af7Sopenharmony_ci pictures>>. 42e5c31af7Sopenharmony_ci * The encoded bitstream data is written to the destination video bitstream 43e5c31af7Sopenharmony_ci buffer range as defined in the 44e5c31af7Sopenharmony_ci <<encode-h264-bitstream-data-access,H.264 Encode Bitstream Data 45e5c31af7Sopenharmony_ci Access>> section. 46e5c31af7Sopenharmony_ci * Picture data in the <<video-picture-resources,video picture resources>> 47e5c31af7Sopenharmony_ci corresponding to the used <<encode-input-picture,encode input 48e5c31af7Sopenharmony_ci picture>>, <<active-reference-pictures,active reference pictures>>, and 49e5c31af7Sopenharmony_ci optional <<reconstructed-picture,reconstructed picture>> is accessed as 50e5c31af7Sopenharmony_ci defined in the <<encode-h264-picture-data-access,H.264 Encode Picture 51e5c31af7Sopenharmony_ci Data Access>> section. 52e5c31af7Sopenharmony_ci * The decision on <<encode-ref-pic-setup,reference picture setup>> is made 53e5c31af7Sopenharmony_ci according to the parameters specified in the 54e5c31af7Sopenharmony_ci <<encode-h264-ref-pic-setup,H.264 picture information>>. 55e5c31af7Sopenharmony_ci 56e5c31af7Sopenharmony_ciIf the parameters adhere to the syntactic and semantic requirements defined 57e5c31af7Sopenharmony_ciin the corresponding sections of the <<itu-t-h264,ITU-T H.264 58e5c31af7Sopenharmony_ciSpecification>>, as described above, and the <<dpb-slot,DPB slots>> 59e5c31af7Sopenharmony_ciassociated with the <<active-reference-pictures,active reference pictures>> 60e5c31af7Sopenharmony_ciall refer to <<dpb-slot-states,valid picture references>>, then the video 61e5c31af7Sopenharmony_ciencode operation will complete successfully. 62e5c31af7Sopenharmony_ciOtherwise, the video encode operation may: complete 63e5c31af7Sopenharmony_ci<<encode-unsuccessful,unsuccessfully>>. 64e5c31af7Sopenharmony_ci 65e5c31af7Sopenharmony_ci 66e5c31af7Sopenharmony_ci[[encode-h264-overrides]] 67e5c31af7Sopenharmony_ci=== H.264 Encode Parameter Overrides 68e5c31af7Sopenharmony_ci 69e5c31af7Sopenharmony_ciImplementations may: override, unless otherwise specified, any of the H.264 70e5c31af7Sopenharmony_ciencode parameters specified in the following Video Std structures: 71e5c31af7Sopenharmony_ci 72e5c31af7Sopenharmony_ci * code:StdVideoH264SequenceParameterSet 73e5c31af7Sopenharmony_ci * code:StdVideoH264PictureParameterSet 74e5c31af7Sopenharmony_ci * code:StdVideoEncodeH264PictureInfo 75e5c31af7Sopenharmony_ci * code:StdVideoEncodeH264SliceHeader 76e5c31af7Sopenharmony_ci * code:StdVideoEncodeH264ReferenceInfo 77e5c31af7Sopenharmony_ci 78e5c31af7Sopenharmony_ciAll such H.264 encode parameter overrides must: fulfill the conditions 79e5c31af7Sopenharmony_cidefined in the <<encode-overrides,Video Encode Parameter Overrides>> 80e5c31af7Sopenharmony_cisection. 81e5c31af7Sopenharmony_ci 82e5c31af7Sopenharmony_ciIn addition, implementations must: not override any of the following H.264 83e5c31af7Sopenharmony_ciencode parameters: 84e5c31af7Sopenharmony_ci 85e5c31af7Sopenharmony_ci * code:StdVideoEncodeH264PictureInfo::code:primary_pic_type 86e5c31af7Sopenharmony_ci * code:StdVideoEncodeH264SliceHeader::code:slice_type 87e5c31af7Sopenharmony_ci 88e5c31af7Sopenharmony_ciIn case of H.264 encode parameters stored in 89e5c31af7Sopenharmony_ci<<encode-h264-parameter-sets,video session parameters>> objects, 90e5c31af7Sopenharmony_ciapplications need to use the flink:vkGetEncodedVideoSessionParametersKHR 91e5c31af7Sopenharmony_cicommand to determine whether any implementation overrides happened. 92e5c31af7Sopenharmony_ciIf the query indicates that implementation overrides were applied, then the 93e5c31af7Sopenharmony_ciapplication needs to retrieve and use the encoded H.264 parameter sets in 94e5c31af7Sopenharmony_cithe bitstream in order to be able to produce a compliant H.264 video 95e5c31af7Sopenharmony_cibitstream using the H.264 encode parameters stored in the video session 96e5c31af7Sopenharmony_ciparameters object. 97e5c31af7Sopenharmony_ci 98e5c31af7Sopenharmony_ciIn case of any H.264 encode parameters stored in the encoded bitstream 99e5c31af7Sopenharmony_ciproduced by video encode operations, if the implementation supports the 100e5c31af7Sopenharmony_ciename:VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR 101e5c31af7Sopenharmony_ci<<queries-video-encode-feedback,video encode feedback query>> flag, the 102e5c31af7Sopenharmony_ciapplication can: use such queries to retrieve feedback about whether any 103e5c31af7Sopenharmony_ciimplementation overrides have been applied to those H.264 encode parameters. 104e5c31af7Sopenharmony_ci 105e5c31af7Sopenharmony_ci 106e5c31af7Sopenharmony_ci[[encode-h264-bitstream-data-access]] 107e5c31af7Sopenharmony_ci=== H.264 Encode Bitstream Data Access 108e5c31af7Sopenharmony_ci 109e5c31af7Sopenharmony_ciEach video encode operation writes one or more VCL NAL units comprising of 110e5c31af7Sopenharmony_cislice headers and data of the encoded picture, in the format defined in 111e5c31af7Sopenharmony_cisections 7.3.3 and 7.3.4, according to the semantics defined in sections 112e5c31af7Sopenharmony_ci7.4.3 and 7.4.4 of the <<itu-t-h264,ITU-T H.264 Specification>>, 113e5c31af7Sopenharmony_cirespectively. 114e5c31af7Sopenharmony_ciThe number of VCL NAL units written is specified by 115e5c31af7Sopenharmony_cislink:VkVideoEncodeH264PictureInfoKHR::pname:naluSliceEntryCount. 116e5c31af7Sopenharmony_ci 117e5c31af7Sopenharmony_ciIn addition, if 118e5c31af7Sopenharmony_cislink:VkVideoEncodeH264PictureInfoKHR::pname:generatePrefixNalu is set to 119e5c31af7Sopenharmony_ciename:VK_TRUE for the video encode operation, then an additional prefix NAL 120e5c31af7Sopenharmony_ciunit is written before each VCL NAL unit corresponding to individual slices 121e5c31af7Sopenharmony_ciin the format defined in section 7.3.2.12, according to the semantics 122e5c31af7Sopenharmony_cidefined in section 7.4.2.12 of the <<itu-t-h264,ITU-T H.264 Specification>>, 123e5c31af7Sopenharmony_cirespectively. 124e5c31af7Sopenharmony_ci 125e5c31af7Sopenharmony_ci 126e5c31af7Sopenharmony_ci[[encode-h264-picture-data-access]] 127e5c31af7Sopenharmony_ci=== H.264 Encode Picture Data Access 128e5c31af7Sopenharmony_ci 129e5c31af7Sopenharmony_ciAccesses to image data within a video picture resource happen at the 130e5c31af7Sopenharmony_cigranularity indicated by 131e5c31af7Sopenharmony_cislink:VkVideoCapabilitiesKHR::pname:pictureAccessGranularity, as returned by 132e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the used <<video-profiles, 133e5c31af7Sopenharmony_civideo profile>>. 134e5c31af7Sopenharmony_ciAccordingly, the complete image subregion of a <<encode-input-picture,encode 135e5c31af7Sopenharmony_ciinput picture>>, <<reference-picture,reference picture>>, or 136e5c31af7Sopenharmony_ci<<reconstructed-picture,reconstructed picture>> accessed by video coding 137e5c31af7Sopenharmony_cioperations using an <<encode-h264-profile,H.264 encode profile>> is defined 138e5c31af7Sopenharmony_cias the set of texels within the coordinate range: 139e5c31af7Sopenharmony_ci 140e5c31af7Sopenharmony_ci {empty}:: [eq]#([0,pname:endX),[0,pname:endY))# 141e5c31af7Sopenharmony_ci 142e5c31af7Sopenharmony_ciWhere: 143e5c31af7Sopenharmony_ci 144e5c31af7Sopenharmony_ci * [eq]#pname:endX# equals [eq]#pname:codedExtent.width# rounded up to the 145e5c31af7Sopenharmony_ci nearest integer multiple of pname:pictureAccessGranularity.width and 146e5c31af7Sopenharmony_ci clamped to the width of the image subresource 147e5c31af7Sopenharmony_ci <<video-image-subresource-reference,referred>> to by the corresponding 148e5c31af7Sopenharmony_ci slink:VkVideoPictureResourceInfoKHR structure; 149e5c31af7Sopenharmony_ci * [eq]#endY# equals [eq]#pname:codedExtent.height# rounded up to the 150e5c31af7Sopenharmony_ci nearest integer multiple of pname:pictureAccessGranularity.height and 151e5c31af7Sopenharmony_ci clamped to the height of the image subresource 152e5c31af7Sopenharmony_ci <<video-image-subresource-reference,referred>> to by the corresponding 153e5c31af7Sopenharmony_ci slink:VkVideoPictureResourceInfoKHR structure; 154e5c31af7Sopenharmony_ci 155e5c31af7Sopenharmony_ciWhere pname:codedExtent is the member of the 156e5c31af7Sopenharmony_cislink:VkVideoPictureResourceInfoKHR structure corresponding to the picture. 157e5c31af7Sopenharmony_ci 158e5c31af7Sopenharmony_ciIn case of video encode operations using an <<encode-h264-profile,H.264 159e5c31af7Sopenharmony_ciencode profile>>, any access to a picture at the coordinates 160e5c31af7Sopenharmony_ci[eq]#(pname:x,pname:y)#, as defined by the <<itu-t-h264,ITU-T H.264 161e5c31af7Sopenharmony_ciSpecification>>, is an access to the image subresource 162e5c31af7Sopenharmony_ci<<video-image-subresource-reference,referred>> to by the corresponding 163e5c31af7Sopenharmony_cislink:VkVideoPictureResourceInfoKHR structure at the texel coordinates 164e5c31af7Sopenharmony_ci[eq]#(pname:x,pname:y)#. 165e5c31af7Sopenharmony_ci 166e5c31af7Sopenharmony_ciImplementations may: choose not to access some or all texels within 167e5c31af7Sopenharmony_ciparticular <<reference-picture,reference pictures>> available to a video 168e5c31af7Sopenharmony_ciencode operation (e.g. due to <<encode-overrides,video encode parameter 169e5c31af7Sopenharmony_cioverrides>> restricting the effective set of used reference pictures, or if 170e5c31af7Sopenharmony_cithe encoding algorithm chooses not to use certain subregions of the 171e5c31af7Sopenharmony_cireference picture data for sample prediction). 172e5c31af7Sopenharmony_ci 173e5c31af7Sopenharmony_ci 174e5c31af7Sopenharmony_ci[[encode-h264-frame-picture-slice]] 175e5c31af7Sopenharmony_ci=== H.264 Frame, Picture, and Slice 176e5c31af7Sopenharmony_ci 177e5c31af7Sopenharmony_ciH.264 pictures are partitioned into slices, as defined in section 6.3 of the 178e5c31af7Sopenharmony_ci<<itu-t-h264,ITU-T H.264 Specification>>. 179e5c31af7Sopenharmony_ci 180e5c31af7Sopenharmony_ciVideo encode operations using an <<encode-h264-profile,H.264 encode 181e5c31af7Sopenharmony_ciprofile>> can: encode slices of different types, as defined in section 7.4.3 182e5c31af7Sopenharmony_ciof the <<itu-t-h264,ITU-T H.264 Specification>>, by specifying the 183e5c31af7Sopenharmony_cicorresponding enumeration constant value in 184e5c31af7Sopenharmony_cicode:StdVideoEncodeH264SliceHeader::code:slice_type in the 185e5c31af7Sopenharmony_ci<<encode-h264-slice-header-params,H.264 slice header parameters>> from the 186e5c31af7Sopenharmony_ciVideo Std enumeration type code:StdVideoH264SliceType: 187e5c31af7Sopenharmony_ci 188e5c31af7Sopenharmony_ci * [[encode-h264-p-slice]] code:STD_VIDEO_H264_SLICE_TYPE_P indicates that 189e5c31af7Sopenharmony_ci the slice is a _P slice_ as defined in section 3.109 of the 190e5c31af7Sopenharmony_ci <<itu-t-h264,ITU-T H.264 Specification>>. 191e5c31af7Sopenharmony_ci * [[encode-h264-b-slice]] code:STD_VIDEO_H264_SLICE_TYPE_B indicates that 192e5c31af7Sopenharmony_ci the slice is a _B slice_ as defined in section 3.9 of the 193e5c31af7Sopenharmony_ci <<itu-t-h264,ITU-T H.264 Specification>>. 194e5c31af7Sopenharmony_ci * [[encode-h264-i-slice]] code:STD_VIDEO_H264_SLICE_TYPE_I indicates that 195e5c31af7Sopenharmony_ci the slice is an _I slice_ as defined in section 3.66 of the 196e5c31af7Sopenharmony_ci <<itu-t-h264,ITU-T H.264 Specification>>. 197e5c31af7Sopenharmony_ci 198e5c31af7Sopenharmony_ciPictures constructed from such slices can: be of different types, as defined 199e5c31af7Sopenharmony_ciin section 7.4.2.4 of the <<itu-t-h264,ITU-T H.264 Specification>>. 200e5c31af7Sopenharmony_ciVideo encode operations using an <<encode-h264-profile,H.264 encode 201e5c31af7Sopenharmony_ciprofile>> can: encode pictures of a specific type by specifying the 202e5c31af7Sopenharmony_cicorresponding enumeration constant value in 203e5c31af7Sopenharmony_cicode:StdVideoEncodeH264PictureInfo::code:primary_pic_type in the 204e5c31af7Sopenharmony_ci<<encode-h264-picture-info,H.264 picture information>> from the Video Std 205e5c31af7Sopenharmony_cienumeration type code:StdVideoH264PictureType: 206e5c31af7Sopenharmony_ci 207e5c31af7Sopenharmony_ci * [[encode-h264-p-pic]] code:STD_VIDEO_H264_PICTURE_TYPE_P indicates that 208e5c31af7Sopenharmony_ci the picture is a _P picture_. 209e5c31af7Sopenharmony_ci A frame consisting of a P picture is also referred to as a _P frame_. 210e5c31af7Sopenharmony_ci * [[encode-h264-b-pic]] code:STD_VIDEO_H264_PICTURE_TYPE_B indicates that 211e5c31af7Sopenharmony_ci the picture is a _B picture_. 212e5c31af7Sopenharmony_ci A frame consisting of a B picture is also referred to as a _B frame_. 213e5c31af7Sopenharmony_ci * [[encode-h264-i-pic]] code:STD_VIDEO_H264_PICTURE_TYPE_I indicates that 214e5c31af7Sopenharmony_ci the picture is an _I picture_. 215e5c31af7Sopenharmony_ci A frame consisting of an I picture is also referred to as an _I frame_. 216e5c31af7Sopenharmony_ci * [[encode-h264-idr-pic]] code:STD_VIDEO_H264_PICTURE_TYPE_IDR indicates 217e5c31af7Sopenharmony_ci that the picture is a special type of I picture called an _IDR picture_ 218e5c31af7Sopenharmony_ci as defined in section 3.69 of the <<itu-t-h264,ITU-T H.264 219e5c31af7Sopenharmony_ci Specification>>. 220e5c31af7Sopenharmony_ci A frame consisting of an IDR picture is also referred to as an _IDR 221e5c31af7Sopenharmony_ci frame_. 222e5c31af7Sopenharmony_ci 223e5c31af7Sopenharmony_ci 224e5c31af7Sopenharmony_ci[[encode-h264-profile]] 225e5c31af7Sopenharmony_ci=== H.264 Encode Profile 226e5c31af7Sopenharmony_ci 227e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264ProfileInfoKHR',desc='Structure specifying H.264 encode-specific video profile parameters',type='structs'] 228e5c31af7Sopenharmony_ci-- 229e5c31af7Sopenharmony_ciA video profile supporting H.264 video encode operations is specified by 230e5c31af7Sopenharmony_cisetting slink:VkVideoProfileInfoKHR::pname:videoCodecOperation to 231e5c31af7Sopenharmony_ciename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and adding a 232e5c31af7Sopenharmony_cisname:VkVideoEncodeH264ProfileInfoKHR structure to the 233e5c31af7Sopenharmony_cislink:VkVideoProfileInfoKHR::pname:pNext chain. 234e5c31af7Sopenharmony_ci 235e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264ProfileInfoKHR structure is defined as: 236e5c31af7Sopenharmony_ci 237e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264ProfileInfoKHR.adoc[] 238e5c31af7Sopenharmony_ci 239e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 240e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 241e5c31af7Sopenharmony_ci structure. 242e5c31af7Sopenharmony_ci * pname:stdProfileIdc is a code:StdVideoH264ProfileIdc value specifying 243e5c31af7Sopenharmony_ci the H.264 codec profile IDC, as defined in section A.2 of the 244e5c31af7Sopenharmony_ci <<itu-t-h264,ITU-T H.264 Specification>>. 245e5c31af7Sopenharmony_ci 246e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264ProfileInfoKHR.adoc[] 247e5c31af7Sopenharmony_ci-- 248e5c31af7Sopenharmony_ci 249e5c31af7Sopenharmony_ci 250e5c31af7Sopenharmony_ci=== H.264 Encode Capabilities 251e5c31af7Sopenharmony_ci 252e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264CapabilitiesKHR',desc='Structure describing H.264 encode capabilities',type='structs'] 253e5c31af7Sopenharmony_ci-- 254e5c31af7Sopenharmony_ciWhen calling flink:vkGetPhysicalDeviceVideoCapabilitiesKHR to query the 255e5c31af7Sopenharmony_cicapabilities for an <<encode-h264-profile,H.264 encode profile>>, the 256e5c31af7Sopenharmony_cislink:VkVideoCapabilitiesKHR::pname:pNext chain must: include a 257e5c31af7Sopenharmony_cisname:VkVideoEncodeH264CapabilitiesKHR structure that will be filled with 258e5c31af7Sopenharmony_cithe profile-specific capabilities. 259e5c31af7Sopenharmony_ci 260e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264CapabilitiesKHR structure is defined as: 261e5c31af7Sopenharmony_ci 262e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264CapabilitiesKHR.adoc[] 263e5c31af7Sopenharmony_ci 264e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 265e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 266e5c31af7Sopenharmony_ci structure. 267e5c31af7Sopenharmony_ci * pname:flags is a bitmask of elink:VkVideoEncodeH264CapabilityFlagBitsKHR 268e5c31af7Sopenharmony_ci indicating supported H.264 encoding capabilities. 269e5c31af7Sopenharmony_ci * pname:maxLevelIdc is a code:StdVideoH264LevelIdc value indicating the 270e5c31af7Sopenharmony_ci maximum H.264 level supported by the profile, where enum constant 271e5c31af7Sopenharmony_ci `STD_VIDEO_H264_LEVEL_IDC_<major>_<minor>` identifies H.264 level 272e5c31af7Sopenharmony_ci `<major>.<minor>` as defined in section A.3 of the <<itu-t-h264,ITU-T 273e5c31af7Sopenharmony_ci H.264 Specification>>. 274e5c31af7Sopenharmony_ci * pname:maxSliceCount indicates the maximum number of slices that can: be 275e5c31af7Sopenharmony_ci encoded for a single picture. 276e5c31af7Sopenharmony_ci Further restrictions may: apply to the number of slices that can: be 277e5c31af7Sopenharmony_ci encoded for a single picture depending on other capabilities and 278e5c31af7Sopenharmony_ci codec-specific rules. 279e5c31af7Sopenharmony_ci * pname:maxPPictureL0ReferenceCount indicates the maximum number of 280e5c31af7Sopenharmony_ci reference pictures the implementation supports in the reference list L0 281e5c31af7Sopenharmony_ci for <<encode-h264-p-pic,P pictures>>. 282e5c31af7Sopenharmony_ci+ 283e5c31af7Sopenharmony_ci[NOTE] 284e5c31af7Sopenharmony_ci.Note 285e5c31af7Sopenharmony_ci==== 286e5c31af7Sopenharmony_ciAs implementations may: <<encode-overrides,override>> the reference lists, 287e5c31af7Sopenharmony_cipname:maxPPictureL0ReferenceCount does not limit the number of elements that 288e5c31af7Sopenharmony_cithe application can: specify in the L0 reference list for P pictures. 289e5c31af7Sopenharmony_ciHowever, if pname:maxPPictureL0ReferenceCount is zero, then the use of P 290e5c31af7Sopenharmony_cipictures is not allowed. 291e5c31af7Sopenharmony_ci==== 292e5c31af7Sopenharmony_ci * pname:maxBPictureL0ReferenceCount indicates the maximum number of 293e5c31af7Sopenharmony_ci reference pictures the implementation supports in the reference list L0 294e5c31af7Sopenharmony_ci for <<encode-h264-b-pic,B pictures>>. 295e5c31af7Sopenharmony_ci * pname:maxL1ReferenceCount indicates the maximum number of reference 296e5c31af7Sopenharmony_ci pictures the implementation supports in the reference list L1 if 297e5c31af7Sopenharmony_ci encoding of <<encode-h264-b-pic,B pictures>> is supported. 298e5c31af7Sopenharmony_ci+ 299e5c31af7Sopenharmony_ci[NOTE] 300e5c31af7Sopenharmony_ci.Note 301e5c31af7Sopenharmony_ci==== 302e5c31af7Sopenharmony_ciAs implementations may: <<encode-overrides,override>> the reference lists, 303e5c31af7Sopenharmony_cipname:maxBPictureL0ReferenceCount and pname:maxL1ReferenceCount does not 304e5c31af7Sopenharmony_cilimit the number of elements that the application can: specify in the L0 and 305e5c31af7Sopenharmony_ciL1 reference lists for B pictures. 306e5c31af7Sopenharmony_ciHowever, if pname:maxBPictureL0ReferenceCount and pname:maxL1ReferenceCount 307e5c31af7Sopenharmony_ciare both zero, then the use of B pictures is not allowed. 308e5c31af7Sopenharmony_ci==== 309e5c31af7Sopenharmony_ci * pname:maxTemporalLayerCount indicates the maximum number of H.264 310e5c31af7Sopenharmony_ci temporal layers supported by the implementation. 311e5c31af7Sopenharmony_ci * pname:expectDyadicTemporalLayerPattern indicates that the 312e5c31af7Sopenharmony_ci implementation's rate control algorithms expect the application to use a 313e5c31af7Sopenharmony_ci <<encode-h264-layer-pattern-dyadic,dyadic temporal layer pattern>> when 314e5c31af7Sopenharmony_ci encoding multiple temporal layers. 315e5c31af7Sopenharmony_ci * pname:minQp indicates the minimum QP value supported. 316e5c31af7Sopenharmony_ci * pname:maxQp indicates the maximum QP value supported. 317e5c31af7Sopenharmony_ci * pname:prefersGopRemainingFrames indicates that the implementation's rate 318e5c31af7Sopenharmony_ci control algorithm prefers the application to specify the number of 319e5c31af7Sopenharmony_ci frames of each type <<encode-h264-gop-remaining-frames,remaining>> in 320e5c31af7Sopenharmony_ci the current <<encode-h264-gop,group of pictures>> when beginning a 321e5c31af7Sopenharmony_ci <<video-coding-scope,video coding scope>>. 322e5c31af7Sopenharmony_ci * pname:requiresGopRemainingFrames indicates that the implementation's 323e5c31af7Sopenharmony_ci rate control algorithm requires the application to specify the number of 324e5c31af7Sopenharmony_ci frames of each type <<encode-h264-gop-remaining-frames,remaining>> in 325e5c31af7Sopenharmony_ci the current <<encode-h264-gop,group of pictures>> when beginning a 326e5c31af7Sopenharmony_ci <<video-coding-scope,video coding scope>>. 327e5c31af7Sopenharmony_ci * pname:stdSyntaxFlags is a bitmask of 328e5c31af7Sopenharmony_ci elink:VkVideoEncodeH264StdFlagBitsKHR indicating capabilities related to 329e5c31af7Sopenharmony_ci H.264 syntax elements. 330e5c31af7Sopenharmony_ci 331e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264CapabilitiesKHR.adoc[] 332e5c31af7Sopenharmony_ci-- 333e5c31af7Sopenharmony_ci 334e5c31af7Sopenharmony_ci 335e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264CapabilityFlagBitsKHR',desc='H.264 encode capability flags',type='enums'] 336e5c31af7Sopenharmony_ci-- 337e5c31af7Sopenharmony_ciBits which may: be set in 338e5c31af7Sopenharmony_cislink:VkVideoEncodeH264CapabilitiesKHR::pname:flags, indicating the H.264 339e5c31af7Sopenharmony_ciencoding capabilities supported, are: 340e5c31af7Sopenharmony_ci 341e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoEncodeH264CapabilityFlagBitsKHR.adoc[] 342e5c31af7Sopenharmony_ci 343e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_KHR indicates 344e5c31af7Sopenharmony_ci whether the implementation may: be able to generate HRD compliant 345e5c31af7Sopenharmony_ci bitstreams if any of the code:nal_hrd_parameters_present_flag or 346e5c31af7Sopenharmony_ci code:vcl_hrd_parameters_present_flag members of 347e5c31af7Sopenharmony_ci code:StdVideoH264SpsVuiFlags are set to `1` in the 348e5c31af7Sopenharmony_ci <<encode-h264-active-sps,active SPS>>. 349e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR 350e5c31af7Sopenharmony_ci indicates that if code:StdVideoH264PpsFlags::code:weighted_pred_flag is 351e5c31af7Sopenharmony_ci set to `1` or 352e5c31af7Sopenharmony_ci code:StdVideoH264PictureParameterSet::code:weighted_bipred_idc is set to 353e5c31af7Sopenharmony_ci code:STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT in the 354e5c31af7Sopenharmony_ci <<encode-h264-active-pps,active PPS>> when encoding a 355e5c31af7Sopenharmony_ci <<encode-h264-p-pic,P picture>> or <<encode-h264-b-pic,B picture>>, 356e5c31af7Sopenharmony_ci respectively, then the implementation is able to internally decide 357e5c31af7Sopenharmony_ci syntax for code:pred_weight_table, as defined in section 7.4.3.2 of the 358e5c31af7Sopenharmony_ci <<itu-t-h264,ITU-T H.264 Specification>>, and the application is not 359e5c31af7Sopenharmony_ci required: to provide a weight table in the 360e5c31af7Sopenharmony_ci <<encode-h264-slice-header-params,H.264 slice header parameters>>. 361e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_KHR 362e5c31af7Sopenharmony_ci indicates that each slice in a frame with multiple slices may begin or 363e5c31af7Sopenharmony_ci finish at any offset in a macroblock row. 364e5c31af7Sopenharmony_ci If not supported, all slices in the frame must: begin at the start of a 365e5c31af7Sopenharmony_ci macroblock row (and hence each slice must: finish at the end of a 366e5c31af7Sopenharmony_ci macroblock row). 367e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR 368e5c31af7Sopenharmony_ci indicates that when a frame is encoded with multiple slices, the 369e5c31af7Sopenharmony_ci implementation allows encoding each slice with a different 370e5c31af7Sopenharmony_ci code:StdVideoEncodeH264SliceHeader::code:slice_type specified in the 371e5c31af7Sopenharmony_ci <<encode-h264-slice-header-params,H.264 slice header parameters>>. 372e5c31af7Sopenharmony_ci If not supported, all slices of the frame must: be encoded with the same 373e5c31af7Sopenharmony_ci code:slice_type which corresponds to the picture type of the frame. 374e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR 375e5c31af7Sopenharmony_ci indicates support for using a <<encode-h264-b-pic,B frame>> as L0 376e5c31af7Sopenharmony_ci reference, as specified in 377e5c31af7Sopenharmony_ci code:StdVideoEncodeH264ReferenceListsInfo::code:RefPicList0 in the 378e5c31af7Sopenharmony_ci <<encode-h264-picture-info,H.264 picture information>>. 379e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR 380e5c31af7Sopenharmony_ci indicates support for using a <<encode-h264-b-pic,B frame>> as L1 381e5c31af7Sopenharmony_ci reference, as specified in 382e5c31af7Sopenharmony_ci code:StdVideoEncodeH264ReferenceListsInfo::code:RefPicList1 in the 383e5c31af7Sopenharmony_ci <<encode-h264-picture-info,H.264 picture information>>. 384e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR 385e5c31af7Sopenharmony_ci indicates support for specifying different QP values in the members of 386e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264QpKHR. 387e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_CAPABILITY_PER_SLICE_CONSTANT_QP_BIT_KHR 388e5c31af7Sopenharmony_ci indicates support for specifying different constant QP values for each 389e5c31af7Sopenharmony_ci slice. 390e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR 391e5c31af7Sopenharmony_ci indicates support for generating prefix NAL units by setting 392e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264PictureInfoKHR::pname:generatePrefixNalu to 393e5c31af7Sopenharmony_ci ename:VK_TRUE. 394e5c31af7Sopenharmony_ci-- 395e5c31af7Sopenharmony_ci 396e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264CapabilityFlagsKHR',desc='Bitmask of VkVideoEncodeH264CapabilityFlagBitsKHR',type='flags'] 397e5c31af7Sopenharmony_ci-- 398e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoEncodeH264CapabilityFlagsKHR.adoc[] 399e5c31af7Sopenharmony_ci 400e5c31af7Sopenharmony_citname:VkVideoEncodeH264CapabilityFlagsKHR is a bitmask type for setting a 401e5c31af7Sopenharmony_cimask of zero or more elink:VkVideoEncodeH264CapabilityFlagBitsKHR. 402e5c31af7Sopenharmony_ci-- 403e5c31af7Sopenharmony_ci 404e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264StdFlagBitsKHR',desc='Video encode H.264 syntax capability flags',type='enums'] 405e5c31af7Sopenharmony_ci-- 406e5c31af7Sopenharmony_ciBits which may: be set in 407e5c31af7Sopenharmony_cislink:VkVideoEncodeH264CapabilitiesKHR::pname:stdSyntaxFlags, indicating the 408e5c31af7Sopenharmony_cicapabilities related to the H.264 syntax elements, are: 409e5c31af7Sopenharmony_ci 410e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoEncodeH264StdFlagBitsKHR.adoc[] 411e5c31af7Sopenharmony_ci 412e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR 413e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 414e5c31af7Sopenharmony_ci application-provided value for 415e5c31af7Sopenharmony_ci code:StdVideoH264SpsFlags::code:separate_colour_plane_flag in the 416e5c31af7Sopenharmony_ci <<encode-h264-sps,SPS>> when that value is `1`. 417e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET_BIT_KHR 418e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 419e5c31af7Sopenharmony_ci application-provided value for 420e5c31af7Sopenharmony_ci code:StdVideoH264SpsFlags::code:qpprime_y_zero_transform_bypass_flag in 421e5c31af7Sopenharmony_ci the <<encode-h264-sps,SPS>> when that value is `1`. 422e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_SCALING_MATRIX_PRESENT_FLAG_SET_BIT_KHR 423e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 424e5c31af7Sopenharmony_ci application-provided values for 425e5c31af7Sopenharmony_ci code:StdVideoH264SpsFlags::code:seq_scaling_matrix_present_flag in the 426e5c31af7Sopenharmony_ci <<encode-h264-sps,SPS>> and 427e5c31af7Sopenharmony_ci code:StdVideoH264PpsFlags::code:pic_scaling_matrix_present_flag in the 428e5c31af7Sopenharmony_ci <<encode-h264-pps,PPS>> when any of those values are `1`. 429e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_CHROMA_QP_INDEX_OFFSET_BIT_KHR indicates 430e5c31af7Sopenharmony_ci whether the implementation supports using the application-provided value 431e5c31af7Sopenharmony_ci for code:StdVideoH264PictureParameterSet::code:chroma_qp_index_offset in 432e5c31af7Sopenharmony_ci the <<encode-h264-pps,PPS>> when that value is non-zero. 433e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_SECOND_CHROMA_QP_INDEX_OFFSET_BIT_KHR 434e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 435e5c31af7Sopenharmony_ci application-provided value for 436e5c31af7Sopenharmony_ci code:StdVideoH264PictureParameterSet::code:second_chroma_qp_index_offset 437e5c31af7Sopenharmony_ci in the <<encode-h264-pps,PPS>> when that value is non-zero. 438e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_PIC_INIT_QP_MINUS26_BIT_KHR indicates 439e5c31af7Sopenharmony_ci whether the implementation supports using the application-provided value 440e5c31af7Sopenharmony_ci for code:StdVideoH264PictureParameterSet::code:pic_init_qp_minus26 in 441e5c31af7Sopenharmony_ci the <<encode-h264-pps,PPS>> when that value is non-zero. 442e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR indicates 443e5c31af7Sopenharmony_ci whether the implementation supports using the application-provided value 444e5c31af7Sopenharmony_ci for code:StdVideoH264PpsFlags::code:weighted_pred_flag in the 445e5c31af7Sopenharmony_ci <<encode-h264-pps,PPS>> when that value is `1`. 446e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_EXPLICIT_BIT_KHR 447e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 448e5c31af7Sopenharmony_ci application-provided value for 449e5c31af7Sopenharmony_ci code:StdVideoH264PictureParameterSet::code:weighted_bipred_idc in the 450e5c31af7Sopenharmony_ci <<encode-h264-pps,PPS>> when that value is 451e5c31af7Sopenharmony_ci code:STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT. 452e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_IMPLICIT_BIT_KHR 453e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 454e5c31af7Sopenharmony_ci application-provided value for 455e5c31af7Sopenharmony_ci code:StdVideoH264PictureParameterSet::code:weighted_bipred_idc in the 456e5c31af7Sopenharmony_ci <<encode-h264-pps,PPS>> when that value is 457e5c31af7Sopenharmony_ci code:STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT. 458e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_TRANSFORM_8X8_MODE_FLAG_SET_BIT_KHR 459e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 460e5c31af7Sopenharmony_ci application-provided value for 461e5c31af7Sopenharmony_ci code:StdVideoH264PpsFlags::code:transform_8x8_mode_flag in the 462e5c31af7Sopenharmony_ci <<encode-h264-pps,PPS>> when that value is `1`. 463e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_DIRECT_SPATIAL_MV_PRED_FLAG_UNSET_BIT_KHR 464e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 465e5c31af7Sopenharmony_ci application-provided value for 466e5c31af7Sopenharmony_ci code:StdVideoEncodeH264SliceHeaderFlags::code:direct_spatial_mv_pred_flag 467e5c31af7Sopenharmony_ci in the <<encode-h264-slice-header-params,H.264 slice header parameters>> 468e5c31af7Sopenharmony_ci when that value is `0`. 469e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_UNSET_BIT_KHR 470e5c31af7Sopenharmony_ci indicates whether the implementation supports CAVLC entropy coding, as 471e5c31af7Sopenharmony_ci defined in section 9.2 of the <<itu-t-h264,ITU-T H.264 Specification>>, 472e5c31af7Sopenharmony_ci and thus supports using the application-provided value for 473e5c31af7Sopenharmony_ci code:StdVideoH264PpsFlags::code:entropy_coding_mode_flag in the 474e5c31af7Sopenharmony_ci <<encode-h264-pps,PPS>> when that value is `0`. 475e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_SET_BIT_KHR 476e5c31af7Sopenharmony_ci indicates whether the implementation supports CABAC entropy coding, as 477e5c31af7Sopenharmony_ci defined in section 9.3 of the <<itu-t-h264,ITU-T H.264 Specification>>, 478e5c31af7Sopenharmony_ci and thus supports using the application-provided value for 479e5c31af7Sopenharmony_ci code:StdVideoH264PpsFlags::code:entropy_coding_mode_flag in the 480e5c31af7Sopenharmony_ci <<encode-h264-pps,PPS>> when that value is `1`. 481e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_DIRECT_8X8_INFERENCE_FLAG_UNSET_BIT_KHR 482e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 483e5c31af7Sopenharmony_ci application-provided value for 484e5c31af7Sopenharmony_ci code:StdVideoH264SpsFlags::code:direct_8x8_inference_flag in the 485e5c31af7Sopenharmony_ci <<encode-h264-sps,SPS>> when that value is `0`. 486e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR 487e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 488e5c31af7Sopenharmony_ci application-provided value for 489e5c31af7Sopenharmony_ci code:StdVideoH264PpsFlags::code:constrained_intra_pred_flag in the 490e5c31af7Sopenharmony_ci <<encode-h264-pps,PPS>> when that value is `1`. 491e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_DISABLED_BIT_KHR 492e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 493e5c31af7Sopenharmony_ci application-provided value for 494e5c31af7Sopenharmony_ci code:StdVideoEncodeH264SliceHeader::code:disable_deblocking_filter_idc 495e5c31af7Sopenharmony_ci in the <<encode-h264-slice-header-params,H.264 slice header parameters>> 496e5c31af7Sopenharmony_ci when that value is 497e5c31af7Sopenharmony_ci code:STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED. 498e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_ENABLED_BIT_KHR 499e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 500e5c31af7Sopenharmony_ci application-provided value for 501e5c31af7Sopenharmony_ci code:StdVideoEncodeH264SliceHeader::code:disable_deblocking_filter_idc 502e5c31af7Sopenharmony_ci in the <<encode-h264-slice-header-params,H.264 slice header parameters>> 503e5c31af7Sopenharmony_ci when that value is 504e5c31af7Sopenharmony_ci code:STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED. 505e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_PARTIAL_BIT_KHR 506e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 507e5c31af7Sopenharmony_ci application-provided value for 508e5c31af7Sopenharmony_ci code:StdVideoEncodeH264SliceHeader::code:disable_deblocking_filter_idc 509e5c31af7Sopenharmony_ci in the <<encode-h264-slice-header-params,H.264 slice header parameters>> 510e5c31af7Sopenharmony_ci when that value is 511e5c31af7Sopenharmony_ci code:STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL. 512e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_SLICE_QP_DELTA_BIT_KHR indicates whether 513e5c31af7Sopenharmony_ci the implementation supports using the application-provided value for 514e5c31af7Sopenharmony_ci code:StdVideoEncodeH264SliceHeader::code:slice_qp_delta in the 515e5c31af7Sopenharmony_ci <<encode-h264-slice-header-params,H.264 slice header parameters>> when 516e5c31af7Sopenharmony_ci that value is identical across the slices of the encoded frame. 517e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR 518e5c31af7Sopenharmony_ci indicates whether the implementation supports using the 519e5c31af7Sopenharmony_ci application-provided value for 520e5c31af7Sopenharmony_ci code:StdVideoEncodeH264SliceHeader::code:slice_qp_delta in the 521e5c31af7Sopenharmony_ci <<encode-h264-slice-header-params,H.264 slice header parameters>> when 522e5c31af7Sopenharmony_ci that value is different across the slices of the encoded frame. 523e5c31af7Sopenharmony_ci 524e5c31af7Sopenharmony_ciThese capability flags provide information to the application about specific 525e5c31af7Sopenharmony_ciH.264 syntax element values that the implementation supports without having 526e5c31af7Sopenharmony_cito <<encode-h264-overrides,override>> them and do not otherwise restrict the 527e5c31af7Sopenharmony_civalues that the application can: specify for any of the mentioned H.264 528e5c31af7Sopenharmony_cisyntax elements. 529e5c31af7Sopenharmony_ci-- 530e5c31af7Sopenharmony_ci 531e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264StdFlagsKHR',desc='Bitmask of VkVideoEncodeH264StdFlagBitsKHR',type='flags'] 532e5c31af7Sopenharmony_ci-- 533e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoEncodeH264StdFlagsKHR.adoc[] 534e5c31af7Sopenharmony_ci 535e5c31af7Sopenharmony_citname:VkVideoEncodeH264StdFlagsKHR is a bitmask type for setting a mask of 536e5c31af7Sopenharmony_cizero or more elink:VkVideoEncodeH264StdFlagBitsKHR. 537e5c31af7Sopenharmony_ci-- 538e5c31af7Sopenharmony_ci 539e5c31af7Sopenharmony_ci 540e5c31af7Sopenharmony_ci=== H.264 Encode Quality Level Properties 541e5c31af7Sopenharmony_ci 542e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264QualityLevelPropertiesKHR',desc='Structure describing the H.264 encode quality level properties',type='structs'] 543e5c31af7Sopenharmony_ci-- 544e5c31af7Sopenharmony_ciWhen calling flink:vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR 545e5c31af7Sopenharmony_ciwith pname:pVideoProfile->videoCodecOperation specified as 546e5c31af7Sopenharmony_ciename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the 547e5c31af7Sopenharmony_cislink:VkVideoEncodeH264QualityLevelPropertiesKHR structure must: be included 548e5c31af7Sopenharmony_ciin the pname:pNext chain of the slink:VkVideoEncodeQualityLevelPropertiesKHR 549e5c31af7Sopenharmony_cistructure to retrieve additional video encode quality level properties 550e5c31af7Sopenharmony_cispecific to H.264 encoding. 551e5c31af7Sopenharmony_ci 552e5c31af7Sopenharmony_ciThe slink:VkVideoEncodeH264QualityLevelPropertiesKHR structure is defined 553e5c31af7Sopenharmony_cias: 554e5c31af7Sopenharmony_ci 555e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264QualityLevelPropertiesKHR.adoc[] 556e5c31af7Sopenharmony_ci 557e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 558e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 559e5c31af7Sopenharmony_ci structure. 560e5c31af7Sopenharmony_ci * pname:preferredRateControlFlags is a bitmask of 561e5c31af7Sopenharmony_ci elink:VkVideoEncodeH264RateControlFlagBitsKHR values indicating the 562e5c31af7Sopenharmony_ci preferred flags to use for 563e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264RateControlInfoKHR::pname:flags. 564e5c31af7Sopenharmony_ci * pname:preferredGopFrameCount indicates the preferred value to use for 565e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264RateControlInfoKHR::pname:gopFrameCount. 566e5c31af7Sopenharmony_ci * pname:preferredIdrPeriod indicates the preferred value to use for 567e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264RateControlInfoKHR::pname:idrPeriod. 568e5c31af7Sopenharmony_ci * pname:preferredConsecutiveBFrameCount indicates the preferred value to 569e5c31af7Sopenharmony_ci use for 570e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264RateControlInfoKHR::pname:consecutiveBFrameCount. 571e5c31af7Sopenharmony_ci * pname:preferredTemporalLayerCount indicates the preferred value to use 572e5c31af7Sopenharmony_ci for slink:VkVideoEncodeH264RateControlInfoKHR::pname:temporalLayerCount. 573e5c31af7Sopenharmony_ci * pname:preferredConstantQp indicates the preferred values to use for 574e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264NaluSliceInfoKHR::pname:constantQp for each 575e5c31af7Sopenharmony_ci picture type when using <<encode-rate-control-modes,rate control mode>> 576e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR. 577e5c31af7Sopenharmony_ci * pname:preferredMaxL0ReferenceCount indicates the preferred maximum 578e5c31af7Sopenharmony_ci number of reference pictures to use in the reference list L0. 579e5c31af7Sopenharmony_ci * pname:preferredMaxL1ReferenceCount indicates the preferred maximum 580e5c31af7Sopenharmony_ci number of reference pictures to use in the reference list L1. 581e5c31af7Sopenharmony_ci * pname:preferredStdEntropyCodingModeFlag indicates the preferred value to 582e5c31af7Sopenharmony_ci use for code:entropy_coding_mode_flag in code:StdVideoH264PpsFlags. 583e5c31af7Sopenharmony_ci 584e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264QualityLevelPropertiesKHR.adoc[] 585e5c31af7Sopenharmony_ci-- 586e5c31af7Sopenharmony_ci 587e5c31af7Sopenharmony_ci 588e5c31af7Sopenharmony_ci=== H.264 Encode Session 589e5c31af7Sopenharmony_ci 590e5c31af7Sopenharmony_ciAdditional parameters can be specified when creating a video session with an 591e5c31af7Sopenharmony_ciH.264 encode profile by including an instance of the 592e5c31af7Sopenharmony_cislink:VkVideoEncodeH264SessionCreateInfoKHR structure in the pname:pNext 593e5c31af7Sopenharmony_cichain of slink:VkVideoSessionCreateInfoKHR. 594e5c31af7Sopenharmony_ci 595e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264SessionCreateInfoKHR',desc='Structure specifies H.264 encode session parameters',type='structs'] 596e5c31af7Sopenharmony_ci-- 597e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264SessionCreateInfoKHR structure is defined as: 598e5c31af7Sopenharmony_ci 599e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264SessionCreateInfoKHR.adoc[] 600e5c31af7Sopenharmony_ci 601e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 602e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 603e5c31af7Sopenharmony_ci structure. 604e5c31af7Sopenharmony_ci * pname:useMaxLevelIdc indicates whether the value of pname:maxLevelIdc 605e5c31af7Sopenharmony_ci should be used by the implementation. 606e5c31af7Sopenharmony_ci When it is set to ename:VK_FALSE, the implementation ignores the value 607e5c31af7Sopenharmony_ci of pname:maxLevelIdc and uses the value of 608e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264CapabilitiesKHR::pname:maxLevelIdc, as reported 609e5c31af7Sopenharmony_ci by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile. 610e5c31af7Sopenharmony_ci * pname:maxLevelIdc is a code:StdVideoH264LevelIdc value specifying the 611e5c31af7Sopenharmony_ci upper bound on the H.264 level for the video bitstreams produced by the 612e5c31af7Sopenharmony_ci created video session, where enum constant 613e5c31af7Sopenharmony_ci `STD_VIDEO_H264_LEVEL_IDC_<major>_<minor>` identifies H.264 level 614e5c31af7Sopenharmony_ci `<major>.<minor>` as defined in section A.3 of the <<itu-t-h264,ITU-T 615e5c31af7Sopenharmony_ci H.264 Specification>>. 616e5c31af7Sopenharmony_ci 617e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264SessionCreateInfoKHR.adoc[] 618e5c31af7Sopenharmony_ci-- 619e5c31af7Sopenharmony_ci 620e5c31af7Sopenharmony_ci 621e5c31af7Sopenharmony_ci[[encode-h264-parameter-sets]] 622e5c31af7Sopenharmony_ci=== H.264 Encode Parameter Sets 623e5c31af7Sopenharmony_ci 624e5c31af7Sopenharmony_ci<<video-session-parameters,Video session parameters>> objects created with 625e5c31af7Sopenharmony_cithe video codec operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR 626e5c31af7Sopenharmony_cican: contain the following types of parameters: 627e5c31af7Sopenharmony_ci 628e5c31af7Sopenharmony_ci:operationType: encode 629e5c31af7Sopenharmony_ciinclude::{chapters}/video/h264_parameter_sets.adoc[] 630e5c31af7Sopenharmony_ci 631e5c31af7Sopenharmony_ciImplementations may: override any of these parameters according to the 632e5c31af7Sopenharmony_cisemantics defined in the <<encode-overrides,Video Encode Parameter 633e5c31af7Sopenharmony_ciOverrides>> section before storing the resulting H.264 parameter sets into 634e5c31af7Sopenharmony_cithe video session parameters object. 635e5c31af7Sopenharmony_ciApplications need to use the flink:vkGetEncodedVideoSessionParametersKHR 636e5c31af7Sopenharmony_cicommand to determine whether any implementation overrides happened and to 637e5c31af7Sopenharmony_ciretrieve the encoded H.264 parameter sets in order to be able to produce a 638e5c31af7Sopenharmony_cicompliant H.264 video bitstream. 639e5c31af7Sopenharmony_ci 640e5c31af7Sopenharmony_ciSuch H.264 parameter set overrides may: also have cascading effects on the 641e5c31af7Sopenharmony_ciimplementation overrides applied to the encoded bitstream produced by video 642e5c31af7Sopenharmony_ciencode operations. 643e5c31af7Sopenharmony_ciIf the implementation supports the 644e5c31af7Sopenharmony_ciename:VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR 645e5c31af7Sopenharmony_ci<<queries-video-encode-feedback,video encode feedback query>> flag, then the 646e5c31af7Sopenharmony_ciapplication can: use such queries to retrieve feedback about whether any 647e5c31af7Sopenharmony_ciimplementation overrides have been applied to the encoded bitstream. 648e5c31af7Sopenharmony_ci 649e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264SessionParametersCreateInfoKHR',desc='Structure specifies H.264 encoder parameter set information',type='structs'] 650e5c31af7Sopenharmony_ci-- 651e5c31af7Sopenharmony_ciWhen a <<video-session-parameters,video session parameters>> object is 652e5c31af7Sopenharmony_cicreated with the codec operation 653e5c31af7Sopenharmony_ciename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the 654e5c31af7Sopenharmony_cislink:VkVideoSessionParametersCreateInfoKHR::pname:pNext chain must: include 655e5c31af7Sopenharmony_cia sname:VkVideoEncodeH264SessionParametersCreateInfoKHR structure specifying 656e5c31af7Sopenharmony_cithe capacity and initial contents of the object. 657e5c31af7Sopenharmony_ci 658e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264SessionParametersCreateInfoKHR structure is 659e5c31af7Sopenharmony_cidefined as: 660e5c31af7Sopenharmony_ci 661e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264SessionParametersCreateInfoKHR.adoc[] 662e5c31af7Sopenharmony_ci 663e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 664e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 665e5c31af7Sopenharmony_ci structure. 666e5c31af7Sopenharmony_ci * pname:maxStdSPSCount is the maximum number of <<encode-h264-sps,H.264 667e5c31af7Sopenharmony_ci SPS>> entries the created sname:VkVideoSessionParametersKHR can: 668e5c31af7Sopenharmony_ci contain. 669e5c31af7Sopenharmony_ci * pname:maxStdPPSCount is the maximum number of <<encode-h264-pps,H.264 670e5c31af7Sopenharmony_ci PPS>> entries the created sname:VkVideoSessionParametersKHR can: 671e5c31af7Sopenharmony_ci contain. 672e5c31af7Sopenharmony_ci * pname:pParametersAddInfo is `NULL` or a pointer to a 673e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersAddInfoKHR structure specifying 674e5c31af7Sopenharmony_ci H.264 parameters to add upon object creation. 675e5c31af7Sopenharmony_ci 676e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264SessionParametersCreateInfoKHR.adoc[] 677e5c31af7Sopenharmony_ci-- 678e5c31af7Sopenharmony_ci 679e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264SessionParametersAddInfoKHR',desc='Structure specifies H.264 encoder parameter set information',type='structs'] 680e5c31af7Sopenharmony_ci-- 681e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264SessionParametersAddInfoKHR structure is defined 682e5c31af7Sopenharmony_cias: 683e5c31af7Sopenharmony_ci 684e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264SessionParametersAddInfoKHR.adoc[] 685e5c31af7Sopenharmony_ci 686e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 687e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 688e5c31af7Sopenharmony_ci structure. 689e5c31af7Sopenharmony_ci * pname:stdSPSCount is the number of elements in the pname:pStdSPSs array. 690e5c31af7Sopenharmony_ci * pname:pStdSPSs is a pointer to an array of 691e5c31af7Sopenharmony_ci code:StdVideoH264SequenceParameterSet structures describing the 692e5c31af7Sopenharmony_ci <<encode-h264-sps,H.264 SPS>> entries to add. 693e5c31af7Sopenharmony_ci * pname:stdPPSCount is the number of elements in the pname:pStdPPSs array. 694e5c31af7Sopenharmony_ci * pname:pStdPPSs is a pointer to an array of 695e5c31af7Sopenharmony_ci code:StdVideoH264PictureParameterSet structures describing the 696e5c31af7Sopenharmony_ci <<encode-h264-pps,H.264 PPS>> entries to add. 697e5c31af7Sopenharmony_ci 698e5c31af7Sopenharmony_ciThis structure can: be specified in the following places: 699e5c31af7Sopenharmony_ci 700e5c31af7Sopenharmony_ci * In the pname:pParametersAddInfo member of the 701e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersCreateInfoKHR structure 702e5c31af7Sopenharmony_ci specified in the pname:pNext chain of 703e5c31af7Sopenharmony_ci slink:VkVideoSessionParametersCreateInfoKHR used to create a 704e5c31af7Sopenharmony_ci <<video-session-parameters,video session parameters>> object. 705e5c31af7Sopenharmony_ci In this case, if the video codec operation the video session parameters 706e5c31af7Sopenharmony_ci object is created with is 707e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then it defines the 708e5c31af7Sopenharmony_ci set of initial parameters to add to the created object (see 709e5c31af7Sopenharmony_ci <<creating-video-session-parameters,Creating Video Session 710e5c31af7Sopenharmony_ci Parameters>>). 711e5c31af7Sopenharmony_ci * In the pname:pNext chain of slink:VkVideoSessionParametersUpdateInfoKHR. 712e5c31af7Sopenharmony_ci In this case, if the video codec operation the 713e5c31af7Sopenharmony_ci <<video-session-parameters,video session parameters>> object to be 714e5c31af7Sopenharmony_ci updated was created with is 715e5c31af7Sopenharmony_ci ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then it defines the 716e5c31af7Sopenharmony_ci set of parameters to add to it (see 717e5c31af7Sopenharmony_ci <<video-session-parameters-update,Updating Video Session Parameters>>). 718e5c31af7Sopenharmony_ci 719e5c31af7Sopenharmony_ci.Valid Usage 720e5c31af7Sopenharmony_ci**** 721e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264SessionParametersAddInfoKHR-None-04837]] 722e5c31af7Sopenharmony_ci The pname:seq_parameter_set_id member of each 723e5c31af7Sopenharmony_ci code:StdVideoH264SequenceParameterSet structure specified in the 724e5c31af7Sopenharmony_ci elements of pname:pStdSPSs must: be unique within pname:pStdSPSs 725e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264SessionParametersAddInfoKHR-None-04838]] 726e5c31af7Sopenharmony_ci The pair constructed from the pname:seq_parameter_set_id and 727e5c31af7Sopenharmony_ci pname:pic_parameter_set_id members of each 728e5c31af7Sopenharmony_ci code:StdVideoH264PictureParameterSet structure specified in the elements 729e5c31af7Sopenharmony_ci of pname:pStdPPSs must: be unique within pname:pStdPPSs 730e5c31af7Sopenharmony_ci**** 731e5c31af7Sopenharmony_ci 732e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264SessionParametersAddInfoKHR.adoc[] 733e5c31af7Sopenharmony_ci-- 734e5c31af7Sopenharmony_ci 735e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264SessionParametersGetInfoKHR',desc='Structure specifying parameters for retrieving encoded H.264 parameter set data',type='structs'] 736e5c31af7Sopenharmony_ci-- 737e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264SessionParametersGetInfoKHR structure is defined 738e5c31af7Sopenharmony_cias: 739e5c31af7Sopenharmony_ci 740e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264SessionParametersGetInfoKHR.adoc[] 741e5c31af7Sopenharmony_ci 742e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 743e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 744e5c31af7Sopenharmony_ci structure. 745e5c31af7Sopenharmony_ci * pname:writeStdSPS indicates whether the encoded <<encode-h264-sps,H.264 746e5c31af7Sopenharmony_ci sequence parameter set>> identified by pname:stdSPSId is requested to be 747e5c31af7Sopenharmony_ci retrieved. 748e5c31af7Sopenharmony_ci * pname:writeStdPPS indicates whether the encoded <<encode-h264-pps,H.264 749e5c31af7Sopenharmony_ci picture parameter set>> identified by the pair constructed from 750e5c31af7Sopenharmony_ci pname:stdSPSId and pname:stdPPSId is requested to be retrieved. 751e5c31af7Sopenharmony_ci * pname:stdSPSId specifies the H.264 sequence parameter set ID used to 752e5c31af7Sopenharmony_ci identify the retrieved H.264 sequence and/or picture parameter set(s). 753e5c31af7Sopenharmony_ci * pname:stdPPSId specifies the H.264 picture parameter set ID used to 754e5c31af7Sopenharmony_ci identify the retrieved H.264 picture parameter set when 755e5c31af7Sopenharmony_ci pname:writeStdPPS is set to ename:VK_TRUE. 756e5c31af7Sopenharmony_ci 757e5c31af7Sopenharmony_ciWhen this structure is specified in the pname:pNext chain of the 758e5c31af7Sopenharmony_cislink:VkVideoEncodeSessionParametersGetInfoKHR structure passed to 759e5c31af7Sopenharmony_ciflink:vkGetEncodedVideoSessionParametersKHR, the command will write encoded 760e5c31af7Sopenharmony_ciparameter data to the output buffer in the following order: 761e5c31af7Sopenharmony_ci 762e5c31af7Sopenharmony_ci . The <<encode-h264-sps,H.264 sequence parameter set>> identified by 763e5c31af7Sopenharmony_ci pname:stdSPSId, if pname:writeStdSPS is set to ename:VK_TRUE. 764e5c31af7Sopenharmony_ci . The <<encode-h264-pps,H.264 picture parameter set>> identified by the 765e5c31af7Sopenharmony_ci pair constructed from pname:stdSPSId and pname:stdPPSId, if 766e5c31af7Sopenharmony_ci pname:writeStdPPS is set to ename:VK_TRUE. 767e5c31af7Sopenharmony_ci 768e5c31af7Sopenharmony_ci.Valid Usage 769e5c31af7Sopenharmony_ci**** 770e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264SessionParametersGetInfoKHR-writeStdSPS-08279]] 771e5c31af7Sopenharmony_ci At least one of pname:writeStdSPS and pname:writeStdPPS must: be set to 772e5c31af7Sopenharmony_ci ename:VK_TRUE 773e5c31af7Sopenharmony_ci**** 774e5c31af7Sopenharmony_ci 775e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264SessionParametersGetInfoKHR.adoc[] 776e5c31af7Sopenharmony_ci-- 777e5c31af7Sopenharmony_ci 778e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264SessionParametersFeedbackInfoKHR',desc='Structure providing feedback about the requested H.264 video session parameters',type='structs'] 779e5c31af7Sopenharmony_ci-- 780e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264SessionParametersFeedbackInfoKHR structure is 781e5c31af7Sopenharmony_cidefined as: 782e5c31af7Sopenharmony_ci 783e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264SessionParametersFeedbackInfoKHR.adoc[] 784e5c31af7Sopenharmony_ci 785e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 786e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 787e5c31af7Sopenharmony_ci structure. 788e5c31af7Sopenharmony_ci * pname:hasStdSPSOverrides indicates whether any of the parameters of the 789e5c31af7Sopenharmony_ci requested <<encode-h264-sps,H.264 sequence parameter set>>, if one was 790e5c31af7Sopenharmony_ci requested via 791e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersGetInfoKHR::pname:writeStdSPS, 792e5c31af7Sopenharmony_ci were <<encode-overrides,overridden>> by the implementation. 793e5c31af7Sopenharmony_ci * pname:hasStdPPSOverrides indicates whether any of the parameters of the 794e5c31af7Sopenharmony_ci requested <<encode-h264-pps,H.264 picture parameter set>>, if one was 795e5c31af7Sopenharmony_ci requested via 796e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264SessionParametersGetInfoKHR::pname:writeStdPPS, 797e5c31af7Sopenharmony_ci were <<encode-overrides,overridden>> by the implementation. 798e5c31af7Sopenharmony_ci 799e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264SessionParametersFeedbackInfoKHR.adoc[] 800e5c31af7Sopenharmony_ci-- 801e5c31af7Sopenharmony_ci 802e5c31af7Sopenharmony_ci=== H.264 Encoding Parameters 803e5c31af7Sopenharmony_ci 804e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264PictureInfoKHR',desc='Structure specifies H.264 encode frame parameters',type='structs'] 805e5c31af7Sopenharmony_ci-- 806e5c31af7Sopenharmony_ciThe slink:VkVideoEncodeH264PictureInfoKHR structure is defined as: 807e5c31af7Sopenharmony_ci 808e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264PictureInfoKHR.adoc[] 809e5c31af7Sopenharmony_ci 810e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 811e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 812e5c31af7Sopenharmony_ci structure. 813e5c31af7Sopenharmony_ci * pname:naluSliceEntryCount is the number of elements in 814e5c31af7Sopenharmony_ci pname:pNaluSliceEntries. 815e5c31af7Sopenharmony_ci * pname:pNaluSliceEntries is a pointer to an array of 816e5c31af7Sopenharmony_ci pname:naluSliceEntryCount slink:VkVideoEncodeH264NaluSliceInfoKHR 817e5c31af7Sopenharmony_ci structures specifying the parameters of the individual H.264 slices to 818e5c31af7Sopenharmony_ci encode for the input picture. 819e5c31af7Sopenharmony_ci * pname:pStdPictureInfo is a pointer to a 820e5c31af7Sopenharmony_ci code:StdVideoEncodeH264PictureInfo structure specifying 821e5c31af7Sopenharmony_ci <<encode-h264-picture-info,H.264 picture information>>. 822e5c31af7Sopenharmony_ci * pname:generatePrefixNalu controls whether prefix NALUs are generated 823e5c31af7Sopenharmony_ci before slice NALUs into the target bitstream, as defined in sections 824e5c31af7Sopenharmony_ci 7.3.2.12 and 7.4.2.12 of the <<itu-t-h264,ITU-T H.264 Specification>>. 825e5c31af7Sopenharmony_ci 826e5c31af7Sopenharmony_ciThis structure is specified in the pname:pNext chain of the 827e5c31af7Sopenharmony_cislink:VkVideoEncodeInfoKHR structure passed to flink:vkCmdEncodeVideoKHR to 828e5c31af7Sopenharmony_cispecify the codec-specific picture information for an <<encode-h264,H.264 829e5c31af7Sopenharmony_ciencode operation>>. 830e5c31af7Sopenharmony_ci 831e5c31af7Sopenharmony_ci[[encode-h264-input-picture-info]] 832e5c31af7Sopenharmony_ciEncode Input Picture Information:: 833e5c31af7Sopenharmony_ci 834e5c31af7Sopenharmony_ciWhen this structure is specified in the pname:pNext chain of the 835e5c31af7Sopenharmony_cislink:VkVideoEncodeInfoKHR structure passed to flink:vkCmdEncodeVideoKHR, 836e5c31af7Sopenharmony_cithe information related to the <<encode-input-picture-info,encode input 837e5c31af7Sopenharmony_cipicture>> is defined as follows: 838e5c31af7Sopenharmony_ci 839e5c31af7Sopenharmony_ci * The image subregion used is determined according to the 840e5c31af7Sopenharmony_ci <<encode-h264-picture-data-access,H.264 Encode Picture Data Access>> 841e5c31af7Sopenharmony_ci section. 842e5c31af7Sopenharmony_ci * The encode input picture is associated with the 843e5c31af7Sopenharmony_ci <<encode-h264-picture-info,H.264 picture information>> provided in 844e5c31af7Sopenharmony_ci pname:pStdPictureInfo. 845e5c31af7Sopenharmony_ci 846e5c31af7Sopenharmony_ci[[encode-h264-picture-info]] 847e5c31af7Sopenharmony_ciStd Picture Information:: 848e5c31af7Sopenharmony_ci 849e5c31af7Sopenharmony_ciThe members of the code:StdVideoEncodeH264PictureInfo structure pointed to 850e5c31af7Sopenharmony_ciby pname:pStdPictureInfo are interpreted as follows: 851e5c31af7Sopenharmony_ci 852e5c31af7Sopenharmony_ci * code:flags.reserved and code:reserved1 are used only for padding 853e5c31af7Sopenharmony_ci purposes and are otherwise ignored; 854e5c31af7Sopenharmony_ci * code:flags.IdrPicFlag as defined in section 7.4.1 of the <<itu-t-h264, 855e5c31af7Sopenharmony_ci ITU-T H.264 Specification>>; 856e5c31af7Sopenharmony_ci * code:flags.is_reference as defined in section 3.136 of the <<itu-t-h264, 857e5c31af7Sopenharmony_ci ITU-T H.264 Specification>>; 858e5c31af7Sopenharmony_ci * code:seq_parameter_set_id and code:pic_parameter_set_id are used to 859e5c31af7Sopenharmony_ci identify the active parameter sets, as described below; 860e5c31af7Sopenharmony_ci * code:primary_pic_type as defined in section 7.4.2 of the <<itu-t-h264, 861e5c31af7Sopenharmony_ci ITU-T H.264 Specification>>; 862e5c31af7Sopenharmony_ci * code:PicOrderCnt as defined in section 8.2 of the <<itu-t-h264,ITU-T 863e5c31af7Sopenharmony_ci H.264 Specification>>; 864e5c31af7Sopenharmony_ci * code:temporal_id as defined in section G.7.4.1.1 of the <<itu-t-h264, 865e5c31af7Sopenharmony_ci ITU-T H.264 Specification>>; 866e5c31af7Sopenharmony_ci * if code:pRefLists is not `NULL`, then it is a pointer to a 867e5c31af7Sopenharmony_ci code:StdVideoEncodeH264ReferenceListsInfo structure that is interpreted 868e5c31af7Sopenharmony_ci as follows: 869e5c31af7Sopenharmony_ci ** code:flags.reserved is used only for padding purposes and is otherwise 870e5c31af7Sopenharmony_ci ignored; 871e5c31af7Sopenharmony_ci ** code:ref_pic_list_modification_flag_l0 and 872e5c31af7Sopenharmony_ci code:ref_pic_list_modification_flag_l1 as defined in section 7.4.3.1 of 873e5c31af7Sopenharmony_ci the <<itu-t-h264, ITU-T H.264 Specification>>; 874e5c31af7Sopenharmony_ci ** code:num_ref_idx_l0_active_minus1 and code:num_ref_idx_l1_active_minus1 875e5c31af7Sopenharmony_ci as defined in section 7.4.3 of the <<itu-t-h264, ITU-T H.264 876e5c31af7Sopenharmony_ci Specification>>; 877e5c31af7Sopenharmony_ci ** code:RefPicList0 and code:RefPicList1 as defined in section 8.2.4 of 878e5c31af7Sopenharmony_ci the <<itu-t-h264, ITU-T H.264 Specification>> where each element of 879e5c31af7Sopenharmony_ci these arrays either identifies an 880e5c31af7Sopenharmony_ci <<encode-active-reference-picture-info,active reference picture>> using 881e5c31af7Sopenharmony_ci its <<dpb-slot,DPB slot>> index or contains the value 882e5c31af7Sopenharmony_ci code:STD_VIDEO_H264_NO_REFERENCE_PICTURE to indicate "`no reference 883e5c31af7Sopenharmony_ci picture`"; 884e5c31af7Sopenharmony_ci ** if code:refList0ModOpCount is not zero, then 885e5c31af7Sopenharmony_ci code:pRefList0ModOperations is a pointer to an array of 886e5c31af7Sopenharmony_ci code:refList0ModOpCount number of 887e5c31af7Sopenharmony_ci code:StdVideoEncodeH264RefListModEntry structures specifying the 888e5c31af7Sopenharmony_ci modification parameters for the reference list L0 as defined in section 889e5c31af7Sopenharmony_ci 7.4.3.1 of the <<itu-t-h264, ITU-T H.264 Specification>>; 890e5c31af7Sopenharmony_ci ** if code:refList1ModOpCount is not zero, then 891e5c31af7Sopenharmony_ci code:pRefList1ModOperations is a pointer to an array of 892e5c31af7Sopenharmony_ci code:refList1ModOpCount number of 893e5c31af7Sopenharmony_ci code:StdVideoEncodeH264RefListModEntry structures specifying the 894e5c31af7Sopenharmony_ci modification parameters for the reference list L1 as defined in section 895e5c31af7Sopenharmony_ci 7.4.3.1 of the <<itu-t-h264, ITU-T H.264 Specification>>; 896e5c31af7Sopenharmony_ci ** if code:refPicMarkingOpCount is not zero, then 897e5c31af7Sopenharmony_ci code:refPicMarkingOperations is a pointer to an array of 898e5c31af7Sopenharmony_ci code:refPicMarkingOpCount number of 899e5c31af7Sopenharmony_ci code:StdVideoEncodeH264RefPicMarkingEntry structures specifying the 900e5c31af7Sopenharmony_ci reference picture marking parameters as defined in section 7.4.3.3 of 901e5c31af7Sopenharmony_ci the <<itu-t-h264, ITU-T H.264 Specification>>; 902e5c31af7Sopenharmony_ci * all other members are interpreted as defined in section 7.4.3 of the 903e5c31af7Sopenharmony_ci <<itu-t-h264,ITU-T H.264 Specification>>. 904e5c31af7Sopenharmony_ci 905e5c31af7Sopenharmony_ci[[encode-h264-ref-pic-setup]] 906e5c31af7Sopenharmony_ciReference picture setup is controlled by the value of 907e5c31af7Sopenharmony_cicode:StdVideoEncodeH264PictureInfo::pname:flags.is_reference. 908e5c31af7Sopenharmony_ciIf it is set and a <<encode-reconstructed-picture-info,reconstructed 909e5c31af7Sopenharmony_cipicture>> is specified, then the latter is used as the target of picture 910e5c31af7Sopenharmony_cireconstruction to <<dpb-slot-states,activate>> the <<dpb-slot,DPB slot>> 911e5c31af7Sopenharmony_cispecified in pname:pEncodeInfo->pSetupReferenceSlot->slotIndex. 912e5c31af7Sopenharmony_ciIf code:StdVideoEncodeH264PictureInfo::pname:flags.is_reference is not set, 913e5c31af7Sopenharmony_cibut a <<encode-reconstructed-picture-info,reconstructed picture>> is 914e5c31af7Sopenharmony_cispecified, then the corresponding picture reference associated with the 915e5c31af7Sopenharmony_ci<<dpb-slot,DPB slot>> is invalidated, as described in the 916e5c31af7Sopenharmony_ci<<dpb-slot-states,DPB Slot States>> section. 917e5c31af7Sopenharmony_ci 918e5c31af7Sopenharmony_ciActive Parameter Sets:: 919e5c31af7Sopenharmony_ci 920e5c31af7Sopenharmony_ciThe members of the code:StdVideoEncodeH264PictureInfo structure pointed to 921e5c31af7Sopenharmony_ciby pname:pStdPictureInfo are used to select the active parameter sets to use 922e5c31af7Sopenharmony_cifrom the bound video session parameters object, as follows: 923e5c31af7Sopenharmony_ci 924e5c31af7Sopenharmony_ci * [[encode-h264-active-sps]] The _active SPS_ is the 925e5c31af7Sopenharmony_ci <<encode-h264-sps,SPS>> identified by the key specified in 926e5c31af7Sopenharmony_ci code:StdVideoEncodeH264PictureInfo::code:seq_parameter_set_id. 927e5c31af7Sopenharmony_ci * [[encode-h264-active-pps]] The _active PPS_ is the 928e5c31af7Sopenharmony_ci <<encode-h264-pps,PPS>> identified by the key specified by the pair 929e5c31af7Sopenharmony_ci constructed from 930e5c31af7Sopenharmony_ci code:StdVideoEncodeH264PictureInfo::code:seq_parameter_set_id and 931e5c31af7Sopenharmony_ci code:StdVideoEncodeH264PictureInfo::code:pic_parameter_set_id. 932e5c31af7Sopenharmony_ci 933e5c31af7Sopenharmony_ci[[encode-h264-weighted-pred]] 934e5c31af7Sopenharmony_ciH.264 encoding uses _explicit weighted sample prediction_ for a slice, as 935e5c31af7Sopenharmony_cidefined in section 8.4.2.3 of the <<itu-t-h264,ITU-T H.264 Specification>>, 936e5c31af7Sopenharmony_ciif any of the following conditions are true for the active 937e5c31af7Sopenharmony_ci<<encode-h264-pps,PPS>> and the pname:pStdSliceHeader member of the 938e5c31af7Sopenharmony_cicorresponding element of pname:pNaluSliceEntries: 939e5c31af7Sopenharmony_ci 940e5c31af7Sopenharmony_ci * pname:pStdSliceHeader->slice_type is code:STD_VIDEO_H264_SLICE_TYPE_P 941e5c31af7Sopenharmony_ci and code:weighted_pred_flag is enabled in the active PPS. 942e5c31af7Sopenharmony_ci * pname:pStdSliceHeader->slice_type is code:STD_VIDEO_H264_SLICE_TYPE_B 943e5c31af7Sopenharmony_ci and code:weighted_bipred_idc in the active PPS equals 944e5c31af7Sopenharmony_ci code:STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT. 945e5c31af7Sopenharmony_ci 946e5c31af7Sopenharmony_ci.Valid Usage 947e5c31af7Sopenharmony_ci**** 948e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264PictureInfoKHR-naluSliceEntryCount-08301]] 949e5c31af7Sopenharmony_ci pname:naluSliceEntryCount must: be between `1` and 950e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264CapabilitiesKHR::pname:maxSliceCount, inclusive, 951e5c31af7Sopenharmony_ci as returned by flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the 952e5c31af7Sopenharmony_ci used video profile 953e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264PictureInfoKHR-flags-08304]] 954e5c31af7Sopenharmony_ci If slink:VkVideoEncodeH264CapabilitiesKHR::pname:flags, as returned by 955e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video 956e5c31af7Sopenharmony_ci profile, does not include 957e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR, then 958e5c31af7Sopenharmony_ci pname:generatePrefixNalu must: be ename:VK_FALSE 959e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264PictureInfoKHR-flags-08314]] 960e5c31af7Sopenharmony_ci If slink:VkVideoEncodeH264CapabilitiesKHR::pname:flags, as returned by 961e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video 962e5c31af7Sopenharmony_ci profile, does not include 963e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR 964e5c31af7Sopenharmony_ci and the slice corresponding to any element of pname:pNaluSliceEntries 965e5c31af7Sopenharmony_ci uses <<encode-h264-weighted-pred,explicit weighted sample prediction>>, 966e5c31af7Sopenharmony_ci then 967e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264NaluSliceInfoKHR::pname:pStdSliceHeader->pWeightTable 968e5c31af7Sopenharmony_ci must: not be `NULL` for that element of pname:pNaluSliceEntries 969e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264PictureInfoKHR-flags-08315]] 970e5c31af7Sopenharmony_ci If slink:VkVideoEncodeH264CapabilitiesKHR::pname:flags, as returned by 971e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video 972e5c31af7Sopenharmony_ci profile, does not include 973e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR, then 974e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264NaluSliceInfoKHR::pname:pStdSliceHeader->slice_type 975e5c31af7Sopenharmony_ci must: be identical for all elements of pname:pNaluSliceEntries 976e5c31af7Sopenharmony_ci**** 977e5c31af7Sopenharmony_ci 978e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264PictureInfoKHR.adoc[] 979e5c31af7Sopenharmony_ci-- 980e5c31af7Sopenharmony_ci 981e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264NaluSliceInfoKHR',desc='Structure specifies H.264 encode slice NALU parameters',type='structs'] 982e5c31af7Sopenharmony_ci-- 983e5c31af7Sopenharmony_ciThe slink:VkVideoEncodeH264NaluSliceInfoKHR structure is defined as: 984e5c31af7Sopenharmony_ci 985e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264NaluSliceInfoKHR.adoc[] 986e5c31af7Sopenharmony_ci 987e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 988e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 989e5c31af7Sopenharmony_ci structure. 990e5c31af7Sopenharmony_ci * pname:constantQp is the QP to use for the slice if the current 991e5c31af7Sopenharmony_ci <<encode-rate-control-modes,rate control mode>> configured for the video 992e5c31af7Sopenharmony_ci session is ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR. 993e5c31af7Sopenharmony_ci * pname:pStdSliceHeader is a pointer to a 994e5c31af7Sopenharmony_ci code:StdVideoEncodeH264SliceHeader structure specifying 995e5c31af7Sopenharmony_ci <<encode-h264-slice-header-params,H.264 slice header parameters>> for 996e5c31af7Sopenharmony_ci the slice. 997e5c31af7Sopenharmony_ci 998e5c31af7Sopenharmony_ci[[encode-h264-slice-header-params]] 999e5c31af7Sopenharmony_ciStd Slice Header Parameters:: 1000e5c31af7Sopenharmony_ci 1001e5c31af7Sopenharmony_ciThe members of the code:StdVideoEncodeH264SliceHeader structure pointed to 1002e5c31af7Sopenharmony_ciby pname:pStdSliceHeader are interpreted as follows: 1003e5c31af7Sopenharmony_ci 1004e5c31af7Sopenharmony_ci * code:flags.reserved and code:reserved1 are used only for padding 1005e5c31af7Sopenharmony_ci purposes and are otherwise ignored; 1006e5c31af7Sopenharmony_ci * if pname:pWeightTable is not `NULL`, then it is a pointer to a 1007e5c31af7Sopenharmony_ci code:StdVideoEncodeH264WeightTable that is interpreted as follows: 1008e5c31af7Sopenharmony_ci ** code:flags.reserved is used only for padding purposes and is otherwise 1009e5c31af7Sopenharmony_ci ignored; 1010e5c31af7Sopenharmony_ci ** all other members of code:StdVideoEncodeH264WeightTable are interpreted 1011e5c31af7Sopenharmony_ci as defined in section 7.4.3.2 of the <<itu-t-h264,ITU-T H.264 1012e5c31af7Sopenharmony_ci Specification>>; 1013e5c31af7Sopenharmony_ci * all other members are interpreted as defined in section 7.4.3 of the 1014e5c31af7Sopenharmony_ci <<itu-t-h264,ITU-T H.264 Specification>>. 1015e5c31af7Sopenharmony_ci 1016e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264NaluSliceInfoKHR.adoc[] 1017e5c31af7Sopenharmony_ci-- 1018e5c31af7Sopenharmony_ci 1019e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264DpbSlotInfoKHR',desc='Structure specifies H.264 encode DPB picture information',type='structs'] 1020e5c31af7Sopenharmony_ci-- 1021e5c31af7Sopenharmony_ciThe slink:VkVideoEncodeH264DpbSlotInfoKHR structure is defined as: 1022e5c31af7Sopenharmony_ci 1023e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264DpbSlotInfoKHR.adoc[] 1024e5c31af7Sopenharmony_ci 1025e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 1026e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1027e5c31af7Sopenharmony_ci structure. 1028e5c31af7Sopenharmony_ci * pname:pStdReferenceInfo is a pointer to a 1029e5c31af7Sopenharmony_ci code:StdVideoEncodeH264ReferenceInfo structure specifying 1030e5c31af7Sopenharmony_ci <<encode-h264-reference-info,H.264 reference information>>. 1031e5c31af7Sopenharmony_ci 1032e5c31af7Sopenharmony_ciThis structure is specified in the pname:pNext chain of 1033e5c31af7Sopenharmony_cislink:VkVideoEncodeInfoKHR::pname:pSetupReferenceSlot, if not `NULL`, and 1034e5c31af7Sopenharmony_cithe pname:pNext chain of the elements of 1035e5c31af7Sopenharmony_cislink:VkVideoEncodeInfoKHR::pname:pReferenceSlots to specify the 1036e5c31af7Sopenharmony_cicodec-specific reference picture information for an <<encode-h264,H.264 1037e5c31af7Sopenharmony_ciencode operation>>. 1038e5c31af7Sopenharmony_ci 1039e5c31af7Sopenharmony_ci[[encode-h264-active-reference-picture-info]] 1040e5c31af7Sopenharmony_ciActive Reference Picture Information:: 1041e5c31af7Sopenharmony_ci 1042e5c31af7Sopenharmony_ciWhen this structure is specified in the pname:pNext chain of the elements of 1043e5c31af7Sopenharmony_cislink:VkVideoEncodeInfoKHR::pname:pReferenceSlots, one element is added to 1044e5c31af7Sopenharmony_cithe list of <<encode-active-reference-picture-info,active reference 1045e5c31af7Sopenharmony_cipictures>> used by the video encode operation for each element of 1046e5c31af7Sopenharmony_cislink:VkVideoEncodeInfoKHR::pname:pReferenceSlots as follows: 1047e5c31af7Sopenharmony_ci 1048e5c31af7Sopenharmony_ci * The image subregion used is determined according to the 1049e5c31af7Sopenharmony_ci <<encode-h264-picture-data-access,H.264 Encode Picture Data Access>> 1050e5c31af7Sopenharmony_ci section. 1051e5c31af7Sopenharmony_ci * The reference picture is associated with the <<dpb-slot,DPB slot>> index 1052e5c31af7Sopenharmony_ci specified in the pname:slotIndex member of the corresponding element of 1053e5c31af7Sopenharmony_ci slink:VkVideoEncodeInfoKHR::pname:pReferenceSlots. 1054e5c31af7Sopenharmony_ci * The reference picture is associated with the 1055e5c31af7Sopenharmony_ci <<encode-h264-reference-info,H.264 reference information>> provided in 1056e5c31af7Sopenharmony_ci pname:pStdReferenceInfo. 1057e5c31af7Sopenharmony_ci 1058e5c31af7Sopenharmony_ci[[encode-h264-reconstructed-picture-info]] 1059e5c31af7Sopenharmony_ciReconstructed Picture Information:: 1060e5c31af7Sopenharmony_ci 1061e5c31af7Sopenharmony_ciWhen this structure is specified in the pname:pNext chain of 1062e5c31af7Sopenharmony_cislink:VkVideoEncodeInfoKHR::pname:pSetupReferenceSlot, the information 1063e5c31af7Sopenharmony_cirelated to the <<encode-reconstructed-picture-info,reconstructed picture>> 1064e5c31af7Sopenharmony_ciis defined as follows: 1065e5c31af7Sopenharmony_ci 1066e5c31af7Sopenharmony_ci * The image subregion used is determined according to the 1067e5c31af7Sopenharmony_ci <<encode-h264-picture-data-access,H.264 Encode Picture Data Access>> 1068e5c31af7Sopenharmony_ci section. 1069e5c31af7Sopenharmony_ci * If <<encode-h264-ref-pic-setup,reference picture setup>> is requested, 1070e5c31af7Sopenharmony_ci then the reconstructed picture is used to <<dpb-slot-states,activate>> 1071e5c31af7Sopenharmony_ci the <<dpb-slot,DPB slot>> with the index specified in 1072e5c31af7Sopenharmony_ci slink:VkVideoEncodeInfoKHR::pname:pSetupReferenceSlot->slotIndex. 1073e5c31af7Sopenharmony_ci * The reconstructed picture is associated with the 1074e5c31af7Sopenharmony_ci <<encode-h264-reference-info,H.264 reference information>> provided in 1075e5c31af7Sopenharmony_ci pname:pStdReferenceInfo. 1076e5c31af7Sopenharmony_ci 1077e5c31af7Sopenharmony_ci[[encode-h264-reference-info]] 1078e5c31af7Sopenharmony_ciStd Reference Information:: 1079e5c31af7Sopenharmony_ci 1080e5c31af7Sopenharmony_ciThe members of the code:StdVideoEncodeH264ReferenceInfo structure pointed to 1081e5c31af7Sopenharmony_ciby pname:pStdReferenceInfo are interpreted as follows: 1082e5c31af7Sopenharmony_ci 1083e5c31af7Sopenharmony_ci * code:flags.reserved is used only for padding purposes and is otherwise 1084e5c31af7Sopenharmony_ci ignored; 1085e5c31af7Sopenharmony_ci * code:flags.used_for_long_term_reference is used to indicate whether the 1086e5c31af7Sopenharmony_ci picture is marked as "`used for long-term reference`" as defined in 1087e5c31af7Sopenharmony_ci section 8.2.5.1 of the <<itu-t-h264,ITU-T H.264 Specification>>; 1088e5c31af7Sopenharmony_ci * code:primary_pic_type as defined in section 7.4.2 of the <<itu-t-h264, 1089e5c31af7Sopenharmony_ci ITU-T H.264 Specification>>; 1090e5c31af7Sopenharmony_ci * code:long_term_pic_num and code:long_term_frame_idx as defined in 1091e5c31af7Sopenharmony_ci section 7.4.3 of the <<itu-t-h264,ITU-T H.264 Specification>>; 1092e5c31af7Sopenharmony_ci * code:temporal_id as defined in section G.7.4.1.1 of the <<itu-t-h264, 1093e5c31af7Sopenharmony_ci ITU-T H.264 Specification>>; 1094e5c31af7Sopenharmony_ci * all other members are interpreted as defined in section 8.2 of the 1095e5c31af7Sopenharmony_ci <<itu-t-h264,ITU-T H.264 Specification>>. 1096e5c31af7Sopenharmony_ci 1097e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264DpbSlotInfoKHR.adoc[] 1098e5c31af7Sopenharmony_ci-- 1099e5c31af7Sopenharmony_ci 1100e5c31af7Sopenharmony_ci 1101e5c31af7Sopenharmony_ci[[encode-h264-rate-control]] 1102e5c31af7Sopenharmony_ci=== H.264 Encode Rate Control 1103e5c31af7Sopenharmony_ci 1104e5c31af7Sopenharmony_ci[[encode-h264-gop]] 1105e5c31af7Sopenharmony_ci==== Group of Pictures 1106e5c31af7Sopenharmony_ci 1107e5c31af7Sopenharmony_ciIn case of H.264 encoding it is common practice to follow a regular pattern 1108e5c31af7Sopenharmony_ciof different picture types in display order when encoding subsequent frames. 1109e5c31af7Sopenharmony_ciThis pattern is referred to as the _group of pictures_ (GOP). 1110e5c31af7Sopenharmony_ci 1111e5c31af7Sopenharmony_ci[[encode-h264-regular-gop]] 1112e5c31af7Sopenharmony_ciA regular GOP is defined by the following parameters: 1113e5c31af7Sopenharmony_ci 1114e5c31af7Sopenharmony_ci * The number of frames in the GOP; 1115e5c31af7Sopenharmony_ci * The number of consecutive B frames between I and/or P frames in display 1116e5c31af7Sopenharmony_ci order. 1117e5c31af7Sopenharmony_ci 1118e5c31af7Sopenharmony_ciGOPs are further classified as _open_ and _closed_ GOPs. 1119e5c31af7Sopenharmony_ci 1120e5c31af7Sopenharmony_ciFrame types in an open GOP follow each other in display order according to 1121e5c31af7Sopenharmony_cithe following algorithm: 1122e5c31af7Sopenharmony_ci 1123e5c31af7Sopenharmony_ci 1. The first frame is always an I frame. 1124e5c31af7Sopenharmony_ci 2. This is followed by a number of consecutive B frames, as defined above. 1125e5c31af7Sopenharmony_ci 3. If the number of frames in the GOP is not reached yet, then the next 1126e5c31af7Sopenharmony_ci frame is a P frame and the algorithm continues from step 2. 1127e5c31af7Sopenharmony_ci 1128e5c31af7Sopenharmony_ci[[encode-h264-open-gop]] 1129e5c31af7Sopenharmony_ciimage::{images}/h26x_open_gop.svg[align="center",title="H.264 open GOP",opts="{imageopts}"] 1130e5c31af7Sopenharmony_ci 1131e5c31af7Sopenharmony_ci[[encode-h264-idr-period]] 1132e5c31af7Sopenharmony_ciIn case of a closed GOP, an <<encode-h264-idr-pic,IDR frame>> is used at a 1133e5c31af7Sopenharmony_cicertain period. 1134e5c31af7Sopenharmony_ci 1135e5c31af7Sopenharmony_ci[[encode-h264-closed-gop]] 1136e5c31af7Sopenharmony_ciimage::{images}/h26x_closed_gop.svg[align="center",title="H.264 closed GOP",opts="{imageopts}"] 1137e5c31af7Sopenharmony_ci 1138e5c31af7Sopenharmony_ciIt is also typical for H.264 encoding to use specific reference picture 1139e5c31af7Sopenharmony_ciusage patterns across the frames of the GOP. 1140e5c31af7Sopenharmony_ciThe two most common reference patterns used are as follows: 1141e5c31af7Sopenharmony_ci 1142e5c31af7Sopenharmony_ci[[encode-h264-ref-pattern-flat]] 1143e5c31af7Sopenharmony_ciFlat Reference Pattern:: 1144e5c31af7Sopenharmony_ci 1145e5c31af7Sopenharmony_ci * Each P frame uses the last non-B frame, in display order, as reference. 1146e5c31af7Sopenharmony_ci * Each B frame uses the last non-B frame, in display order, as its 1147e5c31af7Sopenharmony_ci backward reference, and uses the next non-B frame, in display order, as 1148e5c31af7Sopenharmony_ci its forward reference. 1149e5c31af7Sopenharmony_ci 1150e5c31af7Sopenharmony_ciimage::{images}/h26x_ref_pattern_flat.svg[align="center",title="H.264 flat reference pattern",opts="{imageopts}"] 1151e5c31af7Sopenharmony_ci 1152e5c31af7Sopenharmony_ci[[encode-h264-ref-pattern-dyadic]] 1153e5c31af7Sopenharmony_ciDyadic Reference Pattern:: 1154e5c31af7Sopenharmony_ci 1155e5c31af7Sopenharmony_ci * Each P frame uses the last non-B frame, in display order, as reference. 1156e5c31af7Sopenharmony_ci * The following algorithm is applied to the sequence of consecutive B 1157e5c31af7Sopenharmony_ci frames between I and/or P frames in display order: 1158e5c31af7Sopenharmony_ci 1159e5c31af7Sopenharmony_ci . The B frame in the middle of this sequence uses the frame preceding the 1160e5c31af7Sopenharmony_ci sequence as its backward reference, and uses the frame following the 1161e5c31af7Sopenharmony_ci sequence as its forward reference. 1162e5c31af7Sopenharmony_ci . The algorithm is executed recursively for the following frame sequences: 1163e5c31af7Sopenharmony_ci ** The B frames of the original sequence preceding the frame in the 1164e5c31af7Sopenharmony_ci middle, if any. 1165e5c31af7Sopenharmony_ci ** The B frames of the original sequence following the frame in the 1166e5c31af7Sopenharmony_ci middle, if any. 1167e5c31af7Sopenharmony_ci 1168e5c31af7Sopenharmony_ciimage::{images}/h26x_ref_pattern_dyadic.svg[align="center",title="H.264 dyadic reference pattern",opts="{imageopts}"] 1169e5c31af7Sopenharmony_ci 1170e5c31af7Sopenharmony_ciThe application can: provide guidance to the implementation's rate control 1171e5c31af7Sopenharmony_cialgorithm about the structure of the GOP used by the application. 1172e5c31af7Sopenharmony_ciAny such guidance about the GOP and its structure does not mandate that 1173e5c31af7Sopenharmony_cispecific GOP structure to be used by the application, as the picture type of 1174e5c31af7Sopenharmony_ciindividual encoded pictures is still application-controlled, however, any 1175e5c31af7Sopenharmony_cideviation from the provided guidance may: result in undesired rate control 1176e5c31af7Sopenharmony_cibehavior including, but not limited, to the implementation not being able to 1177e5c31af7Sopenharmony_ciconform to the expected average or target bitrates, or other rate control 1178e5c31af7Sopenharmony_ciparameters specified by the application. 1179e5c31af7Sopenharmony_ci 1180e5c31af7Sopenharmony_ciWhen an H.264 encode session is used to encode multiple temporal layers, it 1181e5c31af7Sopenharmony_ciis also common practice to follow a regular pattern for the H.264 temporal 1182e5c31af7Sopenharmony_ciID for the encoded pictures in display order when encoding subsequent 1183e5c31af7Sopenharmony_ciframes. 1184e5c31af7Sopenharmony_ciThis pattern is referred to as the _temporal GOP_. 1185e5c31af7Sopenharmony_ciThe most common temporal layer pattern used is as follows: 1186e5c31af7Sopenharmony_ci 1187e5c31af7Sopenharmony_ci[[encode-h264-layer-pattern-dyadic]] 1188e5c31af7Sopenharmony_ciDyadic Temporal Layer Pattern:: 1189e5c31af7Sopenharmony_ci 1190e5c31af7Sopenharmony_ci * The number of frames in the temporal GOP is [eq]#2^n-1^#, where [eq]#n# 1191e5c31af7Sopenharmony_ci is the number of temporal layers. 1192e5c31af7Sopenharmony_ci * The [eq]#i#^th^ frame in the temporal GOP uses temporal ID [eq]#t#, if 1193e5c31af7Sopenharmony_ci and only if the index of the least significant bit set in [eq]#i# equals 1194e5c31af7Sopenharmony_ci [eq]#n-t-1#, except for the first frame, which is the only frame in the 1195e5c31af7Sopenharmony_ci temporal GOP using temporal ID zero. 1196e5c31af7Sopenharmony_ci * The [eq]#i#^th^ frame in the temporal GOP uses the [eq]#r#^th^ frame as 1197e5c31af7Sopenharmony_ci reference, where [eq]#r# is calculated from [eq]#i# by clearing the 1198e5c31af7Sopenharmony_ci least significant bit set in it, except for the first frame in the 1199e5c31af7Sopenharmony_ci temporal GOP, which uses the first frame of the previous temporal GOP, 1200e5c31af7Sopenharmony_ci if any, as reference. 1201e5c31af7Sopenharmony_ci 1202e5c31af7Sopenharmony_ciimage::{images}/h26x_layer_pattern_dyadic.svg[align="center",title="H.264 dyadic temporal layer pattern",opts="{imageopts}"] 1203e5c31af7Sopenharmony_ci 1204e5c31af7Sopenharmony_ci[NOTE] 1205e5c31af7Sopenharmony_ci.Note 1206e5c31af7Sopenharmony_ci==== 1207e5c31af7Sopenharmony_ciMulti-layer rate control and multi-layer coding are typically used for 1208e5c31af7Sopenharmony_cistreaming cases where low latency is expected, hence B pictures with forward 1209e5c31af7Sopenharmony_ciprediction are usually not used. 1210e5c31af7Sopenharmony_ci==== 1211e5c31af7Sopenharmony_ci 1212e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264RateControlInfoKHR',desc='Structure describing H.264 stream rate control parameters',type='structs'] 1213e5c31af7Sopenharmony_ci-- 1214e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264RateControlInfoKHR structure is defined as: 1215e5c31af7Sopenharmony_ci 1216e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264RateControlInfoKHR.adoc[] 1217e5c31af7Sopenharmony_ci 1218e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 1219e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1220e5c31af7Sopenharmony_ci structure. 1221e5c31af7Sopenharmony_ci * pname:flags is a bitmask of 1222e5c31af7Sopenharmony_ci elink:VkVideoEncodeH264RateControlFlagBitsKHR specifying H.264 rate 1223e5c31af7Sopenharmony_ci control flags. 1224e5c31af7Sopenharmony_ci * pname:gopFrameCount is the number of frames within a <<encode-h264-gop, 1225e5c31af7Sopenharmony_ci group of pictures (GOP)>> intended to be used by the application. 1226e5c31af7Sopenharmony_ci If it is set to 0, the rate control algorithm may: assume an 1227e5c31af7Sopenharmony_ci implementation-dependent GOP length. 1228e5c31af7Sopenharmony_ci If it is set to code:UINT32_MAX, the GOP length is treated as infinite. 1229e5c31af7Sopenharmony_ci * pname:idrPeriod is the interval, in terms of number of frames, between 1230e5c31af7Sopenharmony_ci two <<encode-h264-idr-pic,IDR frames>> (see <<encode-h264-idr-period,IDR 1231e5c31af7Sopenharmony_ci period>>). 1232e5c31af7Sopenharmony_ci If it is set to 0, the rate control algorithm may: assume an 1233e5c31af7Sopenharmony_ci implementation-dependent IDR period. 1234e5c31af7Sopenharmony_ci If it is set to code:UINT32_MAX, the IDR period is treated as infinite. 1235e5c31af7Sopenharmony_ci * pname:consecutiveBFrameCount is the number of consecutive B frames 1236e5c31af7Sopenharmony_ci between I and/or P frames within the <<encode-h264-gop,GOP>>. 1237e5c31af7Sopenharmony_ci * pname:temporalLayerCount specifies the number of H.264 temporal layers 1238e5c31af7Sopenharmony_ci that the application intends to use. 1239e5c31af7Sopenharmony_ci 1240e5c31af7Sopenharmony_ciWhen an instance of this structure is included in the pname:pNext chain of 1241e5c31af7Sopenharmony_cithe slink:VkVideoCodingControlInfoKHR structure passed to the 1242e5c31af7Sopenharmony_ciflink:vkCmdControlVideoCodingKHR command, and 1243e5c31af7Sopenharmony_cislink:VkVideoCodingControlInfoKHR::pname:flags includes 1244e5c31af7Sopenharmony_ciename:VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, the parameters in 1245e5c31af7Sopenharmony_cithis structure are used as guidance for the implementation's rate control 1246e5c31af7Sopenharmony_cialgorithm (see <<video-coding-control,Video Coding Control>>). 1247e5c31af7Sopenharmony_ci 1248e5c31af7Sopenharmony_ciIf pname:flags includes 1249e5c31af7Sopenharmony_ciename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR, then 1250e5c31af7Sopenharmony_cithe rate control state is reset to an initial state to meet HRD compliance 1251e5c31af7Sopenharmony_cirequirements. 1252e5c31af7Sopenharmony_ciOtherwise the new rate control state may: be applied without a reset 1253e5c31af7Sopenharmony_cidepending on the implementation and the specified rate control parameters. 1254e5c31af7Sopenharmony_ci 1255e5c31af7Sopenharmony_ci[NOTE] 1256e5c31af7Sopenharmony_ci.Note 1257e5c31af7Sopenharmony_ci==== 1258e5c31af7Sopenharmony_ciIt would be possible to infer the picture type to be used when encoding a 1259e5c31af7Sopenharmony_ciframe, on the basis of the values provided for pname:consecutiveBFrameCount, 1260e5c31af7Sopenharmony_cipname:idrPeriod, and pname:gopFrameCount, but this inferred picture type 1261e5c31af7Sopenharmony_ciwill not be used by implementations to override the picture type provided to 1262e5c31af7Sopenharmony_cithe video encode operation. 1263e5c31af7Sopenharmony_ci==== 1264e5c31af7Sopenharmony_ci 1265e5c31af7Sopenharmony_ci.Valid Usage 1266e5c31af7Sopenharmony_ci**** 1267e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264RateControlInfoKHR-flags-08280]] 1268e5c31af7Sopenharmony_ci If slink:VkVideoEncodeH264CapabilitiesKHR::pname:flags, as returned by 1269e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video 1270e5c31af7Sopenharmony_ci profile, does not include 1271e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_KHR, then 1272e5c31af7Sopenharmony_ci pname:flags must: not contain 1273e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR 1274e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264RateControlInfoKHR-flags-08281]] 1275e5c31af7Sopenharmony_ci If pname:flags contains 1276e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR 1277e5c31af7Sopenharmony_ci or 1278e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR, 1279e5c31af7Sopenharmony_ci then it must: also contain 1280e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR 1281e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264RateControlInfoKHR-flags-08282]] 1282e5c31af7Sopenharmony_ci If pname:flags contains 1283e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR, 1284e5c31af7Sopenharmony_ci then it must: not also contain 1285e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR 1286e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264RateControlInfoKHR-flags-08283]] 1287e5c31af7Sopenharmony_ci If pname:flags contains 1288e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR, then 1289e5c31af7Sopenharmony_ci pname:gopFrameCount must: be greater than `0` 1290e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264RateControlInfoKHR-idrPeriod-08284]] 1291e5c31af7Sopenharmony_ci If pname:idrPeriod is not `0`, then it must: be greater than or equal to 1292e5c31af7Sopenharmony_ci pname:gopFrameCount 1293e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264RateControlInfoKHR-consecutiveBFrameCount-08285]] 1294e5c31af7Sopenharmony_ci If pname:consecutiveBFrameCount is not `0`, then it must: be less than 1295e5c31af7Sopenharmony_ci pname:gopFrameCount 1296e5c31af7Sopenharmony_ci**** 1297e5c31af7Sopenharmony_ci 1298e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264RateControlInfoKHR.adoc[] 1299e5c31af7Sopenharmony_ci-- 1300e5c31af7Sopenharmony_ci 1301e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264RateControlFlagBitsKHR',desc='H.264 encode rate control bits',type='enums'] 1302e5c31af7Sopenharmony_ci-- 1303e5c31af7Sopenharmony_ciBits which can: be set in 1304e5c31af7Sopenharmony_cislink:VkVideoEncodeH264RateControlInfoKHR::pname:flags, specifying H.264 1305e5c31af7Sopenharmony_cirate control flags, are: 1306e5c31af7Sopenharmony_ci 1307e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVideoEncodeH264RateControlFlagBitsKHR.adoc[] 1308e5c31af7Sopenharmony_ci 1309e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR 1310e5c31af7Sopenharmony_ci specifies that rate control should: attempt to produce an HRD compliant 1311e5c31af7Sopenharmony_ci bitstream, as defined in annex C of the <<itu-t-h264,ITU-T H.264 1312e5c31af7Sopenharmony_ci Specification>>. 1313e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR specifies 1314e5c31af7Sopenharmony_ci that the application intends to use a <<encode-h264-regular-gop, regular 1315e5c31af7Sopenharmony_ci GOP structure>> according to the parameters specified in the 1316e5c31af7Sopenharmony_ci pname:gopFrameCount, pname:idrPeriod, and pname:consecutiveBFrameCount 1317e5c31af7Sopenharmony_ci members of the slink:VkVideoEncodeH264RateControlInfoKHR structure. 1318e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR 1319e5c31af7Sopenharmony_ci specifies that the application intends to follow a 1320e5c31af7Sopenharmony_ci <<encode-h264-ref-pattern-flat,flat reference pattern>> in the GOP. 1321e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR 1322e5c31af7Sopenharmony_ci specifies that the application intends to follow a 1323e5c31af7Sopenharmony_ci <<encode-h264-ref-pattern-dyadic,dyadic reference pattern>> in the GOP. 1324e5c31af7Sopenharmony_ci * ename:VK_VIDEO_ENCODE_H264_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR 1325e5c31af7Sopenharmony_ci specifies that the application intends to follow a 1326e5c31af7Sopenharmony_ci <<encode-h264-layer-pattern-dyadic,dyadic temporal layer pattern>>. 1327e5c31af7Sopenharmony_ci-- 1328e5c31af7Sopenharmony_ci 1329e5c31af7Sopenharmony_ci 1330e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264RateControlFlagsKHR',desc='Bitmask specifying H.264 encode rate control flags',type='flags'] 1331e5c31af7Sopenharmony_ci-- 1332e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkVideoEncodeH264RateControlFlagsKHR.adoc[] 1333e5c31af7Sopenharmony_ci 1334e5c31af7Sopenharmony_citname:VkVideoEncodeH264RateControlFlagsKHR is a bitmask type for setting a 1335e5c31af7Sopenharmony_cimask of zero or more elink:VkVideoEncodeH264RateControlFlagBitsKHR. 1336e5c31af7Sopenharmony_ci-- 1337e5c31af7Sopenharmony_ci 1338e5c31af7Sopenharmony_ci 1339e5c31af7Sopenharmony_ci[[encode-h264-rate-control-layer]] 1340e5c31af7Sopenharmony_ci==== Rate Control Layers 1341e5c31af7Sopenharmony_ci 1342e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264RateControlLayerInfoKHR',desc='Structure describing H.264 per-layer rate control parameters',type='structs'] 1343e5c31af7Sopenharmony_ci-- 1344e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264RateControlLayerInfoKHR structure is defined as: 1345e5c31af7Sopenharmony_ci 1346e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264RateControlLayerInfoKHR.adoc[] 1347e5c31af7Sopenharmony_ci 1348e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 1349e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1350e5c31af7Sopenharmony_ci structure. 1351e5c31af7Sopenharmony_ci * pname:useMinQp indicates whether the QP values determined by rate 1352e5c31af7Sopenharmony_ci control will be clamped to the lower bounds on the QP values specified 1353e5c31af7Sopenharmony_ci in pname:minQp. 1354e5c31af7Sopenharmony_ci * pname:minQp specifies the lower bounds on the QP values, for each 1355e5c31af7Sopenharmony_ci picture type, that the implementation's rate control algorithm will use 1356e5c31af7Sopenharmony_ci when pname:useMinQp is set to ename:VK_TRUE. 1357e5c31af7Sopenharmony_ci * pname:useMaxQp indicates whether the QP values determined by rate 1358e5c31af7Sopenharmony_ci control will be clamped to the upper bounds on the QP values specified 1359e5c31af7Sopenharmony_ci in pname:maxQp. 1360e5c31af7Sopenharmony_ci * pname:maxQp specifies the upper bounds on the QP values, for each 1361e5c31af7Sopenharmony_ci picture type, that the implementation's rate control algorithm will use 1362e5c31af7Sopenharmony_ci when pname:useMaxQp is set to ename:VK_TRUE. 1363e5c31af7Sopenharmony_ci * pname:useMaxFrameSize indicates whether the implementation's rate 1364e5c31af7Sopenharmony_ci control algorithm should: use the values specified in pname:maxFrameSize 1365e5c31af7Sopenharmony_ci as the upper bounds on the encoded frame size for each picture type. 1366e5c31af7Sopenharmony_ci * pname:maxFrameSize specifies the upper bounds on the encoded frame size, 1367e5c31af7Sopenharmony_ci for each picture type, when pname:useMaxFrameSize is set to 1368e5c31af7Sopenharmony_ci ename:VK_TRUE. 1369e5c31af7Sopenharmony_ci 1370e5c31af7Sopenharmony_ciWhen used, the values in pname:minQp and pname:maxQp guarantee that the 1371e5c31af7Sopenharmony_cieffective QP values used by the implementation will respect those lower and 1372e5c31af7Sopenharmony_ciupper bounds, respectively. 1373e5c31af7Sopenharmony_ciHowever, limiting the range of QP values that the implementation is able to 1374e5c31af7Sopenharmony_ciuse will also limit the capabilities of the implementation's rate control 1375e5c31af7Sopenharmony_cialgorithm to comply to other constraints. 1376e5c31af7Sopenharmony_ciIn particular, the implementation may: not be able to comply to the 1377e5c31af7Sopenharmony_cifollowing: 1378e5c31af7Sopenharmony_ci 1379e5c31af7Sopenharmony_ci * The average and/or peak <<encode-bitrate,bitrate>> values to be used for 1380e5c31af7Sopenharmony_ci the encoded bitstream specified in the pname:averageBitrate and 1381e5c31af7Sopenharmony_ci pname:maxBitrate members of the 1382e5c31af7Sopenharmony_ci slink:VkVideoEncodeRateControlLayerInfoKHR structure. 1383e5c31af7Sopenharmony_ci * The upper bounds on the encoded frame size, for each picture type, 1384e5c31af7Sopenharmony_ci specified in the pname:maxFrameSize member of 1385e5c31af7Sopenharmony_ci sname:VkVideoEncodeH264RateControlLayerInfoKHR. 1386e5c31af7Sopenharmony_ci 1387e5c31af7Sopenharmony_ci[NOTE] 1388e5c31af7Sopenharmony_ci.Note 1389e5c31af7Sopenharmony_ci==== 1390e5c31af7Sopenharmony_ciIn general, applications need to configure rate control parameters 1391e5c31af7Sopenharmony_ciappropriately in order to be able to get the desired rate control behavior, 1392e5c31af7Sopenharmony_cias described in the <<encode-rate-control,Video Encode Rate Control>> 1393e5c31af7Sopenharmony_cisection. 1394e5c31af7Sopenharmony_ci==== 1395e5c31af7Sopenharmony_ci 1396e5c31af7Sopenharmony_ciWhen an instance of this structure is included in the pname:pNext chain of a 1397e5c31af7Sopenharmony_cislink:VkVideoEncodeRateControlLayerInfoKHR structure specified in one of the 1398e5c31af7Sopenharmony_cielements of the pname:pLayers array member of the 1399e5c31af7Sopenharmony_cislink:VkVideoEncodeRateControlInfoKHR structure passed to the 1400e5c31af7Sopenharmony_ciflink:vkCmdControlVideoCodingKHR command, 1401e5c31af7Sopenharmony_cislink:VkVideoCodingControlInfoKHR::pname:flags includes 1402e5c31af7Sopenharmony_ciename:VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, and the bound 1403e5c31af7Sopenharmony_civideo session was created with the video codec operation 1404e5c31af7Sopenharmony_ciename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, it specifies the 1405e5c31af7Sopenharmony_ciH.264-specific rate control parameters of the rate control layer 1406e5c31af7Sopenharmony_cicorresponding to that element of pname:pLayers. 1407e5c31af7Sopenharmony_ci 1408e5c31af7Sopenharmony_ci.Valid Usage 1409e5c31af7Sopenharmony_ci**** 1410e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264RateControlLayerInfoKHR-useMinQp-08286]] 1411e5c31af7Sopenharmony_ci If pname:useMinQp is ename:VK_TRUE, then the pname:qpI, pname:qpP, and 1412e5c31af7Sopenharmony_ci pname:qpB members of pname:minQp must: all be between 1413e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264CapabilitiesKHR::pname:minQp and 1414e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264CapabilitiesKHR::pname:maxQp, as returned by 1415e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile 1416e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264RateControlLayerInfoKHR-useMaxQp-08287]] 1417e5c31af7Sopenharmony_ci If pname:useMaxQp is ename:VK_TRUE, then the pname:qpI, pname:qpP, and 1418e5c31af7Sopenharmony_ci pname:qpB members of pname:maxQp must: all be between 1419e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264CapabilitiesKHR::pname:minQp and 1420e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264CapabilitiesKHR::pname:maxQp, as returned by 1421e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video profile 1422e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264RateControlLayerInfoKHR-useMinQp-08288]] 1423e5c31af7Sopenharmony_ci If pname:useMinQp is ename:VK_TRUE and 1424e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264CapabilitiesKHR::pname:flags, as returned by 1425e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video 1426e5c31af7Sopenharmony_ci profile, does not include 1427e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR, 1428e5c31af7Sopenharmony_ci then the pname:qpI, pname:qpP, and pname:qpB members of pname:minQp 1429e5c31af7Sopenharmony_ci must: all specify the same value 1430e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264RateControlLayerInfoKHR-useMaxQp-08289]] 1431e5c31af7Sopenharmony_ci If pname:useMaxQp is ename:VK_TRUE and 1432e5c31af7Sopenharmony_ci slink:VkVideoEncodeH264CapabilitiesKHR::pname:flags, as returned by 1433e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video 1434e5c31af7Sopenharmony_ci profile, does not include 1435e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR, 1436e5c31af7Sopenharmony_ci then the pname:qpI, pname:qpP, and pname:qpB members of pname:maxQp 1437e5c31af7Sopenharmony_ci must: all specify the same value 1438e5c31af7Sopenharmony_ci * [[VUID-VkVideoEncodeH264RateControlLayerInfoKHR-useMinQp-08374]] 1439e5c31af7Sopenharmony_ci If pname:useMinQp and pname:useMaxQp are both ename:VK_TRUE, then the 1440e5c31af7Sopenharmony_ci pname:qpI, pname:qpP, and pname:qpB members of pname:minQp must: all be 1441e5c31af7Sopenharmony_ci less than or equal to the respective members of pname:maxQp 1442e5c31af7Sopenharmony_ci**** 1443e5c31af7Sopenharmony_ci 1444e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264RateControlLayerInfoKHR.adoc[] 1445e5c31af7Sopenharmony_ci-- 1446e5c31af7Sopenharmony_ci 1447e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264QpKHR',desc='Structure describing H.264 QP values per picture type',type='structs'] 1448e5c31af7Sopenharmony_ci-- 1449e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264QpKHR structure is defined as: 1450e5c31af7Sopenharmony_ci 1451e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264QpKHR.adoc[] 1452e5c31af7Sopenharmony_ci 1453e5c31af7Sopenharmony_ci * pname:qpI is the QP to be used for <<encode-h264-i-pic,I pictures>>. 1454e5c31af7Sopenharmony_ci * pname:qpP is the QP to be used for <<encode-h264-p-pic,P pictures>>. 1455e5c31af7Sopenharmony_ci * pname:qpB is the QP to be used for <<encode-h264-b-pic,B pictures>>. 1456e5c31af7Sopenharmony_ci 1457e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264QpKHR.adoc[] 1458e5c31af7Sopenharmony_ci-- 1459e5c31af7Sopenharmony_ci 1460e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264FrameSizeKHR',desc='Structure describing frame size values per H.264 picture type',type='structs'] 1461e5c31af7Sopenharmony_ci-- 1462e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264FrameSizeKHR structure is defined as: 1463e5c31af7Sopenharmony_ci 1464e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264FrameSizeKHR.adoc[] 1465e5c31af7Sopenharmony_ci 1466e5c31af7Sopenharmony_ci * pname:frameISize is the size in bytes to be used for 1467e5c31af7Sopenharmony_ci <<encode-h264-i-pic,I pictures>>. 1468e5c31af7Sopenharmony_ci * pname:framePSize is the size in bytes to be used for 1469e5c31af7Sopenharmony_ci <<encode-h264-p-pic,P pictures>>. 1470e5c31af7Sopenharmony_ci * pname:frameBSize is the size in bytes to be used for 1471e5c31af7Sopenharmony_ci <<encode-h264-b-pic,B pictures>>. 1472e5c31af7Sopenharmony_ci 1473e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264FrameSizeKHR.adoc[] 1474e5c31af7Sopenharmony_ci-- 1475e5c31af7Sopenharmony_ci 1476e5c31af7Sopenharmony_ci 1477e5c31af7Sopenharmony_ci[[encode-h264-gop-remaining-frames]] 1478e5c31af7Sopenharmony_ci==== GOP Remaining Frames 1479e5c31af7Sopenharmony_ci 1480e5c31af7Sopenharmony_ciBesides session level rate control configuration, the application can: 1481e5c31af7Sopenharmony_cispecify the number of frames per frame type remaining in the 1482e5c31af7Sopenharmony_ci<<encode-h264-gop,group of pictures (GOP)>>. 1483e5c31af7Sopenharmony_ci 1484e5c31af7Sopenharmony_ci[open,refpage='VkVideoEncodeH264GopRemainingFrameInfoKHR',desc='Structure specifying H.264 encode rate control GOP remaining frame counts',type='structs'] 1485e5c31af7Sopenharmony_ci-- 1486e5c31af7Sopenharmony_ciThe sname:VkVideoEncodeH264GopRemainingFrameInfoKHR structure is defined as: 1487e5c31af7Sopenharmony_ci 1488e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkVideoEncodeH264GopRemainingFrameInfoKHR.adoc[] 1489e5c31af7Sopenharmony_ci 1490e5c31af7Sopenharmony_ci * pname:sType is a elink:VkStructureType value identifying this structure. 1491e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1492e5c31af7Sopenharmony_ci structure. 1493e5c31af7Sopenharmony_ci * pname:useGopRemainingFrames indicates whether the implementation's rate 1494e5c31af7Sopenharmony_ci control algorithm should: use the values specified in 1495e5c31af7Sopenharmony_ci pname:gopRemainingI, pname:gopRemainingP, and pname:gopRemainingB. 1496e5c31af7Sopenharmony_ci If pname:useGopRemainingFrames is ename:VK_FALSE, then the values of 1497e5c31af7Sopenharmony_ci pname:gopRemainingI, pname:gopRemainingP, and pname:gopRemainingB are 1498e5c31af7Sopenharmony_ci ignored. 1499e5c31af7Sopenharmony_ci * pname:gopRemainingI specifies the number of <<encode-h264-i-pic,I 1500e5c31af7Sopenharmony_ci frames>> the implementation's rate control algorithm should: assume to 1501e5c31af7Sopenharmony_ci be remaining in the <<encode-h264-gop,GOP>> prior to executing the video 1502e5c31af7Sopenharmony_ci encode operation. 1503e5c31af7Sopenharmony_ci * pname:gopRemainingP specifies the number of <<encode-h264-p-pic,P 1504e5c31af7Sopenharmony_ci frames>> the implementation's rate control algorithm should: assume to 1505e5c31af7Sopenharmony_ci be remaining in the <<encode-h264-gop,GOP>> prior to executing the video 1506e5c31af7Sopenharmony_ci encode operation. 1507e5c31af7Sopenharmony_ci * pname:gopRemainingB specifies the number of <<encode-h264-b-pic,B 1508e5c31af7Sopenharmony_ci frames>> the implementation's rate control algorithm should: assume to 1509e5c31af7Sopenharmony_ci be remaining in the <<encode-h264-gop,GOP>> prior to executing the video 1510e5c31af7Sopenharmony_ci encode operation. 1511e5c31af7Sopenharmony_ci 1512e5c31af7Sopenharmony_ciSetting pname:useGopRemainingFrames to ename:VK_TRUE and including this 1513e5c31af7Sopenharmony_cistructure in the pname:pNext chain of slink:VkVideoBeginCodingInfoKHR is 1514e5c31af7Sopenharmony_cionly mandatory if the 1515e5c31af7Sopenharmony_cislink:VkVideoEncodeH264CapabilitiesKHR::pname:requiresGopRemainingFrames 1516e5c31af7Sopenharmony_cireported for the used <<video-profiles,video profile>> is ename:VK_TRUE. 1517e5c31af7Sopenharmony_ciHowever, implementations may: use these remaining frame counts, when 1518e5c31af7Sopenharmony_cispecified, even when it is not required. 1519e5c31af7Sopenharmony_ciIn particular, when the application does not use a 1520e5c31af7Sopenharmony_ci<<encode-h264-regular-gop,regular GOP structure>>, these values may: provide 1521e5c31af7Sopenharmony_ciadditional guidance for the implementation's rate control algorithm. 1522e5c31af7Sopenharmony_ci 1523e5c31af7Sopenharmony_ciThe slink:VkVideoEncodeH264CapabilitiesKHR::pname:prefersGopRemainingFrames 1524e5c31af7Sopenharmony_cicapability is also used to indicate that the implementation's rate control 1525e5c31af7Sopenharmony_cialgorithm may: operate more accurately if the application specifies the 1526e5c31af7Sopenharmony_ciremaining frame counts using this structure. 1527e5c31af7Sopenharmony_ci 1528e5c31af7Sopenharmony_ciAs with other rate control guidance values, if the effective order and 1529e5c31af7Sopenharmony_cinumber of frames encoded by the application are not in line with the 1530e5c31af7Sopenharmony_ciremaining frame counts specified in this structure at any given point, then 1531e5c31af7Sopenharmony_cithe behavior of the implementation's rate control algorithm may: deviate 1532e5c31af7Sopenharmony_cifrom the one expected by the application. 1533e5c31af7Sopenharmony_ci 1534e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkVideoEncodeH264GopRemainingFrameInfoKHR.adoc[] 1535e5c31af7Sopenharmony_ci-- 1536e5c31af7Sopenharmony_ci 1537e5c31af7Sopenharmony_ci 1538e5c31af7Sopenharmony_ci[[encode-h264-requirements]] 1539e5c31af7Sopenharmony_ci=== H.264 Encode Requirements 1540e5c31af7Sopenharmony_ci 1541e5c31af7Sopenharmony_ciThis section described the required: H.264 encoding capabilities for 1542e5c31af7Sopenharmony_ciphysical devices that have at least one queue family that supports the video 1543e5c31af7Sopenharmony_cicodec operation ename:VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, as 1544e5c31af7Sopenharmony_cireturned by flink:vkGetPhysicalDeviceQueueFamilyProperties2 in 1545e5c31af7Sopenharmony_cislink:VkQueueFamilyVideoPropertiesKHR::pname:videoCodecOperations. 1546e5c31af7Sopenharmony_ci 1547e5c31af7Sopenharmony_ci.Required <<video-std-header-version,Video Std Header Versions>> 1548e5c31af7Sopenharmony_ci[options="header"] 1549e5c31af7Sopenharmony_ci|==== 1550e5c31af7Sopenharmony_ci| Video Std Header Name | Version 1551e5c31af7Sopenharmony_ci| `vulkan_video_codec_h264std_encode` | 1.0.0 1552e5c31af7Sopenharmony_ci|==== 1553e5c31af7Sopenharmony_ci 1554e5c31af7Sopenharmony_ci.Required Video Capabilities 1555e5c31af7Sopenharmony_ci[width="100%",cols="<35,<14,<11",options="header"] 1556e5c31af7Sopenharmony_ci|==== 1557e5c31af7Sopenharmony_ci| Video Capability | Requirement | Requirement Type^1^ 1558e5c31af7Sopenharmony_ci| **slink:VkVideoCapabilitiesKHR** | | 1559e5c31af7Sopenharmony_ci| pname:flags | - | min 1560e5c31af7Sopenharmony_ci| pname:minBitstreamBufferOffsetAlignment | 4096 | max 1561e5c31af7Sopenharmony_ci| pname:minBitstreamBufferSizeAlignment | 4096 | max 1562e5c31af7Sopenharmony_ci| pname:pictureAccessGranularity | (64,64) | max 1563e5c31af7Sopenharmony_ci| pname:minCodedExtent | - | max 1564e5c31af7Sopenharmony_ci| pname:maxCodedExtent | - | min 1565e5c31af7Sopenharmony_ci| pname:maxDpbSlots | 0 | min 1566e5c31af7Sopenharmony_ci| pname:maxActiveReferencePictures | 0 | min 1567e5c31af7Sopenharmony_ci| **slink:VkVideoEncodeCapabilitiesKHR** | | 1568e5c31af7Sopenharmony_ci| pname:flags | - | min 1569e5c31af7Sopenharmony_ci| pname:rateControlModes | - | min 1570e5c31af7Sopenharmony_ci| pname:maxBitrate | 64000 | min 1571e5c31af7Sopenharmony_ci| pname:maxQualityLevels | 1 | min 1572e5c31af7Sopenharmony_ci| pname:encodeInputPictureGranularity | (64,64) | max 1573e5c31af7Sopenharmony_ci| pname:supportedEncodeFeedbackFlags | ename:VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR + 1574e5c31af7Sopenharmony_ci ename:VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR | min 1575e5c31af7Sopenharmony_ci| **slink:VkVideoEncodeH264CapabilitiesKHR** | | 1576e5c31af7Sopenharmony_ci| pname:flags | - | min 1577e5c31af7Sopenharmony_ci| pname:maxLevelIdc | code:STD_VIDEO_H264_LEVEL_IDC_1_0 | min 1578e5c31af7Sopenharmony_ci| pname:maxSliceCount | 1 | min 1579e5c31af7Sopenharmony_ci| pname:maxPPictureL0ReferenceCount | 0 | min 1580e5c31af7Sopenharmony_ci| pname:maxBPictureL0ReferenceCount | 0 | min 1581e5c31af7Sopenharmony_ci| pname:maxL1ReferenceCount | 0 | min 1582e5c31af7Sopenharmony_ci| pname:maxTemporalLayerCount | 1 | min 1583e5c31af7Sopenharmony_ci| pname:expectDyadicTemporalLayerPattern | - | implementation-dependent 1584e5c31af7Sopenharmony_ci| pname:minQp | - | max 1585e5c31af7Sopenharmony_ci| pname:maxQp | - | min 1586e5c31af7Sopenharmony_ci| pname:prefersGopRemainingFrames | - | implementation-dependent 1587e5c31af7Sopenharmony_ci| pname:requiresGopRemainingFrames | - | implementation-dependent 1588e5c31af7Sopenharmony_ci| pname:stdSyntaxFlags | - | min 1589e5c31af7Sopenharmony_ci|==== 1590e5c31af7Sopenharmony_ci 1591e5c31af7Sopenharmony_ci1:: 1592e5c31af7Sopenharmony_ci The *Requirement Type* column specifies the requirement is either the 1593e5c31af7Sopenharmony_ci minimum value all implementations must: support, the maximum value all 1594e5c31af7Sopenharmony_ci implementations must: support, or the exact value all implementations 1595e5c31af7Sopenharmony_ci must: support. 1596e5c31af7Sopenharmony_ci For bitmasks a minimum value is the least bits all implementations must: 1597e5c31af7Sopenharmony_ci set, but they may: have additional bits set beyond this minimum. 1598