1 /* SPDX-License-Identifier: GPL-2.0 */
3 * These are the HEVC state controls for use with stateless HEVC
6 * It turns out that these structs are not stable yet and will undergo
7 * more changes. So keep them private until they are stable and ready to
8 * become part of the official public API.
11 #ifndef _HEVC_CTRLS_H_
12 #define _HEVC_CTRLS_H_
14 #include <linux/videodev2.h>
16 #define V4L2_CID_STATELESS_HEVC_SPS (V4L2_CID_CODEC_BASE + 1008)
17 #define V4L2_CID_STATELESS_HEVC_PPS (V4L2_CID_CODEC_BASE + 1009)
18 #define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS (V4L2_CID_CODEC_BASE + 1010)
19 #define V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (V4L2_CID_CODEC_BASE + 1011)
20 #define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS (V4L2_CID_CODEC_BASE + 1012)
21 #define V4L2_CID_STATELESS_HEVC_DECODE_MODE (V4L2_CID_CODEC_BASE + 1015)
22 #define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_BASE + 1016)
23 #define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_BASE + 1017)
25 enum v4l2_stateless_hevc_decode_mode {
26 V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED,
27 V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED,
30 enum v4l2_stateless_hevc_start_code {
31 V4L2_STATELESS_HEVC_START_CODE_NONE,
32 V4L2_STATELESS_HEVC_START_CODE_ANNEX_B,
35 #define V4L2_HEVC_SLICE_TYPE_B 0
36 #define V4L2_HEVC_SLICE_TYPE_P 1
37 #define V4L2_HEVC_SLICE_TYPE_I 2
39 #define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE (1ULL << 0)
40 #define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED (1ULL << 1)
41 #define V4L2_HEVC_SPS_FLAG_AMP_ENABLED (1ULL << 2)
42 #define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET (1ULL << 3)
43 #define V4L2_HEVC_SPS_FLAG_PCM_ENABLED (1ULL << 4)
44 #define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED (1ULL << 5)
45 #define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT (1ULL << 6)
46 #define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED (1ULL << 7)
47 #define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED (1ULL << 8)
50 * struct v4l2_ctrl_hevc_sps - ITU-T Rec. H.265: Sequence parameter set
52 * @video_parameter_set_id: specifies the value of the
53 * vps_video_parameter_set_id of the active VPS
54 * @seq_parameter_set_id: provides an identifier for the SPS for
55 * reference by other syntax elements
56 * @pic_width_in_luma_samples: specifies the width of each decoded picture
57 * in units of luma samples
58 * @pic_height_in_luma_samples: specifies the height of each decoded picture
59 * in units of luma samples
60 * @bit_depth_luma_minus8: this value plus 8 specifies the bit depth of the
61 * samples of the luma array
62 * @bit_depth_chroma_minus8: this value plus 8 specifies the bit depth of the
63 * samples of the chroma arrays
64 * @log2_max_pic_order_cnt_lsb_minus4: this value plus 4 specifies the value
65 * of the variable MaxPicOrderCntLsb
66 * @sps_max_dec_pic_buffering_minus1: this value plus 1 specifies the maximum
67 * required size of the decoded picture
68 * buffer for the codec video sequence
69 * @sps_max_num_reorder_pics: indicates the maximum allowed number of pictures
70 * @sps_max_latency_increase_plus1: not equal to 0 is used to compute the
71 * value of SpsMaxLatencyPictures array
72 * @log2_min_luma_coding_block_size_minus3: this value plus 3 specifies the
73 * minimum luma coding block size
74 * @log2_diff_max_min_luma_coding_block_size: specifies the difference between
75 * the maximum and minimum luma
77 * @log2_min_luma_transform_block_size_minus2: this value plus 2 specifies the
78 * minimum luma transform block size
79 * @log2_diff_max_min_luma_transform_block_size: specifies the difference between
80 * the maximum and minimum luma
81 * transform block size
82 * @max_transform_hierarchy_depth_inter: specifies the maximum hierarchy
83 * depth for transform units of
84 * coding units coded in inter
86 * @max_transform_hierarchy_depth_intra: specifies the maximum hierarchy
87 * depth for transform units of
88 * coding units coded in intra
90 * @pcm_sample_bit_depth_luma_minus1: this value plus 1 specifies the number of
91 * bits used to represent each of PCM sample
92 * values of the luma component
93 * @pcm_sample_bit_depth_chroma_minus1: this value plus 1 specifies the number
94 * of bits used to represent each of PCM
95 * sample values of the chroma components
96 * @log2_min_pcm_luma_coding_block_size_minus3: this value plus 3 specifies the
97 * minimum size of coding blocks
98 * @log2_diff_max_min_pcm_luma_coding_block_size: specifies the difference between
99 * the maximum and minimum size of
101 * @num_short_term_ref_pic_sets: specifies the number of st_ref_pic_set()
102 * syntax structures included in the SPS
103 * @num_long_term_ref_pics_sps: specifies the number of candidate long-term
104 * reference pictures that are specified in the SPS
105 * @chroma_format_idc: specifies the chroma sampling
106 * @sps_max_sub_layers_minus1: this value plus 1 specifies the maximum number
107 * of temporal sub-layers
108 * @flags: see V4L2_HEVC_SPS_FLAG_{}
110 struct v4l2_ctrl_hevc_sps {
111 __u8 video_parameter_set_id;
112 __u8 seq_parameter_set_id;
113 __u16 pic_width_in_luma_samples;
114 __u16 pic_height_in_luma_samples;
115 __u8 bit_depth_luma_minus8;
116 __u8 bit_depth_chroma_minus8;
117 __u8 log2_max_pic_order_cnt_lsb_minus4;
118 __u8 sps_max_dec_pic_buffering_minus1;
119 __u8 sps_max_num_reorder_pics;
120 __u8 sps_max_latency_increase_plus1;
121 __u8 log2_min_luma_coding_block_size_minus3;
122 __u8 log2_diff_max_min_luma_coding_block_size;
123 __u8 log2_min_luma_transform_block_size_minus2;
124 __u8 log2_diff_max_min_luma_transform_block_size;
125 __u8 max_transform_hierarchy_depth_inter;
126 __u8 max_transform_hierarchy_depth_intra;
127 __u8 pcm_sample_bit_depth_luma_minus1;
128 __u8 pcm_sample_bit_depth_chroma_minus1;
129 __u8 log2_min_pcm_luma_coding_block_size_minus3;
130 __u8 log2_diff_max_min_pcm_luma_coding_block_size;
131 __u8 num_short_term_ref_pic_sets;
132 __u8 num_long_term_ref_pics_sps;
133 __u8 chroma_format_idc;
134 __u8 sps_max_sub_layers_minus1;
139 #define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED (1ULL << 0)
140 #define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1)
141 #define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2)
142 #define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3)
143 #define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED (1ULL << 4)
144 #define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED (1ULL << 5)
145 #define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED (1ULL << 6)
146 #define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT (1ULL << 7)
147 #define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED (1ULL << 8)
148 #define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED (1ULL << 9)
149 #define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED (1ULL << 10)
150 #define V4L2_HEVC_PPS_FLAG_TILES_ENABLED (1ULL << 11)
151 #define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED (1ULL << 12)
152 #define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED (1ULL << 13)
153 #define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14)
154 #define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED (1ULL << 15)
155 #define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER (1ULL << 16)
156 #define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT (1ULL << 17)
157 #define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18)
158 #define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT (1ULL << 19)
159 #define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING (1ULL << 20)
162 * struct v4l2_ctrl_hevc_pps - ITU-T Rec. H.265: Picture parameter set
164 * @pic_parameter_set_id: identifies the PPS for reference by other
166 * @num_extra_slice_header_bits: specifies the number of extra slice header
167 * bits that are present in the slice header RBSP
168 * for coded pictures referring to the PPS.
169 * @num_ref_idx_l0_default_active_minus1: this value plus 1 specifies the inferred
170 * value of num_ref_idx_l0_active_minus1
171 * @num_ref_idx_l1_default_active_minus1: this value plus 1 specifies the inferred
172 * value of num_ref_idx_l1_active_minus1
173 * @init_qp_minus26: this value plus 26 specifies the initial value of SliceQp Y
174 * for each slice referring to the PPS
175 * @diff_cu_qp_delta_depth: specifies the difference between the luma coding
176 * tree block size and the minimum luma coding block
177 * size of coding units that convey cu_qp_delta_abs
178 * and cu_qp_delta_sign_flag
179 * @pps_cb_qp_offset: specify the offsets to the luma quantization parameter Cb
180 * @pps_cr_qp_offset: specify the offsets to the luma quantization parameter Cr
181 * @num_tile_columns_minus1: this value plus 1 specifies the number of tile columns
182 * partitioning the picture
183 * @num_tile_rows_minus1: this value plus 1 specifies the number of tile rows
184 * partitioning the picture
185 * @column_width_minus1: this value plus 1 specifies the width of each tile column
186 * in units of coding tree blocks
187 * @row_height_minus1: this value plus 1 specifies the height of each tile row in
188 * units of coding tree blocks
189 * @pps_beta_offset_div2: specify the default deblocking parameter offsets for
191 * @pps_tc_offset_div2: specify the default deblocking parameter offsets for tC
193 * @log2_parallel_merge_level_minus2: this value plus 2 specifies the value of
194 * the variable Log2ParMrgLevel
195 * @flags: see V4L2_HEVC_PPS_FLAG_{}
197 struct v4l2_ctrl_hevc_pps {
198 __u8 pic_parameter_set_id;
199 __u8 num_extra_slice_header_bits;
200 __u8 num_ref_idx_l0_default_active_minus1;
201 __u8 num_ref_idx_l1_default_active_minus1;
202 __s8 init_qp_minus26;
203 __u8 diff_cu_qp_delta_depth;
204 __s8 pps_cb_qp_offset;
205 __s8 pps_cr_qp_offset;
206 __u8 num_tile_columns_minus1;
207 __u8 num_tile_rows_minus1;
208 __u8 column_width_minus1[20];
209 __u8 row_height_minus1[22];
210 __s8 pps_beta_offset_div2;
211 __s8 pps_tc_offset_div2;
212 __u8 log2_parallel_merge_level_minus2;
218 #define V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE 0x01
220 #define V4L2_HEVC_SEI_PIC_STRUCT_FRAME 0
221 #define V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD 1
222 #define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD 2
223 #define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM 3
224 #define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP 4
225 #define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP 5
226 #define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM 6
227 #define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING 7
228 #define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING 8
229 #define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM 9
230 #define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP 10
231 #define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM 11
232 #define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP 12
234 #define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16
237 * struct v4l2_hevc_dpb_entry - HEVC decoded picture buffer entry
239 * @timestamp: timestamp of the V4L2 capture buffer to use as reference.
240 * @flags: long term flag for the reference frame
241 * @field_pic: whether the reference is a field picture or a frame.
242 * @pic_order_cnt_val: the picture order count of the reference.
244 struct v4l2_hevc_dpb_entry {
248 __s32 pic_order_cnt_val;
253 * struct v4l2_hevc_pred_weight_table - HEVC weighted prediction parameters
255 * @delta_luma_weight_l0: the difference of the weighting factor applied
256 * to the luma prediction value for list 0
257 * @luma_offset_l0: the additive offset applied to the luma prediction value
259 * @delta_chroma_weight_l0: the difference of the weighting factor applied
260 * to the chroma prediction values for list 0
261 * @chroma_offset_l0: the difference of the additive offset applied to
262 * the chroma prediction values for list 0
263 * @delta_luma_weight_l1: the difference of the weighting factor applied
264 * to the luma prediction value for list 1
265 * @luma_offset_l1: the additive offset applied to the luma prediction value
267 * @delta_chroma_weight_l1: the difference of the weighting factor applied
268 * to the chroma prediction values for list 1
269 * @chroma_offset_l1: the difference of the additive offset applied to
270 * the chroma prediction values for list 1
271 * @luma_log2_weight_denom: the base 2 logarithm of the denominator for
272 * all luma weighting factors
273 * @delta_chroma_log2_weight_denom: the difference of the base 2 logarithm
274 * of the denominator for all chroma
277 struct v4l2_hevc_pred_weight_table {
278 __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
279 __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
280 __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
281 __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
283 __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
284 __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
285 __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
286 __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
290 __u8 luma_log2_weight_denom;
291 __s8 delta_chroma_log2_weight_denom;
294 #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0)
295 #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1)
296 #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2)
297 #define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3)
298 #define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4)
299 #define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5)
300 #define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6)
301 #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7)
302 #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8)
303 #define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9)
306 * struct v4l2_ctrl_hevc_slice_params - HEVC slice parameters
308 * This control is a dynamically sized 1-dimensional array,
309 * V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it.
311 * @bit_size: size (in bits) of the current slice data
312 * @data_bit_offset: offset (in bits) to the video data in the current slice data
313 * @num_entry_point_offsets: specifies the number of entry point offset syntax
314 * elements in the slice header.
315 * @nal_unit_type: specifies the coding type of the slice (B, P or I)
316 * @nuh_temporal_id_plus1: minus 1 specifies a temporal identifier for the NAL unit
317 * @slice_type: see V4L2_HEVC_SLICE_TYPE_{}
318 * @colour_plane_id: specifies the colour plane associated with the current slice
319 * @slice_pic_order_cnt: specifies the picture order count
320 * @num_ref_idx_l0_active_minus1: this value plus 1 specifies the maximum reference
321 * index for reference picture list 0 that may be
322 * used to decode the slice
323 * @num_ref_idx_l1_active_minus1: this value plus 1 specifies the maximum reference
324 * index for reference picture list 1 that may be
325 * used to decode the slice
326 * @collocated_ref_idx: specifies the reference index of the collocated picture used
327 * for temporal motion vector prediction
328 * @five_minus_max_num_merge_cand: specifies the maximum number of merging
329 * motion vector prediction candidates supported in
330 * the slice subtracted from 5
331 * @slice_qp_delta: specifies the initial value of QpY to be used for the coding
332 * blocks in the slice
333 * @slice_cb_qp_offset: specifies a difference to be added to the value of pps_cb_qp_offset
334 * @slice_cr_qp_offset: specifies a difference to be added to the value of pps_cr_qp_offset
335 * @slice_act_y_qp_offset: screen content extension parameters
336 * @slice_act_cb_qp_offset: screen content extension parameters
337 * @slice_act_cr_qp_offset: screen content extension parameters
338 * @slice_beta_offset_div2: specify the deblocking parameter offsets for beta divided by 2
339 * @slice_tc_offset_div2: specify the deblocking parameter offsets for tC divided by 2
340 * @pic_struct: indicates whether a picture should be displayed as a frame or as one or
342 * @slice_segment_addr: specifies the address of the first coding tree block in
344 * @ref_idx_l0: the list of L0 reference elements as indices in the DPB
345 * @ref_idx_l1: the list of L1 reference elements as indices in the DPB
346 * @short_term_ref_pic_set_size: specifies the size of short-term reference
347 * pictures included in the SPS
348 * @long_term_ref_pic_set_size: specifies the size of long-term reference
349 * picture include in the SPS
350 * @pred_weight_table: the prediction weight coefficients for inter-picture
352 * @flags: see V4L2_HEVC_SLICE_PARAMS_FLAG_{}
354 struct v4l2_ctrl_hevc_slice_params {
356 __u32 data_bit_offset;
357 __u32 num_entry_point_offsets;
358 /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */
360 __u8 nuh_temporal_id_plus1;
362 /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */
364 __u8 colour_plane_id;
365 __s32 slice_pic_order_cnt;
366 __u8 num_ref_idx_l0_active_minus1;
367 __u8 num_ref_idx_l1_active_minus1;
368 __u8 collocated_ref_idx;
369 __u8 five_minus_max_num_merge_cand;
371 __s8 slice_cb_qp_offset;
372 __s8 slice_cr_qp_offset;
373 __s8 slice_act_y_qp_offset;
374 __s8 slice_act_cb_qp_offset;
375 __s8 slice_act_cr_qp_offset;
376 __s8 slice_beta_offset_div2;
377 __s8 slice_tc_offset_div2;
379 /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */
382 /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */
383 __u32 slice_segment_addr;
384 __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
385 __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
386 __u16 short_term_ref_pic_set_size;
387 __u16 long_term_ref_pic_set_size;
390 /* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */
391 struct v4l2_hevc_pred_weight_table pred_weight_table;
396 #define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC 0x1
397 #define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC 0x2
398 #define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR 0x4
401 * struct v4l2_ctrl_hevc_decode_params - HEVC decode parameters
403 * @pic_order_cnt_val: picture order count
404 * @short_term_ref_pic_set_size: specifies the size of short-term reference
405 * pictures set included in the SPS of the first slice
406 * @long_term_ref_pic_set_size: specifies the size of long-term reference
407 * pictures set include in the SPS of the first slice
408 * @num_active_dpb_entries: the number of entries in dpb
409 * @dpb: the decoded picture buffer, for meta-data about reference frames
410 * @num_poc_st_curr_before: the number of reference pictures in the short-term
411 * set that come before the current frame
412 * @num_poc_st_curr_after: the number of reference pictures in the short-term
413 * set that come after the current frame
414 * @num_poc_lt_curr: the number of reference pictures in the long-term set
415 * @poc_st_curr_before: provides the index of the short term before references
417 * @poc_st_curr_after: provides the index of the short term after references
419 * @poc_lt_curr: provides the index of the long term references in DPB array
420 * @flags: see V4L2_HEVC_DECODE_PARAM_FLAG_{}
422 struct v4l2_ctrl_hevc_decode_params {
423 __s32 pic_order_cnt_val;
424 __u16 short_term_ref_pic_set_size;
425 __u16 long_term_ref_pic_set_size;
426 __u8 num_active_dpb_entries;
427 struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
428 __u8 num_poc_st_curr_before;
429 __u8 num_poc_st_curr_after;
430 __u8 num_poc_lt_curr;
431 __u8 poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
432 __u8 poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
433 __u8 poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
438 * struct v4l2_ctrl_hevc_scaling_matrix - HEVC scaling lists parameters
440 * @scaling_list_4x4: scaling list is used for the scaling process for
441 * transform coefficients. The values on each scaling
442 * list are expected in raster scan order
443 * @scaling_list_8x8: scaling list is used for the scaling process for
444 * transform coefficients. The values on each scaling
445 * list are expected in raster scan order
446 * @scaling_list_16x16: scaling list is used for the scaling process for
447 * transform coefficients. The values on each scaling
448 * list are expected in raster scan order
449 * @scaling_list_32x32: scaling list is used for the scaling process for
450 * transform coefficients. The values on each scaling
451 * list are expected in raster scan order
452 * @scaling_list_dc_coef_16x16: scaling list is used for the scaling process
453 * for transform coefficients. The values on each
454 * scaling list are expected in raster scan order.
455 * @scaling_list_dc_coef_32x32: scaling list is used for the scaling process
456 * for transform coefficients. The values on each
457 * scaling list are expected in raster scan order.
459 struct v4l2_ctrl_hevc_scaling_matrix {
460 __u8 scaling_list_4x4[6][16];
461 __u8 scaling_list_8x8[6][64];
462 __u8 scaling_list_16x16[6][64];
463 __u8 scaling_list_32x32[2][64];
464 __u8 scaling_list_dc_coef_16x16[6];
465 __u8 scaling_list_dc_coef_32x32[2];
468 /* MPEG-class control IDs specific to the Hantro driver as defined by V4L2 */
469 #define V4L2_CID_CODEC_HANTRO_BASE (V4L2_CTRL_CLASS_CODEC | 0x1200)
471 * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP -
472 * the number of data (in bits) to skip in the
473 * slice segment header.
474 * If non-IDR, the bits to be skipped go from syntax element "pic_output_flag"
475 * to before syntax element "slice_temporal_mvp_enabled_flag".
476 * If IDR, the skipped bits are just "pic_output_flag"
477 * (separate_colour_plane_flag is not supported).
479 #define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (V4L2_CID_CODEC_HANTRO_BASE + 0)