1 | #ifndef VULKAN_VIDEO_CODEC_H264STD_H_ |
2 | #define VULKAN_VIDEO_CODEC_H264STD_H_ 1 |
3 | |
4 | /* |
5 | ** Copyright 2015-2023 The Khronos Group Inc. |
6 | ** |
7 | ** SPDX-License-Identifier: Apache-2.0 |
8 | */ |
9 | |
10 | /* |
11 | ** This header is generated from the Khronos Vulkan XML API Registry. |
12 | ** |
13 | */ |
14 | |
15 | |
16 | #ifdef __cplusplus |
17 | extern "C" { |
18 | #endif |
19 | |
20 | |
21 | |
22 | #define vulkan_video_codec_h264std 1 |
23 | #include <stdint.h> |
24 | #define STD_VIDEO_H264_CPB_CNT_LIST_SIZE 32 |
25 | #define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS 6 |
26 | #define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS 16 |
27 | #define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS 6 |
28 | #define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS 64 |
29 | #define STD_VIDEO_H264_MAX_NUM_LIST_REF 32 |
30 | #define STD_VIDEO_H264_MAX_CHROMA_PLANES 2 |
31 | |
32 | typedef enum StdVideoH264ChromaFormatIdc { |
33 | STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME = 0, |
34 | STD_VIDEO_H264_CHROMA_FORMAT_IDC_420 = 1, |
35 | STD_VIDEO_H264_CHROMA_FORMAT_IDC_422 = 2, |
36 | STD_VIDEO_H264_CHROMA_FORMAT_IDC_444 = 3, |
37 | STD_VIDEO_H264_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF, |
38 | STD_VIDEO_H264_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF |
39 | } StdVideoH264ChromaFormatIdc; |
40 | |
41 | typedef enum StdVideoH264ProfileIdc { |
42 | STD_VIDEO_H264_PROFILE_IDC_BASELINE = 66, |
43 | STD_VIDEO_H264_PROFILE_IDC_MAIN = 77, |
44 | STD_VIDEO_H264_PROFILE_IDC_HIGH = 100, |
45 | STD_VIDEO_H264_PROFILE_IDC_HIGH_444_PREDICTIVE = 244, |
46 | STD_VIDEO_H264_PROFILE_IDC_INVALID = 0x7FFFFFFF, |
47 | STD_VIDEO_H264_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF |
48 | } StdVideoH264ProfileIdc; |
49 | |
50 | typedef enum StdVideoH264LevelIdc { |
51 | STD_VIDEO_H264_LEVEL_IDC_1_0 = 0, |
52 | STD_VIDEO_H264_LEVEL_IDC_1_1 = 1, |
53 | STD_VIDEO_H264_LEVEL_IDC_1_2 = 2, |
54 | STD_VIDEO_H264_LEVEL_IDC_1_3 = 3, |
55 | STD_VIDEO_H264_LEVEL_IDC_2_0 = 4, |
56 | STD_VIDEO_H264_LEVEL_IDC_2_1 = 5, |
57 | STD_VIDEO_H264_LEVEL_IDC_2_2 = 6, |
58 | STD_VIDEO_H264_LEVEL_IDC_3_0 = 7, |
59 | STD_VIDEO_H264_LEVEL_IDC_3_1 = 8, |
60 | STD_VIDEO_H264_LEVEL_IDC_3_2 = 9, |
61 | STD_VIDEO_H264_LEVEL_IDC_4_0 = 10, |
62 | STD_VIDEO_H264_LEVEL_IDC_4_1 = 11, |
63 | STD_VIDEO_H264_LEVEL_IDC_4_2 = 12, |
64 | STD_VIDEO_H264_LEVEL_IDC_5_0 = 13, |
65 | STD_VIDEO_H264_LEVEL_IDC_5_1 = 14, |
66 | STD_VIDEO_H264_LEVEL_IDC_5_2 = 15, |
67 | STD_VIDEO_H264_LEVEL_IDC_6_0 = 16, |
68 | STD_VIDEO_H264_LEVEL_IDC_6_1 = 17, |
69 | STD_VIDEO_H264_LEVEL_IDC_6_2 = 18, |
70 | STD_VIDEO_H264_LEVEL_IDC_INVALID = 0x7FFFFFFF, |
71 | STD_VIDEO_H264_LEVEL_IDC_MAX_ENUM = 0x7FFFFFFF |
72 | } StdVideoH264LevelIdc; |
73 | |
74 | typedef enum StdVideoH264PocType { |
75 | STD_VIDEO_H264_POC_TYPE_0 = 0, |
76 | STD_VIDEO_H264_POC_TYPE_1 = 1, |
77 | STD_VIDEO_H264_POC_TYPE_2 = 2, |
78 | STD_VIDEO_H264_POC_TYPE_INVALID = 0x7FFFFFFF, |
79 | STD_VIDEO_H264_POC_TYPE_MAX_ENUM = 0x7FFFFFFF |
80 | } StdVideoH264PocType; |
81 | |
82 | typedef enum StdVideoH264AspectRatioIdc { |
83 | STD_VIDEO_H264_ASPECT_RATIO_IDC_UNSPECIFIED = 0, |
84 | STD_VIDEO_H264_ASPECT_RATIO_IDC_SQUARE = 1, |
85 | STD_VIDEO_H264_ASPECT_RATIO_IDC_12_11 = 2, |
86 | STD_VIDEO_H264_ASPECT_RATIO_IDC_10_11 = 3, |
87 | STD_VIDEO_H264_ASPECT_RATIO_IDC_16_11 = 4, |
88 | STD_VIDEO_H264_ASPECT_RATIO_IDC_40_33 = 5, |
89 | STD_VIDEO_H264_ASPECT_RATIO_IDC_24_11 = 6, |
90 | STD_VIDEO_H264_ASPECT_RATIO_IDC_20_11 = 7, |
91 | STD_VIDEO_H264_ASPECT_RATIO_IDC_32_11 = 8, |
92 | STD_VIDEO_H264_ASPECT_RATIO_IDC_80_33 = 9, |
93 | STD_VIDEO_H264_ASPECT_RATIO_IDC_18_11 = 10, |
94 | STD_VIDEO_H264_ASPECT_RATIO_IDC_15_11 = 11, |
95 | STD_VIDEO_H264_ASPECT_RATIO_IDC_64_33 = 12, |
96 | STD_VIDEO_H264_ASPECT_RATIO_IDC_160_99 = 13, |
97 | STD_VIDEO_H264_ASPECT_RATIO_IDC_4_3 = 14, |
98 | STD_VIDEO_H264_ASPECT_RATIO_IDC_3_2 = 15, |
99 | STD_VIDEO_H264_ASPECT_RATIO_IDC_2_1 = 16, |
100 | STD_VIDEO_H264_ASPECT_RATIO_IDC_EXTENDED_SAR = 255, |
101 | STD_VIDEO_H264_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF, |
102 | STD_VIDEO_H264_ASPECT_RATIO_IDC_MAX_ENUM = 0x7FFFFFFF |
103 | } StdVideoH264AspectRatioIdc; |
104 | |
105 | typedef enum StdVideoH264WeightedBipredIdc { |
106 | STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_DEFAULT = 0, |
107 | STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT = 1, |
108 | STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT = 2, |
109 | STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_INVALID = 0x7FFFFFFF, |
110 | STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_MAX_ENUM = 0x7FFFFFFF |
111 | } StdVideoH264WeightedBipredIdc; |
112 | |
113 | typedef enum StdVideoH264ModificationOfPicNumsIdc { |
114 | STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_SUBTRACT = 0, |
115 | STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_ADD = 1, |
116 | STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_LONG_TERM = 2, |
117 | STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_END = 3, |
118 | STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_INVALID = 0x7FFFFFFF, |
119 | STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_MAX_ENUM = 0x7FFFFFFF |
120 | } StdVideoH264ModificationOfPicNumsIdc; |
121 | |
122 | typedef enum StdVideoH264MemMgmtControlOp { |
123 | STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_END = 0, |
124 | STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_SHORT_TERM = 1, |
125 | STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_LONG_TERM = 2, |
126 | STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_LONG_TERM = 3, |
127 | STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_SET_MAX_LONG_TERM_INDEX = 4, |
128 | STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_ALL = 5, |
129 | STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_CURRENT_AS_LONG_TERM = 6, |
130 | STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_INVALID = 0x7FFFFFFF, |
131 | STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MAX_ENUM = 0x7FFFFFFF |
132 | } StdVideoH264MemMgmtControlOp; |
133 | |
134 | typedef enum StdVideoH264CabacInitIdc { |
135 | STD_VIDEO_H264_CABAC_INIT_IDC_0 = 0, |
136 | STD_VIDEO_H264_CABAC_INIT_IDC_1 = 1, |
137 | STD_VIDEO_H264_CABAC_INIT_IDC_2 = 2, |
138 | STD_VIDEO_H264_CABAC_INIT_IDC_INVALID = 0x7FFFFFFF, |
139 | STD_VIDEO_H264_CABAC_INIT_IDC_MAX_ENUM = 0x7FFFFFFF |
140 | } StdVideoH264CabacInitIdc; |
141 | |
142 | typedef enum StdVideoH264DisableDeblockingFilterIdc { |
143 | STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED = 0, |
144 | STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED = 1, |
145 | STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL = 2, |
146 | STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_INVALID = 0x7FFFFFFF, |
147 | STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_MAX_ENUM = 0x7FFFFFFF |
148 | } StdVideoH264DisableDeblockingFilterIdc; |
149 | |
150 | typedef enum StdVideoH264SliceType { |
151 | STD_VIDEO_H264_SLICE_TYPE_P = 0, |
152 | STD_VIDEO_H264_SLICE_TYPE_B = 1, |
153 | STD_VIDEO_H264_SLICE_TYPE_I = 2, |
154 | STD_VIDEO_H264_SLICE_TYPE_INVALID = 0x7FFFFFFF, |
155 | STD_VIDEO_H264_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF |
156 | } StdVideoH264SliceType; |
157 | |
158 | typedef enum StdVideoH264PictureType { |
159 | STD_VIDEO_H264_PICTURE_TYPE_P = 0, |
160 | STD_VIDEO_H264_PICTURE_TYPE_B = 1, |
161 | STD_VIDEO_H264_PICTURE_TYPE_I = 2, |
162 | STD_VIDEO_H264_PICTURE_TYPE_IDR = 5, |
163 | STD_VIDEO_H264_PICTURE_TYPE_INVALID = 0x7FFFFFFF, |
164 | STD_VIDEO_H264_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF |
165 | } StdVideoH264PictureType; |
166 | |
167 | typedef enum StdVideoH264NonVclNaluType { |
168 | STD_VIDEO_H264_NON_VCL_NALU_TYPE_SPS = 0, |
169 | STD_VIDEO_H264_NON_VCL_NALU_TYPE_PPS = 1, |
170 | STD_VIDEO_H264_NON_VCL_NALU_TYPE_AUD = 2, |
171 | STD_VIDEO_H264_NON_VCL_NALU_TYPE_PREFIX = 3, |
172 | STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_SEQUENCE = 4, |
173 | STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_STREAM = 5, |
174 | STD_VIDEO_H264_NON_VCL_NALU_TYPE_PRECODED = 6, |
175 | STD_VIDEO_H264_NON_VCL_NALU_TYPE_INVALID = 0x7FFFFFFF, |
176 | STD_VIDEO_H264_NON_VCL_NALU_TYPE_MAX_ENUM = 0x7FFFFFFF |
177 | } StdVideoH264NonVclNaluType; |
178 | typedef struct StdVideoH264SpsVuiFlags { |
179 | uint32_t aspect_ratio_info_present_flag : 1; |
180 | uint32_t overscan_info_present_flag : 1; |
181 | uint32_t overscan_appropriate_flag : 1; |
182 | uint32_t video_signal_type_present_flag : 1; |
183 | uint32_t video_full_range_flag : 1; |
184 | uint32_t color_description_present_flag : 1; |
185 | uint32_t chroma_loc_info_present_flag : 1; |
186 | uint32_t timing_info_present_flag : 1; |
187 | uint32_t fixed_frame_rate_flag : 1; |
188 | uint32_t bitstream_restriction_flag : 1; |
189 | uint32_t nal_hrd_parameters_present_flag : 1; |
190 | uint32_t vcl_hrd_parameters_present_flag : 1; |
191 | } StdVideoH264SpsVuiFlags; |
192 | |
193 | typedef struct StdVideoH264HrdParameters { |
194 | uint8_t cpb_cnt_minus1; |
195 | uint8_t bit_rate_scale; |
196 | uint8_t cpb_size_scale; |
197 | uint8_t reserved1; |
198 | uint32_t bit_rate_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE]; |
199 | uint32_t cpb_size_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE]; |
200 | uint8_t cbr_flag[STD_VIDEO_H264_CPB_CNT_LIST_SIZE]; |
201 | uint32_t initial_cpb_removal_delay_length_minus1; |
202 | uint32_t cpb_removal_delay_length_minus1; |
203 | uint32_t dpb_output_delay_length_minus1; |
204 | uint32_t time_offset_length; |
205 | } StdVideoH264HrdParameters; |
206 | |
207 | typedef struct StdVideoH264SequenceParameterSetVui { |
208 | StdVideoH264SpsVuiFlags flags; |
209 | StdVideoH264AspectRatioIdc aspect_ratio_idc; |
210 | uint16_t sar_width; |
211 | uint16_t sar_height; |
212 | uint8_t video_format; |
213 | uint8_t colour_primaries; |
214 | uint8_t transfer_characteristics; |
215 | uint8_t matrix_coefficients; |
216 | uint32_t num_units_in_tick; |
217 | uint32_t time_scale; |
218 | uint8_t max_num_reorder_frames; |
219 | uint8_t max_dec_frame_buffering; |
220 | uint8_t chroma_sample_loc_type_top_field; |
221 | uint8_t chroma_sample_loc_type_bottom_field; |
222 | uint32_t reserved1; |
223 | const StdVideoH264HrdParameters* pHrdParameters; |
224 | } StdVideoH264SequenceParameterSetVui; |
225 | |
226 | typedef struct StdVideoH264SpsFlags { |
227 | uint32_t constraint_set0_flag : 1; |
228 | uint32_t constraint_set1_flag : 1; |
229 | uint32_t constraint_set2_flag : 1; |
230 | uint32_t constraint_set3_flag : 1; |
231 | uint32_t constraint_set4_flag : 1; |
232 | uint32_t constraint_set5_flag : 1; |
233 | uint32_t direct_8x8_inference_flag : 1; |
234 | uint32_t mb_adaptive_frame_field_flag : 1; |
235 | uint32_t frame_mbs_only_flag : 1; |
236 | uint32_t delta_pic_order_always_zero_flag : 1; |
237 | uint32_t separate_colour_plane_flag : 1; |
238 | uint32_t gaps_in_frame_num_value_allowed_flag : 1; |
239 | uint32_t qpprime_y_zero_transform_bypass_flag : 1; |
240 | uint32_t frame_cropping_flag : 1; |
241 | uint32_t seq_scaling_matrix_present_flag : 1; |
242 | uint32_t vui_parameters_present_flag : 1; |
243 | } StdVideoH264SpsFlags; |
244 | |
245 | typedef struct StdVideoH264ScalingLists { |
246 | uint16_t scaling_list_present_mask; |
247 | uint16_t use_default_scaling_matrix_mask; |
248 | uint8_t ScalingList4x4[STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS]; |
249 | uint8_t ScalingList8x8[STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS]; |
250 | } StdVideoH264ScalingLists; |
251 | |
252 | typedef struct StdVideoH264SequenceParameterSet { |
253 | StdVideoH264SpsFlags flags; |
254 | StdVideoH264ProfileIdc profile_idc; |
255 | StdVideoH264LevelIdc level_idc; |
256 | StdVideoH264ChromaFormatIdc chroma_format_idc; |
257 | uint8_t seq_parameter_set_id; |
258 | uint8_t bit_depth_luma_minus8; |
259 | uint8_t bit_depth_chroma_minus8; |
260 | uint8_t log2_max_frame_num_minus4; |
261 | StdVideoH264PocType pic_order_cnt_type; |
262 | int32_t offset_for_non_ref_pic; |
263 | int32_t offset_for_top_to_bottom_field; |
264 | uint8_t log2_max_pic_order_cnt_lsb_minus4; |
265 | uint8_t num_ref_frames_in_pic_order_cnt_cycle; |
266 | uint8_t max_num_ref_frames; |
267 | uint8_t reserved1; |
268 | uint32_t pic_width_in_mbs_minus1; |
269 | uint32_t pic_height_in_map_units_minus1; |
270 | uint32_t frame_crop_left_offset; |
271 | uint32_t frame_crop_right_offset; |
272 | uint32_t frame_crop_top_offset; |
273 | uint32_t frame_crop_bottom_offset; |
274 | uint32_t reserved2; |
275 | const int32_t* pOffsetForRefFrame; |
276 | const StdVideoH264ScalingLists* pScalingLists; |
277 | const StdVideoH264SequenceParameterSetVui* pSequenceParameterSetVui; |
278 | } StdVideoH264SequenceParameterSet; |
279 | |
280 | typedef struct StdVideoH264PpsFlags { |
281 | uint32_t transform_8x8_mode_flag : 1; |
282 | uint32_t redundant_pic_cnt_present_flag : 1; |
283 | uint32_t constrained_intra_pred_flag : 1; |
284 | uint32_t deblocking_filter_control_present_flag : 1; |
285 | uint32_t weighted_pred_flag : 1; |
286 | uint32_t bottom_field_pic_order_in_frame_present_flag : 1; |
287 | uint32_t entropy_coding_mode_flag : 1; |
288 | uint32_t pic_scaling_matrix_present_flag : 1; |
289 | } StdVideoH264PpsFlags; |
290 | |
291 | typedef struct StdVideoH264PictureParameterSet { |
292 | StdVideoH264PpsFlags flags; |
293 | uint8_t seq_parameter_set_id; |
294 | uint8_t pic_parameter_set_id; |
295 | uint8_t num_ref_idx_l0_default_active_minus1; |
296 | uint8_t num_ref_idx_l1_default_active_minus1; |
297 | StdVideoH264WeightedBipredIdc weighted_bipred_idc; |
298 | int8_t pic_init_qp_minus26; |
299 | int8_t pic_init_qs_minus26; |
300 | int8_t chroma_qp_index_offset; |
301 | int8_t second_chroma_qp_index_offset; |
302 | const StdVideoH264ScalingLists* pScalingLists; |
303 | } StdVideoH264PictureParameterSet; |
304 | |
305 | |
306 | #ifdef __cplusplus |
307 | } |
308 | #endif |
309 | |
310 | #endif |
311 | |