• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2018-2021 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5[[decode-h265]]
6== Video Decode of HEVC (ITU-T H.265)
7
8This extension adds H.265 codec specific structures needed for decode
9session to execute decode jobs which include H.265 sequence header, picture
10parameter header and quantization matrix etc.
11Unless otherwise noted, all references to the H.265 specification are to the
122013 edition published by the ITU-T, dated April 2013.
13This specification is available at http://www.itu.int/rec/T-REC-H.265.
14
15
16=== H.265 decode profile
17
18A H.265 decode profile is specified using slink:VkVideoDecodeH265ProfileEXT
19chained to slink:VkVideoProfileKHR when the codec-operation in
20slink:VkVideoProfileKHR is
21ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT.
22
23[open,refpage='VkVideoDecodeH265ProfileEXT',desc='Structure specifying H.265 decode profile',type='structs']
24--
25The slink:VkVideoDecodeH265ProfileEXT structure is defined as:
26
27include::{generated}/api/structs/VkVideoDecodeH265ProfileEXT.txt[]
28
29  * pname:sType is the type of this structure.
30  * pname:pNext is `NULL` or a pointer to a structure extending this
31    structure.
32  * pname:stdProfileIdc is a code:StdVideoH265ProfileIdc value specifying
33    the H.265 codec profile IDC.
34
35include::{generated}/validity/structs/VkVideoDecodeH265ProfileEXT.txt[]
36--
37
38
39=== Selecting an H.265 Profile
40
41When using flink:vkGetPhysicalDeviceVideoCapabilitiesKHR to query the
42capabilities for the input pname:pVideoProfile with
43pname:videoCodecOperation specified as
44ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT, a
45slink:VkVideoDecodeH265ProfileEXT structure must: be chained to
46slink:VkVideoProfileKHR to select a H.265 decode profile.
47If supported, the implementation returns the capabilities associated with
48the specified H.265 decode profile.
49The requirement is similar when querying supported image formats using
50flink:vkGetPhysicalDeviceVideoFormatPropertiesKHR.
51
52A supported H.265 decode profile must: be selected when creating a video
53session by chaining slink:VkVideoDecodeH265ProfileEXT to the
54slink:VkVideoProfileKHR field of slink:VkVideoSessionCreateInfoKHR.
55
56
57=== Capabilities
58
59[open,refpage='VkVideoDecodeH265CapabilitiesEXT',desc='Structure specifies H.265 decode capabilities parameters when decoding a frame',type='structs']
60--
61When uses flink:vkGetPhysicalDeviceVideoCapabilitiesKHR to query the
62capabilities for the parameter pname:videoCodecOperation specified as
63ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT,
64slink:VkVideoDecodeH265CapabilitiesEXT structure can: be chained to
65slink:VkVideoCapabilitiesKHR to get this H.265 extension specific
66capabilities.
67
68The slink:VkVideoDecodeH265CapabilitiesEXT structure is defined as:
69
70include::{generated}/api/structs/VkVideoDecodeH265CapabilitiesEXT.txt[]
71  * pname:sType is the type of this structure.
72  * pname:pNext is `NULL` or a pointer to a structure extending this
73    structure.
74  * pname:maxLevel is the maximum H.265 level supported by the device.
75  * pname:stdExtensionVersion is a slink:VkExtensionProperties structure
76    specifying the H.265 extension name and version supported by this
77    implementation.
78
79include::{generated}/validity/structs/VkVideoDecodeH265CapabilitiesEXT.txt[]
80--
81
82
83=== Create Infomation
84
85[open,refpage='VkVideoDecodeH265SessionCreateInfoEXT',desc='Structure specifies H.265 decode session creation parameters',type='structs']
86--
87A slink:VkVideoDecodeH265SessionCreateInfoEXT structure can: be chained to
88slink:VkVideoSessionCreateInfoKHR when the function
89flink:vkCreateVideoSessionKHR is called to create a video session for H.265
90decode operations.
91
92The slink:VkVideoDecodeH265SessionCreateInfoEXT structure is defined as:
93
94include::{generated}/api/structs/VkVideoDecodeH265SessionCreateInfoEXT.txt[]
95  * pname:sType is the type of this structure.
96  * pname:pNext is `NULL` or a pointer to a structure extending this
97    structure.
98  * pname:flags is reserved for future use.
99  * pname:pStdExtensionVersion is a pointer to a slink:VkExtensionProperties
100    structure specifying H.265 codec extensions.
101
102include::{generated}/validity/structs/VkVideoDecodeH265SessionCreateInfoEXT.txt[]
103--
104
105[open,refpage='VkVideoDecodeH265CreateFlagsEXT',desc='Reserved for future use',type='flags']
106--
107include::{generated}/api/flags/VkVideoDecodeH265CreateFlagsEXT.txt[]
108
109tname:VkVideoDecodeH265CreateFlagsEXT is a bitmask type for setting a mask,
110but is currently reserved for future use.
111--
112
113
114=== Decoder Parameter Sets
115
116To reduce parameter traffic during decoding, the decoder parameter set
117object supports storing H.265 SPS/PPS parameter sets that may be later
118referenced during decoding.
119
120[open,refpage='VkVideoDecodeH265SessionParametersCreateInfoEXT',desc='Structure specifies H.265 decoder parameter set information',type='structs']
121--
122A sname:VkVideoDecodeH265SessionParametersCreateInfoEXT structure holding
123one H.265 SPS and at least one H.265 PPS paramater set must: be chained to
124sname:VkVideoSessionParametersCreateInfoKHR when calling
125fname:vkCreateVideoSessionParametersKHR to store these parameter set(s) with
126the decoder parameter set object for later reference.
127The provided H.265 SPS/PPS parameters must: be within the limits specified
128during decoder creation for the decoder specified in
129sname:VkVideoSessionParametersCreateInfoKHR.
130
131The sname:VkVideoDecodeH265SessionParametersCreateInfoEXT structure is
132defined as:
133
134include::{generated}/api/structs/VkVideoDecodeH265SessionParametersCreateInfoEXT.txt[]
135  * pname:sType is the type of this structure.
136  * pname:pNext is `NULL` or a pointer to a structure extending this
137    structure.
138  * pname:maxSpsStdCount is the maximum number of SPS parameters that the
139    sname:VkVideoSessionParametersKHR can contain.
140  * pname:maxPpsStdCount is the maximum number of PPS parameters that the
141    sname:VkVideoSessionParametersKHR can contain.
142  * pname:pParametersAddInfo is `NULL` or a pointer to a
143    slink:VkVideoDecodeH265SessionParametersAddInfoEXT structure specifying
144    H.265 parameters to add upon object creation.
145
146include::{generated}/validity/structs/VkVideoDecodeH265SessionParametersCreateInfoEXT.txt[]
147--
148
149[open,refpage='VkVideoDecodeH265SessionParametersAddInfoEXT',desc='Structure specifies H.265 decoder parameter set information',type='structs']
150--
151include::{generated}/api/structs/VkVideoDecodeH265SessionParametersAddInfoEXT.txt[]
152  * pname:sType is the type of this structure.
153  * pname:pNext is `NULL` or a pointer to a structure extending this
154    structure.
155  * pname:spsStdCount is the number of SPS elements in the pname:pSpsStd.
156    Its value must: be less than or equal to the value of
157    pname:maxSpsStdCount.
158  * pname:pSpsStd is a pointer to an array of
159    code:StdVideoH265SequenceParameterSet structures representing H.265
160    sequence parameter sets.
161    Each element of the array must: have a unique H.265 VPS-SPS ID pair.
162  * pname:ppsStdCount is the number of PPS provided in pname:pPpsStd.
163    Its value must: be less than or equal to the value of
164    pname:maxPpsStdCount.
165  * pname:pPpsStd is a pointer to an array of
166    code:StdVideoH265PictureParameterSet structures representing H.265
167    picture parameter sets.
168    Each element of the array entry must: have a unique H.265 VPS-SPS-PPS ID
169    tuple.
170
171.Valid Usage
172****
173  * [[VUID-VkVideoDecodeH265SessionParametersAddInfoEXT-vpsStdCount-04829]]
174    The values of pname:vpsStdCount, pname:spsStdCount and pname:ppsStdCount
175    must: be less than or equal to the values of pname:maxVpsStdCount,
176    pname:maxSpsStdCount and pname:maxPpsStdCount, respectively
177  * [[VUID-VkVideoDecodeH265SessionParametersAddInfoEXT-maxVpsStdCount-04830]]
178    When the pname:maxVpsStdCount number of parameters of type
179    StdVideoH265VideoParameterSet in the Video Session Parameters object is
180    reached, no additional parameters of that type can be added to the
181    object.
182    ename:VK_ERROR_TOO_MANY_OBJECTS will be returned if an attempt is made
183    to add additional data to this object at this point
184  * [[VUID-VkVideoDecodeH265SessionParametersAddInfoEXT-maxSpsStdCount-04831]]
185    When the pname:maxSpsStdCount number of parameters of type
186    StdVideoH265SequenceParameterSet in the Video Session Parameters object
187    is reached, no additional parameters of that type can be added to the
188    object.
189    ename:VK_ERROR_TOO_MANY_OBJECTS will be returned if an attempt is made
190    to add additional data to this object at this point
191  * [[VUID-VkVideoDecodeH265SessionParametersAddInfoEXT-maxPpsStdCount-04832]]
192    When the pname:maxPpsStdCount number of parameters of type
193    StdVideoH265PictureParameterSet in the Video Session Parameters object
194    is reached, no additional parameters of that type can be added to the
195    object.
196    ename:VK_ERROR_TOO_MANY_OBJECTS will be returned if an attempt is made
197    to add additional data to this object at this point
198  * [[VUID-VkVideoDecodeH265SessionParametersAddInfoEXT-None-04833]]
199    Each entry to be added must: have a unique, to the rest of the parameter
200    array entries and the existing parameters in the Video Session
201    Parameters Object that is being updated, VPS-SPS-PPS IDs
202  * [[VUID-VkVideoDecodeH265SessionParametersAddInfoEXT-None-04834]]
203    Parameter entries that already exist in Video Session Parameters object
204    with a particular VPS-SPS-PPS IDs cannot: be replaced nor updated
205  * [[VUID-VkVideoDecodeH265SessionParametersAddInfoEXT-None-04835]]
206    When creating a new object using a Video Session Parameters as a
207    template, the array's parameters with the same VPS-SPS-PPS IDs as the
208    ones from the template take precedence
209  * [[VUID-VkVideoDecodeH265SessionParametersAddInfoEXT-None-04836]]
210    VPS/SPS/PPS parameters must: comply with the limits specified in
211    slink:VkVideoSessionCreateInfoKHR during Video Session creation
212****
213
214include::{generated}/validity/structs/VkVideoDecodeH265SessionParametersAddInfoEXT.txt[]
215--
216
217
218=== Picture Parameters
219
220[open,refpage='VkVideoDecodeH265PictureInfoEXT',desc='Structure specifies H.265 picture information when decoding a frame',type='structs']
221--
222The slink:VkVideoDecodeH265PictureInfoEXT structure is defined as:
223
224include::{generated}/api/structs/VkVideoDecodeH265PictureInfoEXT.txt[]
225  * pname:sType is the type of this structure.
226  * pname:pNext is `NULL` or a pointer to a structure extending this
227    structure.
228  * pname:pStdPictureInfo is a pointer to a
229    code:StdVideoDecodeH265PictureInfo structure specifying codec standard
230    specific picture information from the H.265 specification.
231  * pname:slicesCount is the number of slices in this picture.
232  * pname:pSlicesDataOffsets is a pointer to an array of pname:slicesCount
233    offsets indicating the start offset of each slice within the bitstream
234    buffer.
235
236include::{generated}/validity/structs/VkVideoDecodeH265PictureInfoEXT.txt[]
237--
238
239[open,refpage='VkVideoDecodeH265DpbSlotInfoEXT',desc='Structure specifies H.265 DPB information when decoding a frame',type='structs']
240--
241The slink:VkVideoDecodeH265DpbSlotInfoEXT structure is defined as:
242
243include::{generated}/api/structs/VkVideoDecodeH265DpbSlotInfoEXT.txt[]
244  * pname:sType is the type of this structure.
245  * pname:pNext is `NULL` or a pointer to a structure extending this
246    structure.
247  * pname:pStdReferenceInfo is a pointer to a
248    code:StdVideoDecodeH265ReferenceInfo structure specifying the codec
249    standard specific picture reference information from the H.264
250    specification.
251
252include::{generated}/validity/structs/VkVideoDecodeH265DpbSlotInfoEXT.txt[]
253--
254
255