← Documents Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / V4L

Stateless Codec Control Reference

V4L2 stateless H.264, FWHT, VP8, MPEG-2, VP9, HEVC 및 AV1 제어와 payload 구조체를 설명합니다.

Source pathDocumentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

ext-ctrls-codec-stateless.rst:1-4168

Stateless codec API에서는 애플리케이션이 비트스트림을 파싱하고 parameter set, frame/slice header, 확률·필터 상태와 참조 그림을 request마다 완성해야 합니다. 드라이버는 이 payload와 OUTPUT buffer를 이용해 하드웨어를 구성하므로 코덱 규격의 값, UAPI 구조체의 예약 필드, timestamp 기반 DPB 연결이 정확해야 합니다.

H.264와 HEVC는 slice/frame decode mode와 start-code 형식을 명시하고, VP8·VP9은 확률 context와 LAST/GOLDEN/ALTREF를, MPEG-2는 forward/backward reference를, AV1은 8개 reference slot과 tile·복원·film-grain 도구를 전달합니다. 모든 symbol과 배열 크기는 ABI이므로 번역문에서도 원형을 유지했습니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _codec-stateless-controls:
4
5 *********************************
6 Stateless Codec Control Reference
7 *********************************
8
9 The Stateless Codec control class is intended to support
10 stateless decoder and encoders (i.e. hardware accelerators).
11
12 These drivers are typically supported by the :ref:`stateless_decoder`,
13 and deal with parsed pixel formats such as V4L2_PIX_FMT_H264_SLICE.
14
15 Stateless Codec Control ID
16 ==========================
17
18 .. _codec-stateless-control-id:
19
20 ``V4L2_CID_CODEC_STATELESS_CLASS (class)``
21 The Stateless Codec class descriptor.
22
23 .. _v4l2-codec-stateless-h264:
24
25 ``V4L2_CID_STATELESS_H264_SPS (struct)``
26 Specifies the sequence parameter set (as extracted from the
27 bitstream) for the associated H264 slice data. This includes the
28 necessary parameters for configuring a stateless hardware decoding
29 pipeline for H264. The bitstream parameters are defined according
30 to :ref:`h264`, section 7.4.2.1.1 "Sequence Parameter Set Data
31 Semantics". For further documentation, refer to the above
32 specification, unless there is an explicit comment stating
33 otherwise.
34
35 .. c:type:: v4l2_ctrl_h264_sps
36
37 .. raw:: latex
38
39 \small
40
41 .. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}|
42
43 .. flat-table:: struct v4l2_ctrl_h264_sps
44 :header-rows: 0
45 :stub-columns: 0
46 :widths: 1 1 2
47
48 * - __u8
49 - ``profile_idc``
50 -
51 * - __u8
52 - ``constraint_set_flags``
53 - See :ref:`Sequence Parameter Set Constraints Set Flags <h264_sps_constraints_set_flags>`
54 * - __u8
55 - ``level_idc``
56 -
57 * - __u8
58 - ``seq_parameter_set_id``
59 -
60 * - __u8
61 - ``chroma_format_idc``
62 -
63 * - __u8
64 - ``bit_depth_luma_minus8``
65 -
66 * - __u8
67 - ``bit_depth_chroma_minus8``
68 -
69 * - __u8
70 - ``log2_max_frame_num_minus4``
71 -
72 * - __u8
73 - ``pic_order_cnt_type``
74 -
75 * - __u8
76 - ``log2_max_pic_order_cnt_lsb_minus4``
77 -
78 * - __u8
79 - ``max_num_ref_frames``
80 -
81 * - __u8
82 - ``num_ref_frames_in_pic_order_cnt_cycle``
83 -
84 * - __s32
85 - ``offset_for_ref_frame[255]``
86 -
87 * - __s32
88 - ``offset_for_non_ref_pic``
89 -
90 * - __s32
91 - ``offset_for_top_to_bottom_field``
92 -
93 * - __u16
94 - ``pic_width_in_mbs_minus1``
95 -
96 * - __u16
97 - ``pic_height_in_map_units_minus1``
98 -
99 * - __u32
100 - ``flags``
101 - See :ref:`Sequence Parameter Set Flags <h264_sps_flags>`
102
103 .. raw:: latex
104
105 \normalsize
106
107 .. _h264_sps_constraints_set_flags:
108
109 ``Sequence Parameter Set Constraints Set Flags``
110
111 .. cssclass:: longtable
112
113 .. flat-table::
114 :header-rows: 0
115 :stub-columns: 0
116 :widths: 1 1 2
117
118 * - ``V4L2_H264_SPS_CONSTRAINT_SET0_FLAG``
119 - 0x00000001
120 -
121 * - ``V4L2_H264_SPS_CONSTRAINT_SET1_FLAG``
122 - 0x00000002
123 -
124 * - ``V4L2_H264_SPS_CONSTRAINT_SET2_FLAG``
125 - 0x00000004
126 -
127 * - ``V4L2_H264_SPS_CONSTRAINT_SET3_FLAG``
128 - 0x00000008
129 -
130 * - ``V4L2_H264_SPS_CONSTRAINT_SET4_FLAG``
131 - 0x00000010
132 -
133 * - ``V4L2_H264_SPS_CONSTRAINT_SET5_FLAG``
134 - 0x00000020
135 -
136
137 .. _h264_sps_flags:
138
139 ``Sequence Parameter Set Flags``
140
141 .. cssclass:: longtable
142
143 .. flat-table::
144 :header-rows: 0
145 :stub-columns: 0
146 :widths: 1 1 2
147
148 * - ``V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE``
149 - 0x00000001
150 -
151 * - ``V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS``
152 - 0x00000002
153 -
154 * - ``V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO``
155 - 0x00000004
156 -
157 * - ``V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED``
158 - 0x00000008
159 -
160 * - ``V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY``
161 - 0x00000010
162 -
163 * - ``V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD``
164 - 0x00000020
165 -
166 * - ``V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE``
167 - 0x00000040
168 -
169
170 ``V4L2_CID_STATELESS_H264_PPS (struct)``
171 Specifies the picture parameter set (as extracted from the
172 bitstream) for the associated H264 slice data. This includes the
173 necessary parameters for configuring a stateless hardware decoding
174 pipeline for H264. The bitstream parameters are defined according
175 to :ref:`h264`, section 7.4.2.2 "Picture Parameter Set RBSP
176 Semantics". For further documentation, refer to the above
177 specification, unless there is an explicit comment stating
178 otherwise.
179
180 .. c:type:: v4l2_ctrl_h264_pps
181
182 .. raw:: latex
183
184 \small
185
186 .. flat-table:: struct v4l2_ctrl_h264_pps
187 :header-rows: 0
188 :stub-columns: 0
189 :widths: 1 1 2
190
191 * - __u8
192 - ``pic_parameter_set_id``
193 -
194 * - __u8
195 - ``seq_parameter_set_id``
196 -
197 * - __u8
198 - ``num_slice_groups_minus1``
199 -
200 * - __u8
201 - ``num_ref_idx_l0_default_active_minus1``
202 -
203 * - __u8
204 - ``num_ref_idx_l1_default_active_minus1``
205 -
206 * - __u8
207 - ``weighted_bipred_idc``
208 -
209 * - __s8
210 - ``pic_init_qp_minus26``
211 -
212 * - __s8
213 - ``pic_init_qs_minus26``
214 -
215 * - __s8
216 - ``chroma_qp_index_offset``
217 -
218 * - __s8
219 - ``second_chroma_qp_index_offset``
220 -
221 * - __u16
222 - ``flags``
223 - See :ref:`Picture Parameter Set Flags <h264_pps_flags>`
224
225 .. raw:: latex
226
227 \normalsize
228
229 .. _h264_pps_flags:
230
231 ``Picture Parameter Set Flags``
232
233 .. raw:: latex
234
235 \begingroup
236 \scriptsize
237 \setlength{\tabcolsep}{2pt}
238
239 .. tabularcolumns:: |p{9.8cm}|p{1.0cm}|p{6.5cm}|
240
241 .. flat-table::
242 :header-rows: 0
243 :stub-columns: 0
244 :widths: 10 1 4
245
246 * - ``V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE``
247 - 0x0001
248 -
249 * - ``V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT``
250 - 0x0002
251 -
252 * - ``V4L2_H264_PPS_FLAG_WEIGHTED_PRED``
253 - 0x0004
254 -
255 * - ``V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
256 - 0x0008
257 -
258 * - ``V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED``
259 - 0x0010
260 -
261 * - ``V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT``
262 - 0x0020
263 -
264 * - ``V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE``
265 - 0x0040
266 -
267 * - ``V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT``
268 - 0x0080
269 - ``V4L2_CID_STATELESS_H264_SCALING_MATRIX``
270 must be used for this picture.
271
272 .. raw:: latex
273
274 \endgroup
275
276 ``V4L2_CID_STATELESS_H264_SCALING_MATRIX (struct)``
277 Specifies the scaling matrix (as extracted from the bitstream) for
278 the associated H264 slice data. The bitstream parameters are
279 defined according to :ref:`h264`, section 7.4.2.1.1.1 "Scaling
280 List Semantics". For further documentation, refer to the above
281 specification, unless there is an explicit comment stating
282 otherwise.
283
284 .. c:type:: v4l2_ctrl_h264_scaling_matrix
285
286 .. raw:: latex
287
288 \small
289
290 .. tabularcolumns:: |p{0.6cm}|p{4.8cm}|p{11.9cm}|
291
292 .. flat-table:: struct v4l2_ctrl_h264_scaling_matrix
293 :header-rows: 0
294 :stub-columns: 0
295 :widths: 1 1 2
296
297 * - __u8
298 - ``scaling_list_4x4[6][16]``
299 - Scaling matrix after applying the inverse scanning process.
300 Expected list order is Intra Y, Intra Cb, Intra Cr, Inter Y,
301 Inter Cb, Inter Cr. The values on each scaling list are
302 expected in raster scan order.
303 * - __u8
304 - ``scaling_list_8x8[6][64]``
305 - Scaling matrix after applying the inverse scanning process.
306 Expected list order is Intra Y, Inter Y, Intra Cb, Inter Cb,
307 Intra Cr, Inter Cr. The values on each scaling list are
308 expected in raster scan order.
309
310 ``V4L2_CID_STATELESS_H264_SLICE_PARAMS (struct)``
311 Specifies the slice parameters (as extracted from the bitstream)
312 for the associated H264 slice data. This includes the necessary
313 parameters for configuring a stateless hardware decoding pipeline
314 for H264. The bitstream parameters are defined according to
315 :ref:`h264`, section 7.4.3 "Slice Header Semantics". For further
316 documentation, refer to the above specification, unless there is
317 an explicit comment stating otherwise.
318
319 .. c:type:: v4l2_ctrl_h264_slice_params
320
321 .. raw:: latex
322
323 \small
324
325 .. tabularcolumns:: |p{4.0cm}|p{5.9cm}|p{7.4cm}|
326
327 .. flat-table:: struct v4l2_ctrl_h264_slice_params
328 :header-rows: 0
329 :stub-columns: 0
330 :widths: 1 1 2
331
332 * - __u32
333 - ``header_bit_size``
334 - Offset in bits to slice_data() from the beginning of this slice.
335 * - __u32
336 - ``first_mb_in_slice``
337 -
338 * - __u8
339 - ``slice_type``
340 -
341 * - __u8
342 - ``colour_plane_id``
343 -
344 * - __u8
345 - ``redundant_pic_cnt``
346 -
347 * - __u8
348 - ``cabac_init_idc``
349 -
350 * - __s8
351 - ``slice_qp_delta``
352 -
353 * - __s8
354 - ``slice_qs_delta``
355 -
356 * - __u8
357 - ``disable_deblocking_filter_idc``
358 -
359 * - __s8
360 - ``slice_alpha_c0_offset_div2``
361 -
362 * - __s8
363 - ``slice_beta_offset_div2``
364 -
365 * - __u8
366 - ``num_ref_idx_l0_active_minus1``
367 - If num_ref_idx_active_override_flag is not set, this field must be
368 set to the value of num_ref_idx_l0_default_active_minus1
369 * - __u8
370 - ``num_ref_idx_l1_active_minus1``
371 - If num_ref_idx_active_override_flag is not set, this field must be
372 set to the value of num_ref_idx_l1_default_active_minus1
373 * - __u8
374 - ``reserved``
375 - Applications and drivers must set this to zero.
376 * - struct :c:type:`v4l2_h264_reference`
377 - ``ref_pic_list0[32]``
378 - Reference picture list after applying the per-slice modifications
379 * - struct :c:type:`v4l2_h264_reference`
380 - ``ref_pic_list1[32]``
381 - Reference picture list after applying the per-slice modifications
382 * - __u32
383 - ``flags``
384 - See :ref:`Slice Parameter Flags <h264_slice_flags>`
385
386 .. raw:: latex
387
388 \normalsize
389
390 .. _h264_slice_flags:
391
392 ``Slice Parameter Set Flags``
393
394 .. cssclass:: longtable
395
396 .. flat-table::
397 :header-rows: 0
398 :stub-columns: 0
399 :widths: 1 1 2
400
401 * - ``V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED``
402 - 0x00000001
403 -
404 * - ``V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH``
405 - 0x00000002
406 -
407
408 ``V4L2_CID_STATELESS_H264_PRED_WEIGHTS (struct)``
409 Prediction weight table defined according to :ref:`h264`,
410 section 7.4.3.2 "Prediction Weight Table Semantics".
411 The prediction weight table must be passed by applications
412 under the conditions explained in section 7.3.3 "Slice header
413 syntax".
414
415 .. c:type:: v4l2_ctrl_h264_pred_weights
416
417 .. raw:: latex
418
419 \small
420
421 .. tabularcolumns:: |p{4.9cm}|p{4.9cm}|p{7.5cm}|
422
423 .. flat-table:: struct v4l2_ctrl_h264_pred_weights
424 :header-rows: 0
425 :stub-columns: 0
426 :widths: 1 1 2
427
428 * - __u16
429 - ``luma_log2_weight_denom``
430 -
431 * - __u16
432 - ``chroma_log2_weight_denom``
433 -
434 * - struct :c:type:`v4l2_h264_weight_factors`
435 - ``weight_factors[2]``
436 - The weight factors at index 0 are the weight factors for the reference
437 list 0, the one at index 1 for the reference list 1.
438
439 .. raw:: latex
440
441 \normalsize
442
443 .. c:type:: v4l2_h264_weight_factors
444
445 .. raw:: latex
446
447 \small
448
449 .. tabularcolumns:: |p{1.0cm}|p{4.5cm}|p{11.8cm}|
450
451 .. flat-table:: struct v4l2_h264_weight_factors
452 :header-rows: 0
453 :stub-columns: 0
454 :widths: 1 1 2
455
456 * - __s16
457 - ``luma_weight[32]``
458 -
459 * - __s16
460 - ``luma_offset[32]``
461 -
462 * - __s16
463 - ``chroma_weight[32][2]``
464 -
465 * - __s16
466 - ``chroma_offset[32][2]``
467 -
468
469 .. raw:: latex
470
471 \normalsize
472
473 ``Picture Reference``
474
475 .. c:type:: v4l2_h264_reference
476
477 .. cssclass:: longtable
478
479 .. flat-table:: struct v4l2_h264_reference
480 :header-rows: 0
481 :stub-columns: 0
482 :widths: 1 1 2
483
484 * - __u8
485 - ``fields``
486 - Specifies how the picture is referenced. See :ref:`Reference Fields <h264_ref_fields>`
487 * - __u8
488 - ``index``
489 - Index into the :c:type:`v4l2_ctrl_h264_decode_params`.dpb array.
490
491 .. _h264_ref_fields:
492
493 ``Reference Fields``
494
495 .. raw:: latex
496
497 \small
498
499 .. tabularcolumns:: |p{5.4cm}|p{0.8cm}|p{11.1cm}|
500
501 .. flat-table::
502 :header-rows: 0
503 :stub-columns: 0
504 :widths: 1 1 2
505
506 * - ``V4L2_H264_TOP_FIELD_REF``
507 - 0x1
508 - The top field in field pair is used for short-term reference.
509 * - ``V4L2_H264_BOTTOM_FIELD_REF``
510 - 0x2
511 - The bottom field in field pair is used for short-term reference.
512 * - ``V4L2_H264_FRAME_REF``
513 - 0x3
514 - The frame (or the top/bottom fields, if it's a field pair)
515 is used for short-term reference.
516
517 .. raw:: latex
518
519 \normalsize
520
521 ``V4L2_CID_STATELESS_H264_DECODE_PARAMS (struct)``
522 Specifies the decode parameters (as extracted from the bitstream)
523 for the associated H264 slice data. This includes the necessary
524 parameters for configuring a stateless hardware decoding pipeline
525 for H264. The bitstream parameters are defined according to
526 :ref:`h264`. For further documentation, refer to the above
527 specification, unless there is an explicit comment stating
528 otherwise.
529
530 .. c:type:: v4l2_ctrl_h264_decode_params
531
532 .. raw:: latex
533
534 \small
535
536 .. tabularcolumns:: |p{4.0cm}|p{5.9cm}|p{7.4cm}|
537
538 .. flat-table:: struct v4l2_ctrl_h264_decode_params
539 :header-rows: 0
540 :stub-columns: 0
541 :widths: 1 1 2
542
543 * - struct :c:type:`v4l2_h264_dpb_entry`
544 - ``dpb[16]``
545 -
546 * - __u16
547 - ``nal_ref_idc``
548 - NAL reference ID value coming from the NAL Unit header
549 * - __u16
550 - ``frame_num``
551 -
552 * - __s32
553 - ``top_field_order_cnt``
554 - Picture Order Count for the coded top field
555 * - __s32
556 - ``bottom_field_order_cnt``
557 - Picture Order Count for the coded bottom field
558 * - __u16
559 - ``idr_pic_id``
560 -
561 * - __u16
562 - ``pic_order_cnt_lsb``
563 -
564 * - __s32
565 - ``delta_pic_order_cnt_bottom``
566 -
567 * - __s32
568 - ``delta_pic_order_cnt0``
569 -
570 * - __s32
571 - ``delta_pic_order_cnt1``
572 -
573 * - __u32
574 - ``dec_ref_pic_marking_bit_size``
575 - Size in bits of the dec_ref_pic_marking() syntax element.
576 * - __u32
577 - ``pic_order_cnt_bit_size``
578 - Combined size in bits of the picture order count related syntax
579 elements: pic_order_cnt_lsb, delta_pic_order_cnt_bottom,
580 delta_pic_order_cnt0, and delta_pic_order_cnt1.
581 * - __u32
582 - ``slice_group_change_cycle``
583 -
584 * - __u32
585 - ``reserved``
586 - Applications and drivers must set this to zero.
587 * - __u32
588 - ``flags``
589 - See :ref:`Decode Parameters Flags <h264_decode_params_flags>`
590
591 .. raw:: latex
592
593 \normalsize
594
595 .. _h264_decode_params_flags:
596
597 ``Decode Parameters Flags``
598
599 .. raw:: latex
600
601 \small
602
603 .. tabularcolumns:: |p{8.3cm}|p{2.1cm}|p{6.9cm}|
604
605 .. flat-table::
606 :header-rows: 0
607 :stub-columns: 0
608 :widths: 1 1 2
609
610 * - ``V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC``
611 - 0x00000001
612 - That picture is an IDR picture
613 * - ``V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC``
614 - 0x00000002
615 -
616 * - ``V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD``
617 - 0x00000004
618 -
619 * - ``V4L2_H264_DECODE_PARAM_FLAG_PFRAME``
620 - 0x00000008
621 -
622 * - ``V4L2_H264_DECODE_PARAM_FLAG_BFRAME``
623 - 0x00000010
624 -
625
626 .. raw:: latex
627
628 \normalsize
629
630 .. c:type:: v4l2_h264_dpb_entry
631
632 .. raw:: latex
633
634 \small
635
636 .. tabularcolumns:: |p{1.0cm}|p{4.9cm}|p{11.4cm}|
637
638 .. flat-table:: struct v4l2_h264_dpb_entry
639 :header-rows: 0
640 :stub-columns: 0
641 :widths: 1 1 2
642
643 * - __u64
644 - ``reference_ts``
645 - Timestamp of the V4L2 capture buffer to use as reference, used
646 with B-coded and P-coded frames. The timestamp refers to the
647 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
648 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
649 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
650 * - __u32
651 - ``pic_num``
652 - For short term references, this must match the derived value PicNum
653 (8-28) and for long term references it must match the derived value
654 LongTermPicNum (8-29). When decoding frames (as opposed to fields)
655 pic_num is the same as FrameNumWrap.
656 * - __u16
657 - ``frame_num``
658 - For short term references, this must match the frame_num value from
659 the slice header syntax (the driver will wrap the value if needed). For
660 long term references, this must be set to the value of
661 long_term_frame_idx described in the dec_ref_pic_marking() syntax.
662 * - __u8
663 - ``fields``
664 - Specifies how the DPB entry is referenced. See :ref:`Reference Fields <h264_ref_fields>`
665 * - __u8
666 - ``reserved[5]``
667 - Applications and drivers must set this to zero.
668 * - __s32
669 - ``top_field_order_cnt``
670 -
671 * - __s32
672 - ``bottom_field_order_cnt``
673 -
674 * - __u32
675 - ``flags``
676 - See :ref:`DPB Entry Flags <h264_dpb_flags>`
677
678 .. raw:: latex
679
680 \normalsize
681
682 .. _h264_dpb_flags:
683
684 ``DPB Entries Flags``
685
686 .. raw:: latex
687
688 \small
689
690 .. tabularcolumns:: |p{7.7cm}|p{2.1cm}|p{7.5cm}|
691
692 .. flat-table::
693 :header-rows: 0
694 :stub-columns: 0
695 :widths: 1 1 2
696
697 * - ``V4L2_H264_DPB_ENTRY_FLAG_VALID``
698 - 0x00000001
699 - The DPB entry is valid (non-empty) and should be considered.
700 * - ``V4L2_H264_DPB_ENTRY_FLAG_ACTIVE``
701 - 0x00000002
702 - The DPB entry is used for reference.
703 * - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``
704 - 0x00000004
705 - The DPB entry is used for long-term reference.
706 * - ``V4L2_H264_DPB_ENTRY_FLAG_FIELD``
707 - 0x00000008
708 - The DPB entry is a single field or a complementary field pair.
709
710 .. raw:: latex
711
712 \normalsize
713
714 ``V4L2_CID_STATELESS_H264_DECODE_MODE (enum)``
715 Specifies the decoding mode to use. Currently exposes slice-based and
716 frame-based decoding but new modes might be added later on.
717 This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
718 pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
719 are required to set this control in order to specify the decoding mode
720 that is expected for the buffer.
721 Drivers may expose a single or multiple decoding modes, depending
722 on what they can support.
723
724 .. c:type:: v4l2_stateless_h264_decode_mode
725
726 .. raw:: latex
727
728 \scriptsize
729
730 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
731
732 .. flat-table::
733 :header-rows: 0
734 :stub-columns: 0
735 :widths: 1 1 2
736
737 * - ``V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED``
738 - 0
739 - Decoding is done at the slice granularity.
740 The OUTPUT buffer must contain a single slice.
741 When this mode is selected, the ``V4L2_CID_STATELESS_H264_SLICE_PARAMS``
742 control shall be set. When multiple slices compose a frame,
743 use of ``V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF`` flag
744 is required.
745 * - ``V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED``
746 - 1
747 - Decoding is done at the frame granularity,
748 The OUTPUT buffer must contain all slices needed to decode the
749 frame. The OUTPUT buffer must also contain both fields.
750 This mode will be supported by devices that
751 parse the slice(s) header(s) in hardware. When this mode is
752 selected, the ``V4L2_CID_STATELESS_H264_SLICE_PARAMS``
753 control shall not be set.
754
755 .. raw:: latex
756
757 \normalsize
758
759 ``V4L2_CID_STATELESS_H264_START_CODE (enum)``
760 Specifies the H264 slice start code expected for each slice.
761 This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
762 pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
763 are required to set this control in order to specify the start code
764 that is expected for the buffer.
765 Drivers may expose a single or multiple start codes, depending
766 on what they can support.
767
768 .. c:type:: v4l2_stateless_h264_start_code
769
770 .. raw:: latex
771
772 \small
773
774 .. tabularcolumns:: |p{7.9cm}|p{0.4cm}|p{9.0cm}|
775
776 .. flat-table::
777 :header-rows: 0
778 :stub-columns: 0
779 :widths: 4 1 4
780
781 * - ``V4L2_STATELESS_H264_START_CODE_NONE``
782 - 0
783 - Selecting this value specifies that H264 slices are passed
784 to the driver without any start code. The bitstream data should be
785 according to :ref:`h264` 7.3.1 NAL unit syntax, hence contains
786 emulation prevention bytes when required.
787 * - ``V4L2_STATELESS_H264_START_CODE_ANNEX_B``
788 - 1
789 - Selecting this value specifies that H264 slices are expected
790 to be prefixed by Annex B start codes. According to :ref:`h264`
791 valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
792
793 .. raw:: latex
794
795 \normalsize
796
797 .. _codec-stateless-fwht:
798
799 ``V4L2_CID_STATELESS_FWHT_PARAMS (struct)``
800 Specifies the FWHT (Fast Walsh Hadamard Transform) parameters (as extracted
801 from the bitstream) for the associated FWHT data. This includes the necessary
802 parameters for configuring a stateless hardware decoding pipeline for FWHT.
803 This codec is specific to the vicodec test driver.
804
805 .. c:type:: v4l2_ctrl_fwht_params
806
807 .. raw:: latex
808
809 \small
810
811 .. tabularcolumns:: |p{1.4cm}|p{3.9cm}|p{12.0cm}|
812
813 .. flat-table:: struct v4l2_ctrl_fwht_params
814 :header-rows: 0
815 :stub-columns: 0
816 :widths: 1 1 2
817
818 * - __u64
819 - ``backward_ref_ts``
820 - Timestamp of the V4L2 capture buffer to use as backward reference, used
821 with P-coded frames. The timestamp refers to the
822 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
823 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
824 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
825 * - __u32
826 - ``version``
827 - The version of the codec. Set to ``V4L2_FWHT_VERSION``.
828 * - __u32
829 - ``width``
830 - The width of the frame.
831 * - __u32
832 - ``height``
833 - The height of the frame.
834 * - __u32
835 - ``flags``
836 - The flags of the frame, see :ref:`fwht-flags`.
837 * - __u32
838 - ``colorspace``
839 - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.
840 * - __u32
841 - ``xfer_func``
842 - The transfer function, from enum :c:type:`v4l2_xfer_func`.
843 * - __u32
844 - ``ycbcr_enc``
845 - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
846 * - __u32
847 - ``quantization``
848 - The quantization range, from enum :c:type:`v4l2_quantization`.
849
850 .. raw:: latex
851
852 \normalsize
853
854 .. _fwht-flags:
855
856 FWHT Flags
857 ==========
858
859 .. raw:: latex
860
861 \small
862
863 .. tabularcolumns:: |p{7.0cm}|p{2.3cm}|p{8.0cm}|
864
865 .. flat-table::
866 :header-rows: 0
867 :stub-columns: 0
868 :widths: 3 1 4
869
870 * - ``V4L2_FWHT_FL_IS_INTERLACED``
871 - 0x00000001
872 - Set if this is an interlaced format.
873 * - ``V4L2_FWHT_FL_IS_BOTTOM_FIRST``
874 - 0x00000002
875 - Set if this is a bottom-first (NTSC) interlaced format.
876 * - ``V4L2_FWHT_FL_IS_ALTERNATE``
877 - 0x00000004
878 - Set if each 'frame' contains just one field.
879 * - ``V4L2_FWHT_FL_IS_BOTTOM_FIELD``
880 - 0x00000008
881 - If V4L2_FWHT_FL_IS_ALTERNATE was set, then this is set if this 'frame' is the
882 bottom field, else it is the top field.
883 * - ``V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED``
884 - 0x00000010
885 - Set if the Y' (luma) plane is uncompressed.
886 * - ``V4L2_FWHT_FL_CB_IS_UNCOMPRESSED``
887 - 0x00000020
888 - Set if the Cb plane is uncompressed.
889 * - ``V4L2_FWHT_FL_CR_IS_UNCOMPRESSED``
890 - 0x00000040
891 - Set if the Cr plane is uncompressed.
892 * - ``V4L2_FWHT_FL_CHROMA_FULL_HEIGHT``
893 - 0x00000080
894 - Set if the chroma plane has the same height as the luma plane,
895 else the chroma plane is half the height of the luma plane.
896 * - ``V4L2_FWHT_FL_CHROMA_FULL_WIDTH``
897 - 0x00000100
898 - Set if the chroma plane has the same width as the luma plane,
899 else the chroma plane is half the width of the luma plane.
900 * - ``V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED``
901 - 0x00000200
902 - Set if the alpha plane is uncompressed.
903 * - ``V4L2_FWHT_FL_I_FRAME``
904 - 0x00000400
905 - Set if this is an I-frame.
906 * - ``V4L2_FWHT_FL_COMPONENTS_NUM_MSK``
907 - 0x00070000
908 - The number of color components minus one.
909 * - ``V4L2_FWHT_FL_PIXENC_MSK``
910 - 0x00180000
911 - The mask for the pixel encoding.
912 * - ``V4L2_FWHT_FL_PIXENC_YUV``
913 - 0x00080000
914 - Set if the pixel encoding is YUV.
915 * - ``V4L2_FWHT_FL_PIXENC_RGB``
916 - 0x00100000
917 - Set if the pixel encoding is RGB.
918 * - ``V4L2_FWHT_FL_PIXENC_HSV``
919 - 0x00180000
920 - Set if the pixel encoding is HSV.
921
922 .. raw:: latex
923
924 \normalsize
925
926 .. _v4l2-codec-stateless-vp8:
927
928 ``V4L2_CID_STATELESS_VP8_FRAME (struct)``
929 Specifies the frame parameters for the associated VP8 parsed frame data.
930 This includes the necessary parameters for
931 configuring a stateless hardware decoding pipeline for VP8.
932 The bitstream parameters are defined according to :ref:`vp8`.
933
934 .. c:type:: v4l2_ctrl_vp8_frame
935
936 .. raw:: latex
937
938 \small
939
940 .. tabularcolumns:: |p{7.0cm}|p{4.6cm}|p{5.7cm}|
941
942 .. cssclass:: longtable
943
944 .. flat-table:: struct v4l2_ctrl_vp8_frame
945 :header-rows: 0
946 :stub-columns: 0
947 :widths: 1 1 2
948
949 * - struct :c:type:`v4l2_vp8_segment`
950 - ``segment``
951 - Structure with segment-based adjustments metadata.
952 * - struct :c:type:`v4l2_vp8_loop_filter`
953 - ``lf``
954 - Structure with loop filter level adjustments metadata.
955 * - struct :c:type:`v4l2_vp8_quantization`
956 - ``quant``
957 - Structure with VP8 dequantization indices metadata.
958 * - struct :c:type:`v4l2_vp8_entropy`
959 - ``entropy``
960 - Structure with VP8 entropy coder probabilities metadata.
961 * - struct :c:type:`v4l2_vp8_entropy_coder_state`
962 - ``coder_state``
963 - Structure with VP8 entropy coder state.
964 * - __u16
965 - ``width``
966 - The width of the frame. Must be set for all frames.
967 * - __u16
968 - ``height``
969 - The height of the frame. Must be set for all frames.
970 * - __u8
971 - ``horizontal_scale``
972 - Horizontal scaling factor.
973 * - __u8
974 - ``vertical_scale``
975 - Vertical scaling factor.
976 * - __u8
977 - ``version``
978 - Bitstream version.
979 * - __u8
980 - ``prob_skip_false``
981 - Indicates the probability that the macroblock is not skipped.
982 * - __u8
983 - ``prob_intra``
984 - Indicates the probability that a macroblock is intra-predicted.
985 * - __u8
986 - ``prob_last``
987 - Indicates the probability that the last reference frame is used
988 for inter-prediction
989 * - __u8
990 - ``prob_gf``
991 - Indicates the probability that the golden reference frame is used
992 for inter-prediction
993 * - __u8
994 - ``num_dct_parts``
995 - Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8.
996 * - __u32
997 - ``first_part_size``
998 - Size of the first partition, i.e. the control partition.
999 * - __u32
1000 - ``first_part_header_bits``
1001 - Size in bits of the first partition header portion.
1002 * - __u32
1003 - ``dct_part_sizes[8]``
1004 - DCT coefficients sizes.
1005 * - __u64
1006 - ``last_frame_ts``
1007 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
1008 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
1009 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1010 function to convert the struct :c:type:`timeval` in struct
1011 :c:type:`v4l2_buffer` to a __u64.
1012 * - __u64
1013 - ``golden_frame_ts``
1014 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
1015 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
1016 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1017 function to convert the struct :c:type:`timeval` in struct
1018 :c:type:`v4l2_buffer` to a __u64.
1019 * - __u64
1020 - ``alt_frame_ts``
1021 - Timestamp for the V4L2 capture buffer to use as alternate reference frame, used
1022 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
1023 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1024 function to convert the struct :c:type:`timeval` in struct
1025 :c:type:`v4l2_buffer` to a __u64.
1026 * - __u64
1027 - ``flags``
1028 - See :ref:`Frame Flags <vp8_frame_flags>`
1030 .. raw:: latex
1032 \normalsize
1034 .. _vp8_frame_flags:
1036 ``Frame Flags``
1038 .. tabularcolumns:: |p{9.8cm}|p{0.8cm}|p{6.7cm}|
1040 .. cssclass:: longtable
1042 .. flat-table::
1043 :header-rows: 0
1044 :stub-columns: 0
1045 :widths: 1 1 2
1047 * - ``V4L2_VP8_FRAME_FLAG_KEY_FRAME``
1048 - 0x01
1049 - Indicates if the frame is a key frame.
1050 * - ``V4L2_VP8_FRAME_FLAG_EXPERIMENTAL``
1051 - 0x02
1052 - Experimental bitstream.
1053 * - ``V4L2_VP8_FRAME_FLAG_SHOW_FRAME``
1054 - 0x04
1055 - Show frame flag, indicates if the frame is for display.
1056 * - ``V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF``
1057 - 0x08
1058 - Enable/disable skipping of macroblocks with no non-zero coefficients.
1059 * - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN``
1060 - 0x10
1061 - Sign of motion vectors when the golden frame is referenced.
1062 * - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT``
1063 - 0x20
1064 - Sign of motion vectors when the alt frame is referenced.
1066 .. c:type:: v4l2_vp8_entropy_coder_state
1068 .. cssclass:: longtable
1070 .. tabularcolumns:: |p{1.0cm}|p{2.0cm}|p{14.3cm}|
1072 .. flat-table:: struct v4l2_vp8_entropy_coder_state
1073 :header-rows: 0
1074 :stub-columns: 0
1075 :widths: 1 1 2
1077 * - __u8
1078 - ``range``
1079 - coder state value for "Range"
1080 * - __u8
1081 - ``value``
1082 - coder state value for "Value"-
1083 * - __u8
1084 - ``bit_count``
1085 - number of bits left.
1086 * - __u8
1087 - ``padding``
1088 - Applications and drivers must set this to zero.
1090 .. c:type:: v4l2_vp8_segment
1092 .. cssclass:: longtable
1094 .. tabularcolumns:: |p{1.2cm}|p{4.0cm}|p{12.1cm}|
1096 .. flat-table:: struct v4l2_vp8_segment
1097 :header-rows: 0
1098 :stub-columns: 0
1099 :widths: 1 1 2
1101 * - __s8
1102 - ``quant_update[4]``
1103 - Signed quantizer value update.
1104 * - __s8
1105 - ``lf_update[4]``
1106 - Signed loop filter level value update.
1107 * - __u8
1108 - ``segment_probs[3]``
1109 - Segment probabilities.
1110 * - __u8
1111 - ``padding``
1112 - Applications and drivers must set this to zero.
1113 * - __u32
1114 - ``flags``
1115 - See :ref:`Segment Flags <vp8_segment_flags>`
1117 .. _vp8_segment_flags:
1119 ``Segment Flags``
1121 .. raw:: latex
1123 \small
1125 .. tabularcolumns:: |p{10cm}|p{1.0cm}|p{6.3cm}|
1127 .. flat-table::
1128 :header-rows: 0
1129 :stub-columns: 0
1130 :widths: 1 1 2
1132 * - ``V4L2_VP8_SEGMENT_FLAG_ENABLED``
1133 - 0x01
1134 - Enable/disable segment-based adjustments.
1135 * - ``V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP``
1136 - 0x02
1137 - Indicates if the macroblock segmentation map is updated in this frame.
1138 * - ``V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA``
1139 - 0x04
1140 - Indicates if the segment feature data is updated in this frame.
1141 * - ``V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE``
1142 - 0x08
1143 - If is set, the segment feature data mode is delta-value.
1144 If cleared, it's absolute-value.
1146 .. raw:: latex
1148 \normalsize
1150 .. c:type:: v4l2_vp8_loop_filter
1152 .. cssclass:: longtable
1154 .. tabularcolumns:: |p{1.5cm}|p{3.9cm}|p{11.9cm}|
1156 .. flat-table:: struct v4l2_vp8_loop_filter
1157 :header-rows: 0
1158 :stub-columns: 0
1159 :widths: 1 1 2
1161 * - __s8
1162 - ``ref_frm_delta[4]``
1163 - Reference adjustment (signed) delta value.
1164 * - __s8
1165 - ``mb_mode_delta[4]``
1166 - Macroblock prediction mode adjustment (signed) delta value.
1167 * - __u8
1168 - ``sharpness_level``
1169 - Sharpness level
1170 * - __u8
1171 - ``level``
1172 - Filter level
1173 * - __u16
1174 - ``padding``
1175 - Applications and drivers must set this to zero.
1176 * - __u32
1177 - ``flags``
1178 - See :ref:`Loop Filter Flags <vp8_loop_filter_flags>`
1180 .. _vp8_loop_filter_flags:
1182 ``Loop Filter Flags``
1184 .. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|
1186 .. flat-table::
1187 :header-rows: 0
1188 :stub-columns: 0
1189 :widths: 1 1 2
1191 * - ``V4L2_VP8_LF_ADJ_ENABLE``
1192 - 0x01
1193 - Enable/disable macroblock-level loop filter adjustment.
1194 * - ``V4L2_VP8_LF_DELTA_UPDATE``
1195 - 0x02
1196 - Indicates if the delta values used in an adjustment are updated.
1197 * - ``V4L2_VP8_LF_FILTER_TYPE_SIMPLE``
1198 - 0x04
1199 - If set, indicates the filter type is simple.
1200 If cleared, the filter type is normal.
1202 .. c:type:: v4l2_vp8_quantization
1204 .. tabularcolumns:: |p{1.5cm}|p{3.5cm}|p{12.3cm}|
1206 .. flat-table:: struct v4l2_vp8_quantization
1207 :header-rows: 0
1208 :stub-columns: 0
1209 :widths: 1 1 2
1211 * - __u8
1212 - ``y_ac_qi``
1213 - Luma AC coefficient table index.
1214 * - __s8
1215 - ``y_dc_delta``
1216 - Luma DC delta value.
1217 * - __s8
1218 - ``y2_dc_delta``
1219 - Y2 block DC delta value.
1220 * - __s8
1221 - ``y2_ac_delta``
1222 - Y2 block AC delta value.
1223 * - __s8
1224 - ``uv_dc_delta``
1225 - Chroma DC delta value.
1226 * - __s8
1227 - ``uv_ac_delta``
1228 - Chroma AC delta value.
1229 * - __u16
1230 - ``padding``
1231 - Applications and drivers must set this to zero.
1233 .. c:type:: v4l2_vp8_entropy
1235 .. cssclass:: longtable
1237 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
1239 .. flat-table:: struct v4l2_vp8_entropy
1240 :header-rows: 0
1241 :stub-columns: 0
1242 :widths: 1 1 2
1244 * - __u8
1245 - ``coeff_probs[4][8][3][11]``
1246 - Coefficient update probabilities.
1247 * - __u8
1248 - ``y_mode_probs[4]``
1249 - Luma mode update probabilities.
1250 * - __u8
1251 - ``uv_mode_probs[3]``
1252 - Chroma mode update probabilities.
1253 * - __u8
1254 - ``mv_probs[2][19]``
1255 - MV decoding update probabilities.
1256 * - __u8
1257 - ``padding[3]``
1258 - Applications and drivers must set this to zero.
1260 .. _v4l2-codec-stateless-mpeg2:
1262 ``V4L2_CID_STATELESS_MPEG2_SEQUENCE (struct)``
1263 Specifies the sequence parameters (as extracted from the bitstream) for the
1264 associated MPEG-2 slice data. This includes fields matching the syntax
1265 elements from the sequence header and sequence extension parts of the
1266 bitstream as specified by :ref:`mpeg2part2`.
1268 .. c:type:: v4l2_ctrl_mpeg2_sequence
1270 .. raw:: latex
1272 \small
1274 .. cssclass:: longtable
1276 .. tabularcolumns:: |p{1.4cm}|p{6.5cm}|p{9.4cm}|
1278 .. flat-table:: struct v4l2_ctrl_mpeg2_sequence
1279 :header-rows: 0
1280 :stub-columns: 0
1281 :widths: 1 1 2
1283 * - __u16
1284 - ``horizontal_size``
1285 - The width of the displayable part of the frame's luminance component.
1286 * - __u16
1287 - ``vertical_size``
1288 - The height of the displayable part of the frame's luminance component.
1289 * - __u32
1290 - ``vbv_buffer_size``
1291 - Used to calculate the required size of the video buffering verifier,
1292 defined (in bits) as: 16 * 1024 * vbv_buffer_size.
1293 * - __u16
1294 - ``profile_and_level_indication``
1295 - The current profile and level indication as extracted from the
1296 bitstream.
1297 * - __u8
1298 - ``chroma_format``
1299 - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
1300 * - __u8
1301 - ``flags``
1302 - See :ref:`MPEG-2 Sequence Flags <mpeg2_sequence_flags>`.
1304 .. _mpeg2_sequence_flags:
1306 ``MPEG-2 Sequence Flags``
1308 .. cssclass:: longtable
1310 .. flat-table::
1311 :header-rows: 0
1312 :stub-columns: 0
1313 :widths: 1 1 2
1315 * - ``V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE``
1316 - 0x01
1317 - Indication that all the frames for the sequence are progressive instead
1318 of interlaced.
1320 .. raw:: latex
1322 \normalsize
1324 ``V4L2_CID_STATELESS_MPEG2_PICTURE (struct)``
1325 Specifies the picture parameters (as extracted from the bitstream) for the
1326 associated MPEG-2 slice data. This includes fields matching the syntax
1327 elements from the picture header and picture coding extension parts of the
1328 bitstream as specified by :ref:`mpeg2part2`.
1330 .. c:type:: v4l2_ctrl_mpeg2_picture
1332 .. raw:: latex
1334 \small
1336 .. cssclass:: longtable
1338 .. tabularcolumns:: |p{1.0cm}|p{5.6cm}|p{10.7cm}|
1340 .. flat-table:: struct v4l2_ctrl_mpeg2_picture
1341 :header-rows: 0
1342 :stub-columns: 0
1343 :widths: 1 1 2
1345 * - __u64
1346 - ``backward_ref_ts``
1347 - Timestamp of the V4L2 capture buffer to use as backward reference, used
1348 with B-coded and P-coded frames. The timestamp refers to the
1349 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
1350 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
1351 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
1352 * - __u64
1353 - ``forward_ref_ts``
1354 - Timestamp for the V4L2 capture buffer to use as forward reference, used
1355 with B-coded frames. The timestamp refers to the ``timestamp`` field in
1356 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1357 function to convert the struct :c:type:`timeval` in struct
1358 :c:type:`v4l2_buffer` to a __u64.
1359 * - __u32
1360 - ``flags``
1361 - See :ref:`MPEG-2 Picture Flags <mpeg2_picture_flags>`.
1362 * - __u8
1363 - ``f_code[2][2]``
1364 - Motion vector codes.
1365 * - __u8
1366 - ``picture_coding_type``
1367 - Picture coding type for the frame covered by the current slice
1368 (V4L2_MPEG2_PIC_CODING_TYPE_I, V4L2_MPEG2_PIC_CODING_TYPE_P or
1369 V4L2_MPEG2_PIC_CODING_TYPE_B).
1370 * - __u8
1371 - ``picture_structure``
1372 - Picture structure (1: interlaced top field, 2: interlaced bottom field,
1373 3: progressive frame).
1374 * - __u8
1375 - ``intra_dc_precision``
1376 - Precision of Discrete Cosine transform (0: 8 bits precision,
1377 1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
1378 * - __u8
1379 - ``reserved[5]``
1380 - Applications and drivers must set this to zero.
1382 .. _mpeg2_picture_flags:
1384 ``MPEG-2 Picture Flags``
1386 .. cssclass:: longtable
1388 .. flat-table::
1389 :header-rows: 0
1390 :stub-columns: 0
1391 :widths: 1 1 2
1393 * - ``V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST``
1394 - 0x00000001
1395 - If set and it's an interlaced stream, top field is output first.
1396 * - ``V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT``
1397 - 0x00000002
1398 - If set only frame-DCT and frame prediction are used.
1399 * - ``V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV``
1400 - 0x00000004
1401 - If set motion vectors are coded for intra macroblocks.
1402 * - ``V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE``
1403 - 0x00000008
1404 - This flag affects the inverse quantization process.
1405 * - ``V4L2_MPEG2_PIC_FLAG_INTRA_VLC``
1406 - 0x00000010
1407 - This flag affects the decoding of transform coefficient data.
1408 * - ``V4L2_MPEG2_PIC_FLAG_ALT_SCAN``
1409 - 0x00000020
1410 - This flag affects the decoding of transform coefficient data.
1411 * - ``V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST``
1412 - 0x00000040
1413 - This flag affects the decoding process of progressive frames.
1414 * - ``V4L2_MPEG2_PIC_FLAG_PROGRESSIVE``
1415 - 0x00000080
1416 - Indicates whether the current frame is progressive.
1418 .. raw:: latex
1420 \normalsize
1422 ``V4L2_CID_STATELESS_MPEG2_QUANTISATION (struct)``
1423 Specifies quantisation matrices, in zigzag scanning order, for the
1424 associated MPEG-2 slice data. This control is initialized by the kernel
1425 to the matrices default values. If a bitstream transmits a user-defined
1426 quantisation matrices load, applications are expected to use this control.
1427 Applications are also expected to set the control loading the default
1428 values, if the quantisation matrices need to be reset, for instance on a
1429 sequence header. This process is specified by section 6.3.7.
1430 "Quant matrix extension" of the specification.
1432 .. c:type:: v4l2_ctrl_mpeg2_quantisation
1434 .. tabularcolumns:: |p{0.8cm}|p{8.0cm}|p{8.5cm}|
1436 .. cssclass:: longtable
1438 .. raw:: latex
1440 \small
1442 .. flat-table:: struct v4l2_ctrl_mpeg2_quantisation
1443 :header-rows: 0
1444 :stub-columns: 0
1445 :widths: 1 1 2
1447 * - __u8
1448 - ``intra_quantiser_matrix[64]``
1449 - The quantisation matrix coefficients for intra-coded frames, in zigzag
1450 scanning order. It is relevant for both luma and chroma components,
1451 although it can be superseded by the chroma-specific matrix for
1452 non-4:2:0 YUV formats.
1453 * - __u8
1454 - ``non_intra_quantiser_matrix[64]``
1455 - The quantisation matrix coefficients for non-intra-coded frames, in
1456 zigzag scanning order. It is relevant for both luma and chroma
1457 components, although it can be superseded by the chroma-specific matrix
1458 for non-4:2:0 YUV formats.
1459 * - __u8
1460 - ``chroma_intra_quantiser_matrix[64]``
1461 - The quantisation matrix coefficients for the chominance component of
1462 intra-coded frames, in zigzag scanning order. Only relevant for
1463 non-4:2:0 YUV formats.
1464 * - __u8
1465 - ``chroma_non_intra_quantiser_matrix[64]``
1466 - The quantisation matrix coefficients for the chrominance component of
1467 non-intra-coded frames, in zigzag scanning order. Only relevant for
1468 non-4:2:0 YUV formats.
1470 .. raw:: latex
1472 \normalsize
1474 .. _v4l2-codec-stateless-vp9:
1476 ``V4L2_CID_STATELESS_VP9_COMPRESSED_HDR (struct)``
1477 Stores VP9 probabilities updates as parsed from the current compressed frame
1478 header. A value of zero in an array element means no update of the relevant
1479 probability. Motion vector-related updates contain a new value or zero. All
1480 other updates contain values translated with inv_map_table[] (see 6.3.5 in
1481 :ref:`vp9`).
1483 .. c:type:: v4l2_ctrl_vp9_compressed_hdr
1485 .. tabularcolumns:: |p{1cm}|p{4.8cm}|p{11.4cm}|
1487 .. cssclass:: longtable
1489 .. flat-table:: struct v4l2_ctrl_vp9_compressed_hdr
1490 :header-rows: 0
1491 :stub-columns: 0
1492 :widths: 1 1 2
1494 * - __u8
1495 - ``tx_mode``
1496 - Specifies the TX mode. See :ref:`TX Mode <vp9_tx_mode>` for more details.
1497 * - __u8
1498 - ``tx8[2][1]``
1499 - TX 8x8 probabilities delta.
1500 * - __u8
1501 - ``tx16[2][2]``
1502 - TX 16x16 probabilities delta.
1503 * - __u8
1504 - ``tx32[2][3]``
1505 - TX 32x32 probabilities delta.
1506 * - __u8
1507 - ``coef[4][2][2][6][6][3]``
1508 - Coefficient probabilities delta.
1509 * - __u8
1510 - ``skip[3]``
1511 - Skip probabilities delta.
1512 * - __u8
1513 - ``inter_mode[7][3]``
1514 - Inter prediction mode probabilities delta.
1515 * - __u8
1516 - ``interp_filter[4][2]``
1517 - Interpolation filter probabilities delta.
1518 * - __u8
1519 - ``is_inter[4]``
1520 - Is inter-block probabilities delta.
1521 * - __u8
1522 - ``comp_mode[5]``
1523 - Compound prediction mode probabilities delta.
1524 * - __u8
1525 - ``single_ref[5][2]``
1526 - Single reference probabilities delta.
1527 * - __u8
1528 - ``comp_ref[5]``
1529 - Compound reference probabilities delta.
1530 * - __u8
1531 - ``y_mode[4][9]``
1532 - Y prediction mode probabilities delta.
1533 * - __u8
1534 - ``uv_mode[10][9]``
1535 - UV prediction mode probabilities delta.
1536 * - __u8
1537 - ``partition[16][3]``
1538 - Partition probabilities delta.
1539 * - __u8
1540 - ``mv.joint[3]``
1541 - Motion vector joint probabilities delta.
1542 * - __u8
1543 - ``mv.sign[2]``
1544 - Motion vector sign probabilities delta.
1545 * - __u8
1546 - ``mv.classes[2][10]``
1547 - Motion vector class probabilities delta.
1548 * - __u8
1549 - ``mv.class0_bit[2]``
1550 - Motion vector class0 bit probabilities delta.
1551 * - __u8
1552 - ``mv.bits[2][10]``
1553 - Motion vector bits probabilities delta.
1554 * - __u8
1555 - ``mv.class0_fr[2][2][3]``
1556 - Motion vector class0 fractional bit probabilities delta.
1557 * - __u8
1558 - ``mv.fr[2][3]``
1559 - Motion vector fractional bit probabilities delta.
1560 * - __u8
1561 - ``mv.class0_hp[2]``
1562 - Motion vector class0 high precision fractional bit probabilities delta.
1563 * - __u8
1564 - ``mv.hp[2]``
1565 - Motion vector high precision fractional bit probabilities delta.
1567 .. _vp9_tx_mode:
1569 ``TX Mode``
1571 .. tabularcolumns:: |p{6.5cm}|p{0.5cm}|p{10.3cm}|
1573 .. flat-table::
1574 :header-rows: 0
1575 :stub-columns: 0
1576 :widths: 1 1 2
1578 * - ``V4L2_VP9_TX_MODE_ONLY_4X4``
1579 - 0
1580 - Transform size is 4x4.
1581 * - ``V4L2_VP9_TX_MODE_ALLOW_8X8``
1582 - 1
1583 - Transform size can be up to 8x8.
1584 * - ``V4L2_VP9_TX_MODE_ALLOW_16X16``
1585 - 2
1586 - Transform size can be up to 16x16.
1587 * - ``V4L2_VP9_TX_MODE_ALLOW_32X32``
1588 - 3
1589 - transform size can be up to 32x32.
1590 * - ``V4L2_VP9_TX_MODE_SELECT``
1591 - 4
1592 - Bitstream contains the transform size for each block.
1594 See section '7.3.1 Tx mode semantics' of the :ref:`vp9` specification for more details.
1596 ``V4L2_CID_STATELESS_VP9_FRAME (struct)``
1597 Specifies the frame parameters for the associated VP9 frame decode request.
1598 This includes the necessary parameters for configuring a stateless hardware
1599 decoding pipeline for VP9. The bitstream parameters are defined according
1600 to :ref:`vp9`.
1602 .. c:type:: v4l2_ctrl_vp9_frame
1604 .. raw:: latex
1606 \small
1608 .. tabularcolumns:: |p{4.7cm}|p{5.5cm}|p{7.1cm}|
1610 .. cssclass:: longtable
1612 .. flat-table:: struct v4l2_ctrl_vp9_frame
1613 :header-rows: 0
1614 :stub-columns: 0
1615 :widths: 1 1 2
1617 * - struct :c:type:`v4l2_vp9_loop_filter`
1618 - ``lf``
1619 - Loop filter parameters. See struct :c:type:`v4l2_vp9_loop_filter` for more details.
1620 * - struct :c:type:`v4l2_vp9_quantization`
1621 - ``quant``
1622 - Quantization parameters. See :c:type:`v4l2_vp9_quantization` for more details.
1623 * - struct :c:type:`v4l2_vp9_segmentation`
1624 - ``seg``
1625 - Segmentation parameters. See :c:type:`v4l2_vp9_segmentation` for more details.
1626 * - __u32
1627 - ``flags``
1628 - Combination of V4L2_VP9_FRAME_FLAG_* flags. See :ref:`Frame Flags<vp9_frame_flags>`.
1629 * - __u16
1630 - ``compressed_header_size``
1631 - Compressed header size in bytes.
1632 * - __u16
1633 - ``uncompressed_header_size``
1634 - Uncompressed header size in bytes.
1635 * - __u16
1636 - ``frame_width_minus_1``
1637 - Add 1 to get the frame width expressed in pixels. See section 7.2.3 in :ref:`vp9`.
1638 * - __u16
1639 - ``frame_height_minus_1``
1640 - Add 1 to get the frame height expressed in pixels. See section 7.2.3 in :ref:`vp9`.
1641 * - __u16
1642 - ``render_width_minus_1``
1643 - Add 1 to get the expected render width expressed in pixels. This is
1644 not used during the decoding process but might be used by HW scalers to
1645 prepare a frame that's ready for scanout. See section 7.2.4 in :ref:`vp9`.
1646 * - __u16
1647 - render_height_minus_1
1648 - Add 1 to get the expected render height expressed in pixels. This is
1649 not used during the decoding process but might be used by HW scalers to
1650 prepare a frame that's ready for scanout. See section 7.2.4 in :ref:`vp9`.
1651 * - __u64
1652 - ``last_frame_ts``
1653 - "last" reference buffer timestamp.
1654 The timestamp refers to the ``timestamp`` field in
1655 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1656 function to convert the struct :c:type:`timeval` in struct
1657 :c:type:`v4l2_buffer` to a __u64.
1658 * - __u64
1659 - ``golden_frame_ts``
1660 - "golden" reference buffer timestamp.
1661 The timestamp refers to the ``timestamp`` field in
1662 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1663 function to convert the struct :c:type:`timeval` in struct
1664 :c:type:`v4l2_buffer` to a __u64.
1665 * - __u64
1666 - ``alt_frame_ts``
1667 - "alt" reference buffer timestamp.
1668 The timestamp refers to the ``timestamp`` field in
1669 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1670 function to convert the struct :c:type:`timeval` in struct
1671 :c:type:`v4l2_buffer` to a __u64.
1672 * - __u8
1673 - ``ref_frame_sign_bias``
1674 - a bitfield specifying whether the sign bias is set for a given
1675 reference frame. See :ref:`Reference Frame Sign Bias<vp9_ref_frame_sign_bias>`
1676 for more details.
1677 * - __u8
1678 - ``reset_frame_context``
1679 - specifies whether the frame context should be reset to default values. See
1680 :ref:`Reset Frame Context<vp9_reset_frame_context>` for more details.
1681 * - __u8
1682 - ``frame_context_idx``
1683 - Frame context that should be used/updated.
1684 * - __u8
1685 - ``profile``
1686 - VP9 profile. Can be 0, 1, 2 or 3.
1687 * - __u8
1688 - ``bit_depth``
1689 - Component depth in bits. Can be 8, 10 or 12. Note that not all profiles
1690 support 10 and/or 12 bits depths.
1691 * - __u8
1692 - ``interpolation_filter``
1693 - Specifies the filter selection used for performing inter prediction. See
1694 :ref:`Interpolation Filter<vp9_interpolation_filter>` for more details.
1695 * - __u8
1696 - ``tile_cols_log2``
1697 - Specifies the base 2 logarithm of the width of each tile (where the
1698 width is measured in units of 8x8 blocks). Shall be less than or equal
1699 to 6.
1700 * - __u8
1701 - ``tile_rows_log2``
1702 - Specifies the base 2 logarithm of the height of each tile (where the
1703 height is measured in units of 8x8 blocks).
1704 * - __u8
1705 - ``reference_mode``
1706 - Specifies the type of inter prediction to be used. See
1707 :ref:`Reference Mode<vp9_reference_mode>` for more details. Note that
1708 this is derived as part of the compressed header parsing process and
1709 for this reason should have been part of
1710 :c:type: `v4l2_ctrl_vp9_compressed_hdr` optional control. It is safe to
1711 set this value to zero if the driver does not require compressed
1712 headers.
1713 * - __u8
1714 - ``reserved[7]``
1715 - Applications and drivers must set this to zero.
1717 .. raw:: latex
1719 \normalsize
1721 .. _vp9_frame_flags:
1723 ``Frame Flags``
1725 .. tabularcolumns:: |p{10.0cm}|p{1.2cm}|p{6.1cm}|
1727 .. flat-table::
1728 :header-rows: 0
1729 :stub-columns: 0
1730 :widths: 1 1 2
1732 * - ``V4L2_VP9_FRAME_FLAG_KEY_FRAME``
1733 - 0x001
1734 - The frame is a key frame.
1735 * - ``V4L2_VP9_FRAME_FLAG_SHOW_FRAME``
1736 - 0x002
1737 - The frame should be displayed.
1738 * - ``V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT``
1739 - 0x004
1740 - The decoding should be error resilient.
1741 * - ``V4L2_VP9_FRAME_FLAG_INTRA_ONLY``
1742 - 0x008
1743 - The frame does not reference other frames.
1744 * - ``V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV``
1745 - 0x010
1746 - The frame can use high precision motion vectors.
1747 * - ``V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX``
1748 - 0x020
1749 - Frame context should be updated after decoding.
1750 * - ``V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE``
1751 - 0x040
1752 - Parallel decoding is used.
1753 * - ``V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING``
1754 - 0x080
1755 - Vertical subsampling is enabled.
1756 * - ``V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING``
1757 - 0x100
1758 - Horizontal subsampling is enabled.
1759 * - ``V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING``
1760 - 0x200
1761 - The full UV range is used.
1763 .. _vp9_ref_frame_sign_bias:
1765 ``Reference Frame Sign Bias``
1767 .. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|
1769 .. flat-table::
1770 :header-rows: 0
1771 :stub-columns: 0
1772 :widths: 1 1 2
1774 * - ``V4L2_VP9_SIGN_BIAS_LAST``
1775 - 0x1
1776 - Sign bias is set for the last reference frame.
1777 * - ``V4L2_VP9_SIGN_BIAS_GOLDEN``
1778 - 0x2
1779 - Sign bias is set for the golden reference frame.
1780 * - ``V4L2_VP9_SIGN_BIAS_ALT``
1781 - 0x2
1782 - Sign bias is set for the alt reference frame.
1784 .. _vp9_reset_frame_context:
1786 ``Reset Frame Context``
1788 .. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|
1790 .. flat-table::
1791 :header-rows: 0
1792 :stub-columns: 0
1793 :widths: 1 1 2
1795 * - ``V4L2_VP9_RESET_FRAME_CTX_NONE``
1796 - 0
1797 - Do not reset any frame context.
1798 * - ``V4L2_VP9_RESET_FRAME_CTX_SPEC``
1799 - 1
1800 - Reset the frame context pointed to by
1801 :c:type:`v4l2_ctrl_vp9_frame`.frame_context_idx.
1802 * - ``V4L2_VP9_RESET_FRAME_CTX_ALL``
1803 - 2
1804 - Reset all frame contexts.
1806 See section '7.2 Uncompressed header semantics' of the :ref:`vp9` specification
1807 for more details.
1809 .. _vp9_interpolation_filter:
1811 ``Interpolation Filter``
1813 .. tabularcolumns:: |p{9.0cm}|p{1.2cm}|p{7.1cm}|
1815 .. flat-table::
1816 :header-rows: 0
1817 :stub-columns: 0
1818 :widths: 1 1 2
1820 * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP``
1821 - 0
1822 - Eight tap filter.
1823 * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH``
1824 - 1
1825 - Eight tap smooth filter.
1826 * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP``
1827 - 2
1828 - Eeight tap sharp filter.
1829 * - ``V4L2_VP9_INTERP_FILTER_BILINEAR``
1830 - 3
1831 - Bilinear filter.
1832 * - ``V4L2_VP9_INTERP_FILTER_SWITCHABLE``
1833 - 4
1834 - Filter selection is signaled at the block level.
1836 See section '7.2.7 Interpolation filter semantics' of the :ref:`vp9` specification
1837 for more details.
1839 .. _vp9_reference_mode:
1841 ``Reference Mode``
1843 .. tabularcolumns:: |p{9.6cm}|p{0.5cm}|p{7.2cm}|
1845 .. flat-table::
1846 :header-rows: 0
1847 :stub-columns: 0
1848 :widths: 1 1 2
1850 * - ``V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE``
1851 - 0
1852 - Indicates that all the inter blocks use only a single reference frame
1853 to generate motion compensated prediction.
1854 * - ``V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE``
1855 - 1
1856 - Requires all the inter blocks to use compound mode. Single reference
1857 frame prediction is not allowed.
1858 * - ``V4L2_VP9_REFERENCE_MODE_SELECT``
1859 - 2
1860 - Allows each individual inter block to select between single and
1861 compound prediction modes.
1863 See section '7.3.6 Frame reference mode semantics' of the :ref:`vp9` specification for more details.
1865 .. c:type:: v4l2_vp9_segmentation
1867 Encodes the quantization parameters. See section '7.2.10 Segmentation
1868 params syntax' of the :ref:`vp9` specification for more details.
1870 .. tabularcolumns:: |p{0.8cm}|p{5cm}|p{11.4cm}|
1872 .. cssclass:: longtable
1874 .. flat-table:: struct v4l2_vp9_segmentation
1875 :header-rows: 0
1876 :stub-columns: 0
1877 :widths: 1 1 2
1879 * - __u8
1880 - ``feature_data[8][4]``
1881 - Data attached to each feature. Data entry is only valid if the feature
1882 is enabled. The array shall be indexed with segment number as the first dimension
1883 (0..7) and one of V4L2_VP9_SEG_* as the second dimension.
1884 See :ref:`Segment Feature IDs<vp9_segment_feature>`.
1885 * - __u8
1886 - ``feature_enabled[8]``
1887 - Bitmask defining which features are enabled in each segment. The value for each
1888 segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id) values where id is
1889 one of V4L2_VP9_SEG_*. See :ref:`Segment Feature IDs<vp9_segment_feature>`.
1890 * - __u8
1891 - ``tree_probs[7]``
1892 - Specifies the probability values to be used when decoding a Segment-ID.
1893 See '5.15 Segmentation map' section of :ref:`vp9` for more details.
1894 * - __u8
1895 - ``pred_probs[3]``
1896 - Specifies the probability values to be used when decoding a
1897 Predicted-Segment-ID. See '6.4.14 Get segment id syntax'
1898 section of :ref:`vp9` for more details.
1899 * - __u8
1900 - ``flags``
1901 - Combination of V4L2_VP9_SEGMENTATION_FLAG_* flags. See
1902 :ref:`Segmentation Flags<vp9_segmentation_flags>`.
1903 * - __u8
1904 - ``reserved[5]``
1905 - Applications and drivers must set this to zero.
1907 .. _vp9_segment_feature:
1909 ``Segment feature IDs``
1911 .. tabularcolumns:: |p{6.0cm}|p{1cm}|p{10.3cm}|
1913 .. flat-table::
1914 :header-rows: 0
1915 :stub-columns: 0
1916 :widths: 1 1 2
1918 * - ``V4L2_VP9_SEG_LVL_ALT_Q``
1919 - 0
1920 - Quantizer segment feature.
1921 * - ``V4L2_VP9_SEG_LVL_ALT_L``
1922 - 1
1923 - Loop filter segment feature.
1924 * - ``V4L2_VP9_SEG_LVL_REF_FRAME``
1925 - 2
1926 - Reference frame segment feature.
1927 * - ``V4L2_VP9_SEG_LVL_SKIP``
1928 - 3
1929 - Skip segment feature.
1930 * - ``V4L2_VP9_SEG_LVL_MAX``
1931 - 4
1932 - Number of segment features.
1934 .. _vp9_segmentation_flags:
1936 ``Segmentation Flags``
1938 .. tabularcolumns:: |p{10.6cm}|p{0.8cm}|p{5.9cm}|
1940 .. flat-table::
1941 :header-rows: 0
1942 :stub-columns: 0
1943 :widths: 1 1 2
1945 * - ``V4L2_VP9_SEGMENTATION_FLAG_ENABLED``
1946 - 0x01
1947 - Indicates that this frame makes use of the segmentation tool.
1948 * - ``V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP``
1949 - 0x02
1950 - Indicates that the segmentation map should be updated during the
1951 decoding of this frame.
1952 * - ``V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE``
1953 - 0x04
1954 - Indicates that the updates to the segmentation map are coded
1955 relative to the existing segmentation map.
1956 * - ``V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA``
1957 - 0x08
1958 - Indicates that new parameters are about to be specified for each
1959 segment.
1960 * - ``V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE``
1961 - 0x10
1962 - Indicates that the segmentation parameters represent the actual values
1963 to be used.
1965 .. c:type:: v4l2_vp9_quantization
1967 Encodes the quantization parameters. See section '7.2.9 Quantization params
1968 syntax' of the VP9 specification for more details.
1970 .. tabularcolumns:: |p{0.8cm}|p{4cm}|p{12.4cm}|
1972 .. cssclass:: longtable
1974 .. flat-table:: struct v4l2_vp9_quantization
1975 :header-rows: 0
1976 :stub-columns: 0
1977 :widths: 1 1 2
1979 * - __u8
1980 - ``base_q_idx``
1981 - Indicates the base frame qindex.
1982 * - __s8
1983 - ``delta_q_y_dc``
1984 - Indicates the Y DC quantizer relative to base_q_idx.
1985 * - __s8
1986 - ``delta_q_uv_dc``
1987 - Indicates the UV DC quantizer relative to base_q_idx.
1988 * - __s8
1989 - ``delta_q_uv_ac``
1990 - Indicates the UV AC quantizer relative to base_q_idx.
1991 * - __u8
1992 - ``reserved[4]``
1993 - Applications and drivers must set this to zero.
1995 .. c:type:: v4l2_vp9_loop_filter
1997 This structure contains all loop filter related parameters. See sections
1998 '7.2.8 Loop filter semantics' of the :ref:`vp9` specification for more details.
2000 .. tabularcolumns:: |p{0.8cm}|p{4cm}|p{12.4cm}|
2002 .. cssclass:: longtable
2004 .. flat-table:: struct v4l2_vp9_loop_filter
2005 :header-rows: 0
2006 :stub-columns: 0
2007 :widths: 1 1 2
2009 * - __s8
2010 - ``ref_deltas[4]``
2011 - Contains the adjustment needed for the filter level based on the chosen
2012 reference frame.
2013 * - __s8
2014 - ``mode_deltas[2]``
2015 - Contains the adjustment needed for the filter level based on the chosen
2016 mode.
2017 * - __u8
2018 - ``level``
2019 - Indicates the loop filter strength.
2020 * - __u8
2021 - ``sharpness``
2022 - Indicates the sharpness level.
2023 * - __u8
2024 - ``flags``
2025 - Combination of V4L2_VP9_LOOP_FILTER_FLAG_* flags.
2026 See :ref:`Loop Filter Flags <vp9_loop_filter_flags>`.
2027 * - __u8
2028 - ``reserved[7]``
2029 - Applications and drivers must set this to zero.
2032 .. _vp9_loop_filter_flags:
2034 ``Loop Filter Flags``
2036 .. tabularcolumns:: |p{9.6cm}|p{0.5cm}|p{7.2cm}|
2038 .. flat-table::
2039 :header-rows: 0
2040 :stub-columns: 0
2041 :widths: 1 1 2
2043 * - ``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED``
2044 - 0x1
2045 - When set, the filter level depends on the mode and reference frame used
2046 to predict a block.
2047 * - ``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE``
2048 - 0x2
2049 - When set, the bitstream contains additional syntax elements that
2050 specify which mode and reference frame deltas are to be updated.
2052 .. _v4l2-codec-stateless-hevc:
2054 ``V4L2_CID_STATELESS_HEVC_SPS (struct)``
2055 Specifies the Sequence Parameter Set fields (as extracted from the
2056 bitstream) for the associated HEVC slice data.
2057 These bitstream parameters are defined according to :ref:`hevc`.
2058 They are described in section 7.4.3.2 "Sequence parameter set RBSP
2059 semantics" of the specification.
2061 .. c:type:: v4l2_ctrl_hevc_sps
2063 .. raw:: latex
2065 \small
2067 .. tabularcolumns:: |p{1.2cm}|p{9.2cm}|p{6.9cm}|
2069 .. cssclass:: longtable
2071 .. flat-table:: struct v4l2_ctrl_hevc_sps
2072 :header-rows: 0
2073 :stub-columns: 0
2074 :widths: 1 1 2
2076 * - __u8
2077 - ``video_parameter_set_id``
2078 - Specifies the value of the vps_video_parameter_set_id of the active VPS
2079 as described in section "7.4.3.2.1 General sequence parameter set RBSP semantics"
2080 of H.265 specifications.
2081 * - __u8
2082 - ``seq_parameter_set_id``
2083 - Provides an identifier for the SPS for reference by other syntax elements
2084 as described in section "7.4.3.2.1 General sequence parameter set RBSP semantics"
2085 of H.265 specifications.
2086 * - __u16
2087 - ``pic_width_in_luma_samples``
2088 - Specifies the width of each decoded picture in units of luma samples.
2089 * - __u16
2090 - ``pic_height_in_luma_samples``
2091 - Specifies the height of each decoded picture in units of luma samples.
2092 * - __u8
2093 - ``bit_depth_luma_minus8``
2094 - This value plus 8 specifies the bit depth of the samples of the luma array.
2095 * - __u8
2096 - ``bit_depth_chroma_minus8``
2097 - This value plus 8 specifies the bit depth of the samples of the chroma arrays.
2098 * - __u8
2099 - ``log2_max_pic_order_cnt_lsb_minus4``
2100 - Specifies the value of the variable MaxPicOrderCntLsb.
2101 * - __u8
2102 - ``sps_max_dec_pic_buffering_minus1``
2103 - This value plus 1 specifies the maximum required size of the decoded picture buffer for
2104 the coded video sequence (CVS).
2105 * - __u8
2106 - ``sps_max_num_reorder_pics``
2107 - Indicates the maximum allowed number of pictures.
2108 * - __u8
2109 - ``sps_max_latency_increase_plus1``
2110 - Used to signal MaxLatencyPictures, which indicates the maximum number of
2111 pictures that can precede any picture in output order and follow that
2112 picture in decoding order.
2113 * - __u8
2114 - ``log2_min_luma_coding_block_size_minus3``
2115 - This value plus 3 specifies the minimum luma coding block size.
2116 * - __u8
2117 - ``log2_diff_max_min_luma_coding_block_size``
2118 - Specifies the difference between the maximum and minimum luma coding block size.
2119 * - __u8
2120 - ``log2_min_luma_transform_block_size_minus2``
2121 - This value plus 2 specifies the minimum luma transform block size.
2122 * - __u8
2123 - ``log2_diff_max_min_luma_transform_block_size``
2124 - Specifies the difference between the maximum and minimum luma transform block size.
2125 * - __u8
2126 - ``max_transform_hierarchy_depth_inter``
2127 - Specifies the maximum hierarchy depth for transform units of coding units coded
2128 in inter prediction mode.
2129 * - __u8
2130 - ``max_transform_hierarchy_depth_intra``
2131 - Specifies the maximum hierarchy depth for transform units of coding units coded in
2132 intra prediction mode.
2133 * - __u8
2134 - ``pcm_sample_bit_depth_luma_minus1``
2135 - This value plus 1 specifies the number of bits used to represent each of PCM sample values of the
2136 luma component.
2137 * - __u8
2138 - ``pcm_sample_bit_depth_chroma_minus1``
2139 - Specifies the number of bits used to represent each of PCM sample values of
2140 the chroma components.
2141 * - __u8
2142 - ``log2_min_pcm_luma_coding_block_size_minus3``
2143 - Plus 3 specifies the minimum size of coding blocks.
2144 * - __u8
2145 - ``log2_diff_max_min_pcm_luma_coding_block_size``
2146 - Specifies the difference between the maximum and minimum size of coding blocks.
2147 * - __u8
2148 - ``num_short_term_ref_pic_sets``
2149 - Specifies the number of st_ref_pic_set() syntax structures included in the SPS.
2150 * - __u8
2151 - ``num_long_term_ref_pics_sps``
2152 - Specifies the number of candidate long-term reference pictures that are
2153 specified in the SPS.
2154 * - __u8
2155 - ``chroma_format_idc``
2156 - Specifies the chroma sampling.
2157 * - __u8
2158 - ``sps_max_sub_layers_minus1``
2159 - This value plus 1 specifies the maximum number of temporal sub-layers.
2160 * - __u64
2161 - ``flags``
2162 - See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>`
2164 .. raw:: latex
2166 \normalsize
2168 .. _hevc_sps_flags:
2170 ``Sequence Parameter Set Flags``
2172 .. raw:: latex
2174 \small
2176 .. cssclass:: longtable
2178 .. flat-table::
2179 :header-rows: 0
2180 :stub-columns: 0
2181 :widths: 1 1 2
2183 * - ``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE``
2184 - 0x00000001
2185 -
2186 * - ``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED``
2187 - 0x00000002
2188 -
2189 * - ``V4L2_HEVC_SPS_FLAG_AMP_ENABLED``
2190 - 0x00000004
2191 -
2192 * - ``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET``
2193 - 0x00000008
2194 -
2195 * - ``V4L2_HEVC_SPS_FLAG_PCM_ENABLED``
2196 - 0x00000010
2197 -
2198 * - ``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED``
2199 - 0x00000020
2200 -
2201 * - ``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT``
2202 - 0x00000040
2203 -
2204 * - ``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED``
2205 - 0x00000080
2206 -
2207 * - ``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED``
2208 - 0x00000100
2209 -
2211 .. raw:: latex
2213 \normalsize
2215 ``V4L2_CID_STATELESS_HEVC_PPS (struct)``
2216 Specifies the Picture Parameter Set fields (as extracted from the
2217 bitstream) for the associated HEVC slice data.
2218 These bitstream parameters are defined according to :ref:`hevc`.
2219 They are described in section 7.4.3.3 "Picture parameter set RBSP
2220 semantics" of the specification.
2222 .. c:type:: v4l2_ctrl_hevc_pps
2224 .. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}|
2226 .. cssclass:: longtable
2228 .. flat-table:: struct v4l2_ctrl_hevc_pps
2229 :header-rows: 0
2230 :stub-columns: 0
2231 :widths: 1 1 2
2233 * - __u8
2234 - ``pic_parameter_set_id``
2235 - Identifies the PPS for reference by other syntax elements.
2236 * - __u8
2237 - ``num_extra_slice_header_bits``
2238 - Specifies the number of extra slice header bits that are present
2239 in the slice header RBSP for coded pictures referring to the PPS.
2240 * - __u8
2241 - ``num_ref_idx_l0_default_active_minus1``
2242 - This value plus 1 specifies the inferred value of num_ref_idx_l0_active_minus1.
2243 * - __u8
2244 - ``num_ref_idx_l1_default_active_minus1``
2245 - This value plus 1 specifies the inferred value of num_ref_idx_l1_active_minus1.
2246 * - __s8
2247 - ``init_qp_minus26``
2248 - This value plus 26 specifies the initial value of SliceQp Y for each slice
2249 referring to the PPS.
2250 * - __u8
2251 - ``diff_cu_qp_delta_depth``
2252 - Specifies the difference between the luma coding tree block size
2253 and the minimum luma coding block size of coding units that
2254 convey cu_qp_delta_abs and cu_qp_delta_sign_flag.
2255 * - __s8
2256 - ``pps_cb_qp_offset``
2257 - Specifies the offsets to the luma quantization parameter Cb.
2258 * - __s8
2259 - ``pps_cr_qp_offset``
2260 - Specifies the offsets to the luma quantization parameter Cr.
2261 * - __u8
2262 - ``num_tile_columns_minus1``
2263 - This value plus 1 specifies the number of tile columns partitioning the picture.
2264 * - __u8
2265 - ``num_tile_rows_minus1``
2266 - This value plus 1 specifies the number of tile rows partitioning the picture.
2267 * - __u8
2268 - ``column_width_minus1[20]``
2269 - This value plus 1 specifies the width of the i-th tile column in units of
2270 coding tree blocks.
2271 * - __u8
2272 - ``row_height_minus1[22]``
2273 - This value plus 1 specifies the height of the i-th tile row in units of coding
2274 tree blocks.
2275 * - __s8
2276 - ``pps_beta_offset_div2``
2277 - Specifies the default deblocking parameter offsets for beta divided by 2.
2278 * - __s8
2279 - ``pps_tc_offset_div2``
2280 - Specifies the default deblocking parameter offsets for tC divided by 2.
2281 * - __u8
2282 - ``log2_parallel_merge_level_minus2``
2283 - This value plus 2 specifies the value of the variable Log2ParMrgLevel.
2284 * - __u8
2285 - ``padding[4]``
2286 - Applications and drivers must set this to zero.
2287 * - __u64
2288 - ``flags``
2289 - See :ref:`Picture Parameter Set Flags <hevc_pps_flags>`
2291 .. _hevc_pps_flags:
2293 ``Picture Parameter Set Flags``
2295 .. raw:: latex
2297 \small
2299 .. flat-table::
2300 :header-rows: 0
2301 :stub-columns: 0
2302 :widths: 1 1 2
2304 * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED``
2305 - 0x00000001
2306 -
2307 * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``
2308 - 0x00000002
2309 -
2310 * - ``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED``
2311 - 0x00000004
2312 -
2313 * - ``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT``
2314 - 0x00000008
2315 -
2316 * - ``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED``
2317 - 0x00000010
2318 -
2319 * - ``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED``
2320 - 0x00000020
2321 -
2322 * - ``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED``
2323 - 0x00000040
2324 -
2325 * - ``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT``
2326 - 0x00000080
2327 -
2328 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED``
2329 - 0x00000100
2330 -
2331 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED``
2332 - 0x00000200
2333 -
2334 * - ``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED``
2335 - 0x00000400
2336 -
2337 * - ``V4L2_HEVC_PPS_FLAG_TILES_ENABLED``
2338 - 0x00000800
2339 -
2340 * - ``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED``
2341 - 0x00001000
2342 -
2343 * - ``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED``
2344 - 0x00002000
2345 -
2346 * - ``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED``
2347 - 0x00004000
2348 -
2349 * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED``
2350 - 0x00008000
2351 -
2352 * - ``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER``
2353 - 0x00010000
2354 -
2355 * - ``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT``
2356 - 0x00020000
2357 -
2358 * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``
2359 - 0x00040000
2360 -
2361 * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
2362 - 0x00080000
2363 - Specifies the presence of deblocking filter control syntax elements in
2364 the PPS
2365 * - ``V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING``
2366 - 0x00100000
2367 - Specifies that tile column boundaries and likewise tile row boundaries
2368 are distributed uniformly across the picture
2370 .. raw:: latex
2372 \normalsize
2374 ``V4L2_CID_STATELESS_HEVC_SLICE_PARAMS (struct)``
2375 Specifies various slice-specific parameters, especially from the NAL unit
2376 header, general slice segment header and weighted prediction parameter
2377 parts of the bitstream.
2378 These bitstream parameters are defined according to :ref:`hevc`.
2379 They are described in section 7.4.7 "General slice segment header
2380 semantics" of the specification.
2381 This control is a dynamically sized 1-dimensional array,
2382 V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it.
2384 .. c:type:: v4l2_ctrl_hevc_slice_params
2386 .. raw:: latex
2388 \scriptsize
2390 .. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|
2392 .. cssclass:: longtable
2394 .. flat-table:: struct v4l2_ctrl_hevc_slice_params
2395 :header-rows: 0
2396 :stub-columns: 0
2397 :widths: 1 1 2
2399 * - __u32
2400 - ``bit_size``
2401 - Size (in bits) of the current slice data.
2402 * - __u32
2403 - ``data_byte_offset``
2404 - Offset (in byte) to the video data in the current slice data.
2405 * - __u32
2406 - ``num_entry_point_offsets``
2407 - Specifies the number of entry point offset syntax elements in the slice header.
2408 When the driver supports it, the ``V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS``
2409 must be set.
2410 * - __u8
2411 - ``nal_unit_type``
2412 - Specifies the coding type of the slice (B, P or I).
2413 * - __u8
2414 - ``nuh_temporal_id_plus1``
2415 - Minus 1 specifies a temporal identifier for the NAL unit.
2416 * - __u8
2417 - ``slice_type``
2418 -
2419 (V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or
2420 V4L2_HEVC_SLICE_TYPE_B).
2421 * - __u8
2422 - ``colour_plane_id``
2423 - Specifies the colour plane associated with the current slice.
2424 * - __s32
2425 - ``slice_pic_order_cnt``
2426 - Specifies the picture order count.
2427 * - __u8
2428 - ``num_ref_idx_l0_active_minus1``
2429 - This value plus 1 specifies the maximum reference index for reference picture list 0
2430 that may be used to decode the slice.
2431 * - __u8
2432 - ``num_ref_idx_l1_active_minus1``
2433 - This value plus 1 specifies the maximum reference index for reference picture list 1
2434 that may be used to decode the slice.
2435 * - __u8
2436 - ``collocated_ref_idx``
2437 - Specifies the reference index of the collocated picture used for
2438 temporal motion vector prediction.
2439 * - __u8
2440 - ``five_minus_max_num_merge_cand``
2441 - Specifies the maximum number of merging motion vector prediction
2442 candidates supported in the slice subtracted from 5.
2443 * - __s8
2444 - ``slice_qp_delta``
2445 - Specifies the initial value of QpY to be used for the coding blocks in the slice.
2446 * - __s8
2447 - ``slice_cb_qp_offset``
2448 - Specifies a difference to be added to the value of pps_cb_qp_offset.
2449 * - __s8
2450 - ``slice_cr_qp_offset``
2451 - Specifies a difference to be added to the value of pps_cr_qp_offset.
2452 * - __s8
2453 - ``slice_act_y_qp_offset``
2454 - Specifies the offset to the luma of quantization parameter qP derived in section 8.6.2
2455 * - __s8
2456 - ``slice_act_cb_qp_offset``
2457 - Specifies the offset to the cb of quantization parameter qP derived in section 8.6.2
2458 * - __s8
2459 - ``slice_act_cr_qp_offset``
2460 - Specifies the offset to the cr of quantization parameter qP derived in section 8.6.2
2461 * - __s8
2462 - ``slice_beta_offset_div2``
2463 - Specifies the deblocking parameter offsets for beta divided by 2.
2464 * - __s8
2465 - ``slice_tc_offset_div2``
2466 - Specifies the deblocking parameter offsets for tC divided by 2.
2467 * - __u8
2468 - ``pic_struct``
2469 - Indicates whether a picture should be displayed as a frame or as one or more fields.
2470 * - __u32
2471 - ``slice_segment_addr``
2472 - Specifies the address of the first coding tree block in the slice segment.
2473 * - __u8
2474 - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2475 - The list of L0 reference elements as indices in the DPB.
2476 * - __u8
2477 - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2478 - The list of L1 reference elements as indices in the DPB.
2479 * - __u16
2480 - ``short_term_ref_pic_set_size``
2481 - Specifies the size, in bits, of the short-term reference picture set, described as st_ref_pic_set()
2482 in the specification, included in the slice header or SPS (section 7.3.6.1).
2483 * - __u16
2484 - ``long_term_ref_pic_set_size``
2485 - Specifies the size, in bits, of the long-term reference picture set include in the slice header
2486 or SPS. It is the number of bits in the conditional block if(long_term_ref_pics_present_flag)
2487 in section 7.3.6.1 of the specification.
2488 * - __u8
2489 - ``padding``
2490 - Applications and drivers must set this to zero.
2491 * - struct :c:type:`v4l2_hevc_pred_weight_table`
2492 - ``pred_weight_table``
2493 - The prediction weight coefficients for inter-picture prediction.
2494 * - __u64
2495 - ``flags``
2496 - See :ref:`Slice Parameters Flags <hevc_slice_params_flags>`
2498 .. raw:: latex
2500 \normalsize
2502 .. _hevc_slice_params_flags:
2504 ``Slice Parameters Flags``
2506 .. raw:: latex
2508 \scriptsize
2510 .. flat-table::
2511 :header-rows: 0
2512 :stub-columns: 0
2513 :widths: 1 1 2
2515 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA``
2516 - 0x00000001
2517 -
2518 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA``
2519 - 0x00000002
2520 -
2521 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED``
2522 - 0x00000004
2523 -
2524 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO``
2525 - 0x00000008
2526 -
2527 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT``
2528 - 0x00000010
2529 -
2530 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0``
2531 - 0x00000020
2532 -
2533 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV``
2534 - 0x00000040
2535 -
2536 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED``
2537 - 0x00000080
2538 -
2539 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``
2540 - 0x00000100
2541 -
2542 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT``
2543 - 0x00000200
2544 -
2546 .. raw:: latex
2548 \normalsize
2550 ``V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (integer)``
2551 Specifies entry point offsets in bytes.
2552 This control is a dynamically sized array. The number of entry point
2553 offsets is reported by the ``elems`` field.
2554 This bitstream parameter is defined according to :ref:`hevc`.
2555 They are described in section 7.4.7.1 "General slice segment header
2556 semantics" of the specification.
2557 When multiple slices are submitted in a request, the length of
2558 this array must be the sum of num_entry_point_offsets of all the
2559 slices in the request.
2561 ``V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (struct)``
2562 Specifies the HEVC scaling matrix parameters used for the scaling process
2563 for transform coefficients.
2564 These matrix and parameters are defined according to :ref:`hevc`.
2565 They are described in section 7.4.5 "Scaling list data semantics" of
2566 the specification.
2568 .. c:type:: v4l2_ctrl_hevc_scaling_matrix
2570 .. raw:: latex
2572 \scriptsize
2574 .. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|
2576 .. cssclass:: longtable
2578 .. flat-table:: struct v4l2_ctrl_hevc_scaling_matrix
2579 :header-rows: 0
2580 :stub-columns: 0
2581 :widths: 1 1 2
2583 * - __u8
2584 - ``scaling_list_4x4[6][16]``
2585 - Scaling list is used for the scaling process for transform
2586 coefficients. The values on each scaling list are expected
2587 in raster scan order.
2588 * - __u8
2589 - ``scaling_list_8x8[6][64]``
2590 - Scaling list is used for the scaling process for transform
2591 coefficients. The values on each scaling list are expected
2592 in raster scan order.
2593 * - __u8
2594 - ``scaling_list_16x16[6][64]``
2595 - Scaling list is used for the scaling process for transform
2596 coefficients. The values on each scaling list are expected
2597 in raster scan order.
2598 * - __u8
2599 - ``scaling_list_32x32[2][64]``
2600 - Scaling list is used for the scaling process for transform
2601 coefficients. The values on each scaling list are expected
2602 in raster scan order.
2603 * - __u8
2604 - ``scaling_list_dc_coef_16x16[6]``
2605 - Scaling list is used for the scaling process for transform
2606 coefficients. The values on each scaling list are expected
2607 in raster scan order.
2608 * - __u8
2609 - ``scaling_list_dc_coef_32x32[2]``
2610 - Scaling list is used for the scaling process for transform
2611 coefficients. The values on each scaling list are expected
2612 in raster scan order.
2614 .. raw:: latex
2616 \normalsize
2618 .. c:type:: v4l2_hevc_dpb_entry
2620 .. raw:: latex
2622 \small
2624 .. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{12.1cm}|
2626 .. flat-table:: struct v4l2_hevc_dpb_entry
2627 :header-rows: 0
2628 :stub-columns: 0
2629 :widths: 1 1 2
2631 * - __u64
2632 - ``timestamp``
2633 - Timestamp of the V4L2 capture buffer to use as reference, used
2634 with B-coded and P-coded frames. The timestamp refers to the
2635 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
2636 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
2637 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
2638 * - __u8
2639 - ``flags``
2640 - Long term flag for the reference frame
2641 (V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE). The flag is set as
2642 described in the ITU HEVC specification chapter "8.3.2 Decoding
2643 process for reference picture set".
2644 * - __u8
2645 - ``field_pic``
2646 - Whether the reference is a field picture or a frame.
2647 See :ref:`HEVC dpb field pic Flags <hevc_dpb_field_pic_flags>`
2648 * - __s32
2649 - ``pic_order_cnt_val``
2650 - The picture order count of the current picture.
2651 * - __u8
2652 - ``padding[2]``
2653 - Applications and drivers must set this to zero.
2655 .. raw:: latex
2657 \normalsize
2659 .. _hevc_dpb_field_pic_flags:
2661 ``HEVC dpb field pic Flags``
2663 .. raw:: latex
2665 \scriptsize
2667 .. flat-table::
2668 :header-rows: 0
2669 :stub-columns: 0
2670 :widths: 1 1 2
2672 * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME``
2673 - 0
2674 - (progressive) Frame
2675 * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD``
2676 - 1
2677 - Top field
2678 * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD``
2679 - 2
2680 - Bottom field
2681 * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM``
2682 - 3
2683 - Top field, bottom field, in that order
2684 * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP``
2685 - 4
2686 - Bottom field, top field, in that order
2687 * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP``
2688 - 5
2689 - Top field, bottom field, top field repeated, in that order
2690 * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM``
2691 - 6
2692 - Bottom field, top field, bottom field repeated, in that order
2693 * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING``
2694 - 7
2695 - Frame doubling
2696 * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING``
2697 - 8
2698 - Frame tripling
2699 * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM``
2700 - 9
2701 - Top field paired with previous bottom field in output order
2702 * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP``
2703 - 10
2704 - Bottom field paired with previous top field in output order
2705 * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM``
2706 - 11
2707 - Top field paired with next bottom field in output order
2708 * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP``
2709 - 12
2710 - Bottom field paired with next top field in output order
2712 .. c:type:: v4l2_hevc_pred_weight_table
2714 .. raw:: latex
2716 \footnotesize
2718 .. tabularcolumns:: |p{0.8cm}|p{10.6cm}|p{5.9cm}|
2720 .. flat-table:: struct v4l2_hevc_pred_weight_table
2721 :header-rows: 0
2722 :stub-columns: 0
2723 :widths: 1 1 2
2725 * - __s8
2726 - ``delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2727 - The difference of the weighting factor applied to the luma
2728 prediction value for list 0.
2729 * - __s8
2730 - ``luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2731 - The additive offset applied to the luma prediction value for list 0.
2732 * - __s8
2733 - ``delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
2734 - The difference of the weighting factor applied to the chroma
2735 prediction value for list 0.
2736 * - __s8
2737 - ``chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
2738 - The difference of the additive offset applied to the chroma
2739 prediction values for list 0.
2740 * - __s8
2741 - ``delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2742 - The difference of the weighting factor applied to the luma
2743 prediction value for list 1.
2744 * - __s8
2745 - ``luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2746 - The additive offset applied to the luma prediction value for list 1.
2747 * - __s8
2748 - ``delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
2749 - The difference of the weighting factor applied to the chroma
2750 prediction value for list 1.
2751 * - __s8
2752 - ``chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
2753 - The difference of the additive offset applied to the chroma
2754 prediction values for list 1.
2755 * - __u8
2756 - ``luma_log2_weight_denom``
2757 - The base 2 logarithm of the denominator for all luma weighting
2758 factors.
2759 * - __s8
2760 - ``delta_chroma_log2_weight_denom``
2761 - The difference of the base 2 logarithm of the denominator for
2762 all chroma weighting factors.
2763 * - __u8
2764 - ``padding[6]``
2765 - Applications and drivers must set this to zero.
2767 .. raw:: latex
2769 \normalsize
2771 ``V4L2_CID_STATELESS_HEVC_DECODE_MODE (enum)``
2772 Specifies the decoding mode to use. Currently exposes slice-based and
2773 frame-based decoding but new modes might be added later on.
2774 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
2775 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
2776 are required to set this control in order to specify the decoding mode
2777 that is expected for the buffer.
2778 Drivers may expose a single or multiple decoding modes, depending
2779 on what they can support.
2781 .. c:type:: v4l2_stateless_hevc_decode_mode
2783 .. raw:: latex
2785 \small
2787 .. tabularcolumns:: |p{9.4cm}|p{0.6cm}|p{7.3cm}|
2789 .. flat-table::
2790 :header-rows: 0
2791 :stub-columns: 0
2792 :widths: 1 1 2
2794 * - ``V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED``
2795 - 0
2796 - Decoding is done at the slice granularity.
2797 The OUTPUT buffer must contain a single slice.
2798 * - ``V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED``
2799 - 1
2800 - Decoding is done at the frame granularity.
2801 The OUTPUT buffer must contain all slices needed to decode the
2802 frame.
2804 .. raw:: latex
2806 \normalsize
2808 ``V4L2_CID_STATELESS_HEVC_START_CODE (enum)``
2809 Specifies the HEVC slice start code expected for each slice.
2810 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
2811 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
2812 are required to set this control in order to specify the start code
2813 that is expected for the buffer.
2814 Drivers may expose a single or multiple start codes, depending
2815 on what they can support.
2817 .. c:type:: v4l2_stateless_hevc_start_code
2819 .. tabularcolumns:: |p{9.2cm}|p{0.6cm}|p{7.5cm}|
2821 .. flat-table::
2822 :header-rows: 0
2823 :stub-columns: 0
2824 :widths: 1 1 2
2826 * - ``V4L2_STATELESS_HEVC_START_CODE_NONE``
2827 - 0
2828 - Selecting this value specifies that HEVC slices are passed
2829 to the driver without any start code. The bitstream data should be
2830 according to :ref:`hevc` 7.3.1.1 General NAL unit syntax, hence
2831 contains emulation prevention bytes when required.
2832 * - ``V4L2_STATELESS_HEVC_START_CODE_ANNEX_B``
2833 - 1
2834 - Selecting this value specifies that HEVC slices are expected
2835 to be prefixed by Annex B start codes. According to :ref:`hevc`
2836 valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
2838 .. raw:: latex
2840 \normalsize
2842 ``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (integer)``
2843 Specifies a priority identifier for the NAL unit, which will be applied to
2844 the base layer. By default this value is set to 0 for the base layer,
2845 and the next layer will have the priority ID assigned as 1, 2, 3 and so on.
2846 The video encoder can't decide the priority id to be applied to a layer,
2847 so this has to come from client.
2848 This is applicable to H264 and valid Range is from 0 to 63.
2849 Source Rec. ITU-T H.264 (06/2019); G.7.4.1.1, G.8.8.1.
2851 ``V4L2_CID_MPEG_VIDEO_LTR_COUNT (integer)``
2852 Specifies the maximum number of Long Term Reference (LTR) frames at any
2853 given time that the encoder can keep.
2854 This is applicable to the H264 and HEVC encoders.
2856 ``V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (integer)``
2857 After setting this control the frame that will be queued next
2858 will be marked as a Long Term Reference (LTR) frame
2859 and given this LTR index which ranges from 0 to LTR_COUNT-1.
2860 This is applicable to the H264 and HEVC encoders.
2861 Source Rec. ITU-T H.264 (06/2019); Table 7.9
2863 ``V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (bitmask)``
2864 Specifies the Long Term Reference (LTR) frame(s) to be used for
2865 encoding the next frame queued after setting this control.
2866 This provides a bitmask which consists of bits [0, LTR_COUNT-1].
2867 This is applicable to the H264 and HEVC encoders.
2869 ``V4L2_CID_STATELESS_HEVC_DECODE_PARAMS (struct)``
2870 Specifies various decode parameters, especially the references picture order
2871 count (POC) for all the lists (short, long, before, current, after) and the
2872 number of entries for each of them.
2873 These parameters are defined according to :ref:`hevc`.
2874 They are described in section 8.3 "Slice decoding process" of the
2875 specification.
2877 .. c:type:: v4l2_ctrl_hevc_decode_params
2879 .. cssclass:: longtable
2881 .. flat-table:: struct v4l2_ctrl_hevc_decode_params
2882 :header-rows: 0
2883 :stub-columns: 0
2884 :widths: 1 1 2
2886 * - __s32
2887 - ``pic_order_cnt_val``
2888 - PicOrderCntVal as described in section 8.3.1 "Decoding process
2889 for picture order count" of the specification.
2890 * - __u16
2891 - ``short_term_ref_pic_set_size``
2892 - Specifies the size, in bits, of the short-term reference picture set, of the first slice
2893 described as st_ref_pic_set() in the specification, included in the slice header
2894 or SPS (section 7.3.6.1).
2895 * - __u16
2896 - ``long_term_ref_pic_set_size``
2897 - Specifies the size, in bits, of the long-term reference picture set, of the first slice
2898 included in the slice header or SPS. It is the number of bits in the conditional block
2899 if(long_term_ref_pics_present_flag) in section 7.3.6.1 of the specification.
2900 * - __u8
2901 - ``num_active_dpb_entries``
2902 - The number of entries in ``dpb``.
2903 * - __u8
2904 - ``num_poc_st_curr_before``
2905 - The number of reference pictures in the short-term set that come before
2906 the current frame.
2907 * - __u8
2908 - ``num_poc_st_curr_after``
2909 - The number of reference pictures in the short-term set that come after
2910 the current frame.
2911 * - __u8
2912 - ``num_poc_lt_curr``
2913 - The number of reference pictures in the long-term set.
2914 * - __u8
2915 - ``poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2916 - PocStCurrBefore as described in section 8.3.2 "Decoding process for reference
2917 picture set": provides the index of the short term before references in DPB array.
2918 * - __u8
2919 - ``poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2920 - PocStCurrAfter as described in section 8.3.2 "Decoding process for reference
2921 picture set": provides the index of the short term after references in DPB array.
2922 * - __u8
2923 - ``poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2924 - PocLtCurr as described in section 8.3.2 "Decoding process for reference
2925 picture set": provides the index of the long term references in DPB array.
2926 * - __u8
2927 - ``num_delta_pocs_of_ref_rps_idx``
2928 - When the short_term_ref_pic_set_sps_flag in the slice header is equal to 0,
2929 it is the same as the derived value NumDeltaPocs[RefRpsIdx]. It can be used to parse
2930 the RPS data in slice headers instead of skipping it with @short_term_ref_pic_set_size.
2931 When the value of short_term_ref_pic_set_sps_flag in the slice header is
2932 equal to 1, num_delta_pocs_of_ref_rps_idx shall be set to 0.
2933 * - struct :c:type:`v4l2_hevc_dpb_entry`
2934 - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2935 - The decoded picture buffer, for meta-data about reference frames.
2936 * - __u64
2937 - ``flags``
2938 - See :ref:`Decode Parameters Flags <hevc_decode_params_flags>`
2940 .. _hevc_decode_params_flags:
2942 ``Decode Parameters Flags``
2944 .. cssclass:: longtable
2946 .. flat-table::
2947 :header-rows: 0
2948 :stub-columns: 0
2949 :widths: 1 1 2
2951 * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC``
2952 - 0x00000001
2953 -
2954 * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC``
2955 - 0x00000002
2956 -
2957 * - ``V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR``
2958 - 0x00000004
2959 -
2961 .. _v4l2-codec-stateless-av1:
2963 ``V4L2_CID_STATELESS_AV1_SEQUENCE (struct)``
2964 Represents an AV1 Sequence OBU (Open Bitstream Unit). See section 5.5
2965 "Sequence header OBU syntax" in :ref:`av1` for more details.
2967 .. c:type:: v4l2_ctrl_av1_sequence
2969 .. cssclass:: longtable
2971 .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
2973 .. flat-table:: struct v4l2_ctrl_av1_sequence
2974 :header-rows: 0
2975 :stub-columns: 0
2976 :widths: 1 1 2
2978 * - __u32
2979 - ``flags``
2980 - See :ref:`AV1 Sequence Flags <av1_sequence_flags>`.
2981 * - __u8
2982 - ``seq_profile``
2983 - Specifies the features that can be used in the coded video sequence.
2984 * - __u8
2985 - ``order_hint_bits``
2986 - Specifies the number of bits used for the order_hint field at each frame.
2987 * - __u8
2988 - ``bit_depth``
2989 - the bit depth to use for the sequence as described in section 5.5.2
2990 "Color config syntax" in :ref:`av1` for more details.
2991 * - __u8
2992 - ``reserved``
2993 - Applications and drivers must set this to zero.
2994 * - __u16
2995 - ``max_frame_width_minus_1``
2996 - Specifies the maximum frame width minus 1 for the frames represented by
2997 this sequence header.
2998 * - __u16
2999 - ``max_frame_height_minus_1``
3000 - Specifies the maximum frame height minus 1 for the frames represented by
3001 this sequence header.
3003 .. _av1_sequence_flags:
3005 ``AV1 Sequence Flags``
3007 .. cssclass:: longtable
3009 .. flat-table::
3010 :header-rows: 0
3011 :stub-columns: 0
3012 :widths: 1 1 2
3014 * - ``V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE``
3015 - 0x00000001
3016 - If set, specifies that the coded video sequence contains only one coded
3017 frame. If not set, specifies that the coded video sequence contains one
3018 or more coded frames.
3019 * - ``V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK``
3020 - 0x00000002
3021 - If set, indicates that superblocks contain 128x128 luma samples.
3022 When equal to 0, it indicates that superblocks contain 64x64 luma
3023 samples. The number of contained chroma samples depends on
3024 subsampling_x and subsampling_y.
3025 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA``
3026 - 0x00000004
3027 - If set, specifies that the use_filter_intra syntax element may be
3028 present. If not set, specifies that the use_filter_intra syntax element
3029 will not be present.
3030 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER``
3031 - 0x00000008
3032 - Specifies whether the intra edge filtering process should be enabled.
3033 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND``
3034 - 0x00000010
3035 - If set, specifies that the mode info for inter blocks may contain the
3036 syntax element interintra. If not set, specifies that the syntax element
3037 interintra will not be present.
3038 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND``
3039 - 0x00000020
3040 - If set, specifies that the mode info for inter blocks may contain the
3041 syntax element compound_type. If not set, specifies that the syntax
3042 element compound_type will not be present.
3043 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION``
3044 - 0x00000040
3045 - If set, indicates that the allow_warped_motion syntax element may be
3046 present. If not set, indicates that the allow_warped_motion syntax
3047 element will not be present.
3048 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER``
3049 - 0x00000080
3050 - If set, indicates that the inter prediction filter type may be specified
3051 independently in the horizontal and vertical directions. If the flag is
3052 equal to 0, only one filter type may be specified, which is then used in
3053 both directions.
3054 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT``
3055 - 0x00000100
3056 - If set, indicates that tools based on the values of order hints may be
3057 used. If not set, indicates that tools based on order hints are
3058 disabled.
3059 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP``
3060 - 0x00000200
3061 - If set, indicates that the distance weights process may be used for
3062 inter prediction.
3063 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS``
3064 - 0x00000400
3065 - If set, indicates that the use_ref_frame_mvs syntax element may be
3066 present. If not set, indicates that the use_ref_frame_mvs syntax element
3067 will not be present.
3068 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES``
3069 - 0x00000800
3070 - If set, specifies that the use_superres syntax element will be present
3071 in the uncompressed header. If not set, specifies that the use_superres
3072 syntax element will not be present (instead use_superres will be set to
3073 0 in the uncompressed header without being read).
3074 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF``
3075 - 0x00001000
3076 - If set, specifies that cdef filtering may be enabled. If not set,
3077 specifies that cdef filtering is disabled.
3078 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION``
3079 - 0x00002000
3080 - If set, specifies that loop restoration filtering may be enabled. If not
3081 set, specifies that loop restoration filtering is disabled.
3082 * - ``V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME``
3083 - 0x00004000
3084 - If set, indicates that the video does not contain U and V color planes.
3085 If not set, indicates that the video contains Y, U, and V color planes.
3086 * - ``V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE``
3087 - 0x00008000
3088 - If set, signals full swing representation, i.e. "Full Range
3089 Quantization". If not set, signals studio swing representation, i.e.
3090 "Limited Range Quantization".
3091 * - ``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X``
3092 - 0x00010000
3093 - Specify the chroma subsampling format.
3094 * - ``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y``
3095 - 0x00020000
3096 - Specify the chroma subsampling format.
3097 * - ``V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT``
3098 - 0x00040000
3099 - Specifies whether film grain parameters are present in the coded video
3100 sequence.
3101 * - ``V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q``
3102 - 0x00080000
3103 - If set, indicates that the U and V planes may have separate delta
3104 quantizer values. If not set, indicates that the U and V planes will share
3105 the same delta quantizer value.
3107 ``V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY (struct)``
3108 Represents a single AV1 tile inside an AV1 Tile Group. Note that MiRowStart,
3109 MiRowEnd, MiColStart and MiColEnd can be retrieved from struct
3110 v4l2_av1_tile_info in struct v4l2_ctrl_av1_frame using tile_row and
3111 tile_col. See section 6.10.1 "General tile group OBU semantics" in
3112 :ref:`av1` for more details.
3114 .. c:type:: v4l2_ctrl_av1_tile_group_entry
3116 .. cssclass:: longtable
3118 .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
3120 .. flat-table:: struct v4l2_ctrl_av1_tile_group_entry
3121 :header-rows: 0
3122 :stub-columns: 0
3123 :widths: 1 1 2
3125 * - __u32
3126 - ``tile_offset``
3127 - Offset from the OBU data, i.e. where the coded tile data actually starts.
3128 * - __u32
3129 - ``tile_size``
3130 - Specifies the size in bytes of the coded tile. Equivalent to "TileSize"
3131 in :ref:`av1`.
3132 * - __u32
3133 - ``tile_row``
3134 - Specifies the row of the current tile. Equivalent to "TileRow" in
3135 :ref:`av1`.
3136 * - __u32
3137 - ``tile_col``
3138 - Specifies the column of the current tile. Equivalent to "TileColumn" in
3139 :ref:`av1`.
3141 .. c:type:: v4l2_av1_warp_model
3143 AV1 Warp Model as described in section 3 "Symbols and abbreviated terms" of
3144 :ref:`av1`.
3146 .. raw:: latex
3148 \scriptsize
3150 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3152 .. flat-table::
3153 :header-rows: 0
3154 :stub-columns: 0
3155 :widths: 1 1 2
3157 * - ``V4L2_AV1_WARP_MODEL_IDENTITY``
3158 - 0
3159 - Warp model is just an identity transform.
3160 * - ``V4L2_AV1_WARP_MODEL_TRANSLATION``
3161 - 1
3162 - Warp model is a pure translation.
3163 * - ``V4L2_AV1_WARP_MODEL_ROTZOOM``
3164 - 2
3165 - Warp model is a rotation + symmetric zoom + translation.
3166 * - ``V4L2_AV1_WARP_MODEL_AFFINE``
3167 - 3
3168 - Warp model is a general affine transform.
3170 .. c:type:: v4l2_av1_reference_frame
3172 AV1 Reference Frames as described in section 6.10.24 "Ref frames semantics"
3173 of :ref:`av1`.
3175 .. raw:: latex
3177 \scriptsize
3179 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3181 .. flat-table::
3182 :header-rows: 0
3183 :stub-columns: 0
3184 :widths: 1 1 2
3186 * - ``V4L2_AV1_REF_INTRA_FRAME``
3187 - 0
3188 - Intra Frame Reference.
3189 * - ``V4L2_AV1_REF_LAST_FRAME``
3190 - 1
3191 - Last Frame Reference.
3192 * - ``V4L2_AV1_REF_LAST2_FRAME``
3193 - 2
3194 - Last2 Frame Reference.
3195 * - ``V4L2_AV1_REF_LAST3_FRAME``
3196 - 3
3197 - Last3 Frame Reference.
3198 * - ``V4L2_AV1_REF_GOLDEN_FRAME``
3199 - 4
3200 - Golden Frame Reference.
3201 * - ``V4L2_AV1_REF_BWDREF_FRAME``
3202 - 5
3203 - BWD Frame Reference.
3204 * - ``V4L2_AV1_REF_ALTREF2_FRAME``
3205 - 6
3206 - ALTREF2 Frame Reference.
3207 * - ``V4L2_AV1_REF_ALTREF_FRAME``
3208 - 7
3209 - ALTREF Frame Reference.
3211 .. c:type:: v4l2_av1_global_motion
3213 AV1 Global Motion parameters as described in section 6.8.17
3214 "Global motion params semantics" of :ref:`av1`.
3216 .. cssclass:: longtable
3218 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3220 .. flat-table:: struct v4l2_av1_global_motion
3221 :header-rows: 0
3222 :stub-columns: 0
3223 :widths: 1 1 2
3225 * - __u8
3226 - ``flags[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
3227 - A bitfield containing the flags per reference frame. See
3228 :ref:`AV1 Global Motion Flags <av1_global_motion_flags>` for more
3229 details.
3230 * - enum :c:type:`v4l2_av1_warp_model`
3231 - ``type[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
3232 - The type of global motion transform used.
3233 * - __s32
3234 - ``params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6]``
3235 - This field has the same meaning as "gm_params" in :ref:`av1`.
3236 * - __u8
3237 - ``invalid``
3238 - Bitfield indicating whether the global motion params are invalid for a
3239 given reference frame. See section 7.11.3.6 Setup shear process and the
3240 variable "warpValid". Use V4L2_AV1_GLOBAL_MOTION_IS_INVALID(ref) to
3241 create a suitable mask.
3242 * - __u8
3243 - ``reserved[3]``
3244 - Applications and drivers must set this to zero.
3246 .. _av1_global_motion_flags:
3248 ``AV1 Global Motion Flags``
3250 .. cssclass:: longtable
3252 .. flat-table::
3253 :header-rows: 0
3254 :stub-columns: 0
3255 :widths: 1 1 2
3257 * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_GLOBAL``
3258 - 0x00000001
3259 - Specifies whether global motion parameters are present for a particular
3260 reference frame.
3261 * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_ROT_ZOOM``
3262 - 0x00000002
3263 - Specifies whether a particular reference frame uses rotation and zoom
3264 global motion.
3265 * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_TRANSLATION``
3266 - 0x00000004
3267 - Specifies whether a particular reference frame uses translation global
3268 motion
3270 .. c:type:: v4l2_av1_frame_restoration_type
3272 AV1 Frame Restoration Type.
3274 .. raw:: latex
3276 \scriptsize
3278 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3280 .. flat-table::
3281 :header-rows: 0
3282 :stub-columns: 0
3283 :widths: 1 1 2
3285 * - ``V4L2_AV1_FRAME_RESTORE_NONE``
3286 - 0
3287 - No filtering is applied.
3288 * - ``V4L2_AV1_FRAME_RESTORE_WIENER``
3289 - 1
3290 - Wiener filter process is invoked.
3291 * - ``V4L2_AV1_FRAME_RESTORE_SGRPROJ``
3292 - 2
3293 - Self guided filter process is invoked.
3294 * - ``V4L2_AV1_FRAME_RESTORE_SWITCHABLE``
3295 - 3
3296 - Restoration filter is swichtable.
3298 .. c:type:: v4l2_av1_loop_restoration
3300 AV1 Loop Restoration as described in section 6.10.15 "Loop restoration params
3301 semantics" of :ref:`av1`.
3303 .. cssclass:: longtable
3305 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3307 .. flat-table:: struct v4l2_av1_loop_restoration
3308 :header-rows: 0
3309 :stub-columns: 0
3310 :widths: 1 1 2
3312 * - __u8
3313 - ``flags``
3314 - See :ref:`AV1 Loop Restoration Flags <av1_loop_restoration_flags>`.
3315 * - __u8
3316 - ``lr_unit_shift``
3317 - Specifies if the luma restoration size should be halved.
3318 * - __u8
3319 - ``lr_uv_shift``
3320 - Specifies if the chroma size should be half the luma size.
3321 * - __u8
3322 - ``reserved``
3323 - Applications and drivers must set this to zero.
3324 * - :c:type:`v4l2_av1_frame_restoration_type`
3325 - ``frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX]``
3326 - Specifies the type of restoration used for each plane.
3327 * - __u8
3328 - ``loop_restoration_size[V4L2_AV1_MAX_NUM_PLANES]``
3329 - Specifies the size of loop restoration units in units of samples in the
3330 current plane.
3332 .. _av1_loop_restoration_flags:
3334 ``AV1 Loop Restoration Flags``
3336 .. cssclass:: longtable
3338 .. flat-table::
3339 :header-rows: 0
3340 :stub-columns: 0
3341 :widths: 1 1 2
3343 * - ``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR``
3344 - 0x00000001
3345 - Retains the same meaning as UsesLr in :ref:`av1`.
3346 * - ``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR``
3347 - 0x00000002
3348 - Retains the same meaning as UsesChromaLr in :ref:`av1`.
3350 .. c:type:: v4l2_av1_cdef
3352 AV1 CDEF params semantics as described in section 6.10.14 "CDEF params
3353 semantics" of :ref:`av1`.
3355 .. cssclass:: longtable
3357 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3359 .. flat-table:: struct v4l2_av1_cdef
3360 :header-rows: 0
3361 :stub-columns: 0
3362 :widths: 1 1 2
3364 * - __u8
3365 - ``damping_minus_3``
3366 - Controls the amount of damping in the deringing filter.
3367 * - __u8
3368 - ``bits``
3369 - Specifies the number of bits needed to specify which CDEF filter to
3370 apply.
3371 * - __u8
3372 - ``y_pri_strength[V4L2_AV1_CDEF_MAX]``
3373 - Specifies the strength of the primary filter.
3374 * - __u8
3375 - ``y_sec_strength[V4L2_AV1_CDEF_MAX]``
3376 - Specifies the strength of the secondary filter.
3377 * - __u8
3378 - ``uv_pri_strength[V4L2_AV1_CDEF_MAX]``
3379 - Specifies the strength of the primary filter.
3380 * - __u8
3381 - ``uv_sec_strength[V4L2_AV1_CDEF_MAX]``
3382 - Specifies the strength of the secondary filter.
3384 .. c:type:: v4l2_av1_segment_feature
3386 AV1 segment features as described in section 3 "Symbols and abbreviated terms"
3387 of :ref:`av1`.
3389 .. raw:: latex
3391 \scriptsize
3393 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3395 .. flat-table::
3396 :header-rows: 0
3397 :stub-columns: 0
3398 :widths: 1 1 2
3400 * - ``V4L2_AV1_SEG_LVL_ALT_Q``
3401 - 0
3402 - Index for quantizer segment feature.
3403 * - ``V4L2_AV1_SEG_LVL_ALT_LF_Y_V``
3404 - 1
3405 - Index for vertical luma loop filter segment feature.
3406 * - ``V4L2_AV1_SEG_LVL_REF_FRAME``
3407 - 5
3408 - Index for reference frame segment feature.
3409 * - ``V4L2_AV1_SEG_LVL_REF_SKIP``
3410 - 6
3411 - Index for skip segment feature.
3412 * - ``V4L2_AV1_SEG_LVL_REF_GLOBALMV``
3413 - 7
3414 - Index for global mv feature.
3415 * - ``V4L2_AV1_SEG_LVL_MAX``
3416 - 8
3417 - Number of segment features.
3419 .. c:type:: v4l2_av1_segmentation
3421 AV1 Segmentation params as defined in section 6.8.13 "Segmentation params
3422 semantics" of :ref:`av1`.
3424 .. cssclass:: longtable
3426 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3428 .. flat-table:: struct v4l2_av1_segmentation
3429 :header-rows: 0
3430 :stub-columns: 0
3431 :widths: 1 1 2
3433 * - __u8
3434 - ``flags``
3435 - See :ref:`AV1 Segmentation Flags <av1_segmentation_flags>`
3436 * - __u8
3437 - ``last_active_seg_id``
3438 - Indicates the highest numbered segment id that has some
3439 enabled feature. This is used when decoding the segment id to only decode
3440 choices corresponding to used segments.
3441 * - __u8
3442 - ``feature_enabled[V4L2_AV1_MAX_SEGMENTS]``
3443 - Bitmask defining which features are enabled in each segment. Use
3444 V4L2_AV1_SEGMENT_FEATURE_ENABLED to build a suitable mask.
3445 * - __u16
3446 - ``feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX]``
3447 - Data attached to each feature. Data entry is only valid if the feature
3448 is enabled.
3450 .. _av1_segmentation_flags:
3452 ``AV1 Segmentation Flags``
3454 .. cssclass:: longtable
3456 .. flat-table::
3457 :header-rows: 0
3458 :stub-columns: 0
3459 :widths: 1 1 2
3461 * - ``V4L2_AV1_SEGMENTATION_FLAG_ENABLED``
3462 - 0x00000001
3463 - If set, indicates that this frame makes use of the segmentation tool. If
3464 not set, indicates that the frame does not use segmentation.
3465 * - ``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP``
3466 - 0x00000002
3467 - If set, indicates that the segmentation map are updated during the
3468 decoding of this frame. If not set, indicates that the segmentation map
3469 from the previous frame is used.
3470 * - ``V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE``
3471 - 0x00000004
3472 - If set, indicates that the updates to the segmentation map are coded
3473 relative to the existing segmentation map. If not set, indicates that
3474 the new segmentation map is coded without reference to the existing
3475 segmentation map.
3476 * - ``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA``
3477 - 0x00000008
3478 - If set, indicates that the updates to the segmentation map are coded
3479 relative to the existing segmentation map. If not set, indicates that
3480 the new segmentation map is coded without reference to the existing
3481 segmentation map.
3482 * - ``V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP``
3483 - 0x00000010
3484 - If set, indicates that the segment id will be read before the skip
3485 syntax element. If not set, indicates that the skip syntax element will
3486 be read first.
3488 .. c:type:: v4l2_av1_loop_filter
3490 AV1 Loop filter params as defined in section 6.8.10 "Loop filter semantics" of
3491 :ref:`av1`.
3493 .. cssclass:: longtable
3495 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3497 .. flat-table:: struct v4l2_av1_loop_filter
3498 :header-rows: 0
3499 :stub-columns: 0
3500 :widths: 1 1 2
3502 * - __u8
3503 - ``flags``
3504 - See
3505 :ref:`AV1 Loop Filter flags <av1_loop_filter_flags>` for more details.
3506 * - __u8
3507 - ``level[4]``
3508 - An array containing loop filter strength values. Different loop
3509 filter strength values from the array are used depending on the image
3510 plane being filtered, and the edge direction (vertical or horizontal)
3511 being filtered.
3512 * - __u8
3513 - ``sharpness``
3514 - indicates the sharpness level. The loop_filter_level and
3515 loop_filter_sharpness together determine when a block edge is filtered,
3516 and by how much the filtering can change the sample values. The loop
3517 filter process is described in section 7.14 of :ref:`av1`.
3518 * - __u8
3519 - ``ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
3520 - contains the adjustment needed for the filter level based on the
3521 chosen reference frame. If this syntax element is not present, it
3522 maintains its previous value.
3523 * - __u8
3524 - ``mode_deltas[2]``
3525 - contains the adjustment needed for the filter level based on
3526 the chosen mode. If this syntax element is not present, it maintains its
3527 previous value.
3528 * - __u8
3529 - ``delta_lf_res``
3530 - specifies the left shift which should be applied to decoded loop filter
3531 delta values.
3533 .. _av1_loop_filter_flags:
3535 ``AV1 Loop Filter Flags``
3537 .. cssclass:: longtable
3539 .. flat-table::
3540 :header-rows: 0
3541 :stub-columns: 0
3542 :widths: 1 1 2
3544 * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED``
3545 - 0x00000001
3546 - If set, means that the filter level depends on the mode and reference
3547 frame used to predict a block. If not set, means that the filter level
3548 does not depend on the mode and reference frame.
3549 * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE``
3550 - 0x00000002
3551 - If set, means that additional syntax elements are present that specify
3552 which mode and reference frame deltas are to be updated. If not set,
3553 means that these syntax elements are not present.
3554 * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT``
3555 - 0x00000004
3556 - Specifies whether loop filter delta values are present
3557 * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI``
3558 - 0x00000008
3559 - A value equal to 1 specifies that separate loop filter
3560 deltas are sent for horizontal luma edges, vertical luma edges,
3561 the U edges, and the V edges. A value of delta_lf_multi equal to 0
3562 specifies that the same loop filter delta is used for all edges.
3564 .. c:type:: v4l2_av1_quantization
3566 AV1 Quantization params as defined in section 6.8.11 "Quantization params
3567 semantics" of :ref:`av1`.
3569 .. cssclass:: longtable
3571 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3573 .. flat-table:: struct v4l2_av1_quantization
3574 :header-rows: 0
3575 :stub-columns: 0
3576 :widths: 1 1 2
3578 * - __u8
3579 - ``flags``
3580 - See
3581 :ref:`AV1 Loop Filter flags <av1_quantization_flags>` for more details.
3582 * - __u8
3583 - ``base_q_idx``
3584 - Indicates the base frame qindex. This is used for Y AC coefficients and
3585 as the base value for the other quantizers.
3586 * - __u8
3587 - ``delta_q_y_dc``
3588 - Indicates the Y DC quantizer relative to base_q_idx.
3589 * - __u8
3590 - ``delta_q_u_dc``
3591 - Indicates the U DC quantizer relative to base_q_idx.
3592 * - __u8
3593 - ``delta_q_u_ac``
3594 - Indicates the U AC quantizer relative to base_q_idx.
3595 * - __u8
3596 - ``delta_q_v_dc``
3597 - Indicates the V DC quantizer relative to base_q_idx.
3598 * - __u8
3599 - ``delta_q_v_ac``
3600 - Indicates the V AC quantizer relative to base_q_idx.
3601 * - __u8
3602 - ``qm_y``
3603 - Specifies the level in the quantizer matrix that should be used for
3604 luma plane decoding.
3605 * - __u8
3606 - ``qm_u``
3607 - Specifies the level in the quantizer matrix that should be used for
3608 chroma U plane decoding.
3609 * - __u8
3610 - ``qm_v``
3611 - Specifies the level in the quantizer matrix that should be used for
3612 chroma V plane decoding.
3613 * - __u8
3614 - ``delta_q_res``
3615 - Specifies the left shift which should be applied to decoded quantizer
3616 index delta values.
3618 .. _av1_quantization_flags:
3620 ``AV1 Quantization Flags``
3622 .. cssclass:: longtable
3624 .. flat-table::
3625 :header-rows: 0
3626 :stub-columns: 0
3627 :widths: 1 1 2
3629 * - ``V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA``
3630 - 0x00000001
3631 - If set, indicates that the U and V delta quantizer values are coded
3632 separately. If not set, indicates that the U and V delta quantizer
3633 values share a common value.
3634 * - ``V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX``
3635 - 0x00000002
3636 - If set, specifies that the quantizer matrix will be used to compute
3637 quantizers.
3638 * - ``V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT``
3639 - 0x00000004
3640 - Specifies whether quantizer index delta values are present.
3642 .. c:type:: v4l2_av1_tile_info
3644 AV1 Tile info as defined in section 6.8.14 "Tile info semantics" of ref:`av1`.
3646 .. cssclass:: longtable
3648 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3650 .. flat-table:: struct v4l2_av1_tile_info
3651 :header-rows: 0
3652 :stub-columns: 0
3653 :widths: 1 1 2
3655 * - __u8
3656 - ``flags``
3657 - See
3658 :ref:`AV1 Tile Info flags <av1_tile_info_flags>` for more details.
3659 * - __u8
3660 - ``context_update_tile_id``
3661 - Specifies which tile to use for the CDF update.
3662 * - __u8
3663 - ``tile_cols``
3664 - Specifies the number of tiles across the frame.
3665 * - __u8
3666 - ``tile_rows``
3667 - Specifies the number of tiles down the frame.
3668 * - __u32
3669 - ``mi_col_starts[V4L2_AV1_MAX_TILE_COLS + 1]``
3670 - An array specifying the start column (in units of 4x4 luma
3671 samples) for each tile across the image.
3672 * - __u32
3673 - ``mi_row_starts[V4L2_AV1_MAX_TILE_ROWS + 1]``
3674 - An array specifying the start row (in units of 4x4 luma
3675 samples) for each tile across the image.
3676 * - __u32
3677 - ``width_in_sbs_minus_1[V4L2_AV1_MAX_TILE_COLS]``
3678 - Specifies the width of a tile minus 1 in units of superblocks.
3679 * - __u32
3680 - ``height_in_sbs_minus_1[V4L2_AV1_MAX_TILE_ROWS]``
3681 - Specifies the height of a tile minus 1 in units of superblocks.
3682 * - __u8
3683 - ``tile_size_bytes``
3684 - Specifies the number of bytes needed to code each tile size.
3685 * - __u8
3686 - ``reserved[3]``
3687 - Applications and drivers must set this to zero.
3689 .. _av1_tile_info_flags:
3691 ``AV1 Tile Info Flags``
3693 .. cssclass:: longtable
3695 .. flat-table::
3696 :header-rows: 0
3697 :stub-columns: 0
3698 :widths: 1 1 2
3700 * - ``V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING``
3701 - 0x00000001
3702 - If set, means that the tiles are uniformly spaced across the frame. (In
3703 other words, all tiles are the same size except for the ones at the
3704 right and bottom edge which can be smaller). If not set means that the
3705 tile sizes are coded.
3707 .. c:type:: v4l2_av1_frame_type
3709 AV1 Frame Type
3711 .. raw:: latex
3713 \scriptsize
3715 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3717 .. flat-table::
3718 :header-rows: 0
3719 :stub-columns: 0
3720 :widths: 1 1 2
3722 * - ``V4L2_AV1_KEY_FRAME``
3723 - 0
3724 - Key frame.
3725 * - ``V4L2_AV1_INTER_FRAME``
3726 - 1
3727 - Inter frame.
3728 * - ``V4L2_AV1_INTRA_ONLY_FRAME``
3729 - 2
3730 - Intra-only frame.
3731 * - ``V4L2_AV1_SWITCH_FRAME``
3732 - 3
3733 - Switch frame.
3735 .. c:type:: v4l2_av1_interpolation_filter
3737 AV1 Interpolation Filter
3739 .. raw:: latex
3741 \scriptsize
3743 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3745 .. flat-table::
3746 :header-rows: 0
3747 :stub-columns: 0
3748 :widths: 1 1 2
3750 * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP``
3751 - 0
3752 - Eight tap filter.
3753 * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH``
3754 - 1
3755 - Eight tap smooth filter.
3756 * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP``
3757 - 2
3758 - Eight tap sharp filter.
3759 * - ``V4L2_AV1_INTERPOLATION_FILTER_BILINEAR``
3760 - 3
3761 - Bilinear filter.
3762 * - ``V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE``
3763 - 4
3764 - Filter selection is signaled at the block level.
3766 .. c:type:: v4l2_av1_tx_mode
3768 AV1 Tx mode as described in section 6.8.21 "TX mode semantics" of :ref:`av1`.
3770 .. raw:: latex
3772 \scriptsize
3774 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3776 .. flat-table::
3777 :header-rows: 0
3778 :stub-columns: 0
3779 :widths: 1 1 2
3781 * - ``V4L2_AV1_TX_MODE_ONLY_4X4``
3782 - 0
3783 - The inverse transform will use only 4x4 transforms.
3784 * - ``V4L2_AV1_TX_MODE_LARGEST``
3785 - 1
3786 - The inverse transform will use the largest transform size that fits
3787 inside the block.
3788 * - ``V4L2_AV1_TX_MODE_SELECT``
3789 - 2
3790 - The choice of transform size is specified explicitly for each block.
3792 ``V4L2_CID_STATELESS_AV1_FRAME (struct)``
3793 Represents a Frame Header OBU. See 6.8 "Frame Header OBU semantics" of
3794 :ref:`av1` for more details.
3796 .. c:type:: v4l2_ctrl_av1_frame
3798 .. cssclass:: longtable
3800 .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
3802 .. flat-table:: struct v4l2_ctrl_av1_frame
3803 :header-rows: 0
3804 :stub-columns: 0
3805 :widths: 1 1 2
3807 * - struct :c:type:`v4l2_av1_tile_info`
3808 - ``tile_info``
3809 - Tile info
3810 * - struct :c:type:`v4l2_av1_quantization`
3811 - ``quantization``
3812 - Quantization parameters.
3813 * - __u8
3814 - ``superres_denom``
3815 - The denominator for the upscaling ratio.
3816 * - struct :c:type:`v4l2_av1_segmentation`
3817 - ``segmentation``
3818 - Segmentation parameters.
3819 * - struct :c:type:`v4l2_av1_loop_filter`
3820 - ``loop_filter``
3821 - Loop filter params
3822 * - struct :c:type:`v4l2_av1_cdef`
3823 - ``cdef``
3824 - CDEF params
3825 * - __u8
3826 - ``skip_mode_frame[2]``
3827 - Specifies the frames to use for compound prediction when skip_mode is
3828 equal to 1.
3829 * - __u8
3830 - ``primary_ref_frame``
3831 - Specifies which reference frame contains the CDF values and other state
3832 that should be loaded at the start of the frame.
3833 * - struct :c:type:`v4l2_av1_loop_restoration`
3834 - ``loop_restoration``
3835 - Loop restoration parameters.
3836 * - struct :c:type:`v4l2_av1_global_motion`
3837 - ``global_motion``
3838 - Global motion parameters.
3839 * - __u32
3840 - ``flags``
3841 - See
3842 :ref:`AV1 Frame flags <av1_frame_flags>` for more details.
3843 * - enum :c:type:`v4l2_av1_frame_type`
3844 - ``frame_type``
3845 - Specifies the AV1 frame type
3846 * - __u32
3847 - ``order_hint``
3848 - Specifies OrderHintBits least significant bits of the expected output
3849 order for this frame.
3850 * - __u32
3851 - ``upscaled_width``
3852 - The upscaled width.
3853 * - enum :c:type:`v4l2_av1_interpolation_filter`
3854 - ``interpolation_filter``
3855 - Specifies the filter selection used for performing inter prediction.
3856 * - enum :c:type:`v4l2_av1_tx_mode`
3857 - ``tx_mode``
3858 - Specifies how the transform size is determined.
3859 * - __u32
3860 - ``frame_width_minus_1``
3861 - Add 1 to get the frame's width.
3862 * - __u32
3863 - ``frame_height_minus_1``
3864 - Add 1 to get the frame's height.
3865 * - __u16
3866 - ``render_width_minus_1``
3867 - Add 1 to get the render width of the frame in luma samples.
3868 * - __u16
3869 - ``render_height_minus_1``
3870 - Add 1 to get the render height of the frame in luma samples.
3871 * - __u32
3872 - ``current_frame_id``
3873 - Specifies the frame id number for the current frame. Frame
3874 id numbers are additional information that do not affect the decoding
3875 process, but provide decoders with a way of detecting missing reference
3876 frames so that appropriate action can be taken.
3877 * - __u8
3878 - ``buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS]``
3879 - Specifies the frame removal time in units of DecCT clock ticks counted
3880 from the removal time of the last random access point for operating point
3881 opNum.
3882 * - __u8
3883 - ``reserved[4]``
3884 - Applications and drivers must set this to zero.
3885 * - __u32
3886 - ``order_hints[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
3887 - Specifies the expected output order hint for each reference frame.
3888 This field corresponds to the OrderHints variable from the specification
3889 (section 5.9.2 "Uncompressed header syntax"). As such, this is only
3890 used for non-intra frames and ignored otherwise. order_hints[0] is
3891 always ignored.
3892 * - __u64
3893 - ``reference_frame_ts[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
3894 - The V4L2 timestamp for each of the reference frames enumerated in
3895 enum :c:type:`v4l2_av1_reference_frame` starting at
3896 ``V4L2_AV1_REF_LAST_FRAME``. This represents the state of reference
3897 slot as described in the spec and updated by userland through the
3898 "Reference frame update process" in section 7.20 The timestamp refers
3899 to the ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
3900 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
3901 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
3902 * - __s8
3903 - ``ref_frame_idx[V4L2_AV1_REFS_PER_FRAME]``
3904 - An index into ``reference_frame_ts`` representing the ordered list of
3905 references used by inter-frame. Matches the bitstream syntax
3906 element of the same name.
3907 * - __u8
3908 - ``refresh_frame_flags``
3909 - Contains a bitmask that specifies which reference frame slots will be
3910 updated with the current frame after it is decoded.
3912 .. _av1_frame_flags:
3914 ``AV1 Frame Flags``
3916 .. cssclass:: longtable
3918 .. flat-table::
3919 :header-rows: 0
3920 :stub-columns: 0
3921 :widths: 1 1 2
3923 * - ``V4L2_AV1_FRAME_FLAG_SHOW_FRAME``
3924 - 0x00000001
3925 - If set, specifies that this frame should be immediately output once
3926 decoded. If not set, specifies that this frame should not be immediately
3927 output; it may be output later if a later uncompressed header uses
3928 show_existing_frame equal to 1.
3929 * - ``V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME``
3930 - 0x00000002
3931 - If set, specifies that the frame may be output using the
3932 show_existing_frame mechanism. If not set, specifies that this frame
3933 will not be output using the show_existing_frame mechanism.
3934 * - ``V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE``
3935 - 0x00000004
3936 - Specifies whether error resilient mode is enabled.
3937 * - ``V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE``
3938 - 0x00000008
3939 - Specifies whether the CDF update in the symbol decoding process should
3940 be disabled.
3941 * - ``V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS``
3942 - 0x00000010
3943 - If set, indicates that intra blocks may use palette encoding. If not
3944 set, indicates that palette encoding is never used.
3945 * - ``V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV``
3946 - 0x00000020
3947 - If set, specifies that motion vectors will always be integers. If not
3948 set, specifies that motion vectors can contain fractional bits.
3949 * - ``V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC``
3950 - 0x00000040
3951 - If set, indicates that intra block copy may be used in this frame. If
3952 not set, indicates that intra block copy is not allowed in this frame.
3953 * - ``V4L2_AV1_FRAME_FLAG_USE_SUPERRES``
3954 - 0x00000080
3955 - If set, indicates that upscaling is needed.
3956 * - ``V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV``
3957 - 0x00000100
3958 - If set, specifies that motion vectors are specified to eighth pel
3959 precision. If not set, specifies that motion vectors are specified to
3960 quarter pel precision;
3961 * - ``V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE``
3962 - 0x00000200
3963 - If not set, specifies that only the SIMPLE motion mode will be used.
3964 * - ``V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS``
3965 - 0x00000400
3966 - If set specifies that motion vector information from a previous frame
3967 can be used when decoding the current frame. If not set, specifies that
3968 this information will not be used.
3969 * - ``V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF``
3970 - 0x00000800
3971 - If set indicates that the end of frame CDF update is disabled. If not
3972 set, indicates that the end of frame CDF update is enabled
3973 * - ``V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION``
3974 - 0x00001000
3975 - If set, indicates that the syntax element motion_mode may be present, if
3976 not set, indicates that the syntax element motion_mode will not be
3977 present.
3978 * - ``V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT``
3979 - 0x00002000
3980 - If set, specifies that the mode info for inter blocks contains the
3981 syntax element comp_mode that indicates whether to use single or
3982 compound reference prediction. If not set, specifies that all inter
3983 blocks will use single prediction.
3984 * - ``V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET``
3985 - 0x00004000
3986 - If set, specifies that the frame is restricted to a reduced subset of
3987 the full set of transform types.
3988 * - ``V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED``
3989 - 0x00008000
3990 - This flag retains the same meaning as SkipModeAllowed in :ref:`av1`.
3991 * - ``V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT``
3992 - 0x00010000
3993 - If set, specifies that the syntax element skip_mode will be present, if
3994 not set, specifies that skip_mode will not be used for this frame.
3995 * - ``V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE``
3996 - 0x00020000
3997 - If set, specifies that the frame size will either be specified as the
3998 size of one of the reference frames, or computed from the
3999 frame_width_minus_1 and frame_height_minus_1 syntax elements. If not
4000 set, specifies that the frame size is equal to the size in the sequence
4001 header.
4002 * - ``V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT``
4003 - 0x00040000
4004 - If set, specifies that buffer_removal_time is present. If not set,
4005 specifies that buffer_removal_time is not present.
4006 * - ``V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING``
4007 - 0x00080000
4008 - If set, indicates that only two reference frames are explicitly
4009 signaled. If not set, indicates that all reference frames are explicitly
4010 signaled.
4012 ``V4L2_CID_STATELESS_AV1_FILM_GRAIN (struct)``
4013 Represents the optional film grain parameters. See section
4014 6.8.20 "Film grain params semantics" of :ref:`av1` for more details.
4016 .. c:type:: v4l2_ctrl_av1_film_grain
4018 .. cssclass:: longtable
4020 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
4022 .. flat-table:: struct v4l2_ctrl_av1_film_grain
4023 :header-rows: 0
4024 :stub-columns: 0
4025 :widths: 1 1 2
4027 * - __u8
4028 - ``flags``
4029 - See :ref:`AV1 Film Grain Flags <av1_film_grain_flags>`.
4030 * - __u8
4031 - ``cr_mult``
4032 - Represents a multiplier for the cr component used in derivation of the
4033 input index to the cr component scaling function.
4034 * - __u16
4035 - ``grain_seed``
4036 - Specifies the starting value for the pseudo-random numbers used during
4037 film grain synthesis.
4038 * - __u8
4039 - ``film_grain_params_ref_idx``
4040 - Indicates which reference frame contains the film grain parameters to be
4041 used for this frame.
4042 * - __u8
4043 - ``num_y_points``
4044 - Specifies the number of points for the piece-wise linear scaling
4045 function of the luma component.
4046 * - __u8
4047 - ``point_y_value[V4L2_AV1_MAX_NUM_Y_POINTS]``
4048 - Represents the x (luma value) coordinate for the i-th point
4049 of the piecewise linear scaling function for luma component. The values
4050 are signaled on the scale of 0..255. In case of 10 bit video, these
4051 values correspond to luma values divided by 4. In case of 12 bit video,
4052 these values correspond to luma values divided by 16.
4053 * - __u8
4054 - ``point_y_scaling[V4L2_AV1_MAX_NUM_Y_POINTS]``
4055 - Represents the scaling (output) value for the i-th point
4056 of the piecewise linear scaling function for luma component.
4057 * - __u8
4058 - ``num_cb_points``
4059 - Specifies the number of points for the piece-wise linear scaling
4060 function of the cb component.
4061 * - __u8
4062 - ``point_cb_value[V4L2_AV1_MAX_NUM_CB_POINTS]``
4063 - Represents the x coordinate for the i-th point of the
4064 piece-wise linear scaling function for cb component. The values are
4065 signaled on the scale of 0..255.
4066 * - __u8
4067 - ``point_cb_scaling[V4L2_AV1_MAX_NUM_CB_POINTS]``
4068 - Represents the scaling (output) value for the i-th point of the
4069 piecewise linear scaling function for cb component.
4070 * - __u8
4071 - ``num_cr_points``
4072 - Represents the number of points for the piece-wise
4073 linear scaling function of the cr component.
4074 * - __u8
4075 - ``point_cr_value[V4L2_AV1_MAX_NUM_CR_POINTS]``
4076 - Represents the x coordinate for the i-th point of the
4077 piece-wise linear scaling function for cr component. The values are
4078 signaled on the scale of 0..255.
4079 * - __u8
4080 - ``point_cr_scaling[V4L2_AV1_MAX_NUM_CR_POINTS]``
4081 - Represents the scaling (output) value for the i-th point of the
4082 piecewise linear scaling function for cr component.
4083 * - __u8
4084 - ``grain_scaling_minus_8``
4085 - Represents the shift - 8 applied to the values of the chroma component.
4086 The grain_scaling_minus_8 can take values of 0..3 and determines the
4087 range and quantization step of the standard deviation of film grain.
4088 * - __u8
4089 - ``ar_coeff_lag``
4090 - Specifies the number of auto-regressive coefficients for luma and
4091 chroma.
4092 * - __u8
4093 - ``ar_coeffs_y_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
4094 - Specifies auto-regressive coefficients used for the Y plane.
4095 * - __u8
4096 - ``ar_coeffs_cb_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
4097 - Specifies auto-regressive coefficients used for the U plane.
4098 * - __u8
4099 - ``ar_coeffs_cr_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
4100 - Specifies auto-regressive coefficients used for the V plane.
4101 * - __u8
4102 - ``ar_coeff_shift_minus_6``
4103 - Specifies the range of the auto-regressive coefficients. Values of 0,
4104 1, 2, and 3 correspond to the ranges for auto-regressive coefficients of
4105 [-2, 2), [-1, 1), [-0.5, 0.5) and [-0.25, 0.25) respectively.
4106 * - __u8
4107 - ``grain_scale_shift``
4108 - Specifies how much the Gaussian random numbers should be scaled down
4109 during the grain synthesis process.
4110 * - __u8
4111 - ``cb_mult``
4112 - Represents a multiplier for the cb component used in derivation of the
4113 input index to the cb component scaling function.
4114 * - __u8
4115 - ``cb_luma_mult``
4116 - Represents a multiplier for the average luma component used in
4117 derivation of the input index to the cb component scaling function..
4118 * - __u8
4119 - ``cr_luma_mult``
4120 - Represents a multiplier for the average luma component used in
4121 derivation of the input index to the cr component scaling function.
4122 * - __u16
4123 - ``cb_offset``
4124 - Represents an offset used in derivation of the input index to the
4125 cb component scaling function.
4126 * - __u16
4127 - ``cr_offset``
4128 - Represents an offset used in derivation of the input index to the
4129 cr component scaling function.
4130 * - __u8
4131 - ``reserved[4]``
4132 - Applications and drivers must set this to zero.
4134 .. _av1_film_grain_flags:
4136 ``AV1 Film Grain Flags``
4138 .. cssclass:: longtable
4140 .. flat-table::
4141 :header-rows: 0
4142 :stub-columns: 0
4143 :widths: 1 1 2
4145 * - ``V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN``
4146 - 0x00000001
4147 - If set, specifies that film grain should be added to this frame. If not
4148 set, specifies that film grain should not be added.
4149 * - ``V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN``
4150 - 0x00000002
4151 - If set, means that a new set of parameters should be sent. If not set,
4152 specifies that the previous set of parameters should be used.
4153 * - ``V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA``
4154 - 0x00000004
4155 - If set, specifies that the chroma scaling is inferred from the luma
4156 scaling.
4157 * - ``V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP``
4158 - 0x00000008
4159 - If set, indicates that the overlap between film grain blocks shall be
4160 applied. If not set, indicates that the overlap between film grain blocks
4161 shall not be applied.
4162 * - ``V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE``
4163 - 0x00000010
4164 - If set, indicates that clipping to the restricted (studio, i.e. limited)
4165 range shall be applied to the sample values after adding the film grain
4166 (see the semantics for color_range for an explanation of studio swing).
4167 If not set, indicates that clipping to the full range shall be applied
4168 to the sample values after adding the film grain.

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Stateless Codec 제어 클래스

1-22

Stateless Codec 제어 클래스는 H.264, FWHT, VP8, MPEG-2, VP9, HEVC/H.265, AV1처럼 파싱된 비트스트림을 처리하는 하드웨어 가속 디코더와 인코더를 위한 인터페이스입니다. 커널 드라이버가 비트스트림 상태를 장기간 보관하지 않으므로 애플리케이션이 각 요청에 필요한 헤더·참조 그림·확률·필터 파라미터를 모두 전달해야 합니다.

이 문서의 구조체 payload는 보통 Media Request API와 함께 OUTPUT 버퍼에 묶입니다. `V4L2_CID_CODEC_STATELESS_CLASS`는 이 제어 클래스의 descriptor이며, 픽셀 형식과 디코딩 모드는 해당 코덱 제어가 요구하는 조합으로 설정해야 합니다.

Stateless 디코딩 요청
압축 비트스트림 헤더 파싱SPS/PPS·프레임·슬라이스 payload 구성참조 CAPTURE 버퍼 타임스탬프 연결OUTPUT 버퍼와 제어를 하나의 request에 결합하드웨어 디코딩CAPTURE 버퍼에서 완성된 프레임 회수

애플리케이션이 파싱과 상태 조립을 담당하고 드라이버는 요청 단위로 하드웨어를 구성합니다.

클래스 상수
항목한국어 설명
`V4L2_PIX_FMT_H264_SLICE``V4L2_PIX_FMT_H264_SLICE`: pix fmt h264 slice에 대응하는 UAPI 상수입니다.
`V4L2_CID_CODEC_STATELESS_CLASS``V4L2_CID_CODEC_STATELESS_CLASS`: cid codec stateless class 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.

이 구간에 등장하는 UAPI 상수입니다.

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later

.. _codec-stateless-controls:

*********************************
Stateless Codec Control Reference
*********************************

The Stateless Codec control class is intended to support
stateless decoder and encoders (i.e. hardware accelerators).

These drivers are typically supported by the :ref:`stateless_decoder`,
and deal with parsed pixel formats such as V4L2_PIX_FMT_H264_SLICE.

Stateless Codec Control ID
==========================

.. _codec-stateless-control-id:

``V4L2_CID_CODEC_STATELESS_CLASS (class)``
    The Stateless Codec class descriptor.

H.264 stateless 제어

23-796

`V4L2_CID_STATELESS_H264_SPS`는 비트스트림에서 추출한 sequence parameter set을 `v4l2_ctrl_h264_sps`로 전달합니다. profile, constraint set, level, chroma format, bit depth, frame number와 picture order count 비트 폭, 참조 프레임 수, 화면 크기와 SPS 플래그가 포함됩니다. 각 값은 H.264 규격 7.4.2.1.1의 의미를 따릅니다.

`V4L2_CID_STATELESS_H264_PPS`는 picture parameter set을 전달합니다. PPS/SPS 식별자, slice group 수, 기본 L0/L1 참조 수, weighted bipred 방식, 초기 QP/QS와 chroma QP 오프셋을 제공하며 entropy coding, weighted prediction, deblocking, constrained intra, redundant picture, 8x8 transform과 scaling matrix 존재 여부를 플래그로 표시합니다.

`V4L2_CID_STATELESS_H264_SCALING_MATRIX`는 4x4 및 8x8 scaling list를 역스캔한 래스터 순서로 전달합니다. 4x4 목록 순서는 Intra Y/Cb/Cr 다음 Inter Y/Cb/Cr이고, 8x8 목록은 Intra Y, Inter Y, Intra Cb, Inter Cb, Intra Cr, Inter Cr 순서입니다.

`V4L2_CID_STATELESS_H264_SLICE_PARAMS`는 slice header에서 얻은 비트 오프셋, 첫 macroblock, slice type, colour plane, CABAC, QP/QS, deblocking, 참조 목록과 slice flags를 담습니다. 참조 수 override가 없으면 L0/L1 active count는 PPS의 기본값과 일치해야 하며 `reserved`는 0이어야 합니다.

`V4L2_CID_STATELESS_H264_PRED_WEIGHTS`와 `v4l2_h264_weight_factors`는 H.264 7.4.3.2의 prediction weight table을 나타냅니다. 인덱스 0은 reference list 0, 인덱스 1은 list 1이며 루마·크로마 weight와 offset을 함께 전달합니다.

`v4l2_h264_reference`는 `fields`로 top, bottom 또는 frame 참조를 표시하고 `index`로 decode parameters의 DPB 항목을 가리킵니다. `V4L2_CID_STATELESS_H264_DECODE_PARAMS`는 DPB 16개, NAL reference ID, frame number, top/bottom POC, IDR ID, POC delta와 관련 구문 비트 크기, slice-group change cycle 및 그림 유형 플래그를 전달합니다.

`v4l2_h264_dpb_entry.reference_ts`는 참조할 CAPTURE 버퍼의 timestamp를 나노초 단위 정수로 연결합니다. short-term 참조의 `pic_num`과 `frame_num`, long-term 참조의 `LongTermPicNum`과 `long_term_frame_idx`, field 상태와 POC를 정확히 채워야 합니다. VALID, ACTIVE, LONG_TERM, FIELD 플래그는 항목의 생명주기와 참조 용도를 구분합니다.

`V4L2_CID_STATELESS_H264_DECODE_MODE`는 slice-based와 frame-based 방식을 선택합니다. Slice 기반에서는 OUTPUT 버퍼 하나에 slice 하나를 넣고 slice params를 설정하며, 여러 slice가 한 frame을 이룰 때 `V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF`가 필요합니다. Frame 기반에서는 한 OUTPUT 버퍼에 프레임 디코딩에 필요한 모든 slice와 양쪽 field를 넣습니다.

`V4L2_CID_STATELESS_H264_START_CODE`는 OUTPUT 버퍼가 Annex B start code를 포함하는지, start code 없이 NAL 단위부터 시작하는지를 지정합니다. 드라이버가 노출하는 모드만 사용할 수 있으며 애플리케이션은 지원 픽셀 형식만 보고 이 값을 생략해서는 안 됩니다.

H.264 구조체 필드
필드의미
`profile_idc`비트스트림 프로파일 또는 프로파일 식별자입니다.
`constraint_set_flags`원문 구조체의 `constraint_set_flags` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`level_idc`코덱 레벨, 필터 강도 또는 계층 수준입니다. 정확한 의미는 소속 구조체와 코덱 문맥을 따릅니다.
`seq_parameter_set_id`원문 구조체의 `seq_parameter_set_id` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`chroma_format_idc`원문 구조체의 `chroma_format_idc` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`bit_depth_luma_minus8`루마 또는 크로마 샘플의 비트 깊이 파라미터입니다.
`bit_depth_chroma_minus8`루마 또는 크로마 샘플의 비트 깊이 파라미터입니다.
`log2_max_frame_num_minus4`프레임 번호 또는 프레임 식별자입니다.
`pic_order_cnt_type`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`log2_max_pic_order_cnt_lsb_minus4`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`max_num_ref_frames`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`num_ref_frames_in_pic_order_cnt_cycle`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`offset_for_ref_frame[255]`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`offset_for_non_ref_pic`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`offset_for_top_to_bottom_field`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`pic_width_in_mbs_minus1`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`pic_height_in_map_units_minus1`부호화 또는 표시 영상의 높이를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`flags`이 구조체에 적용되는 기능과 비트스트림 상태를 나타내는 비트 플래그입니다. 아래 상수 표의 비트를 조합합니다.
`pic_parameter_set_id`원문 구조체의 `pic_parameter_set_id` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`num_slice_groups_minus1`원문 구조체의 `num_slice_groups_minus1` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`num_ref_idx_l0_default_active_minus1`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`num_ref_idx_l1_default_active_minus1`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`weighted_bipred_idc`가중 예측에 사용하는 가중치 또는 분모 값입니다.
`pic_init_qp_minus26`양자화 계수, 인덱스 또는 QP 보정값입니다.
`pic_init_qs_minus26`원문 구조체의 `pic_init_qs_minus26` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`chroma_qp_index_offset`양자화 계수, 인덱스 또는 QP 보정값입니다.
`second_chroma_qp_index_offset`양자화 계수, 인덱스 또는 QP 보정값입니다.
`scaling_list_4x4[6][16]`역스캔 뒤 래스터 순서로 전달하는 양자화 스케일링 행렬입니다.
`scaling_list_8x8[6][64]`역스캔 뒤 래스터 순서로 전달하는 양자화 스케일링 행렬입니다.
`header_bit_size`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`first_mb_in_slice`원문 구조체의 `first_mb_in_slice` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`slice_type`프레임·그림·슬라이스의 부호화 유형입니다.
`colour_plane_id`색 공간, 전달 함수, Y'CbCr 인코딩 또는 양자화 범위를 나타냅니다.
`redundant_pic_cnt`원문 구조체의 `redundant_pic_cnt` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`cabac_init_idc`원문 구조체의 `cabac_init_idc` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`slice_qp_delta`양자화 계수, 인덱스 또는 QP 보정값입니다.
`slice_qs_delta`기준값에 더하는 코덱 구문상의 차분값입니다.
`disable_deblocking_filter_idc`보간, 디블로킹 또는 복원 필터의 선택값입니다.
`slice_alpha_c0_offset_div2`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`slice_beta_offset_div2`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`num_ref_idx_l0_active_minus1`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`num_ref_idx_l1_active_minus1`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`reserved`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`ref_pic_list0[32]`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`ref_pic_list1[32]`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`luma_log2_weight_denom`가중 예측에 사용하는 가중치 또는 분모 값입니다.
`chroma_log2_weight_denom`가중 예측에 사용하는 가중치 또는 분모 값입니다.
`weight_factors[2]`가중 예측에 사용하는 가중치 또는 분모 값입니다.
`luma_weight[32]`가중 예측에 사용하는 가중치 또는 분모 값입니다.
`luma_offset[32]`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`chroma_weight[32][2]`가중 예측에 사용하는 가중치 또는 분모 값입니다.
`chroma_offset[32][2]`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`fields`원문 구조체의 `fields` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`index`원문 구조체의 `index` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`dpb[16]`원문 구조체의 `dpb[16]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`nal_ref_idc`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`frame_num`프레임 번호 또는 프레임 식별자입니다.
`top_field_order_cnt`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`bottom_field_order_cnt`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`idr_pic_id`원문 구조체의 `idr_pic_id` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`pic_order_cnt_lsb`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`delta_pic_order_cnt_bottom`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`delta_pic_order_cnt0`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`delta_pic_order_cnt1`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`dec_ref_pic_marking_bit_size`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`pic_order_cnt_bit_size`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`slice_group_change_cycle`원문 구조체의 `slice_group_change_cycle` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`reference_ts`참조할 CAPTURE 버퍼를 식별하는 타임스탬프입니다. 디코딩 참조 그림과 큐의 버퍼를 연결합니다.
`pic_num`원문 구조체의 `pic_num` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`reserved[5]`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.

원문의 모든 H.264 payload 필드를 구조체 이름 그대로 보존해 설명합니다.

H.264 제어·플래그 상수
상수의미
`V4L2_CID_STATELESS_H264_SPS``V4L2_CID_STATELESS_H264_SPS`: cid stateless h264 sps 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_H264_SPS_CONSTRAINT_SET0_FLAG``V4L2_H264_SPS_CONSTRAINT_SET0_FLAG`: h264 sps constraint set0 flag 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_CONSTRAINT_SET1_FLAG``V4L2_H264_SPS_CONSTRAINT_SET1_FLAG`: h264 sps constraint set1 flag 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_CONSTRAINT_SET2_FLAG``V4L2_H264_SPS_CONSTRAINT_SET2_FLAG`: h264 sps constraint set2 flag 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_CONSTRAINT_SET3_FLAG``V4L2_H264_SPS_CONSTRAINT_SET3_FLAG`: h264 sps constraint set3 flag 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_CONSTRAINT_SET4_FLAG``V4L2_H264_SPS_CONSTRAINT_SET4_FLAG`: h264 sps constraint set4 flag 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_CONSTRAINT_SET5_FLAG``V4L2_H264_SPS_CONSTRAINT_SET5_FLAG`: h264 sps constraint set5 flag 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE``V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE`: h264 sps flag separate colour plane 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS``V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS`: h264 sps flag qpprime y zero transform bypass 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO``V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO`: h264 sps flag delta pic order always zero 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED``V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED`: h264 sps flag gaps in frame num value allowed 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY``V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY`: h264 sps flag frame mbs only 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD``V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD`: h264 sps flag mb adaptive frame field 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE``V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE`: h264 sps flag direct 8x8 inference 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_H264_PPS``V4L2_CID_STATELESS_H264_PPS`: cid stateless h264 pps 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE``V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE`: h264 pps flag entropy coding mode 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT``V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT`: h264 pps flag bottom field pic order in frame present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_PPS_FLAG_WEIGHTED_PRED``V4L2_H264_PPS_FLAG_WEIGHTED_PRED`: h264 pps flag weighted pred 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT`: h264 pps flag deblocking filter control present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED``V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED`: h264 pps flag constrained intra pred 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT``V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT`: h264 pps flag redundant pic cnt present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE``V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE`: h264 pps flag transform 8x8 mode 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT``V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT`: h264 pps flag scaling matrix present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_H264_SCALING_MATRIX``V4L2_CID_STATELESS_H264_SCALING_MATRIX`: cid stateless h264 scaling matrix 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_CID_STATELESS_H264_SLICE_PARAMS``V4L2_CID_STATELESS_H264_SLICE_PARAMS`: cid stateless h264 slice params 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED``V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED`: h264 slice flag direct spatial mv pred 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH``V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH`: h264 slice flag sp for switch 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_H264_PRED_WEIGHTS``V4L2_CID_STATELESS_H264_PRED_WEIGHTS`: cid stateless h264 pred weights 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_H264_TOP_FIELD_REF``V4L2_H264_TOP_FIELD_REF`: h264 top field ref에 대응하는 UAPI 상수입니다.
`V4L2_H264_BOTTOM_FIELD_REF``V4L2_H264_BOTTOM_FIELD_REF`: h264 bottom field ref에 대응하는 UAPI 상수입니다.
`V4L2_H264_FRAME_REF``V4L2_H264_FRAME_REF`: h264 frame ref에 대응하는 UAPI 상수입니다.
`V4L2_CID_STATELESS_H264_DECODE_PARAMS``V4L2_CID_STATELESS_H264_DECODE_PARAMS`: cid stateless h264 decode params 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC``V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC`: h264 decode param flag idr pic 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC``V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC`: h264 decode param flag field pic 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD``V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD`: h264 decode param flag bottom field 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_DECODE_PARAM_FLAG_PFRAME``V4L2_H264_DECODE_PARAM_FLAG_PFRAME`: h264 decode param flag pframe 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_DECODE_PARAM_FLAG_BFRAME``V4L2_H264_DECODE_PARAM_FLAG_BFRAME`: h264 decode param flag bframe 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_DPB_ENTRY_FLAG_VALID``V4L2_H264_DPB_ENTRY_FLAG_VALID`: h264 dpb entry flag valid 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_DPB_ENTRY_FLAG_ACTIVE``V4L2_H264_DPB_ENTRY_FLAG_ACTIVE`: h264 dpb entry flag active 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM`: h264 dpb entry flag long term 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_H264_DPB_ENTRY_FLAG_FIELD``V4L2_H264_DPB_ENTRY_FLAG_FIELD`: h264 dpb entry flag field 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_H264_DECODE_MODE``V4L2_CID_STATELESS_H264_DECODE_MODE`: cid stateless h264 decode mode 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_PIX_FMT_H264_SLICE``V4L2_PIX_FMT_H264_SLICE`: pix fmt h264 slice에 대응하는 UAPI 상수입니다.
`V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED``V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED`: stateless h264 decode mode slice based 동작 모드 선택값입니다.
`V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF``V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF`: buf cap supports m2m hold capture buf에 대응하는 UAPI 상수입니다.
`V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED``V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED`: stateless h264 decode mode frame based 동작 모드 선택값입니다.
`V4L2_CID_STATELESS_H264_START_CODE``V4L2_CID_STATELESS_H264_START_CODE`: cid stateless h264 start code 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_STATELESS_H264_START_CODE_NONE``V4L2_STATELESS_H264_START_CODE_NONE`: stateless h264 start code none에 대응하는 UAPI 상수입니다.
`V4L2_STATELESS_H264_START_CODE_ANNEX_B``V4L2_STATELESS_H264_START_CODE_ANNEX_B`: stateless h264 start code annex b에 대응하는 UAPI 상수입니다.

SPS/PPS, slice, DPB, decode mode와 start-code 상수 전체입니다.

H.264 request 조립
SPS와 PPS 파싱필요하면 scaling matrix와 prediction weights 구성slice params 및 L0/L1 참조 목록 작성DPB 항목을 CAPTURE timestamp에 연결decode mode와 start-code 형식 설정OUTPUT 버퍼와 controls를 request에 queue

SPS와 PPS부터 참조 그림까지 한 요청의 일관된 상태로 묶습니다.

.. _v4l2-codec-stateless-h264:

``V4L2_CID_STATELESS_H264_SPS (struct)``
    Specifies the sequence parameter set (as extracted from the
    bitstream) for the associated H264 slice data. This includes the
    necessary parameters for configuring a stateless hardware decoding
    pipeline for H264. The bitstream parameters are defined according
    to :ref:`h264`, section 7.4.2.1.1 "Sequence Parameter Set Data
    Semantics". For further documentation, refer to the above
    specification, unless there is an explicit comment stating
    otherwise.

.. c:type:: v4l2_ctrl_h264_sps

.. raw:: latex

    \small

.. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}|

.. flat-table:: struct v4l2_ctrl_h264_sps
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``profile_idc``
      -
    * - __u8
      - ``constraint_set_flags``
      - See :ref:`Sequence Parameter Set Constraints Set Flags <h264_sps_constraints_set_flags>`
    * - __u8
      - ``level_idc``
      -
    * - __u8
      - ``seq_parameter_set_id``
      -
    * - __u8
      - ``chroma_format_idc``
      -
    * - __u8
      - ``bit_depth_luma_minus8``
      -
    * - __u8
      - ``bit_depth_chroma_minus8``
      -
    * - __u8
      - ``log2_max_frame_num_minus4``
      -
    * - __u8
      - ``pic_order_cnt_type``
      -
    * - __u8
      - ``log2_max_pic_order_cnt_lsb_minus4``
      -
    * - __u8
      - ``max_num_ref_frames``
      -
    * - __u8
      - ``num_ref_frames_in_pic_order_cnt_cycle``
      -
    * - __s32
      - ``offset_for_ref_frame[255]``
      -
    * - __s32
      - ``offset_for_non_ref_pic``
      -
    * - __s32
      - ``offset_for_top_to_bottom_field``
      -
    * - __u16
      - ``pic_width_in_mbs_minus1``
      -
    * - __u16
      - ``pic_height_in_map_units_minus1``
      -
    * - __u32
      - ``flags``
      - See :ref:`Sequence Parameter Set Flags <h264_sps_flags>`

.. raw:: latex

    \normalsize

.. _h264_sps_constraints_set_flags:

``Sequence Parameter Set Constraints Set Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_H264_SPS_CONSTRAINT_SET0_FLAG``
      - 0x00000001
      -
    * - ``V4L2_H264_SPS_CONSTRAINT_SET1_FLAG``
      - 0x00000002
      -
    * - ``V4L2_H264_SPS_CONSTRAINT_SET2_FLAG``
      - 0x00000004
      -
    * - ``V4L2_H264_SPS_CONSTRAINT_SET3_FLAG``
      - 0x00000008
      -
    * - ``V4L2_H264_SPS_CONSTRAINT_SET4_FLAG``
      - 0x00000010
      -
    * - ``V4L2_H264_SPS_CONSTRAINT_SET5_FLAG``
      - 0x00000020
      -

.. _h264_sps_flags:

``Sequence Parameter Set Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE``
      - 0x00000001
      -
    * - ``V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS``
      - 0x00000002
      -
    * - ``V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO``
      - 0x00000004
      -
    * - ``V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED``
      - 0x00000008
      -
    * - ``V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY``
      - 0x00000010
      -
    * - ``V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD``
      - 0x00000020
      -
    * - ``V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE``
      - 0x00000040
      -

``V4L2_CID_STATELESS_H264_PPS (struct)``
    Specifies the picture parameter set (as extracted from the
    bitstream) for the associated H264 slice data. This includes the
    necessary parameters for configuring a stateless hardware decoding
    pipeline for H264.  The bitstream parameters are defined according
    to :ref:`h264`, section 7.4.2.2 "Picture Parameter Set RBSP
    Semantics". For further documentation, refer to the above
    specification, unless there is an explicit comment stating
    otherwise.

.. c:type:: v4l2_ctrl_h264_pps

.. raw:: latex

    \small

.. flat-table:: struct v4l2_ctrl_h264_pps
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``pic_parameter_set_id``
      -
    * - __u8
      - ``seq_parameter_set_id``
      -
    * - __u8
      - ``num_slice_groups_minus1``
      -
    * - __u8
      - ``num_ref_idx_l0_default_active_minus1``
      -
    * - __u8
      - ``num_ref_idx_l1_default_active_minus1``
      -
    * - __u8
      - ``weighted_bipred_idc``
      -
    * - __s8
      - ``pic_init_qp_minus26``
      -
    * - __s8
      - ``pic_init_qs_minus26``
      -
    * - __s8
      - ``chroma_qp_index_offset``
      -
    * - __s8
      - ``second_chroma_qp_index_offset``
      -
    * - __u16
      - ``flags``
      - See :ref:`Picture Parameter Set Flags <h264_pps_flags>`

.. raw:: latex

    \normalsize

.. _h264_pps_flags:

``Picture Parameter Set Flags``

.. raw:: latex

    \begingroup
    \scriptsize
    \setlength{\tabcolsep}{2pt}

.. tabularcolumns:: |p{9.8cm}|p{1.0cm}|p{6.5cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       10 1 4

    * - ``V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE``
      - 0x0001
      -
    * - ``V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT``
      - 0x0002
      -
    * - ``V4L2_H264_PPS_FLAG_WEIGHTED_PRED``
      - 0x0004
      -
    * - ``V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
      - 0x0008
      -
    * - ``V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED``
      - 0x0010
      -
    * - ``V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT``
      - 0x0020
      -
    * - ``V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE``
      - 0x0040
      -
    * - ``V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT``
      - 0x0080
      - ``V4L2_CID_STATELESS_H264_SCALING_MATRIX``
        must be used for this picture.

.. raw:: latex

    \endgroup

``V4L2_CID_STATELESS_H264_SCALING_MATRIX (struct)``
    Specifies the scaling matrix (as extracted from the bitstream) for
    the associated H264 slice data. The bitstream parameters are
    defined according to :ref:`h264`, section 7.4.2.1.1.1 "Scaling
    List Semantics". For further documentation, refer to the above
    specification, unless there is an explicit comment stating
    otherwise.

.. c:type:: v4l2_ctrl_h264_scaling_matrix

.. raw:: latex

    \small

.. tabularcolumns:: |p{0.6cm}|p{4.8cm}|p{11.9cm}|

.. flat-table:: struct v4l2_ctrl_h264_scaling_matrix
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``scaling_list_4x4[6][16]``
      - Scaling matrix after applying the inverse scanning process.
        Expected list order is Intra Y, Intra Cb, Intra Cr, Inter Y,
        Inter Cb, Inter Cr. The values on each scaling list are
        expected in raster scan order.
    * - __u8
      - ``scaling_list_8x8[6][64]``
      - Scaling matrix after applying the inverse scanning process.
        Expected list order is Intra Y, Inter Y, Intra Cb, Inter Cb,
        Intra Cr, Inter Cr. The values on each scaling list are
        expected in raster scan order.

``V4L2_CID_STATELESS_H264_SLICE_PARAMS (struct)``
    Specifies the slice parameters (as extracted from the bitstream)
    for the associated H264 slice data. This includes the necessary
    parameters for configuring a stateless hardware decoding pipeline
    for H264.  The bitstream parameters are defined according to
    :ref:`h264`, section 7.4.3 "Slice Header Semantics". For further
    documentation, refer to the above specification, unless there is
    an explicit comment stating otherwise.

.. c:type:: v4l2_ctrl_h264_slice_params

.. raw:: latex

    \small

.. tabularcolumns:: |p{4.0cm}|p{5.9cm}|p{7.4cm}|

.. flat-table:: struct v4l2_ctrl_h264_slice_params
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u32
      - ``header_bit_size``
      - Offset in bits to slice_data() from the beginning of this slice.
    * - __u32
      - ``first_mb_in_slice``
      -
    * - __u8
      - ``slice_type``
      -
    * - __u8
      - ``colour_plane_id``
      -
    * - __u8
      - ``redundant_pic_cnt``
      -
    * - __u8
      - ``cabac_init_idc``
      -
    * - __s8
      - ``slice_qp_delta``
      -
    * - __s8
      - ``slice_qs_delta``
      -
    * - __u8
      - ``disable_deblocking_filter_idc``
      -
    * - __s8
      - ``slice_alpha_c0_offset_div2``
      -
    * - __s8
      - ``slice_beta_offset_div2``
      -
    * - __u8
      - ``num_ref_idx_l0_active_minus1``
      - If num_ref_idx_active_override_flag is not set, this field must be
        set to the value of num_ref_idx_l0_default_active_minus1
    * - __u8
      - ``num_ref_idx_l1_active_minus1``
      - If num_ref_idx_active_override_flag is not set, this field must be
        set to the value of num_ref_idx_l1_default_active_minus1
    * - __u8
      - ``reserved``
      - Applications and drivers must set this to zero.
    * - struct :c:type:`v4l2_h264_reference`
      - ``ref_pic_list0[32]``
      - Reference picture list after applying the per-slice modifications
    * - struct :c:type:`v4l2_h264_reference`
      - ``ref_pic_list1[32]``
      - Reference picture list after applying the per-slice modifications
    * - __u32
      - ``flags``
      - See :ref:`Slice Parameter Flags <h264_slice_flags>`

.. raw:: latex

    \normalsize

.. _h264_slice_flags:

``Slice Parameter Set Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED``
      - 0x00000001
      -
    * - ``V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH``
      - 0x00000002
      -

``V4L2_CID_STATELESS_H264_PRED_WEIGHTS (struct)``
    Prediction weight table defined according to :ref:`h264`,
    section 7.4.3.2 "Prediction Weight Table Semantics".
    The prediction weight table must be passed by applications
    under the conditions explained in section 7.3.3 "Slice header
    syntax".

.. c:type:: v4l2_ctrl_h264_pred_weights

.. raw:: latex

    \small

.. tabularcolumns:: |p{4.9cm}|p{4.9cm}|p{7.5cm}|

.. flat-table:: struct v4l2_ctrl_h264_pred_weights
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u16
      - ``luma_log2_weight_denom``
      -
    * - __u16
      - ``chroma_log2_weight_denom``
      -
    * - struct :c:type:`v4l2_h264_weight_factors`
      - ``weight_factors[2]``
      - The weight factors at index 0 are the weight factors for the reference
        list 0, the one at index 1 for the reference list 1.

.. raw:: latex

    \normalsize

.. c:type:: v4l2_h264_weight_factors

.. raw:: latex

    \small

.. tabularcolumns:: |p{1.0cm}|p{4.5cm}|p{11.8cm}|

.. flat-table:: struct v4l2_h264_weight_factors
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __s16
      - ``luma_weight[32]``
      -
    * - __s16
      - ``luma_offset[32]``
      -
    * - __s16
      - ``chroma_weight[32][2]``
      -
    * - __s16
      - ``chroma_offset[32][2]``
      -

.. raw:: latex

    \normalsize

``Picture Reference``

.. c:type:: v4l2_h264_reference

.. cssclass:: longtable

.. flat-table:: struct v4l2_h264_reference
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``fields``
      - Specifies how the picture is referenced. See :ref:`Reference Fields <h264_ref_fields>`
    * - __u8
      - ``index``
      - Index into the :c:type:`v4l2_ctrl_h264_decode_params`.dpb array.

.. _h264_ref_fields:

``Reference Fields``

.. raw:: latex

    \small

.. tabularcolumns:: |p{5.4cm}|p{0.8cm}|p{11.1cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_H264_TOP_FIELD_REF``
      - 0x1
      - The top field in field pair is used for short-term reference.
    * - ``V4L2_H264_BOTTOM_FIELD_REF``
      - 0x2
      - The bottom field in field pair is used for short-term reference.
    * - ``V4L2_H264_FRAME_REF``
      - 0x3
      - The frame (or the top/bottom fields, if it's a field pair)
        is used for short-term reference.

.. raw:: latex

    \normalsize

``V4L2_CID_STATELESS_H264_DECODE_PARAMS (struct)``
    Specifies the decode parameters (as extracted from the bitstream)
    for the associated H264 slice data. This includes the necessary
    parameters for configuring a stateless hardware decoding pipeline
    for H264. The bitstream parameters are defined according to
    :ref:`h264`. For further documentation, refer to the above
    specification, unless there is an explicit comment stating
    otherwise.

.. c:type:: v4l2_ctrl_h264_decode_params

.. raw:: latex

    \small

.. tabularcolumns:: |p{4.0cm}|p{5.9cm}|p{7.4cm}|

.. flat-table:: struct v4l2_ctrl_h264_decode_params
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - struct :c:type:`v4l2_h264_dpb_entry`
      - ``dpb[16]``
      -
    * - __u16
      - ``nal_ref_idc``
      - NAL reference ID value coming from the NAL Unit header
    * - __u16
      - ``frame_num``
      -
    * - __s32
      - ``top_field_order_cnt``
      - Picture Order Count for the coded top field
    * - __s32
      - ``bottom_field_order_cnt``
      - Picture Order Count for the coded bottom field
    * - __u16
      - ``idr_pic_id``
      -
    * - __u16
      - ``pic_order_cnt_lsb``
      -
    * - __s32
      - ``delta_pic_order_cnt_bottom``
      -
    * - __s32
      - ``delta_pic_order_cnt0``
      -
    * - __s32
      - ``delta_pic_order_cnt1``
      -
    * - __u32
      - ``dec_ref_pic_marking_bit_size``
      - Size in bits of the dec_ref_pic_marking() syntax element.
    * - __u32
      - ``pic_order_cnt_bit_size``
      - Combined size in bits of the picture order count related syntax
        elements: pic_order_cnt_lsb, delta_pic_order_cnt_bottom,
        delta_pic_order_cnt0, and delta_pic_order_cnt1.
    * - __u32
      - ``slice_group_change_cycle``
      -
    * - __u32
      - ``reserved``
      - Applications and drivers must set this to zero.
    * - __u32
      - ``flags``
      - See :ref:`Decode Parameters Flags <h264_decode_params_flags>`

.. raw:: latex

    \normalsize

.. _h264_decode_params_flags:

``Decode Parameters Flags``

.. raw:: latex

    \small

.. tabularcolumns:: |p{8.3cm}|p{2.1cm}|p{6.9cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC``
      - 0x00000001
      - That picture is an IDR picture
    * - ``V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC``
      - 0x00000002
      -
    * - ``V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD``
      - 0x00000004
      -
    * - ``V4L2_H264_DECODE_PARAM_FLAG_PFRAME``
      - 0x00000008
      -
    * - ``V4L2_H264_DECODE_PARAM_FLAG_BFRAME``
      - 0x00000010
      -

.. raw:: latex

    \normalsize

.. c:type:: v4l2_h264_dpb_entry

.. raw:: latex

    \small

.. tabularcolumns:: |p{1.0cm}|p{4.9cm}|p{11.4cm}|

.. flat-table:: struct v4l2_h264_dpb_entry
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u64
      - ``reference_ts``
      - Timestamp of the V4L2 capture buffer to use as reference, used
        with B-coded and P-coded frames. The timestamp refers to the
        ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
        :c:func:`v4l2_timeval_to_ns()` function to convert the struct
        :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
    * - __u32
      - ``pic_num``
      - For short term references, this must match the derived value PicNum
	(8-28) and for long term references it must match the derived value
	LongTermPicNum (8-29). When decoding frames (as opposed to fields)
	pic_num is the same as FrameNumWrap.
    * - __u16
      - ``frame_num``
      - For short term references, this must match the frame_num value from
	the slice header syntax (the driver will wrap the value if needed). For
	long term references, this must be set to the value of
	long_term_frame_idx described in the dec_ref_pic_marking() syntax.
    * - __u8
      - ``fields``
      - Specifies how the DPB entry is referenced. See :ref:`Reference Fields <h264_ref_fields>`
    * - __u8
      - ``reserved[5]``
      - Applications and drivers must set this to zero.
    * - __s32
      - ``top_field_order_cnt``
      -
    * - __s32
      - ``bottom_field_order_cnt``
      -
    * - __u32
      - ``flags``
      - See :ref:`DPB Entry Flags <h264_dpb_flags>`

.. raw:: latex

    \normalsize

.. _h264_dpb_flags:

``DPB Entries Flags``

.. raw:: latex

    \small

.. tabularcolumns:: |p{7.7cm}|p{2.1cm}|p{7.5cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_H264_DPB_ENTRY_FLAG_VALID``
      - 0x00000001
      - The DPB entry is valid (non-empty) and should be considered.
    * - ``V4L2_H264_DPB_ENTRY_FLAG_ACTIVE``
      - 0x00000002
      - The DPB entry is used for reference.
    * - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``
      - 0x00000004
      - The DPB entry is used for long-term reference.
    * - ``V4L2_H264_DPB_ENTRY_FLAG_FIELD``
      - 0x00000008
      - The DPB entry is a single field or a complementary field pair.

.. raw:: latex

    \normalsize

``V4L2_CID_STATELESS_H264_DECODE_MODE (enum)``
    Specifies the decoding mode to use. Currently exposes slice-based and
    frame-based decoding but new modes might be added later on.
    This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
    pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
    are required to set this control in order to specify the decoding mode
    that is expected for the buffer.
    Drivers may expose a single or multiple decoding modes, depending
    on what they can support.

.. c:type:: v4l2_stateless_h264_decode_mode

.. raw:: latex

    \scriptsize

.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED``
      - 0
      - Decoding is done at the slice granularity.
        The OUTPUT buffer must contain a single slice.
        When this mode is selected, the ``V4L2_CID_STATELESS_H264_SLICE_PARAMS``
        control shall be set. When multiple slices compose a frame,
        use of ``V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF`` flag
        is required.
    * - ``V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED``
      - 1
      - Decoding is done at the frame granularity,
        The OUTPUT buffer must contain all slices needed to decode the
        frame. The OUTPUT buffer must also contain both fields.
        This mode will be supported by devices that
        parse the slice(s) header(s) in hardware. When this mode is
        selected, the ``V4L2_CID_STATELESS_H264_SLICE_PARAMS``
        control shall not be set.

.. raw:: latex

    \normalsize

``V4L2_CID_STATELESS_H264_START_CODE (enum)``
    Specifies the H264 slice start code expected for each slice.
    This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
    pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
    are required to set this control in order to specify the start code
    that is expected for the buffer.
    Drivers may expose a single or multiple start codes, depending
    on what they can support.

.. c:type:: v4l2_stateless_h264_start_code

.. raw:: latex

    \small

.. tabularcolumns:: |p{7.9cm}|p{0.4cm}|p{9.0cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       4 1 4

    * - ``V4L2_STATELESS_H264_START_CODE_NONE``
      - 0
      - Selecting this value specifies that H264 slices are passed
        to the driver without any start code. The bitstream data should be
        according to :ref:`h264` 7.3.1 NAL unit syntax, hence contains
        emulation prevention bytes when required.
    * - ``V4L2_STATELESS_H264_START_CODE_ANNEX_B``
      - 1
      - Selecting this value specifies that H264 slices are expected
        to be prefixed by Annex B start codes. According to :ref:`h264`
        valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.

.. raw:: latex

    \normalsize

FWHT stateless 제어

797-925

`V4L2_CID_STATELESS_FWHT_PARAMS`는 FWHT 프레임 헤더의 모든 필드를 `v4l2_ctrl_fwht_params`로 전달합니다. backward reference timestamp, 헤더 version, frame width/height, 코덱 flags와 colorimetry가 포함됩니다.

`backward_ref_ts`가 0이면 intra-coded frame이고, 0이 아니면 참조할 CAPTURE 버퍼의 timestamp입니다. `version`은 FWHT bitstream version과 일치해야 하며 width와 height는 실제 프레임 크기를 나타냅니다.

FWHT flags는 interlaced 여부, bottom-first, alternate field, bottom field, luma·chroma uncompressed 상태와 component 수를 나타냅니다. `colorspace`, `xfer_func`, `ycbcr_enc`, `quantization`은 V4L2 colorimetry 열거형 값을 사용합니다.

FWHT 구조체 필드
필드의미
`backward_ref_ts`참조할 CAPTURE 버퍼를 식별하는 타임스탬프입니다. 디코딩 참조 그림과 큐의 버퍼를 연결합니다.
`version`원문 구조체의 `version` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`width`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`height`부호화 또는 표시 영상의 높이를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`flags`이 구조체에 적용되는 기능과 비트스트림 상태를 나타내는 비트 플래그입니다. 아래 상수 표의 비트를 조합합니다.
`colorspace`색 공간, 전달 함수, Y'CbCr 인코딩 또는 양자화 범위를 나타냅니다.
`xfer_func`색 공간, 전달 함수, Y'CbCr 인코딩 또는 양자화 범위를 나타냅니다.
`ycbcr_enc`색 공간, 전달 함수, Y'CbCr 인코딩 또는 양자화 범위를 나타냅니다.
`quantization`양자화 계수, 인덱스 또는 QP 보정값입니다.

FWHT payload의 필드를 원문 순서대로 추적합니다.

FWHT 상수와 플래그
상수의미
`V4L2_CID_STATELESS_FWHT_PARAMS``V4L2_CID_STATELESS_FWHT_PARAMS`: cid stateless fwht params 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_FWHT_VERSION``V4L2_FWHT_VERSION`: fwht version에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_IS_INTERLACED``V4L2_FWHT_FL_IS_INTERLACED`: fwht fl is interlaced에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_IS_BOTTOM_FIRST``V4L2_FWHT_FL_IS_BOTTOM_FIRST`: fwht fl is bottom first에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_IS_ALTERNATE``V4L2_FWHT_FL_IS_ALTERNATE`: fwht fl is alternate에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_IS_BOTTOM_FIELD``V4L2_FWHT_FL_IS_BOTTOM_FIELD`: fwht fl is bottom field에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED``V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED`: fwht fl luma is uncompressed에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_CB_IS_UNCOMPRESSED``V4L2_FWHT_FL_CB_IS_UNCOMPRESSED`: fwht fl cb is uncompressed에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_CR_IS_UNCOMPRESSED``V4L2_FWHT_FL_CR_IS_UNCOMPRESSED`: fwht fl cr is uncompressed에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_CHROMA_FULL_HEIGHT``V4L2_FWHT_FL_CHROMA_FULL_HEIGHT`: fwht fl chroma full height에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_CHROMA_FULL_WIDTH``V4L2_FWHT_FL_CHROMA_FULL_WIDTH`: fwht fl chroma full width에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED``V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED`: fwht fl alpha is uncompressed에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_I_FRAME``V4L2_FWHT_FL_I_FRAME`: fwht fl i frame에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_COMPONENTS_NUM_MSK``V4L2_FWHT_FL_COMPONENTS_NUM_MSK`: fwht fl components num msk에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_PIXENC_MSK``V4L2_FWHT_FL_PIXENC_MSK`: fwht fl pixenc msk에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_PIXENC_YUV``V4L2_FWHT_FL_PIXENC_YUV`: fwht fl pixenc yuv에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_PIXENC_RGB``V4L2_FWHT_FL_PIXENC_RGB`: fwht fl pixenc rgb에 대응하는 UAPI 상수입니다.
`V4L2_FWHT_FL_PIXENC_HSV``V4L2_FWHT_FL_PIXENC_HSV`: fwht fl pixenc hsv에 대응하는 UAPI 상수입니다.

FWHT frame header를 해석하는 UAPI 상수입니다.

.. _codec-stateless-fwht:

``V4L2_CID_STATELESS_FWHT_PARAMS (struct)``
    Specifies the FWHT (Fast Walsh Hadamard Transform) parameters (as extracted
    from the bitstream) for the associated FWHT data. This includes the necessary
    parameters for configuring a stateless hardware decoding pipeline for FWHT.
    This codec is specific to the vicodec test driver.

.. c:type:: v4l2_ctrl_fwht_params

.. raw:: latex

    \small

.. tabularcolumns:: |p{1.4cm}|p{3.9cm}|p{12.0cm}|

.. flat-table:: struct v4l2_ctrl_fwht_params
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u64
      - ``backward_ref_ts``
      - Timestamp of the V4L2 capture buffer to use as backward reference, used
        with P-coded frames. The timestamp refers to the
	``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
	:c:func:`v4l2_timeval_to_ns()` function to convert the struct
	:c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
    * - __u32
      - ``version``
      - The version of the codec. Set to ``V4L2_FWHT_VERSION``.
    * - __u32
      - ``width``
      - The width of the frame.
    * - __u32
      - ``height``
      - The height of the frame.
    * - __u32
      - ``flags``
      - The flags of the frame, see :ref:`fwht-flags`.
    * - __u32
      - ``colorspace``
      - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.
    * - __u32
      - ``xfer_func``
      - The transfer function, from enum :c:type:`v4l2_xfer_func`.
    * - __u32
      - ``ycbcr_enc``
      - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
    * - __u32
      - ``quantization``
      - The quantization range, from enum :c:type:`v4l2_quantization`.

.. raw:: latex

    \normalsize

.. _fwht-flags:

FWHT Flags
==========

.. raw:: latex

    \small

.. tabularcolumns:: |p{7.0cm}|p{2.3cm}|p{8.0cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       3 1 4

    * - ``V4L2_FWHT_FL_IS_INTERLACED``
      - 0x00000001
      - Set if this is an interlaced format.
    * - ``V4L2_FWHT_FL_IS_BOTTOM_FIRST``
      - 0x00000002
      - Set if this is a bottom-first (NTSC) interlaced format.
    * - ``V4L2_FWHT_FL_IS_ALTERNATE``
      - 0x00000004
      - Set if each 'frame' contains just one field.
    * - ``V4L2_FWHT_FL_IS_BOTTOM_FIELD``
      - 0x00000008
      - If V4L2_FWHT_FL_IS_ALTERNATE was set, then this is set if this 'frame' is the
	bottom field, else it is the top field.
    * - ``V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED``
      - 0x00000010
      - Set if the Y' (luma) plane is uncompressed.
    * - ``V4L2_FWHT_FL_CB_IS_UNCOMPRESSED``
      - 0x00000020
      - Set if the Cb plane is uncompressed.
    * - ``V4L2_FWHT_FL_CR_IS_UNCOMPRESSED``
      - 0x00000040
      - Set if the Cr plane is uncompressed.
    * - ``V4L2_FWHT_FL_CHROMA_FULL_HEIGHT``
      - 0x00000080
      - Set if the chroma plane has the same height as the luma plane,
	else the chroma plane is half the height of the luma plane.
    * - ``V4L2_FWHT_FL_CHROMA_FULL_WIDTH``
      - 0x00000100
      - Set if the chroma plane has the same width as the luma plane,
	else the chroma plane is half the width of the luma plane.
    * - ``V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED``
      - 0x00000200
      - Set if the alpha plane is uncompressed.
    * - ``V4L2_FWHT_FL_I_FRAME``
      - 0x00000400
      - Set if this is an I-frame.
    * - ``V4L2_FWHT_FL_COMPONENTS_NUM_MSK``
      - 0x00070000
      - The number of color components minus one.
    * - ``V4L2_FWHT_FL_PIXENC_MSK``
      - 0x00180000
      - The mask for the pixel encoding.
    * - ``V4L2_FWHT_FL_PIXENC_YUV``
      - 0x00080000
      - Set if the pixel encoding is YUV.
    * - ``V4L2_FWHT_FL_PIXENC_RGB``
      - 0x00100000
      - Set if the pixel encoding is RGB.
    * - ``V4L2_FWHT_FL_PIXENC_HSV``
      - 0x00180000
      - Set if the pixel encoding is HSV.

.. raw:: latex

    \normalsize

VP8 stateless 제어

926-1259

`V4L2_CID_STATELESS_VP8_FRAME`은 하나의 VP8 프레임을 디코딩하는 데 필요한 상태를 `v4l2_ctrl_vp8_frame`으로 전달합니다. segmentation, loop filter, quantization, entropy, boolean coder state와 coded/render 크기, 확률, partition 크기, 참조 timestamp 및 frame flags가 한 payload에 들어갑니다.

`last_frame_ts`, `golden_frame_ts`, `alt_frame_ts`는 각각 VP8 LAST, GOLDEN, ALTREF 참조를 제공한 CAPTURE 버퍼의 timestamp입니다. 관련 참조가 유효하지 않거나 key frame인 경우에는 원문이 지정한 0 값을 사용합니다.

Frame flags는 key frame, experiment version, show frame, MB no-skip coefficient, sign bias와 entropy/last/golden/alt refresh, segmentation enabled/update map/update feature data를 표시합니다. 애플리케이션은 uncompressed header와 first partition에서 얻은 상태를 정확히 반영해야 합니다.

`v4l2_vp8_entropy_coder_state`는 range, value, bit count를 전달하고 `v4l2_vp8_segment`는 세그먼트별 quantizer와 loop-filter 보정, segment probabilities와 absolute/delta mode를 담습니다. `v4l2_vp8_loop_filter`는 reference 및 macroblock mode delta, sharpness와 level을 제공하며 simple filter와 adjustment 플래그를 구분합니다.

`v4l2_vp8_quantization`은 Y AC 기준 인덱스와 Y DC, Y2 DC/AC, UV DC/AC delta를 전달합니다. `v4l2_vp8_entropy`는 coefficient, Y/UV mode와 motion-vector 확률을 담아 하드웨어 entropy decoder 상태를 완성합니다.

VP8 구조체 필드
필드의미
`segment`세그먼테이션 상태, 세그먼트 식별자 또는 세그먼트별 기능 데이터입니다.
`lf`원문 구조체의 `lf` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`quant`양자화 계수, 인덱스 또는 QP 보정값입니다.
`entropy`원문 구조체의 `entropy` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`coder_state`원문 구조체의 `coder_state` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`width`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`height`부호화 또는 표시 영상의 높이를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`horizontal_scale`원문 구조체의 `horizontal_scale` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`vertical_scale`원문 구조체의 `vertical_scale` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`version`원문 구조체의 `version` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`prob_skip_false`엔트로피 부호화에 사용하는 확률 값 또는 확률 배열입니다.
`prob_intra`엔트로피 부호화에 사용하는 확률 값 또는 확률 배열입니다.
`prob_last`엔트로피 부호화에 사용하는 확률 값 또는 확률 배열입니다.
`prob_gf`엔트로피 부호화에 사용하는 확률 값 또는 확률 배열입니다.
`num_dct_parts`원문 구조체의 `num_dct_parts` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`first_part_size`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`first_part_header_bits`원문 구조체의 `first_part_header_bits` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`dct_part_sizes[8]`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`last_frame_ts`참조할 CAPTURE 버퍼를 식별하는 타임스탬프입니다. 디코딩 참조 그림과 큐의 버퍼를 연결합니다.
`golden_frame_ts`참조할 CAPTURE 버퍼를 식별하는 타임스탬프입니다. 디코딩 참조 그림과 큐의 버퍼를 연결합니다.
`alt_frame_ts`참조할 CAPTURE 버퍼를 식별하는 타임스탬프입니다. 디코딩 참조 그림과 큐의 버퍼를 연결합니다.
`flags`이 구조체에 적용되는 기능과 비트스트림 상태를 나타내는 비트 플래그입니다. 아래 상수 표의 비트를 조합합니다.
`range`원문 구조체의 `range` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`value`원문 구조체의 `value` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`bit_count`원문 구조체의 `bit_count` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`padding`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`quant_update[4]`양자화 계수, 인덱스 또는 QP 보정값입니다.
`lf_update[4]`인루프 필터의 설정, 강도 또는 보정값입니다.
`segment_probs[3]`엔트로피 부호화에 사용하는 확률 값 또는 확률 배열입니다.
`ref_frm_delta[4]`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`mb_mode_delta[4]`기준값에 더하는 코덱 구문상의 차분값입니다.
`sharpness_level`코덱 레벨, 필터 강도 또는 계층 수준입니다. 정확한 의미는 소속 구조체와 코덱 문맥을 따릅니다.
`level`코덱 레벨, 필터 강도 또는 계층 수준입니다. 정확한 의미는 소속 구조체와 코덱 문맥을 따릅니다.
`y_ac_qi`양자화 계수, 인덱스 또는 QP 보정값입니다.
`y_dc_delta`기준값에 더하는 코덱 구문상의 차분값입니다.
`y2_dc_delta`기준값에 더하는 코덱 구문상의 차분값입니다.
`y2_ac_delta`기준값에 더하는 코덱 구문상의 차분값입니다.
`uv_dc_delta`기준값에 더하는 코덱 구문상의 차분값입니다.
`uv_ac_delta`기준값에 더하는 코덱 구문상의 차분값입니다.
`coeff_probs[4][8][3][11]`엔트로피 부호화에 사용하는 확률 값 또는 확률 배열입니다.
`y_mode_probs[4]`엔트로피 부호화에 사용하는 확률 값 또는 확률 배열입니다.
`uv_mode_probs[3]`엔트로피 부호화에 사용하는 확률 값 또는 확률 배열입니다.
`mv_probs[2][19]`엔트로피 부호화에 사용하는 확률 값 또는 확률 배열입니다.
`padding[3]`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.

프레임, coder, segment, loop filter, quantization과 entropy 필드 전체입니다.

VP8 상수와 플래그
상수의미
`V4L2_CID_STATELESS_VP8_FRAME``V4L2_CID_STATELESS_VP8_FRAME`: cid stateless vp8 frame 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_VP8_FRAME_FLAG_KEY_FRAME``V4L2_VP8_FRAME_FLAG_KEY_FRAME`: vp8 frame flag key frame 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP8_FRAME_FLAG_EXPERIMENTAL``V4L2_VP8_FRAME_FLAG_EXPERIMENTAL`: vp8 frame flag experimental 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP8_FRAME_FLAG_SHOW_FRAME``V4L2_VP8_FRAME_FLAG_SHOW_FRAME`: vp8 frame flag show frame 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF``V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF`: vp8 frame flag mb no skip coeff 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN`: vp8 frame flag sign bias golden 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT`: vp8 frame flag sign bias alt 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP8_SEGMENT_FLAG_ENABLED``V4L2_VP8_SEGMENT_FLAG_ENABLED`: vp8 segment flag enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP``V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP`: vp8 segment flag update map 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA``V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA`: vp8 segment flag update feature data 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE``V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE`: vp8 segment flag delta value mode 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP8_LF_ADJ_ENABLE``V4L2_VP8_LF_ADJ_ENABLE`: vp8 lf adj enable에 대응하는 UAPI 상수입니다.
`V4L2_VP8_LF_DELTA_UPDATE``V4L2_VP8_LF_DELTA_UPDATE`: vp8 lf delta update에 대응하는 UAPI 상수입니다.
`V4L2_VP8_LF_FILTER_TYPE_SIMPLE``V4L2_VP8_LF_FILTER_TYPE_SIMPLE`: vp8 lf filter type simple에 대응하는 UAPI 상수입니다.

VP8 frame·segment·loop-filter 상태 비트입니다.

VP8 frame request
VP8 frame tag와 uncompressed header 파싱Segmentation·loop filter·quantization 구성Entropy probability와 coder state 구성LAST·GOLDEN·ALTREF timestamp 연결Partition 크기와 frame flags 설정Frame control과 OUTPUT buffer queue

Uncompressed header와 partition 정보를 참조 버퍼 상태에 결합합니다.

.. _v4l2-codec-stateless-vp8:

``V4L2_CID_STATELESS_VP8_FRAME (struct)``
    Specifies the frame parameters for the associated VP8 parsed frame data.
    This includes the necessary parameters for
    configuring a stateless hardware decoding pipeline for VP8.
    The bitstream parameters are defined according to :ref:`vp8`.

.. c:type:: v4l2_ctrl_vp8_frame

.. raw:: latex

    \small

.. tabularcolumns:: |p{7.0cm}|p{4.6cm}|p{5.7cm}|

.. cssclass:: longtable

.. flat-table:: struct v4l2_ctrl_vp8_frame
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - struct :c:type:`v4l2_vp8_segment`
      - ``segment``
      - Structure with segment-based adjustments metadata.
    * - struct :c:type:`v4l2_vp8_loop_filter`
      - ``lf``
      - Structure with loop filter level adjustments metadata.
    * - struct :c:type:`v4l2_vp8_quantization`
      - ``quant``
      - Structure with VP8 dequantization indices metadata.
    * - struct :c:type:`v4l2_vp8_entropy`
      - ``entropy``
      - Structure with VP8 entropy coder probabilities metadata.
    * - struct :c:type:`v4l2_vp8_entropy_coder_state`
      - ``coder_state``
      - Structure with VP8 entropy coder state.
    * - __u16
      - ``width``
      - The width of the frame. Must be set for all frames.
    * - __u16
      - ``height``
      - The height of the frame. Must be set for all frames.
    * - __u8
      - ``horizontal_scale``
      - Horizontal scaling factor.
    * - __u8
      - ``vertical_scale``
      - Vertical scaling factor.
    * - __u8
      - ``version``
      - Bitstream version.
    * - __u8
      - ``prob_skip_false``
      - Indicates the probability that the macroblock is not skipped.
    * - __u8
      - ``prob_intra``
      - Indicates the probability that a macroblock is intra-predicted.
    * - __u8
      - ``prob_last``
      - Indicates the probability that the last reference frame is used
        for inter-prediction
    * - __u8
      - ``prob_gf``
      - Indicates the probability that the golden reference frame is used
        for inter-prediction
    * - __u8
      - ``num_dct_parts``
      - Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8.
    * - __u32
      - ``first_part_size``
      - Size of the first partition, i.e. the control partition.
    * - __u32
      - ``first_part_header_bits``
      - Size in bits of the first partition header portion.
    * - __u32
      - ``dct_part_sizes[8]``
      - DCT coefficients sizes.
    * - __u64
      - ``last_frame_ts``
      - Timestamp for the V4L2 capture buffer to use as last reference frame, used
        with inter-coded frames. The timestamp refers to the ``timestamp`` field in
	struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
	function to convert the struct :c:type:`timeval` in struct
	:c:type:`v4l2_buffer` to a __u64.
    * - __u64
      - ``golden_frame_ts``
      - Timestamp for the V4L2 capture buffer to use as last reference frame, used
        with inter-coded frames. The timestamp refers to the ``timestamp`` field in
	struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
	function to convert the struct :c:type:`timeval` in struct
	:c:type:`v4l2_buffer` to a __u64.
    * - __u64
      - ``alt_frame_ts``
      - Timestamp for the V4L2 capture buffer to use as alternate reference frame, used
        with inter-coded frames. The timestamp refers to the ``timestamp`` field in
	struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
	function to convert the struct :c:type:`timeval` in struct
	:c:type:`v4l2_buffer` to a __u64.
    * - __u64
      - ``flags``
      - See :ref:`Frame Flags <vp8_frame_flags>`

.. raw:: latex

    \normalsize

.. _vp8_frame_flags:

``Frame Flags``

.. tabularcolumns:: |p{9.8cm}|p{0.8cm}|p{6.7cm}|

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP8_FRAME_FLAG_KEY_FRAME``
      - 0x01
      - Indicates if the frame is a key frame.
    * - ``V4L2_VP8_FRAME_FLAG_EXPERIMENTAL``
      - 0x02
      - Experimental bitstream.
    * - ``V4L2_VP8_FRAME_FLAG_SHOW_FRAME``
      - 0x04
      - Show frame flag, indicates if the frame is for display.
    * - ``V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF``
      - 0x08
      - Enable/disable skipping of macroblocks with no non-zero coefficients.
    * - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN``
      - 0x10
      - Sign of motion vectors when the golden frame is referenced.
    * - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT``
      - 0x20
      - Sign of motion vectors when the alt frame is referenced.

.. c:type:: v4l2_vp8_entropy_coder_state

.. cssclass:: longtable

.. tabularcolumns:: |p{1.0cm}|p{2.0cm}|p{14.3cm}|

.. flat-table:: struct v4l2_vp8_entropy_coder_state
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``range``
      - coder state value for "Range"
    * - __u8
      - ``value``
      - coder state value for "Value"-
    * - __u8
      - ``bit_count``
      - number of bits left.
    * - __u8
      - ``padding``
      - Applications and drivers must set this to zero.

.. c:type:: v4l2_vp8_segment

.. cssclass:: longtable

.. tabularcolumns:: |p{1.2cm}|p{4.0cm}|p{12.1cm}|

.. flat-table:: struct v4l2_vp8_segment
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __s8
      - ``quant_update[4]``
      - Signed quantizer value update.
    * - __s8
      - ``lf_update[4]``
      - Signed loop filter level value update.
    * - __u8
      - ``segment_probs[3]``
      - Segment probabilities.
    * - __u8
      - ``padding``
      - Applications and drivers must set this to zero.
    * - __u32
      - ``flags``
      - See :ref:`Segment Flags <vp8_segment_flags>`

.. _vp8_segment_flags:

``Segment Flags``

.. raw:: latex

    \small

.. tabularcolumns:: |p{10cm}|p{1.0cm}|p{6.3cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP8_SEGMENT_FLAG_ENABLED``
      - 0x01
      - Enable/disable segment-based adjustments.
    * - ``V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP``
      - 0x02
      - Indicates if the macroblock segmentation map is updated in this frame.
    * - ``V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA``
      - 0x04
      - Indicates if the segment feature data is updated in this frame.
    * - ``V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE``
      - 0x08
      - If is set, the segment feature data mode is delta-value.
        If cleared, it's absolute-value.

.. raw:: latex

    \normalsize

.. c:type:: v4l2_vp8_loop_filter

.. cssclass:: longtable

.. tabularcolumns:: |p{1.5cm}|p{3.9cm}|p{11.9cm}|

.. flat-table:: struct v4l2_vp8_loop_filter
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __s8
      - ``ref_frm_delta[4]``
      - Reference adjustment (signed) delta value.
    * - __s8
      - ``mb_mode_delta[4]``
      - Macroblock prediction mode adjustment (signed) delta value.
    * - __u8
      - ``sharpness_level``
      - Sharpness level
    * - __u8
      - ``level``
      - Filter level
    * - __u16
      - ``padding``
      - Applications and drivers must set this to zero.
    * - __u32
      - ``flags``
      - See :ref:`Loop Filter Flags <vp8_loop_filter_flags>`

.. _vp8_loop_filter_flags:

``Loop Filter Flags``

.. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP8_LF_ADJ_ENABLE``
      - 0x01
      - Enable/disable macroblock-level loop filter adjustment.
    * - ``V4L2_VP8_LF_DELTA_UPDATE``
      - 0x02
      - Indicates if the delta values used in an adjustment are updated.
    * - ``V4L2_VP8_LF_FILTER_TYPE_SIMPLE``
      - 0x04
      - If set, indicates the filter type is simple.
        If cleared, the filter type is normal.

.. c:type:: v4l2_vp8_quantization

.. tabularcolumns:: |p{1.5cm}|p{3.5cm}|p{12.3cm}|

.. flat-table:: struct v4l2_vp8_quantization
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``y_ac_qi``
      - Luma AC coefficient table index.
    * - __s8
      - ``y_dc_delta``
      - Luma DC delta value.
    * - __s8
      - ``y2_dc_delta``
      - Y2 block DC delta value.
    * - __s8
      - ``y2_ac_delta``
      - Y2 block AC delta value.
    * - __s8
      - ``uv_dc_delta``
      - Chroma DC delta value.
    * - __s8
      - ``uv_ac_delta``
      - Chroma AC delta value.
    * - __u16
      - ``padding``
      - Applications and drivers must set this to zero.

.. c:type:: v4l2_vp8_entropy

.. cssclass:: longtable

.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|

.. flat-table:: struct v4l2_vp8_entropy
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``coeff_probs[4][8][3][11]``
      - Coefficient update probabilities.
    * - __u8
      - ``y_mode_probs[4]``
      - Luma mode update probabilities.
    * - __u8
      - ``uv_mode_probs[3]``
      - Chroma mode update probabilities.
    * - __u8
      - ``mv_probs[2][19]``
      - MV decoding update probabilities.
    * - __u8
      - ``padding[3]``
      - Applications and drivers must set this to zero.

MPEG-2 stateless 제어

1260-1473

`V4L2_CID_STATELESS_MPEG2_SEQUENCE`는 sequence header와 sequence extension에서 얻은 horizontal/vertical size, VBV buffer size, profile/level indication, chroma format 및 progressive·low-delay 플래그를 전달합니다.

`V4L2_CID_STATELESS_MPEG2_PICTURE`는 picture header와 picture coding extension의 상태입니다. backward·forward reference timestamp, picture coding type, picture structure, f_code, intra DC precision과 top-field-first, frame-pred-frame-DCT, concealment MV, Q scale type, intra VLC, alternate scan, repeat-first-field, progressive-frame 등의 플래그를 포함합니다.

I picture에는 forward/backward 참조가 필요하지 않고 P picture는 forward reference를, B picture는 forward와 backward reference를 모두 사용합니다. timestamp는 해당 참조를 담은 CAPTURE 버퍼와 연결해야 합니다.

`V4L2_CID_STATELESS_MPEG2_QUANTISATION`은 intra, non-intra, chroma intra, chroma non-intra의 64개 quantiser matrix를 지그재그 스캔이 적용된 규격 순서로 전달합니다. 비트스트림에 행렬이 없으면 MPEG-2 기본값과 상속 규칙을 적용합니다.

MPEG-2 구조체 필드
필드의미
`horizontal_size`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`vertical_size`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`vbv_buffer_size`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`profile_and_level_indication`비트스트림 프로파일 또는 프로파일 식별자입니다.
`chroma_format`원문 구조체의 `chroma_format` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`flags`이 구조체에 적용되는 기능과 비트스트림 상태를 나타내는 비트 플래그입니다. 아래 상수 표의 비트를 조합합니다.
`backward_ref_ts`참조할 CAPTURE 버퍼를 식별하는 타임스탬프입니다. 디코딩 참조 그림과 큐의 버퍼를 연결합니다.
`forward_ref_ts`참조할 CAPTURE 버퍼를 식별하는 타임스탬프입니다. 디코딩 참조 그림과 큐의 버퍼를 연결합니다.
`f_code[2][2]`원문 구조체의 `f_code[2][2]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`picture_coding_type`프레임·그림·슬라이스의 부호화 유형입니다.
`picture_structure`원문 구조체의 `picture_structure` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`intra_dc_precision`원문 구조체의 `intra_dc_precision` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`reserved[5]`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`intra_quantiser_matrix[64]`양자화 계수, 인덱스 또는 QP 보정값입니다.
`non_intra_quantiser_matrix[64]`양자화 계수, 인덱스 또는 QP 보정값입니다.
`chroma_intra_quantiser_matrix[64]`양자화 계수, 인덱스 또는 QP 보정값입니다.
`chroma_non_intra_quantiser_matrix[64]`양자화 계수, 인덱스 또는 QP 보정값입니다.

Sequence, picture와 quantisation payload 필드입니다.

MPEG-2 상수와 플래그
상수의미
`V4L2_CID_STATELESS_MPEG2_SEQUENCE``V4L2_CID_STATELESS_MPEG2_SEQUENCE`: cid stateless mpeg2 sequence 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE``V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE`: mpeg2 seq flag progressive 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_MPEG2_PICTURE``V4L2_CID_STATELESS_MPEG2_PICTURE`: cid stateless mpeg2 picture 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_MPEG2_PIC_CODING_TYPE_I``V4L2_MPEG2_PIC_CODING_TYPE_I`: mpeg2 pic coding type i에 대응하는 UAPI 상수입니다.
`V4L2_MPEG2_PIC_CODING_TYPE_P``V4L2_MPEG2_PIC_CODING_TYPE_P`: mpeg2 pic coding type p에 대응하는 UAPI 상수입니다.
`V4L2_MPEG2_PIC_CODING_TYPE_B``V4L2_MPEG2_PIC_CODING_TYPE_B`: mpeg2 pic coding type b에 대응하는 UAPI 상수입니다.
`V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST``V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST`: mpeg2 pic flag top field first 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT``V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT`: mpeg2 pic flag frame pred dct 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV``V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV`: mpeg2 pic flag concealment mv 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE``V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE`: mpeg2 pic flag q scale type 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_MPEG2_PIC_FLAG_INTRA_VLC``V4L2_MPEG2_PIC_FLAG_INTRA_VLC`: mpeg2 pic flag intra vlc 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_MPEG2_PIC_FLAG_ALT_SCAN``V4L2_MPEG2_PIC_FLAG_ALT_SCAN`: mpeg2 pic flag alt scan 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST``V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST`: mpeg2 pic flag repeat first 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_MPEG2_PIC_FLAG_PROGRESSIVE``V4L2_MPEG2_PIC_FLAG_PROGRESSIVE`: mpeg2 pic flag progressive 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_MPEG2_QUANTISATION``V4L2_CID_STATELESS_MPEG2_QUANTISATION`: cid stateless mpeg2 quantisation 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.

Sequence와 picture coding 상태를 나타냅니다.

.. _v4l2-codec-stateless-mpeg2:

``V4L2_CID_STATELESS_MPEG2_SEQUENCE (struct)``
    Specifies the sequence parameters (as extracted from the bitstream) for the
    associated MPEG-2 slice data. This includes fields matching the syntax
    elements from the sequence header and sequence extension parts of the
    bitstream as specified by :ref:`mpeg2part2`.

.. c:type:: v4l2_ctrl_mpeg2_sequence

.. raw:: latex

    \small

.. cssclass:: longtable

.. tabularcolumns:: |p{1.4cm}|p{6.5cm}|p{9.4cm}|

.. flat-table:: struct v4l2_ctrl_mpeg2_sequence
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u16
      - ``horizontal_size``
      - The width of the displayable part of the frame's luminance component.
    * - __u16
      - ``vertical_size``
      - The height of the displayable part of the frame's luminance component.
    * - __u32
      - ``vbv_buffer_size``
      - Used to calculate the required size of the video buffering verifier,
	defined (in bits) as: 16 * 1024 * vbv_buffer_size.
    * - __u16
      - ``profile_and_level_indication``
      - The current profile and level indication as extracted from the
	bitstream.
    * - __u8
      - ``chroma_format``
      - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
    * - __u8
      - ``flags``
      - See :ref:`MPEG-2 Sequence Flags <mpeg2_sequence_flags>`.

.. _mpeg2_sequence_flags:

``MPEG-2 Sequence Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE``
      - 0x01
      - Indication that all the frames for the sequence are progressive instead
	of interlaced.

.. raw:: latex

    \normalsize

``V4L2_CID_STATELESS_MPEG2_PICTURE (struct)``
    Specifies the picture parameters (as extracted from the bitstream) for the
    associated MPEG-2 slice data. This includes fields matching the syntax
    elements from the picture header and picture coding extension parts of the
    bitstream as specified by :ref:`mpeg2part2`.

.. c:type:: v4l2_ctrl_mpeg2_picture

.. raw:: latex

    \small

.. cssclass:: longtable

.. tabularcolumns:: |p{1.0cm}|p{5.6cm}|p{10.7cm}|

.. flat-table:: struct v4l2_ctrl_mpeg2_picture
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u64
      - ``backward_ref_ts``
      - Timestamp of the V4L2 capture buffer to use as backward reference, used
        with B-coded and P-coded frames. The timestamp refers to the
	``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
	:c:func:`v4l2_timeval_to_ns()` function to convert the struct
	:c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
    * - __u64
      - ``forward_ref_ts``
      - Timestamp for the V4L2 capture buffer to use as forward reference, used
        with B-coded frames. The timestamp refers to the ``timestamp`` field in
	struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
	function to convert the struct :c:type:`timeval` in struct
	:c:type:`v4l2_buffer` to a __u64.
    * - __u32
      - ``flags``
      - See :ref:`MPEG-2 Picture Flags <mpeg2_picture_flags>`.
    * - __u8
      - ``f_code[2][2]``
      - Motion vector codes.
    * - __u8
      - ``picture_coding_type``
      - Picture coding type for the frame covered by the current slice
	(V4L2_MPEG2_PIC_CODING_TYPE_I, V4L2_MPEG2_PIC_CODING_TYPE_P or
	V4L2_MPEG2_PIC_CODING_TYPE_B).
    * - __u8
      - ``picture_structure``
      - Picture structure (1: interlaced top field, 2: interlaced bottom field,
	3: progressive frame).
    * - __u8
      - ``intra_dc_precision``
      - Precision of Discrete Cosine transform (0: 8 bits precision,
	1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
    * - __u8
      - ``reserved[5]``
      - Applications and drivers must set this to zero.

.. _mpeg2_picture_flags:

``MPEG-2 Picture Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST``
      - 0x00000001
      - If set and it's an interlaced stream, top field is output first.
    * - ``V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT``
      - 0x00000002
      - If set only frame-DCT and frame prediction are used.
    * - ``V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV``
      - 0x00000004
      -  If set motion vectors are coded for intra macroblocks.
    * - ``V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE``
      - 0x00000008
      - This flag affects the inverse quantization process.
    * - ``V4L2_MPEG2_PIC_FLAG_INTRA_VLC``
      - 0x00000010
      - This flag affects the decoding of transform coefficient data.
    * - ``V4L2_MPEG2_PIC_FLAG_ALT_SCAN``
      - 0x00000020
      - This flag affects the decoding of transform coefficient data.
    * - ``V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST``
      - 0x00000040
      - This flag affects the decoding process of progressive frames.
    * - ``V4L2_MPEG2_PIC_FLAG_PROGRESSIVE``
      - 0x00000080
      - Indicates whether the current frame is progressive.

.. raw:: latex

    \normalsize

``V4L2_CID_STATELESS_MPEG2_QUANTISATION (struct)``
    Specifies quantisation matrices, in zigzag scanning order, for the
    associated MPEG-2 slice data. This control is initialized by the kernel
    to the matrices default values. If a bitstream transmits a user-defined
    quantisation matrices load, applications are expected to use this control.
    Applications are also expected to set the control loading the default
    values, if the quantisation matrices need to be reset, for instance on a
    sequence header. This process is specified by section 6.3.7.
    "Quant matrix extension" of the specification.

.. c:type:: v4l2_ctrl_mpeg2_quantisation

.. tabularcolumns:: |p{0.8cm}|p{8.0cm}|p{8.5cm}|

.. cssclass:: longtable

.. raw:: latex

    \small

.. flat-table:: struct v4l2_ctrl_mpeg2_quantisation
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``intra_quantiser_matrix[64]``
      - The quantisation matrix coefficients for intra-coded frames, in zigzag
	scanning order. It is relevant for both luma and chroma components,
	although it can be superseded by the chroma-specific matrix for
	non-4:2:0 YUV formats.
    * - __u8
      - ``non_intra_quantiser_matrix[64]``
      - The quantisation matrix coefficients for non-intra-coded frames, in
	zigzag scanning order. It is relevant for both luma and chroma
	components, although it can be superseded by the chroma-specific matrix
	for non-4:2:0 YUV formats.
    * - __u8
      - ``chroma_intra_quantiser_matrix[64]``
      - The quantisation matrix coefficients for the chominance component of
	intra-coded frames, in zigzag scanning order. Only relevant for
	non-4:2:0 YUV formats.
    * - __u8
      - ``chroma_non_intra_quantiser_matrix[64]``
      - The quantisation matrix coefficients for the chrominance component of
	non-intra-coded frames, in zigzag scanning order. Only relevant for
	non-4:2:0 YUV formats.

.. raw:: latex

    \normalsize

VP9 stateless 제어

1474-2051

`V4L2_CID_STATELESS_VP9_COMPRESSED_HDR`는 VP9 compressed header에서 갱신된 확률을 `v4l2_ctrl_vp9_compressed_hdr`로 전달합니다. transform mode와 크기별 transform 확률, coefficient, skip, inter mode, interpolation filter, reference mode, Y/UV mode, partition 및 motion-vector 확률이 포함됩니다.

`V4L2_CID_STATELESS_VP9_FRAME`은 uncompressed header와 프레임 전체 상태입니다. loop filter, quantization, segmentation, flags, compressed/uncompressed header size, coded/render 크기, LAST/GOLDEN/ALTREF timestamp, sign bias, frame-context reset/index, profile, bit depth, interpolation filter, tile 배치와 reference mode를 전달합니다.

`last_frame_ts`, `golden_frame_ts`, `alt_frame_ts`는 CAPTURE timestamp와 연결합니다. `ref_frame_sign_bias`는 참조별 motion-vector sign bias를, `reset_frame_context`와 `frame_context_idx`는 확률 context의 초기화·선택 규칙을 나타냅니다.

`v4l2_vp9_segmentation`은 8개 세그먼트의 feature data·enabled mask, tree/prediction probabilities와 enabled/update/temporal/absolute-or-delta 플래그를 담습니다. feature 값은 ALT_Q, ALT_LF, REF_FRAME, SKIP 기능 순서와 원문의 범위 규칙을 지킵니다.

`v4l2_vp9_quantization`은 base Q index와 Y DC, UV DC/AC delta를 전달합니다. `v4l2_vp9_loop_filter`는 reference/mode delta, level, sharpness 및 delta enabled/update 플래그를 전달합니다.

VP9 frame flags는 key/show/error-resilient/intra-only/high-precision-MV, frame-parallel mode, refresh context와 color-range/subsampling 상태를 포함합니다. Profile과 bit depth 조합, interpolation filter, tile row/column 수와 reference mode는 VP9 bitstream semantics와 일치해야 합니다.

VP9 구조체 필드
필드의미
`tx_mode`코덱 도구 또는 디코딩 동작 모드를 선택합니다.
`tx8[2][1]`원문 구조체의 `tx8[2][1]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`tx16[2][2]`원문 구조체의 `tx16[2][2]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`tx32[2][3]`원문 구조체의 `tx32[2][3]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`coef[4][2][2][6][6][3]`원문 구조체의 `coef[4][2][2][6][6][3]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`skip[3]`원문 구조체의 `skip[3]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`inter_mode[7][3]`코덱 도구 또는 디코딩 동작 모드를 선택합니다.
`interp_filter[4][2]`보간, 디블로킹 또는 복원 필터의 선택값입니다.
`is_inter[4]`원문 구조체의 `is_inter[4]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`comp_mode[5]`코덱 도구 또는 디코딩 동작 모드를 선택합니다.
`single_ref[5][2]`원문 구조체의 `single_ref[5][2]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`comp_ref[5]`원문 구조체의 `comp_ref[5]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`y_mode[4][9]`코덱 도구 또는 디코딩 동작 모드를 선택합니다.
`uv_mode[10][9]`코덱 도구 또는 디코딩 동작 모드를 선택합니다.
`partition[16][3]`원문 구조체의 `partition[16][3]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`mv.joint[3]`움직임 벡터 또는 전역 움직임 모델의 파라미터입니다.
`mv.sign[2]`움직임 벡터 또는 전역 움직임 모델의 파라미터입니다.
`mv.classes[2][10]`움직임 벡터 또는 전역 움직임 모델의 파라미터입니다.
`mv.class0_bit[2]`움직임 벡터 또는 전역 움직임 모델의 파라미터입니다.
`mv.bits[2][10]`움직임 벡터 또는 전역 움직임 모델의 파라미터입니다.
`mv.class0_fr[2][2][3]`움직임 벡터 또는 전역 움직임 모델의 파라미터입니다.
`mv.fr[2][3]`움직임 벡터 또는 전역 움직임 모델의 파라미터입니다.
`mv.class0_hp[2]`움직임 벡터 또는 전역 움직임 모델의 파라미터입니다.
`mv.hp[2]`움직임 벡터 또는 전역 움직임 모델의 파라미터입니다.
`lf`원문 구조체의 `lf` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`quant`양자화 계수, 인덱스 또는 QP 보정값입니다.
`seg`원문 구조체의 `seg` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`flags`이 구조체에 적용되는 기능과 비트스트림 상태를 나타내는 비트 플래그입니다. 아래 상수 표의 비트를 조합합니다.
`compressed_header_size`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`uncompressed_header_size`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`frame_width_minus_1`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`frame_height_minus_1`부호화 또는 표시 영상의 높이를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`render_width_minus_1`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`last_frame_ts`참조할 CAPTURE 버퍼를 식별하는 타임스탬프입니다. 디코딩 참조 그림과 큐의 버퍼를 연결합니다.
`golden_frame_ts`참조할 CAPTURE 버퍼를 식별하는 타임스탬프입니다. 디코딩 참조 그림과 큐의 버퍼를 연결합니다.
`alt_frame_ts`참조할 CAPTURE 버퍼를 식별하는 타임스탬프입니다. 디코딩 참조 그림과 큐의 버퍼를 연결합니다.
`ref_frame_sign_bias`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`reset_frame_context`원문 구조체의 `reset_frame_context` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`frame_context_idx`원문 구조체의 `frame_context_idx` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`profile`비트스트림 프로파일 또는 프로파일 식별자입니다.
`bit_depth`루마 또는 크로마 샘플의 비트 깊이 파라미터입니다.
`interpolation_filter`보간, 디블로킹 또는 복원 필터의 선택값입니다.
`tile_cols_log2`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`tile_rows_log2`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`reference_mode`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`reserved[7]`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`feature_data[8][4]`원문 구조체의 `feature_data[8][4]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`feature_enabled[8]`원문 구조체의 `feature_enabled[8]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`tree_probs[7]`엔트로피 부호화에 사용하는 확률 값 또는 확률 배열입니다.
`pred_probs[3]`엔트로피 부호화에 사용하는 확률 값 또는 확률 배열입니다.
`reserved[5]`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`base_q_idx`양자화 계수, 인덱스 또는 QP 보정값입니다.
`delta_q_y_dc`기준값에 더하는 코덱 구문상의 차분값입니다.
`delta_q_uv_dc`기준값에 더하는 코덱 구문상의 차분값입니다.
`delta_q_uv_ac`기준값에 더하는 코덱 구문상의 차분값입니다.
`reserved[4]`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`ref_deltas[4]`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`mode_deltas[2]`기준값에 더하는 코덱 구문상의 차분값입니다.
`level`코덱 레벨, 필터 강도 또는 계층 수준입니다. 정확한 의미는 소속 구조체와 코덱 문맥을 따릅니다.
`sharpness`원문 구조체의 `sharpness` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.

Compressed header, frame, segmentation, quantization과 loop-filter 필드 전체입니다.

VP9 상수와 플래그
상수의미
`V4L2_CID_STATELESS_VP9_COMPRESSED_HDR``V4L2_CID_STATELESS_VP9_COMPRESSED_HDR`: cid stateless vp9 compressed hdr 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_VP9_TX_MODE_ONLY_4X4``V4L2_VP9_TX_MODE_ONLY_4X4`: vp9 tx mode only 4x4 동작 모드 선택값입니다.
`V4L2_VP9_TX_MODE_ALLOW_8X8``V4L2_VP9_TX_MODE_ALLOW_8X8`: vp9 tx mode allow 8x8 동작 모드 선택값입니다.
`V4L2_VP9_TX_MODE_ALLOW_16X16``V4L2_VP9_TX_MODE_ALLOW_16X16`: vp9 tx mode allow 16x16 동작 모드 선택값입니다.
`V4L2_VP9_TX_MODE_ALLOW_32X32``V4L2_VP9_TX_MODE_ALLOW_32X32`: vp9 tx mode allow 32x32 동작 모드 선택값입니다.
`V4L2_VP9_TX_MODE_SELECT``V4L2_VP9_TX_MODE_SELECT`: vp9 tx mode select 동작 모드 선택값입니다.
`V4L2_CID_STATELESS_VP9_FRAME``V4L2_CID_STATELESS_VP9_FRAME`: cid stateless vp9 frame 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_VP9_FRAME_FLAG_``V4L2_VP9_FRAME_FLAG_`: vp9 frame flag 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_FRAME_FLAG_KEY_FRAME``V4L2_VP9_FRAME_FLAG_KEY_FRAME`: vp9 frame flag key frame 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_FRAME_FLAG_SHOW_FRAME``V4L2_VP9_FRAME_FLAG_SHOW_FRAME`: vp9 frame flag show frame 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT``V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT`: vp9 frame flag error resilient 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_FRAME_FLAG_INTRA_ONLY``V4L2_VP9_FRAME_FLAG_INTRA_ONLY`: vp9 frame flag intra only 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV``V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV`: vp9 frame flag allow high prec mv 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX``V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX`: vp9 frame flag refresh frame ctx 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE``V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE`: vp9 frame flag parallel dec mode 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING``V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING`: vp9 frame flag x subsampling 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING``V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING`: vp9 frame flag y subsampling 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING``V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING`: vp9 frame flag color range full swing 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_SIGN_BIAS_LAST``V4L2_VP9_SIGN_BIAS_LAST`: vp9 sign bias last에 대응하는 UAPI 상수입니다.
`V4L2_VP9_SIGN_BIAS_GOLDEN``V4L2_VP9_SIGN_BIAS_GOLDEN`: vp9 sign bias golden에 대응하는 UAPI 상수입니다.
`V4L2_VP9_SIGN_BIAS_ALT``V4L2_VP9_SIGN_BIAS_ALT`: vp9 sign bias alt에 대응하는 UAPI 상수입니다.
`V4L2_VP9_RESET_FRAME_CTX_NONE``V4L2_VP9_RESET_FRAME_CTX_NONE`: vp9 reset frame ctx none에 대응하는 UAPI 상수입니다.
`V4L2_VP9_RESET_FRAME_CTX_SPEC``V4L2_VP9_RESET_FRAME_CTX_SPEC`: vp9 reset frame ctx spec에 대응하는 UAPI 상수입니다.
`V4L2_VP9_RESET_FRAME_CTX_ALL``V4L2_VP9_RESET_FRAME_CTX_ALL`: vp9 reset frame ctx all에 대응하는 UAPI 상수입니다.
`V4L2_VP9_INTERP_FILTER_EIGHTTAP``V4L2_VP9_INTERP_FILTER_EIGHTTAP`: vp9 interp filter eighttap에 대응하는 UAPI 상수입니다.
`V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH`: vp9 interp filter eighttap smooth에 대응하는 UAPI 상수입니다.
`V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP`: vp9 interp filter eighttap sharp에 대응하는 UAPI 상수입니다.
`V4L2_VP9_INTERP_FILTER_BILINEAR``V4L2_VP9_INTERP_FILTER_BILINEAR`: vp9 interp filter bilinear에 대응하는 UAPI 상수입니다.
`V4L2_VP9_INTERP_FILTER_SWITCHABLE``V4L2_VP9_INTERP_FILTER_SWITCHABLE`: vp9 interp filter switchable에 대응하는 UAPI 상수입니다.
`V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE``V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE`: vp9 reference mode single reference 동작 모드 선택값입니다.
`V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE``V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE`: vp9 reference mode compound reference 동작 모드 선택값입니다.
`V4L2_VP9_REFERENCE_MODE_SELECT``V4L2_VP9_REFERENCE_MODE_SELECT`: vp9 reference mode select 동작 모드 선택값입니다.
`V4L2_VP9_SEG_``V4L2_VP9_SEG_`: vp9 seg 에 대응하는 UAPI 상수입니다.
`V4L2_VP9_SEGMENT_FEATURE_ENABLED``V4L2_VP9_SEGMENT_FEATURE_ENABLED`: vp9 segment feature enabled에 대응하는 UAPI 상수입니다.
`V4L2_VP9_SEGMENTATION_FLAG_``V4L2_VP9_SEGMENTATION_FLAG_`: vp9 segmentation flag 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_SEG_LVL_ALT_Q``V4L2_VP9_SEG_LVL_ALT_Q`: vp9 seg lvl alt q에 대응하는 UAPI 상수입니다.
`V4L2_VP9_SEG_LVL_ALT_L``V4L2_VP9_SEG_LVL_ALT_L`: vp9 seg lvl alt l에 대응하는 UAPI 상수입니다.
`V4L2_VP9_SEG_LVL_REF_FRAME``V4L2_VP9_SEG_LVL_REF_FRAME`: vp9 seg lvl ref frame에 대응하는 UAPI 상수입니다.
`V4L2_VP9_SEG_LVL_SKIP``V4L2_VP9_SEG_LVL_SKIP`: vp9 seg lvl skip에 대응하는 UAPI 상수입니다.
`V4L2_VP9_SEG_LVL_MAX``V4L2_VP9_SEG_LVL_MAX`: vp9 seg lvl max에 대응하는 UAPI 상수입니다.
`V4L2_VP9_SEGMENTATION_FLAG_ENABLED``V4L2_VP9_SEGMENTATION_FLAG_ENABLED`: vp9 segmentation flag enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP``V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP`: vp9 segmentation flag update map 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE``V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE`: vp9 segmentation flag temporal update 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA``V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA`: vp9 segmentation flag update data 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE``V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE`: vp9 segmentation flag abs or delta update 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_LOOP_FILTER_FLAG_``V4L2_VP9_LOOP_FILTER_FLAG_`: vp9 loop filter flag 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED`: vp9 loop filter flag delta enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE`: vp9 loop filter flag delta update 상태 또는 기능을 나타내는 비트 플래그입니다.

Transform, frame, reference, segmentation과 filter 상수입니다.

VP9 frame request
Uncompressed header 파싱Compressed header probability update 파싱Segmentation·quantization·loop filter 구성LAST·GOLDEN·ALTREF timestamp 연결Tile·reference·frame-context 상태 설정Controls와 OUTPUT buffer를 request로 제출

두 헤더의 확률 상태와 참조 프레임을 하나의 요청으로 결합합니다.

.. _v4l2-codec-stateless-vp9:

``V4L2_CID_STATELESS_VP9_COMPRESSED_HDR (struct)``
    Stores VP9 probabilities updates as parsed from the current compressed frame
    header. A value of zero in an array element means no update of the relevant
    probability. Motion vector-related updates contain a new value or zero. All
    other updates contain values translated with inv_map_table[] (see 6.3.5 in
    :ref:`vp9`).

.. c:type:: v4l2_ctrl_vp9_compressed_hdr

.. tabularcolumns:: |p{1cm}|p{4.8cm}|p{11.4cm}|

.. cssclass:: longtable

.. flat-table:: struct v4l2_ctrl_vp9_compressed_hdr
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``tx_mode``
      - Specifies the TX mode. See :ref:`TX Mode <vp9_tx_mode>` for more details.
    * - __u8
      - ``tx8[2][1]``
      - TX 8x8 probabilities delta.
    * - __u8
      - ``tx16[2][2]``
      - TX 16x16 probabilities delta.
    * - __u8
      - ``tx32[2][3]``
      - TX 32x32 probabilities delta.
    * - __u8
      - ``coef[4][2][2][6][6][3]``
      - Coefficient probabilities delta.
    * - __u8
      - ``skip[3]``
      - Skip probabilities delta.
    * - __u8
      - ``inter_mode[7][3]``
      - Inter prediction mode probabilities delta.
    * - __u8
      - ``interp_filter[4][2]``
      - Interpolation filter probabilities delta.
    * - __u8
      - ``is_inter[4]``
      - Is inter-block probabilities delta.
    * - __u8
      - ``comp_mode[5]``
      - Compound prediction mode probabilities delta.
    * - __u8
      - ``single_ref[5][2]``
      - Single reference probabilities delta.
    * - __u8
      - ``comp_ref[5]``
      - Compound reference probabilities delta.
    * - __u8
      - ``y_mode[4][9]``
      - Y prediction mode probabilities delta.
    * - __u8
      - ``uv_mode[10][9]``
      - UV prediction mode probabilities delta.
    * - __u8
      - ``partition[16][3]``
      - Partition probabilities delta.
    * - __u8
      - ``mv.joint[3]``
      - Motion vector joint probabilities delta.
    * - __u8
      - ``mv.sign[2]``
      - Motion vector sign probabilities delta.
    * - __u8
      - ``mv.classes[2][10]``
      - Motion vector class probabilities delta.
    * - __u8
      - ``mv.class0_bit[2]``
      - Motion vector class0 bit probabilities delta.
    * - __u8
      - ``mv.bits[2][10]``
      - Motion vector bits probabilities delta.
    * - __u8
      - ``mv.class0_fr[2][2][3]``
      - Motion vector class0 fractional bit probabilities delta.
    * - __u8
      - ``mv.fr[2][3]``
      - Motion vector fractional bit probabilities delta.
    * - __u8
      - ``mv.class0_hp[2]``
      - Motion vector class0 high precision fractional bit probabilities delta.
    * - __u8
      - ``mv.hp[2]``
      - Motion vector high precision fractional bit probabilities delta.

.. _vp9_tx_mode:

``TX Mode``

.. tabularcolumns:: |p{6.5cm}|p{0.5cm}|p{10.3cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP9_TX_MODE_ONLY_4X4``
      - 0
      - Transform size is 4x4.
    * - ``V4L2_VP9_TX_MODE_ALLOW_8X8``
      - 1
      - Transform size can be up to 8x8.
    * - ``V4L2_VP9_TX_MODE_ALLOW_16X16``
      - 2
      - Transform size can be up to 16x16.
    * - ``V4L2_VP9_TX_MODE_ALLOW_32X32``
      - 3
      - transform size can be up to 32x32.
    * - ``V4L2_VP9_TX_MODE_SELECT``
      - 4
      - Bitstream contains the transform size for each block.

See section '7.3.1 Tx mode semantics' of the :ref:`vp9` specification for more details.

``V4L2_CID_STATELESS_VP9_FRAME (struct)``
    Specifies the frame parameters for the associated VP9 frame decode request.
    This includes the necessary parameters for configuring a stateless hardware
    decoding pipeline for VP9. The bitstream parameters are defined according
    to :ref:`vp9`.

.. c:type:: v4l2_ctrl_vp9_frame

.. raw:: latex

    \small

.. tabularcolumns:: |p{4.7cm}|p{5.5cm}|p{7.1cm}|

.. cssclass:: longtable

.. flat-table:: struct v4l2_ctrl_vp9_frame
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - struct :c:type:`v4l2_vp9_loop_filter`
      - ``lf``
      - Loop filter parameters. See struct :c:type:`v4l2_vp9_loop_filter` for more details.
    * - struct :c:type:`v4l2_vp9_quantization`
      - ``quant``
      - Quantization parameters. See :c:type:`v4l2_vp9_quantization` for more details.
    * - struct :c:type:`v4l2_vp9_segmentation`
      - ``seg``
      - Segmentation parameters. See :c:type:`v4l2_vp9_segmentation` for more details.
    * - __u32
      - ``flags``
      - Combination of V4L2_VP9_FRAME_FLAG_* flags. See :ref:`Frame Flags<vp9_frame_flags>`.
    * - __u16
      - ``compressed_header_size``
      - Compressed header size in bytes.
    * - __u16
      - ``uncompressed_header_size``
      - Uncompressed header size in bytes.
    * - __u16
      - ``frame_width_minus_1``
      - Add 1 to get the frame width expressed in pixels. See section 7.2.3 in :ref:`vp9`.
    * - __u16
      - ``frame_height_minus_1``
      - Add 1 to get the frame height expressed in pixels. See section 7.2.3 in :ref:`vp9`.
    * - __u16
      - ``render_width_minus_1``
      - Add 1 to get the expected render width expressed in pixels. This is
        not used during the decoding process but might be used by HW scalers to
        prepare a frame that's ready for scanout. See section 7.2.4 in :ref:`vp9`.
    * - __u16
      - render_height_minus_1
      - Add 1 to get the expected render height expressed in pixels. This is
        not used during the decoding process but might be used by HW scalers to
        prepare a frame that's ready for scanout. See section 7.2.4 in :ref:`vp9`.
    * - __u64
      - ``last_frame_ts``
      - "last" reference buffer timestamp.
	The timestamp refers to the ``timestamp`` field in
        struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
        function to convert the struct :c:type:`timeval` in struct
        :c:type:`v4l2_buffer` to a __u64.
    * - __u64
      - ``golden_frame_ts``
      - "golden" reference buffer timestamp.
	The timestamp refers to the ``timestamp`` field in
        struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
        function to convert the struct :c:type:`timeval` in struct
        :c:type:`v4l2_buffer` to a __u64.
    * - __u64
      - ``alt_frame_ts``
      - "alt" reference buffer timestamp.
	The timestamp refers to the ``timestamp`` field in
        struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
        function to convert the struct :c:type:`timeval` in struct
        :c:type:`v4l2_buffer` to a __u64.
    * - __u8
      - ``ref_frame_sign_bias``
      - a bitfield specifying whether the sign bias is set for a given
        reference frame. See :ref:`Reference Frame Sign Bias<vp9_ref_frame_sign_bias>`
        for more details.
    * - __u8
      - ``reset_frame_context``
      - specifies whether the frame context should be reset to default values. See
        :ref:`Reset Frame Context<vp9_reset_frame_context>` for more details.
    * - __u8
      - ``frame_context_idx``
      - Frame context that should be used/updated.
    * - __u8
      - ``profile``
      - VP9 profile. Can be 0, 1, 2 or 3.
    * - __u8
      - ``bit_depth``
      - Component depth in bits. Can be 8, 10 or 12. Note that not all profiles
        support 10 and/or 12 bits depths.
    * - __u8
      - ``interpolation_filter``
      - Specifies the filter selection used for performing inter prediction. See
        :ref:`Interpolation Filter<vp9_interpolation_filter>` for more details.
    * - __u8
      - ``tile_cols_log2``
      - Specifies the base 2 logarithm of the width of each tile (where the
        width is measured in units of 8x8 blocks). Shall be less than or equal
        to 6.
    * - __u8
      - ``tile_rows_log2``
      - Specifies the base 2 logarithm of the height of each tile (where the
        height is measured in units of 8x8 blocks).
    * - __u8
      - ``reference_mode``
      - Specifies the type of inter prediction to be used. See
        :ref:`Reference Mode<vp9_reference_mode>` for more details. Note that
	this is derived as part of the compressed header parsing process and
	for this reason should have been part of
	:c:type: `v4l2_ctrl_vp9_compressed_hdr` optional control. It is safe to
	set this value to zero if the driver does not require compressed
	headers.
    * - __u8
      - ``reserved[7]``
      - Applications and drivers must set this to zero.

.. raw:: latex

    \normalsize

.. _vp9_frame_flags:

``Frame Flags``

.. tabularcolumns:: |p{10.0cm}|p{1.2cm}|p{6.1cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP9_FRAME_FLAG_KEY_FRAME``
      - 0x001
      - The frame is a key frame.
    * - ``V4L2_VP9_FRAME_FLAG_SHOW_FRAME``
      - 0x002
      - The frame should be displayed.
    * - ``V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT``
      - 0x004
      - The decoding should be error resilient.
    * - ``V4L2_VP9_FRAME_FLAG_INTRA_ONLY``
      - 0x008
      - The frame does not reference other frames.
    * - ``V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV``
      - 0x010
      - The frame can use high precision motion vectors.
    * - ``V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX``
      - 0x020
      - Frame context should be updated after decoding.
    * - ``V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE``
      - 0x040
      - Parallel decoding is used.
    * - ``V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING``
      - 0x080
      - Vertical subsampling is enabled.
    * - ``V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING``
      - 0x100
      - Horizontal subsampling is enabled.
    * - ``V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING``
      - 0x200
      - The full UV range is used.

.. _vp9_ref_frame_sign_bias:

``Reference Frame Sign Bias``

.. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP9_SIGN_BIAS_LAST``
      - 0x1
      - Sign bias is set for the last reference frame.
    * - ``V4L2_VP9_SIGN_BIAS_GOLDEN``
      - 0x2
      - Sign bias is set for the golden reference frame.
    * - ``V4L2_VP9_SIGN_BIAS_ALT``
      - 0x2
      - Sign bias is set for the alt reference frame.

.. _vp9_reset_frame_context:

``Reset Frame Context``

.. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP9_RESET_FRAME_CTX_NONE``
      - 0
      - Do not reset any frame context.
    * - ``V4L2_VP9_RESET_FRAME_CTX_SPEC``
      - 1
      - Reset the frame context pointed to by
        :c:type:`v4l2_ctrl_vp9_frame`.frame_context_idx.
    * - ``V4L2_VP9_RESET_FRAME_CTX_ALL``
      - 2
      - Reset all frame contexts.

See section '7.2 Uncompressed header semantics' of the :ref:`vp9` specification
for more details.

.. _vp9_interpolation_filter:

``Interpolation Filter``

.. tabularcolumns:: |p{9.0cm}|p{1.2cm}|p{7.1cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP``
      - 0
      - Eight tap filter.
    * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH``
      - 1
      - Eight tap smooth filter.
    * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP``
      - 2
      - Eeight tap sharp filter.
    * - ``V4L2_VP9_INTERP_FILTER_BILINEAR``
      - 3
      - Bilinear filter.
    * - ``V4L2_VP9_INTERP_FILTER_SWITCHABLE``
      - 4
      - Filter selection is signaled at the block level.

See section '7.2.7 Interpolation filter semantics' of the :ref:`vp9` specification
for more details.

.. _vp9_reference_mode:

``Reference Mode``

.. tabularcolumns:: |p{9.6cm}|p{0.5cm}|p{7.2cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE``
      - 0
      - Indicates that all the inter blocks use only a single reference frame
        to generate motion compensated prediction.
    * - ``V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE``
      - 1
      - Requires all the inter blocks to use compound mode. Single reference
        frame prediction is not allowed.
    * - ``V4L2_VP9_REFERENCE_MODE_SELECT``
      - 2
      - Allows each individual inter block to select between single and
        compound prediction modes.

See section '7.3.6 Frame reference mode semantics' of the :ref:`vp9` specification for more details.

.. c:type:: v4l2_vp9_segmentation

Encodes the quantization parameters. See section '7.2.10 Segmentation
params syntax' of the :ref:`vp9` specification for more details.

.. tabularcolumns:: |p{0.8cm}|p{5cm}|p{11.4cm}|

.. cssclass:: longtable

.. flat-table:: struct v4l2_vp9_segmentation
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``feature_data[8][4]``
      - Data attached to each feature. Data entry is only valid if the feature
        is enabled. The array shall be indexed with segment number as the first dimension
        (0..7) and one of V4L2_VP9_SEG_* as the second dimension.
        See :ref:`Segment Feature IDs<vp9_segment_feature>`.
    * - __u8
      - ``feature_enabled[8]``
      - Bitmask defining which features are enabled in each segment. The value for each
        segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id) values where id is
        one of V4L2_VP9_SEG_*. See :ref:`Segment Feature IDs<vp9_segment_feature>`.
    * - __u8
      - ``tree_probs[7]``
      - Specifies the probability values to be used when decoding a Segment-ID.
        See '5.15 Segmentation map' section of :ref:`vp9` for more details.
    * - __u8
      - ``pred_probs[3]``
      - Specifies the probability values to be used when decoding a
        Predicted-Segment-ID. See '6.4.14 Get segment id syntax'
        section of :ref:`vp9` for more details.
    * - __u8
      - ``flags``
      - Combination of V4L2_VP9_SEGMENTATION_FLAG_* flags. See
        :ref:`Segmentation Flags<vp9_segmentation_flags>`.
    * - __u8
      - ``reserved[5]``
      - Applications and drivers must set this to zero.

.. _vp9_segment_feature:

``Segment feature IDs``

.. tabularcolumns:: |p{6.0cm}|p{1cm}|p{10.3cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP9_SEG_LVL_ALT_Q``
      - 0
      - Quantizer segment feature.
    * - ``V4L2_VP9_SEG_LVL_ALT_L``
      - 1
      - Loop filter segment feature.
    * - ``V4L2_VP9_SEG_LVL_REF_FRAME``
      - 2
      - Reference frame segment feature.
    * - ``V4L2_VP9_SEG_LVL_SKIP``
      - 3
      - Skip segment feature.
    * - ``V4L2_VP9_SEG_LVL_MAX``
      - 4
      - Number of segment features.

.. _vp9_segmentation_flags:

``Segmentation Flags``

.. tabularcolumns:: |p{10.6cm}|p{0.8cm}|p{5.9cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP9_SEGMENTATION_FLAG_ENABLED``
      - 0x01
      - Indicates that this frame makes use of the segmentation tool.
    * - ``V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP``
      - 0x02
      - Indicates that the segmentation map should be updated during the
        decoding of this frame.
    * - ``V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE``
      - 0x04
      - Indicates that the updates to the segmentation map are coded
        relative to the existing segmentation map.
    * - ``V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA``
      - 0x08
      - Indicates that new parameters are about to be specified for each
        segment.
    * - ``V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE``
      - 0x10
      - Indicates that the segmentation parameters represent the actual values
        to be used.

.. c:type:: v4l2_vp9_quantization

Encodes the quantization parameters. See section '7.2.9 Quantization params
syntax' of the VP9 specification for more details.

.. tabularcolumns:: |p{0.8cm}|p{4cm}|p{12.4cm}|

.. cssclass:: longtable

.. flat-table:: struct v4l2_vp9_quantization
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``base_q_idx``
      - Indicates the base frame qindex.
    * - __s8
      - ``delta_q_y_dc``
      - Indicates the Y DC quantizer relative to base_q_idx.
    * - __s8
      - ``delta_q_uv_dc``
      - Indicates the UV DC quantizer relative to base_q_idx.
    * - __s8
      - ``delta_q_uv_ac``
      - Indicates the UV AC quantizer relative to base_q_idx.
    * - __u8
      - ``reserved[4]``
      - Applications and drivers must set this to zero.

.. c:type:: v4l2_vp9_loop_filter

This structure contains all loop filter related parameters. See sections
'7.2.8 Loop filter semantics' of the :ref:`vp9` specification for more details.

.. tabularcolumns:: |p{0.8cm}|p{4cm}|p{12.4cm}|

.. cssclass:: longtable

.. flat-table:: struct v4l2_vp9_loop_filter
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __s8
      - ``ref_deltas[4]``
      - Contains the adjustment needed for the filter level based on the chosen
        reference frame.
    * - __s8
      - ``mode_deltas[2]``
      - Contains the adjustment needed for the filter level based on the chosen
        mode.
    * - __u8
      - ``level``
      - Indicates the loop filter strength.
    * - __u8
      - ``sharpness``
      - Indicates the sharpness level.
    * - __u8
      - ``flags``
      - Combination of V4L2_VP9_LOOP_FILTER_FLAG_* flags.
        See :ref:`Loop Filter Flags <vp9_loop_filter_flags>`.
    * - __u8
      - ``reserved[7]``
      - Applications and drivers must set this to zero.


.. _vp9_loop_filter_flags:

``Loop Filter Flags``

.. tabularcolumns:: |p{9.6cm}|p{0.5cm}|p{7.2cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED``
      - 0x1
      - When set, the filter level depends on the mode and reference frame used
        to predict a block.
    * - ``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE``
      - 0x2
      - When set, the bitstream contains additional syntax elements that
        specify which mode and reference frame deltas are to be updated.

HEVC/H.265 stateless 제어

2052-2960

`V4L2_CID_STATELESS_HEVC_SPS`는 VPS/SPS 식별자, luma sample 크기, bit depth, POC 비트 폭, DPB·reorder·latency 한계, coding/transform/PCM block 크기, reference-picture-set 수, chroma format, sub-layer 수와 SPS 도구 플래그를 전달합니다.

SPS flags는 separate colour plane, scaling list, AMP, SAO, PCM, PCM loop-filter disable, temporal MVP, strong intra smoothing과 range-extension의 transform skip, RDPCM, precision, offset, cross-component prediction, chroma QP offset list 기능을 표시합니다.

`V4L2_CID_STATELESS_HEVC_PPS`는 PPS 식별자, extra slice-header bits, 기본 참조 수, 초기 QP, CU QP delta depth, Cb/Cr offset, tile 수와 크기, deblocking offset, merge level과 PPS 플래그를 전달합니다. dependent slice, output flag, sign-data hiding, CABAC init, constrained intra, transform skip, tiles, entropy sync, loop-filter across tiles/slices 등은 플래그로 표현합니다.

`V4L2_CID_STATELESS_HEVC_SLICE_PARAMS`는 slice bit size와 data byte offset, entry-point 수, NAL type와 temporal ID, slice type·POC·참조 수, collocated ref, merge candidate, QP 및 색차/ACT/filter offset, picture structure, segment address, L0/L1 DPB index, short/long-term RPS 크기, weighted prediction table과 slice flags를 전달합니다.

`V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS`는 tile 또는 wavefront 경계의 entry-point byte offset 배열입니다. `V4L2_CID_STATELESS_HEVC_SCALING_MATRIX`는 4x4, 8x8, 16x16, 32x32 목록과 16x16/32x32 DC coefficient를 규격 순서로 전달합니다.

`v4l2_hevc_dpb_entry`는 참조 CAPTURE timestamp, RPS 상태 플래그, field-picture 상태와 POC를 보관합니다. `v4l2_hevc_pred_weight_table`은 L0/L1 루마·크로마 delta weight와 offset 및 logarithmic denominator를 전달합니다.

`V4L2_CID_STATELESS_HEVC_DECODE_MODE`는 slice-based와 frame-based 방식을 선택하고 `V4L2_CID_STATELESS_HEVC_START_CODE`는 Annex B start code 포함 여부를 선택합니다. Slice 기반에서 여러 slice가 한 frame을 이루면 hold-capture-buffer capability가 필요합니다.

Base-layer priority와 LTR 제어는 encoder 계층 우선순위와 long-term reference 수·현재 프레임의 LTR index·사용할 LTR bitmask를 지정합니다. `V4L2_CID_STATELESS_HEVC_DECODE_PARAMS`는 현재 POC, RPS 크기와 active DPB 수, before/after/long-term POC 목록, delta POC 수, DPB 배열과 IRAP/IDR/no-output 플래그를 전달합니다.

HEVC 구조체 필드
필드의미
`video_parameter_set_id`원문 구조체의 `video_parameter_set_id` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`seq_parameter_set_id`원문 구조체의 `seq_parameter_set_id` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`pic_width_in_luma_samples`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`pic_height_in_luma_samples`부호화 또는 표시 영상의 높이를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`bit_depth_luma_minus8`루마 또는 크로마 샘플의 비트 깊이 파라미터입니다.
`bit_depth_chroma_minus8`루마 또는 크로마 샘플의 비트 깊이 파라미터입니다.
`log2_max_pic_order_cnt_lsb_minus4`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`sps_max_dec_pic_buffering_minus1`원문 구조체의 `sps_max_dec_pic_buffering_minus1` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`sps_max_num_reorder_pics`원문 구조체의 `sps_max_num_reorder_pics` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`sps_max_latency_increase_plus1`원문 구조체의 `sps_max_latency_increase_plus1` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`log2_min_luma_coding_block_size_minus3`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`log2_diff_max_min_luma_coding_block_size`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`log2_min_luma_transform_block_size_minus2`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`log2_diff_max_min_luma_transform_block_size`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`max_transform_hierarchy_depth_inter`원문 구조체의 `max_transform_hierarchy_depth_inter` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`max_transform_hierarchy_depth_intra`원문 구조체의 `max_transform_hierarchy_depth_intra` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`pcm_sample_bit_depth_luma_minus1`루마 또는 크로마 샘플의 비트 깊이 파라미터입니다.
`pcm_sample_bit_depth_chroma_minus1`루마 또는 크로마 샘플의 비트 깊이 파라미터입니다.
`log2_min_pcm_luma_coding_block_size_minus3`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`log2_diff_max_min_pcm_luma_coding_block_size`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`num_short_term_ref_pic_sets`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`num_long_term_ref_pics_sps`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`chroma_format_idc`원문 구조체의 `chroma_format_idc` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`sps_max_sub_layers_minus1`원문 구조체의 `sps_max_sub_layers_minus1` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`flags`이 구조체에 적용되는 기능과 비트스트림 상태를 나타내는 비트 플래그입니다. 아래 상수 표의 비트를 조합합니다.
`pic_parameter_set_id`원문 구조체의 `pic_parameter_set_id` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`num_extra_slice_header_bits`원문 구조체의 `num_extra_slice_header_bits` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`num_ref_idx_l0_default_active_minus1`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`num_ref_idx_l1_default_active_minus1`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`init_qp_minus26`양자화 계수, 인덱스 또는 QP 보정값입니다.
`diff_cu_qp_delta_depth`양자화 계수, 인덱스 또는 QP 보정값입니다.
`pps_cb_qp_offset`양자화 계수, 인덱스 또는 QP 보정값입니다.
`pps_cr_qp_offset`양자화 계수, 인덱스 또는 QP 보정값입니다.
`num_tile_columns_minus1`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`num_tile_rows_minus1`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`column_width_minus1[20]`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`row_height_minus1[22]`부호화 또는 표시 영상의 높이를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`pps_beta_offset_div2`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`pps_tc_offset_div2`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`log2_parallel_merge_level_minus2`코덱 레벨, 필터 강도 또는 계층 수준입니다. 정확한 의미는 소속 구조체와 코덱 문맥을 따릅니다.
`padding[4]`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`bit_size`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`data_byte_offset`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`num_entry_point_offsets`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`nal_unit_type`원문 구조체의 `nal_unit_type` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`nuh_temporal_id_plus1`원문 구조체의 `nuh_temporal_id_plus1` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`slice_type`프레임·그림·슬라이스의 부호화 유형입니다.
`colour_plane_id`색 공간, 전달 함수, Y'CbCr 인코딩 또는 양자화 범위를 나타냅니다.
`slice_pic_order_cnt`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`num_ref_idx_l0_active_minus1`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`num_ref_idx_l1_active_minus1`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`collocated_ref_idx`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`five_minus_max_num_merge_cand`원문 구조체의 `five_minus_max_num_merge_cand` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`slice_qp_delta`양자화 계수, 인덱스 또는 QP 보정값입니다.
`slice_cb_qp_offset`양자화 계수, 인덱스 또는 QP 보정값입니다.
`slice_cr_qp_offset`양자화 계수, 인덱스 또는 QP 보정값입니다.
`slice_act_y_qp_offset`양자화 계수, 인덱스 또는 QP 보정값입니다.
`slice_act_cb_qp_offset`양자화 계수, 인덱스 또는 QP 보정값입니다.
`slice_act_cr_qp_offset`양자화 계수, 인덱스 또는 QP 보정값입니다.
`slice_beta_offset_div2`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`slice_tc_offset_div2`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`pic_struct`원문 구조체의 `pic_struct` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`slice_segment_addr`세그먼테이션 상태, 세그먼트 식별자 또는 세그먼트별 기능 데이터입니다.
`ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`short_term_ref_pic_set_size`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`long_term_ref_pic_set_size`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`padding`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`pred_weight_table`가중 예측에 사용하는 가중치 또는 분모 값입니다.
`scaling_list_4x4[6][16]`역스캔 뒤 래스터 순서로 전달하는 양자화 스케일링 행렬입니다.
`scaling_list_8x8[6][64]`역스캔 뒤 래스터 순서로 전달하는 양자화 스케일링 행렬입니다.
`scaling_list_16x16[6][64]`역스캔 뒤 래스터 순서로 전달하는 양자화 스케일링 행렬입니다.
`scaling_list_32x32[2][64]`역스캔 뒤 래스터 순서로 전달하는 양자화 스케일링 행렬입니다.
`scaling_list_dc_coef_16x16[6]`역스캔 뒤 래스터 순서로 전달하는 양자화 스케일링 행렬입니다.
`scaling_list_dc_coef_32x32[2]`역스캔 뒤 래스터 순서로 전달하는 양자화 스케일링 행렬입니다.
`timestamp`참조할 CAPTURE 버퍼를 식별하는 타임스탬프입니다. 디코딩 참조 그림과 큐의 버퍼를 연결합니다.
`field_pic`원문 구조체의 `field_pic` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`pic_order_cnt_val`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`padding[2]`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`기준값에 더하는 코덱 구문상의 차분값입니다.
`luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]`기준값에 더하는 코덱 구문상의 차분값입니다.
`chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`기준값에 더하는 코덱 구문상의 차분값입니다.
`luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]`기준값에 더하는 코덱 구문상의 차분값입니다.
`chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`luma_log2_weight_denom`가중 예측에 사용하는 가중치 또는 분모 값입니다.
`delta_chroma_log2_weight_denom`기준값에 더하는 코덱 구문상의 차분값입니다.
`padding[6]`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`num_active_dpb_entries`원문 구조체의 `num_active_dpb_entries` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`num_poc_st_curr_before`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`num_poc_st_curr_after`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`num_poc_lt_curr`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`num_delta_pocs_of_ref_rps_idx`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`원문 구조체의 `dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.

SPS/PPS, slice, scaling, DPB, weights와 decode payload 필드 전체입니다.

HEVC 제어·플래그 상수
상수의미
`V4L2_CID_STATELESS_HEVC_SPS``V4L2_CID_STATELESS_HEVC_SPS`: cid stateless hevc sps 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE`: hevc sps flag separate colour plane 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED`: hevc sps flag scaling list enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SPS_FLAG_AMP_ENABLED``V4L2_HEVC_SPS_FLAG_AMP_ENABLED`: hevc sps flag amp enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET`: hevc sps flag sample adaptive offset 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SPS_FLAG_PCM_ENABLED``V4L2_HEVC_SPS_FLAG_PCM_ENABLED`: hevc sps flag pcm enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED`: hevc sps flag pcm loop filter disabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT`: hevc sps flag long term ref pics present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED`: hevc sps flag sps temporal mvp enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED`: hevc sps flag strong intra smoothing enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_HEVC_PPS``V4L2_CID_STATELESS_HEVC_PPS`: cid stateless hevc pps 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED`: hevc pps flag dependent slice segment enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT`: hevc pps flag output flag present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED`: hevc pps flag sign data hiding enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT`: hevc pps flag cabac init present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED`: hevc pps flag constrained intra pred 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED`: hevc pps flag transform skip enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED`: hevc pps flag cu qp delta enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT`: hevc pps flag pps slice chroma qp offsets present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED`: hevc pps flag weighted pred 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED`: hevc pps flag weighted bipred 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED`: hevc pps flag transquant bypass enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_TILES_ENABLED``V4L2_HEVC_PPS_FLAG_TILES_ENABLED`: hevc pps flag tiles enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED`: hevc pps flag entropy coding sync enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED`: hevc pps flag loop filter across tiles enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED`: hevc pps flag pps loop filter across slices enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED`: hevc pps flag deblocking filter override enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER`: hevc pps flag pps disable deblocking filter 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT`: hevc pps flag lists modification present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT`: hevc pps flag slice segment header extension present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT`: hevc pps flag deblocking filter control present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING``V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING`: hevc pps flag uniform spacing 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_HEVC_SLICE_PARAMS``V4L2_CID_STATELESS_HEVC_SLICE_PARAMS`: cid stateless hevc slice params 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_CTRL_FLAG_DYNAMIC_ARRAY``V4L2_CTRL_FLAG_DYNAMIC_ARRAY`: ctrl flag dynamic array 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS``V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS`: cid stateless hevc entry point offsets 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_HEVC_SLICE_TYPE_I``V4L2_HEVC_SLICE_TYPE_I`: hevc slice type i에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SLICE_TYPE_P``V4L2_HEVC_SLICE_TYPE_P`: hevc slice type p에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SLICE_TYPE_B``V4L2_HEVC_SLICE_TYPE_B`: hevc slice type b에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_DPB_ENTRIES_NUM_MAX``V4L2_HEVC_DPB_ENTRIES_NUM_MAX`: hevc dpb entries num max에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA`: hevc slice params flag slice sao luma 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA`: hevc slice params flag slice sao chroma 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED`: hevc slice params flag slice temporal mvp enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO`: hevc slice params flag mvd l1 zero 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT`: hevc slice params flag cabac init 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0`: hevc slice params flag collocated from l0 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV`: hevc slice params flag use integer mv 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED`: hevc slice params flag slice deblocking filter disabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED`: hevc slice params flag slice loop filter across slices enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT``V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT`: hevc slice params flag dependent slice segment 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_HEVC_SCALING_MATRIX``V4L2_CID_STATELESS_HEVC_SCALING_MATRIX`: cid stateless hevc scaling matrix 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE``V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE`: hevc dpb entry long term reference에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_FRAME``V4L2_HEVC_SEI_PIC_STRUCT_FRAME`: hevc sei pic struct frame에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD``V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD`: hevc sei pic struct top field에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD`: hevc sei pic struct bottom field에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM`: hevc sei pic struct top bottom에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP`: hevc sei pic struct bottom top에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP`: hevc sei pic struct top bottom top에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM`: hevc sei pic struct bottom top bottom에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING`: hevc sei pic struct frame doubling에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING`: hevc sei pic struct frame tripling에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM`: hevc sei pic struct top paired previous bottom에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP`: hevc sei pic struct bottom paired previous top에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM`: hevc sei pic struct top paired next bottom에 대응하는 UAPI 상수입니다.
`V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP`: hevc sei pic struct bottom paired next top에 대응하는 UAPI 상수입니다.
`V4L2_CID_STATELESS_HEVC_DECODE_MODE``V4L2_CID_STATELESS_HEVC_DECODE_MODE`: cid stateless hevc decode mode 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_PIX_FMT_HEVC_SLICE``V4L2_PIX_FMT_HEVC_SLICE`: pix fmt hevc slice에 대응하는 UAPI 상수입니다.
`V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED``V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED`: stateless hevc decode mode slice based 동작 모드 선택값입니다.
`V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED``V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED`: stateless hevc decode mode frame based 동작 모드 선택값입니다.
`V4L2_CID_STATELESS_HEVC_START_CODE``V4L2_CID_STATELESS_HEVC_START_CODE`: cid stateless hevc start code 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_STATELESS_HEVC_START_CODE_NONE``V4L2_STATELESS_HEVC_START_CODE_NONE`: stateless hevc start code none에 대응하는 UAPI 상수입니다.
`V4L2_STATELESS_HEVC_START_CODE_ANNEX_B``V4L2_STATELESS_HEVC_START_CODE_ANNEX_B`: stateless hevc start code annex b에 대응하는 UAPI 상수입니다.
`V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID`: cid mpeg video baselayer priority id 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_CID_MPEG_VIDEO_LTR_COUNT``V4L2_CID_MPEG_VIDEO_LTR_COUNT`: cid mpeg video ltr count 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX``V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX`: cid mpeg video frame ltr index 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES``V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES`: cid mpeg video use ltr frames 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_CID_STATELESS_HEVC_DECODE_PARAMS``V4L2_CID_STATELESS_HEVC_DECODE_PARAMS`: cid stateless hevc decode params 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC``V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC`: hevc decode param flag irap pic 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC``V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC`: hevc decode param flag idr pic 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR``V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR`: hevc decode param flag no output of prior 상태 또는 기능을 나타내는 비트 플래그입니다.

SPS/PPS/slice/DPB, mode, start code와 LTR 상수입니다.

HEVC picture request
VPS/SPS/PPS 파싱Scaling matrix와 tile entry point 구성Slice params 및 weighted prediction 작성Short/long-term RPS와 DPB timestamp 연결Decode mode·start-code·picture flags 설정Request 제출 후 CAPTURE frame 회수

Parameter set, RPS, slice와 DPB를 일관되게 조립합니다.

.. _v4l2-codec-stateless-hevc:

``V4L2_CID_STATELESS_HEVC_SPS (struct)``
    Specifies the Sequence Parameter Set fields (as extracted from the
    bitstream) for the associated HEVC slice data.
    These bitstream parameters are defined according to :ref:`hevc`.
    They are described in section 7.4.3.2 "Sequence parameter set RBSP
    semantics" of the specification.

.. c:type:: v4l2_ctrl_hevc_sps

.. raw:: latex

    \small

.. tabularcolumns:: |p{1.2cm}|p{9.2cm}|p{6.9cm}|

.. cssclass:: longtable

.. flat-table:: struct v4l2_ctrl_hevc_sps
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``video_parameter_set_id``
      - Specifies the value of the vps_video_parameter_set_id of the active VPS
        as described in section "7.4.3.2.1 General sequence parameter set RBSP semantics"
        of H.265 specifications.
    * - __u8
      - ``seq_parameter_set_id``
      - Provides an identifier for the SPS for reference by other syntax elements
        as described in section "7.4.3.2.1 General sequence parameter set RBSP semantics"
        of H.265 specifications.
    * - __u16
      - ``pic_width_in_luma_samples``
      - Specifies the width of each decoded picture in units of luma samples.
    * - __u16
      - ``pic_height_in_luma_samples``
      - Specifies the height of each decoded picture in units of luma samples.
    * - __u8
      - ``bit_depth_luma_minus8``
      - This value plus 8 specifies the bit depth of the samples of the luma array.
    * - __u8
      - ``bit_depth_chroma_minus8``
      - This value plus 8 specifies the bit depth of the samples of the chroma arrays.
    * - __u8
      - ``log2_max_pic_order_cnt_lsb_minus4``
      - Specifies the value of the variable MaxPicOrderCntLsb.
    * - __u8
      - ``sps_max_dec_pic_buffering_minus1``
      - This value plus 1 specifies the maximum required size of the decoded picture buffer for
        the coded video sequence (CVS).
    * - __u8
      - ``sps_max_num_reorder_pics``
      - Indicates the maximum allowed number of pictures.
    * - __u8
      - ``sps_max_latency_increase_plus1``
      - Used to signal MaxLatencyPictures, which indicates the maximum number of
        pictures that can precede any picture in output order and follow that
        picture in decoding order.
    * - __u8
      - ``log2_min_luma_coding_block_size_minus3``
      - This value plus 3 specifies the minimum luma coding block size.
    * - __u8
      - ``log2_diff_max_min_luma_coding_block_size``
      - Specifies the difference between the maximum and minimum luma coding block size.
    * - __u8
      - ``log2_min_luma_transform_block_size_minus2``
      - This value plus 2 specifies the minimum luma transform block size.
    * - __u8
      - ``log2_diff_max_min_luma_transform_block_size``
      - Specifies the difference between the maximum and minimum luma transform block size.
    * - __u8
      - ``max_transform_hierarchy_depth_inter``
      - Specifies the maximum hierarchy depth for transform units of coding units coded
        in inter prediction mode.
    * - __u8
      - ``max_transform_hierarchy_depth_intra``
      - Specifies the maximum hierarchy depth for transform units of coding units coded in
        intra prediction mode.
    * - __u8
      - ``pcm_sample_bit_depth_luma_minus1``
      - This value plus 1 specifies the number of bits used to represent each of PCM sample values of the
        luma component.
    * - __u8
      - ``pcm_sample_bit_depth_chroma_minus1``
      - Specifies the number of bits used to represent each of PCM sample values of
        the chroma components.
    * - __u8
      - ``log2_min_pcm_luma_coding_block_size_minus3``
      - Plus 3 specifies the minimum size of coding blocks.
    * - __u8
      - ``log2_diff_max_min_pcm_luma_coding_block_size``
      - Specifies the difference between the maximum and minimum size of coding blocks.
    * - __u8
      - ``num_short_term_ref_pic_sets``
      - Specifies the number of st_ref_pic_set() syntax structures included in the SPS.
    * - __u8
      - ``num_long_term_ref_pics_sps``
      - Specifies the number of candidate long-term reference pictures that are
        specified in the SPS.
    * - __u8
      - ``chroma_format_idc``
      - Specifies the chroma sampling.
    * - __u8
      - ``sps_max_sub_layers_minus1``
      - This value plus 1 specifies the maximum number of temporal sub-layers.
    * - __u64
      - ``flags``
      - See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>`

.. raw:: latex

    \normalsize

.. _hevc_sps_flags:

``Sequence Parameter Set Flags``

.. raw:: latex

    \small

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE``
      - 0x00000001
      -
    * - ``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED``
      - 0x00000002
      -
    * - ``V4L2_HEVC_SPS_FLAG_AMP_ENABLED``
      - 0x00000004
      -
    * - ``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET``
      - 0x00000008
      -
    * - ``V4L2_HEVC_SPS_FLAG_PCM_ENABLED``
      - 0x00000010
      -
    * - ``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED``
      - 0x00000020
      -
    * - ``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT``
      - 0x00000040
      -
    * - ``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED``
      - 0x00000080
      -
    * - ``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED``
      - 0x00000100
      -

.. raw:: latex

    \normalsize

``V4L2_CID_STATELESS_HEVC_PPS (struct)``
    Specifies the Picture Parameter Set fields (as extracted from the
    bitstream) for the associated HEVC slice data.
    These bitstream parameters are defined according to :ref:`hevc`.
    They are described in section 7.4.3.3 "Picture parameter set RBSP
    semantics" of the specification.

.. c:type:: v4l2_ctrl_hevc_pps

.. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}|

.. cssclass:: longtable

.. flat-table:: struct v4l2_ctrl_hevc_pps
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``pic_parameter_set_id``
      - Identifies the PPS for reference by other syntax elements.
    * - __u8
      - ``num_extra_slice_header_bits``
      - Specifies the number of extra slice header bits that are present
        in the slice header RBSP for coded pictures referring to the PPS.
    * - __u8
      - ``num_ref_idx_l0_default_active_minus1``
      - This value plus 1 specifies the inferred value of num_ref_idx_l0_active_minus1.
    * - __u8
      - ``num_ref_idx_l1_default_active_minus1``
      - This value plus 1 specifies the inferred value of num_ref_idx_l1_active_minus1.
    * - __s8
      - ``init_qp_minus26``
      - This value plus 26 specifies the initial value of SliceQp Y for each slice
        referring to the PPS.
    * - __u8
      - ``diff_cu_qp_delta_depth``
      - Specifies the difference between the luma coding tree block size
        and the minimum luma coding block size of coding units that
        convey cu_qp_delta_abs and cu_qp_delta_sign_flag.
    * - __s8
      - ``pps_cb_qp_offset``
      - Specifies the offsets to the luma quantization parameter Cb.
    * - __s8
      - ``pps_cr_qp_offset``
      - Specifies the offsets to the luma quantization parameter Cr.
    * - __u8
      - ``num_tile_columns_minus1``
      - This value plus 1 specifies the number of tile columns partitioning the picture.
    * - __u8
      - ``num_tile_rows_minus1``
      - This value plus 1 specifies the number of tile rows partitioning the picture.
    * - __u8
      - ``column_width_minus1[20]``
      - This value plus 1 specifies the width of the i-th tile column in units of
        coding tree blocks.
    * - __u8
      - ``row_height_minus1[22]``
      - This value plus 1 specifies the height of the i-th tile row in units of coding
        tree blocks.
    * - __s8
      - ``pps_beta_offset_div2``
      - Specifies the default deblocking parameter offsets for beta divided by 2.
    * - __s8
      - ``pps_tc_offset_div2``
      - Specifies the default deblocking parameter offsets for tC divided by 2.
    * - __u8
      - ``log2_parallel_merge_level_minus2``
      - This value plus 2 specifies the value of the variable Log2ParMrgLevel.
    * - __u8
      - ``padding[4]``
      - Applications and drivers must set this to zero.
    * - __u64
      - ``flags``
      - See :ref:`Picture Parameter Set Flags <hevc_pps_flags>`

.. _hevc_pps_flags:

``Picture Parameter Set Flags``

.. raw:: latex

    \small

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED``
      - 0x00000001
      -
    * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``
      - 0x00000002
      -
    * - ``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED``
      - 0x00000004
      -
    * - ``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT``
      - 0x00000008
      -
    * - ``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED``
      - 0x00000010
      -
    * - ``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED``
      - 0x00000020
      -
    * - ``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED``
      - 0x00000040
      -
    * - ``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT``
      - 0x00000080
      -
    * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED``
      - 0x00000100
      -
    * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED``
      - 0x00000200
      -
    * - ``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED``
      - 0x00000400
      -
    * - ``V4L2_HEVC_PPS_FLAG_TILES_ENABLED``
      - 0x00000800
      -
    * - ``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED``
      - 0x00001000
      -
    * - ``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED``
      - 0x00002000
      -
    * - ``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED``
      - 0x00004000
      -
    * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED``
      - 0x00008000
      -
    * - ``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER``
      - 0x00010000
      -
    * - ``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT``
      - 0x00020000
      -
    * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``
      - 0x00040000
      -
    * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
      - 0x00080000
      - Specifies the presence of deblocking filter control syntax elements in
        the PPS
    * - ``V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING``
      - 0x00100000
      - Specifies that tile column boundaries and likewise tile row boundaries
        are distributed uniformly across the picture

.. raw:: latex

    \normalsize

``V4L2_CID_STATELESS_HEVC_SLICE_PARAMS (struct)``
    Specifies various slice-specific parameters, especially from the NAL unit
    header, general slice segment header and weighted prediction parameter
    parts of the bitstream.
    These bitstream parameters are defined according to :ref:`hevc`.
    They are described in section 7.4.7 "General slice segment header
    semantics" of the specification.
    This control is a dynamically sized 1-dimensional array,
    V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it.

.. c:type:: v4l2_ctrl_hevc_slice_params

.. raw:: latex

    \scriptsize

.. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|

.. cssclass:: longtable

.. flat-table:: struct v4l2_ctrl_hevc_slice_params
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u32
      - ``bit_size``
      - Size (in bits) of the current slice data.
    * - __u32
      - ``data_byte_offset``
      - Offset (in byte) to the video data in the current slice data.
    * - __u32
      - ``num_entry_point_offsets``
      - Specifies the number of entry point offset syntax elements in the slice header.
        When the driver supports it, the ``V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS``
        must be set.
    * - __u8
      - ``nal_unit_type``
      - Specifies the coding type of the slice (B, P or I).
    * - __u8
      - ``nuh_temporal_id_plus1``
      - Minus 1 specifies a temporal identifier for the NAL unit.
    * - __u8
      - ``slice_type``
      -
	(V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or
	V4L2_HEVC_SLICE_TYPE_B).
    * - __u8
      - ``colour_plane_id``
      - Specifies the colour plane associated with the current slice.
    * - __s32
      - ``slice_pic_order_cnt``
      - Specifies the picture order count.
    * - __u8
      - ``num_ref_idx_l0_active_minus1``
      - This value plus 1 specifies the maximum reference index for reference picture list 0
        that may be used to decode the slice.
    * - __u8
      - ``num_ref_idx_l1_active_minus1``
      - This value plus 1 specifies the maximum reference index for reference picture list 1
        that may be used to decode the slice.
    * - __u8
      - ``collocated_ref_idx``
      - Specifies the reference index of the collocated picture used for
        temporal motion vector prediction.
    * - __u8
      - ``five_minus_max_num_merge_cand``
      - Specifies the maximum number of merging motion vector prediction
        candidates supported in the slice subtracted from 5.
    * - __s8
      - ``slice_qp_delta``
      - Specifies the initial value of QpY to be used for the coding blocks in the slice.
    * - __s8
      - ``slice_cb_qp_offset``
      - Specifies a difference to be added to the value of pps_cb_qp_offset.
    * - __s8
      - ``slice_cr_qp_offset``
      - Specifies a difference to be added to the value of pps_cr_qp_offset.
    * - __s8
      - ``slice_act_y_qp_offset``
      - Specifies the offset to the luma of quantization parameter qP derived in section 8.6.2
    * - __s8
      - ``slice_act_cb_qp_offset``
      - Specifies the offset to the cb of quantization parameter qP derived in section 8.6.2
    * - __s8
      - ``slice_act_cr_qp_offset``
      - Specifies the offset to the cr of quantization parameter qP derived in section 8.6.2
    * - __s8
      - ``slice_beta_offset_div2``
      - Specifies the deblocking parameter offsets for beta divided by 2.
    * - __s8
      - ``slice_tc_offset_div2``
      - Specifies the deblocking parameter offsets for tC divided by 2.
    * - __u8
      - ``pic_struct``
      - Indicates whether a picture should be displayed as a frame or as one or more fields.
    * - __u32
      - ``slice_segment_addr``
      - Specifies the address of the first coding tree block in the slice segment.
    * - __u8
      - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
      - The list of L0 reference elements as indices in the DPB.
    * - __u8
      - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
      - The list of L1 reference elements as indices in the DPB.
    * - __u16
      - ``short_term_ref_pic_set_size``
      - Specifies the size, in bits, of the short-term reference picture set, described as st_ref_pic_set()
        in the specification, included in the slice header or SPS (section 7.3.6.1).
    * - __u16
      - ``long_term_ref_pic_set_size``
      - Specifies the size, in bits, of the long-term reference picture set include in the slice header
        or SPS. It is the number of bits in the conditional block if(long_term_ref_pics_present_flag)
        in section 7.3.6.1 of the specification.
    * - __u8
      - ``padding``
      - Applications and drivers must set this to zero.
    * - struct :c:type:`v4l2_hevc_pred_weight_table`
      - ``pred_weight_table``
      - The prediction weight coefficients for inter-picture prediction.
    * - __u64
      - ``flags``
      - See :ref:`Slice Parameters Flags <hevc_slice_params_flags>`

.. raw:: latex

    \normalsize

.. _hevc_slice_params_flags:

``Slice Parameters Flags``

.. raw:: latex

    \scriptsize

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA``
      - 0x00000001
      -
    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA``
      - 0x00000002
      -
    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED``
      - 0x00000004
      -
    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO``
      - 0x00000008
      -
    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT``
      - 0x00000010
      -
    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0``
      - 0x00000020
      -
    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV``
      - 0x00000040
      -
    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED``
      - 0x00000080
      -
    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``
      - 0x00000100
      -
    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT``
      - 0x00000200
      -

.. raw:: latex

    \normalsize

``V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (integer)``
    Specifies entry point offsets in bytes.
    This control is a dynamically sized array. The number of entry point
    offsets is reported by the ``elems`` field.
    This bitstream parameter is defined according to :ref:`hevc`.
    They are described in section 7.4.7.1 "General slice segment header
    semantics" of the specification.
    When multiple slices are submitted in a request, the length of
    this array must be the sum of num_entry_point_offsets of all the
    slices in the request.

``V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (struct)``
    Specifies the HEVC scaling matrix parameters used for the scaling process
    for transform coefficients.
    These matrix and parameters are defined according to :ref:`hevc`.
    They are described in section 7.4.5 "Scaling list data semantics" of
    the specification.

.. c:type:: v4l2_ctrl_hevc_scaling_matrix

.. raw:: latex

    \scriptsize

.. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|

.. cssclass:: longtable

.. flat-table:: struct v4l2_ctrl_hevc_scaling_matrix
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``scaling_list_4x4[6][16]``
      - Scaling list is used for the scaling process for transform
        coefficients. The values on each scaling list are expected
        in raster scan order.
    * - __u8
      - ``scaling_list_8x8[6][64]``
      - Scaling list is used for the scaling process for transform
        coefficients. The values on each scaling list are expected
        in raster scan order.
    * - __u8
      - ``scaling_list_16x16[6][64]``
      - Scaling list is used for the scaling process for transform
        coefficients. The values on each scaling list are expected
        in raster scan order.
    * - __u8
      - ``scaling_list_32x32[2][64]``
      - Scaling list is used for the scaling process for transform
        coefficients. The values on each scaling list are expected
        in raster scan order.
    * - __u8
      - ``scaling_list_dc_coef_16x16[6]``
      - Scaling list is used for the scaling process for transform
        coefficients. The values on each scaling list are expected
        in raster scan order.
    * - __u8
      - ``scaling_list_dc_coef_32x32[2]``
      - Scaling list is used for the scaling process for transform
        coefficients. The values on each scaling list are expected
        in raster scan order.

.. raw:: latex

    \normalsize

.. c:type:: v4l2_hevc_dpb_entry

.. raw:: latex

    \small

.. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{12.1cm}|

.. flat-table:: struct v4l2_hevc_dpb_entry
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u64
      - ``timestamp``
      - Timestamp of the V4L2 capture buffer to use as reference, used
        with B-coded and P-coded frames. The timestamp refers to the
	``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
	:c:func:`v4l2_timeval_to_ns()` function to convert the struct
	:c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
    * - __u8
      - ``flags``
      - Long term flag for the reference frame
        (V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE). The flag is set as
        described in the ITU HEVC specification chapter "8.3.2 Decoding
        process for reference picture set".
    * - __u8
      - ``field_pic``
      - Whether the reference is a field picture or a frame.
        See :ref:`HEVC dpb field pic Flags <hevc_dpb_field_pic_flags>`
    * - __s32
      - ``pic_order_cnt_val``
      - The picture order count of the current picture.
    * - __u8
      - ``padding[2]``
      - Applications and drivers must set this to zero.

.. raw:: latex

    \normalsize

.. _hevc_dpb_field_pic_flags:

``HEVC dpb field pic Flags``

.. raw:: latex

    \scriptsize

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME``
      - 0
      - (progressive) Frame
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD``
      - 1
      - Top field
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD``
      - 2
      - Bottom field
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM``
      - 3
      - Top field, bottom field, in that order
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP``
      - 4
      - Bottom field, top field, in that order
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP``
      - 5
      - Top field, bottom field, top field repeated, in that order
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM``
      - 6
      - Bottom field, top field, bottom field repeated, in that order
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING``
      - 7
      - Frame doubling
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING``
      - 8
      - Frame tripling
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM``
      - 9
      - Top field paired with previous bottom field in output order
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP``
      - 10
      - Bottom field paired with previous top field in output order
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM``
      - 11
      - Top field paired with next bottom field in output order
    * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP``
      - 12
      - Bottom field paired with next top field in output order

.. c:type:: v4l2_hevc_pred_weight_table

.. raw:: latex

    \footnotesize

.. tabularcolumns:: |p{0.8cm}|p{10.6cm}|p{5.9cm}|

.. flat-table:: struct v4l2_hevc_pred_weight_table
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __s8
      - ``delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
      - The difference of the weighting factor applied to the luma
        prediction value for list 0.
    * - __s8
      - ``luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
      - The additive offset applied to the luma prediction value for list 0.
    * - __s8
      - ``delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
      - The difference of the weighting factor applied to the chroma
        prediction value for list 0.
    * - __s8
      - ``chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
      - The difference of the additive offset applied to the chroma
        prediction values for list 0.
    * - __s8
      - ``delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
      - The difference of the weighting factor applied to the luma
        prediction value for list 1.
    * - __s8
      - ``luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
      - The additive offset applied to the luma prediction value for list 1.
    * - __s8
      - ``delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
      - The difference of the weighting factor applied to the chroma
        prediction value for list 1.
    * - __s8
      - ``chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
      - The difference of the additive offset applied to the chroma
        prediction values for list 1.
    * - __u8
      - ``luma_log2_weight_denom``
      - The base 2 logarithm of the denominator for all luma weighting
        factors.
    * - __s8
      - ``delta_chroma_log2_weight_denom``
      - The difference of the base 2 logarithm of the denominator for
        all chroma weighting factors.
    * - __u8
      - ``padding[6]``
      - Applications and drivers must set this to zero.

.. raw:: latex

    \normalsize

``V4L2_CID_STATELESS_HEVC_DECODE_MODE (enum)``
    Specifies the decoding mode to use. Currently exposes slice-based and
    frame-based decoding but new modes might be added later on.
    This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
    pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
    are required to set this control in order to specify the decoding mode
    that is expected for the buffer.
    Drivers may expose a single or multiple decoding modes, depending
    on what they can support.

.. c:type:: v4l2_stateless_hevc_decode_mode

.. raw:: latex

    \small

.. tabularcolumns:: |p{9.4cm}|p{0.6cm}|p{7.3cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED``
      - 0
      - Decoding is done at the slice granularity.
        The OUTPUT buffer must contain a single slice.
    * - ``V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED``
      - 1
      - Decoding is done at the frame granularity.
        The OUTPUT buffer must contain all slices needed to decode the
        frame.

.. raw:: latex

    \normalsize

``V4L2_CID_STATELESS_HEVC_START_CODE (enum)``
    Specifies the HEVC slice start code expected for each slice.
    This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
    pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
    are required to set this control in order to specify the start code
    that is expected for the buffer.
    Drivers may expose a single or multiple start codes, depending
    on what they can support.

.. c:type:: v4l2_stateless_hevc_start_code

.. tabularcolumns:: |p{9.2cm}|p{0.6cm}|p{7.5cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_STATELESS_HEVC_START_CODE_NONE``
      - 0
      - Selecting this value specifies that HEVC slices are passed
        to the driver without any start code. The bitstream data should be
        according to :ref:`hevc` 7.3.1.1 General NAL unit syntax, hence
        contains emulation prevention bytes when required.
    * - ``V4L2_STATELESS_HEVC_START_CODE_ANNEX_B``
      - 1
      - Selecting this value specifies that HEVC slices are expected
        to be prefixed by Annex B start codes. According to :ref:`hevc`
        valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.

.. raw:: latex

    \normalsize

``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (integer)``
    Specifies a priority identifier for the NAL unit, which will be applied to
    the base layer. By default this value is set to 0 for the base layer,
    and the next layer will have the priority ID assigned as 1, 2, 3 and so on.
    The video encoder can't decide the priority id to be applied to a layer,
    so this has to come from client.
    This is applicable to H264 and valid Range is from 0 to 63.
    Source Rec. ITU-T H.264 (06/2019); G.7.4.1.1, G.8.8.1.

``V4L2_CID_MPEG_VIDEO_LTR_COUNT (integer)``
    Specifies the maximum number of Long Term Reference (LTR) frames at any
    given time that the encoder can keep.
    This is applicable to the H264 and HEVC encoders.

``V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (integer)``
    After setting this control the frame that will be queued next
    will be marked as a Long Term Reference (LTR) frame
    and given this LTR index which ranges from 0 to LTR_COUNT-1.
    This is applicable to the H264 and HEVC encoders.
    Source Rec. ITU-T H.264 (06/2019); Table 7.9

``V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (bitmask)``
    Specifies the Long Term Reference (LTR) frame(s) to be used for
    encoding the next frame queued after setting this control.
    This provides a bitmask which consists of bits [0, LTR_COUNT-1].
    This is applicable to the H264 and HEVC encoders.

``V4L2_CID_STATELESS_HEVC_DECODE_PARAMS (struct)``
    Specifies various decode parameters, especially the references picture order
    count (POC) for all the lists (short, long, before, current, after) and the
    number of entries for each of them.
    These parameters are defined according to :ref:`hevc`.
    They are described in section 8.3 "Slice decoding process" of the
    specification.

.. c:type:: v4l2_ctrl_hevc_decode_params

.. cssclass:: longtable

.. flat-table:: struct v4l2_ctrl_hevc_decode_params
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __s32
      - ``pic_order_cnt_val``
      - PicOrderCntVal as described in section 8.3.1 "Decoding process
        for picture order count" of the specification.
    * - __u16
      - ``short_term_ref_pic_set_size``
      - Specifies the size, in bits, of the short-term reference picture set, of the first slice
        described as st_ref_pic_set() in the specification, included in the slice header
        or SPS (section 7.3.6.1).
    * - __u16
      - ``long_term_ref_pic_set_size``
      - Specifies the size, in bits, of the long-term reference picture set, of the first slice
        included in the slice header or SPS. It is the number of bits in the conditional block
        if(long_term_ref_pics_present_flag) in section 7.3.6.1 of the specification.
    * - __u8
      - ``num_active_dpb_entries``
      - The number of entries in ``dpb``.
    * - __u8
      - ``num_poc_st_curr_before``
      - The number of reference pictures in the short-term set that come before
        the current frame.
    * - __u8
      - ``num_poc_st_curr_after``
      - The number of reference pictures in the short-term set that come after
        the current frame.
    * - __u8
      - ``num_poc_lt_curr``
      - The number of reference pictures in the long-term set.
    * - __u8
      - ``poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
      - PocStCurrBefore as described in section 8.3.2 "Decoding process for reference
        picture set": provides the index of the short term before references in DPB array.
    * - __u8
      - ``poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
      - PocStCurrAfter as described in section 8.3.2 "Decoding process for reference
        picture set": provides the index of the short term after references in DPB array.
    * - __u8
      - ``poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
      - PocLtCurr as described in section 8.3.2 "Decoding process for reference
        picture set": provides the index of the long term references in DPB array.
    * - __u8
      - ``num_delta_pocs_of_ref_rps_idx``
      - When the short_term_ref_pic_set_sps_flag in the slice header is equal to 0,
        it is the same as the derived value NumDeltaPocs[RefRpsIdx]. It can be used to parse
        the RPS data in slice headers instead of skipping it with @short_term_ref_pic_set_size.
        When the value of short_term_ref_pic_set_sps_flag in the slice header is
        equal to 1, num_delta_pocs_of_ref_rps_idx shall be set to 0.
    * - struct :c:type:`v4l2_hevc_dpb_entry`
      - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
      - The decoded picture buffer, for meta-data about reference frames.
    * - __u64
      - ``flags``
      - See :ref:`Decode Parameters Flags <hevc_decode_params_flags>`

.. _hevc_decode_params_flags:

``Decode Parameters Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC``
      - 0x00000001
      -
    * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC``
      - 0x00000002
      -
    * - ``V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR``
      - 0x00000004
      -

AV1 stateless 제어

2961-4168

`V4L2_CID_STATELESS_AV1_SEQUENCE`는 sequence header의 profile, order-hint 비트 수, bit depth, 최대 frame width/height와 sequence-tool 플래그를 전달합니다. Still picture, reduced header, timing/model 정보, initial display delay, order hint, superres, CDEF, restoration, screen-content와 integer-MV 선택 기능을 플래그로 표현합니다.

`V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY`는 각 tile의 byte offset·size와 row·column을 전달합니다. `v4l2_av1_tile_info`는 uniform spacing, context-update tile, tile 행·열 수, MI 시작 위치, superblock 단위 크기와 tile-size field 바이트 수를 정의합니다.

`v4l2_av1_warp_model`, `v4l2_av1_reference_frame`, `v4l2_av1_global_motion`은 참조 프레임별 identity/translation/rotzoom/affine 모델, 6개 파라미터와 invalid 상태를 전달합니다. 전역 움직임 플래그는 is_global, is_rot_zoom, is_translation을 참조 슬롯별로 표시합니다.

`v4l2_av1_loop_restoration`은 Y/U/V plane별 NONE, WIENER, SGRPROJ, SWITCHABLE 복원 유형과 unit size를 전달합니다. `v4l2_av1_cdef`는 damping, strength bits와 Y/UV primary·secondary strength 배열을 담습니다.

`v4l2_av1_segmentation`은 enabled/update-map/temporal/update-data/segment-id-pre-skip 상태, 마지막 active segment, segment별 enabled feature bitmask와 feature data를 제공합니다. ALT_Q, ALT_LF 계열, REF_FRAME, SKIP, GLOBALMV 기능의 범위와 signedness는 AV1 규격을 따릅니다.

`v4l2_av1_loop_filter`는 plane별 level, sharpness, reference/mode delta와 delta-LF resolution을 전달합니다. `v4l2_av1_quantization`은 base Q와 Y/U/V DC·AC delta, quantization matrix level 및 delta-Q resolution을 제공하며 separate UV delta와 delta-Q present 플래그를 구분합니다.

`V4L2_CID_STATELESS_AV1_FRAME`은 tile, quantization, superres, segmentation, loop filter, CDEF, skip-mode references, primary reference, restoration, global motion, frame flags/type, order hint, upscaled/render/coded 크기, interpolation, transform mode, frame ID, buffer-removal time, 참조 order hints와 CAPTURE timestamps, 참조 index 및 refresh mask를 한 프레임 payload로 전달합니다.

AV1 frame flags는 show/showable/error-resilient/disable-CDF-update, allow screen-content/integer-MV/intrabc/high-precision-MV/warped-motion, reduced-tx-set, reference-frame-MVs, frame-end-CDF update disable, primary-ref-none, buffer-removal-time present, frame-size override, motion-mode switchable, use-ref-frame-MVs와 reference select를 포함합니다.

`reference_frame_ts` 배열은 AV1의 8개 reference slot을 CAPTURE 버퍼 timestamp에 연결하고 `ref_frame_idx`는 inter frame이 사용할 7개 참조를 slot에 매핑합니다. `refresh_frame_flags`는 현재 프레임으로 갱신할 reference slot bitmask입니다.

`V4L2_CID_STATELESS_AV1_FILM_GRAIN`은 apply/update grain, chroma scaling, overlap, clipping 플래그와 seed, Y/Cb/Cr scaling points, AR lag·coefficients·shift, grain scale, chroma multiplier와 offset을 전달합니다. update-grain이 설정되면 `film_grain_params_ref_idx`가 참조하는 슬롯의 파라미터 갱신 규칙을 적용합니다.

AV1 구조체 필드
필드의미
`flags`이 구조체에 적용되는 기능과 비트스트림 상태를 나타내는 비트 플래그입니다. 아래 상수 표의 비트를 조합합니다.
`seq_profile`비트스트림 프로파일 또는 프로파일 식별자입니다.
`order_hint_bits`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`bit_depth`루마 또는 크로마 샘플의 비트 깊이 파라미터입니다.
`reserved`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`max_frame_width_minus_1`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`max_frame_height_minus_1`부호화 또는 표시 영상의 높이를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`tile_offset`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`tile_size`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`tile_row`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`tile_col`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`flags[V4L2_AV1_TOTAL_REFS_PER_FRAME]`이 구조체에 적용되는 기능과 비트스트림 상태를 나타내는 비트 플래그입니다. 아래 상수 표의 비트를 조합합니다.
`type[V4L2_AV1_TOTAL_REFS_PER_FRAME]`원문 구조체의 `type[V4L2_AV1_TOTAL_REFS_PER_FRAME]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6]`원문 구조체의 `params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`invalid`원문 구조체의 `invalid` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`reserved[3]`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`lr_unit_shift`원문 구조체의 `lr_unit_shift` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`lr_uv_shift`원문 구조체의 `lr_uv_shift` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX]`원문 구조체의 `frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`loop_restoration_size[V4L2_AV1_MAX_NUM_PLANES]`해당 헤더, 구문 또는 데이터 영역의 크기입니다. 단위는 필드 설명을 따릅니다.
`damping_minus_3`원문 구조체의 `damping_minus_3` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`bits`원문 구조체의 `bits` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`y_pri_strength[V4L2_AV1_CDEF_MAX]`원문 구조체의 `y_pri_strength[V4L2_AV1_CDEF_MAX]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`y_sec_strength[V4L2_AV1_CDEF_MAX]`원문 구조체의 `y_sec_strength[V4L2_AV1_CDEF_MAX]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`uv_pri_strength[V4L2_AV1_CDEF_MAX]`원문 구조체의 `uv_pri_strength[V4L2_AV1_CDEF_MAX]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`uv_sec_strength[V4L2_AV1_CDEF_MAX]`원문 구조체의 `uv_sec_strength[V4L2_AV1_CDEF_MAX]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`last_active_seg_id`원문 구조체의 `last_active_seg_id` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`feature_enabled[V4L2_AV1_MAX_SEGMENTS]`원문 구조체의 `feature_enabled[V4L2_AV1_MAX_SEGMENTS]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX]`원문 구조체의 `feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`level[4]`코덱 레벨, 필터 강도 또는 계층 수준입니다. 정확한 의미는 소속 구조체와 코덱 문맥을 따릅니다.
`sharpness`원문 구조체의 `sharpness` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME]`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`mode_deltas[2]`기준값에 더하는 코덱 구문상의 차분값입니다.
`delta_lf_res`인루프 필터의 설정, 강도 또는 보정값입니다.
`base_q_idx`양자화 계수, 인덱스 또는 QP 보정값입니다.
`delta_q_y_dc`기준값에 더하는 코덱 구문상의 차분값입니다.
`delta_q_u_dc`기준값에 더하는 코덱 구문상의 차분값입니다.
`delta_q_u_ac`기준값에 더하는 코덱 구문상의 차분값입니다.
`delta_q_v_dc`기준값에 더하는 코덱 구문상의 차분값입니다.
`delta_q_v_ac`기준값에 더하는 코덱 구문상의 차분값입니다.
`qm_y`원문 구조체의 `qm_y` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`qm_u`원문 구조체의 `qm_u` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`qm_v`원문 구조체의 `qm_v` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`delta_q_res`기준값에 더하는 코덱 구문상의 차분값입니다.
`context_update_tile_id`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`tile_cols`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`tile_rows`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`width_in_sbs_minus_1[V4L2_AV1_MAX_TILE_COLS]`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`height_in_sbs_minus_1[V4L2_AV1_MAX_TILE_ROWS]`부호화 또는 표시 영상의 높이를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`tile_size_bytes`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`tile_info`타일 위치·크기·행·열 또는 타일 컨텍스트 정보입니다.
`quantization`양자화 계수, 인덱스 또는 QP 보정값입니다.
`superres_denom`원문 구조체의 `superres_denom` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`segmentation`세그먼테이션 상태, 세그먼트 식별자 또는 세그먼트별 기능 데이터입니다.
`loop_filter`인루프 필터의 설정, 강도 또는 보정값입니다.
`cdef`원문 구조체의 `cdef` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`skip_mode_frame[2]`코덱 도구 또는 디코딩 동작 모드를 선택합니다.
`primary_ref_frame`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`loop_restoration`원문 구조체의 `loop_restoration` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`global_motion`움직임 벡터 또는 전역 움직임 모델의 파라미터입니다.
`frame_type`프레임·그림·슬라이스의 부호화 유형입니다.
`order_hint`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`upscaled_width`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`interpolation_filter`보간, 디블로킹 또는 복원 필터의 선택값입니다.
`tx_mode`코덱 도구 또는 디코딩 동작 모드를 선택합니다.
`frame_width_minus_1`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`frame_height_minus_1`부호화 또는 표시 영상의 높이를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`render_width_minus_1`부호화 또는 표시 영상의 너비를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`render_height_minus_1`부호화 또는 표시 영상의 높이를 나타냅니다. 이름의 minus_1 규칙과 단위는 해당 코덱 규격을 따릅니다.
`current_frame_id`프레임 번호 또는 프레임 식별자입니다.
`buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS]`원문 구조체의 `buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`reserved[4]`ABI 호환을 위해 예약된 필드입니다. 애플리케이션과 드라이버는 원문이 요구하는 값, 보통 0으로 설정해야 합니다.
`order_hints[V4L2_AV1_TOTAL_REFS_PER_FRAME]`화면 출력·참조 순서를 계산하는 picture order 값입니다.
`reference_frame_ts[V4L2_AV1_TOTAL_REFS_PER_FRAME]`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`ref_frame_idx[V4L2_AV1_REFS_PER_FRAME]`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`refresh_frame_flags`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`cr_mult`원문 구조체의 `cr_mult` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`grain_seed`AV1 필름 그레인 합성 모델의 파라미터입니다.
`film_grain_params_ref_idx`참조 그림, 참조 목록 또는 참조 프레임 관련 값입니다.
`num_y_points`원문 구조체의 `num_y_points` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`point_y_value[V4L2_AV1_MAX_NUM_Y_POINTS]`원문 구조체의 `point_y_value[V4L2_AV1_MAX_NUM_Y_POINTS]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`point_y_scaling[V4L2_AV1_MAX_NUM_Y_POINTS]`원문 구조체의 `point_y_scaling[V4L2_AV1_MAX_NUM_Y_POINTS]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`num_cb_points`원문 구조체의 `num_cb_points` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`point_cb_value[V4L2_AV1_MAX_NUM_CB_POINTS]`원문 구조체의 `point_cb_value[V4L2_AV1_MAX_NUM_CB_POINTS]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`point_cb_scaling[V4L2_AV1_MAX_NUM_CB_POINTS]`원문 구조체의 `point_cb_scaling[V4L2_AV1_MAX_NUM_CB_POINTS]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`num_cr_points`원문 구조체의 `num_cr_points` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`point_cr_value[V4L2_AV1_MAX_NUM_CR_POINTS]`원문 구조체의 `point_cr_value[V4L2_AV1_MAX_NUM_CR_POINTS]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`point_cr_scaling[V4L2_AV1_MAX_NUM_CR_POINTS]`원문 구조체의 `point_cr_scaling[V4L2_AV1_MAX_NUM_CR_POINTS]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`grain_scaling_minus_8`AV1 필름 그레인 합성 모델의 파라미터입니다.
`ar_coeff_lag`원문 구조체의 `ar_coeff_lag` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`ar_coeffs_y_plus_128[V4L2_AV1_AR_COEFFS_SIZE]`원문 구조체의 `ar_coeffs_y_plus_128[V4L2_AV1_AR_COEFFS_SIZE]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`ar_coeffs_cb_plus_128[V4L2_AV1_AR_COEFFS_SIZE]`원문 구조체의 `ar_coeffs_cb_plus_128[V4L2_AV1_AR_COEFFS_SIZE]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`ar_coeffs_cr_plus_128[V4L2_AV1_AR_COEFFS_SIZE]`원문 구조체의 `ar_coeffs_cr_plus_128[V4L2_AV1_AR_COEFFS_SIZE]` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`ar_coeff_shift_minus_6`원문 구조체의 `ar_coeff_shift_minus_6` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`grain_scale_shift`AV1 필름 그레인 합성 모델의 파라미터입니다.
`cb_mult`원문 구조체의 `cb_mult` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`cb_luma_mult`원문 구조체의 `cb_luma_mult` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`cr_luma_mult`원문 구조체의 `cr_luma_mult` 필드입니다. 값의 범위와 코덱 구문 매핑은 이 필드가 속한 표 및 참조 규격을 그대로 따릅니다.
`cb_offset`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.
`cr_offset`비트스트림 구문, 필터, 색차 또는 가중 예측에 적용하는 오프셋입니다.

Sequence, tile, motion, restoration, CDEF, segmentation, filter, quantization, frame과 film-grain 필드 전체입니다.

AV1 제어·플래그 상수
상수의미
`V4L2_CID_STATELESS_AV1_SEQUENCE``V4L2_CID_STATELESS_AV1_SEQUENCE`: cid stateless av1 sequence 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE``V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE`: av1 sequence flag still picture 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK``V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK`: av1 sequence flag use 128x128 superblock 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA``V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA`: av1 sequence flag enable filter intra 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER`: av1 sequence flag enable intra edge filter 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND`: av1 sequence flag enable interintra compound 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND``V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND`: av1 sequence flag enable masked compound 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION``V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION`: av1 sequence flag enable warped motion 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER``V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER`: av1 sequence flag enable dual filter 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT``V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT`: av1 sequence flag enable order hint 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP``V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP`: av1 sequence flag enable jnt comp 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS``V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS`: av1 sequence flag enable ref frame mvs 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES``V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES`: av1 sequence flag enable superres 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF``V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF`: av1 sequence flag enable cdef 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION``V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION`: av1 sequence flag enable restoration 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME``V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME`: av1 sequence flag mono chrome 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE``V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE`: av1 sequence flag color range 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X`: av1 sequence flag subsampling x 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y`: av1 sequence flag subsampling y 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT``V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT`: av1 sequence flag film grain params present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q``V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q`: av1 sequence flag separate uv delta q 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY``V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY`: cid stateless av1 tile group entry 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_AV1_WARP_MODEL_IDENTITY``V4L2_AV1_WARP_MODEL_IDENTITY`: av1 warp model identity 동작 모드 선택값입니다.
`V4L2_AV1_WARP_MODEL_TRANSLATION``V4L2_AV1_WARP_MODEL_TRANSLATION`: av1 warp model translation 동작 모드 선택값입니다.
`V4L2_AV1_WARP_MODEL_ROTZOOM``V4L2_AV1_WARP_MODEL_ROTZOOM`: av1 warp model rotzoom 동작 모드 선택값입니다.
`V4L2_AV1_WARP_MODEL_AFFINE``V4L2_AV1_WARP_MODEL_AFFINE`: av1 warp model affine 동작 모드 선택값입니다.
`V4L2_AV1_REF_INTRA_FRAME``V4L2_AV1_REF_INTRA_FRAME`: av1 ref intra frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_REF_LAST_FRAME``V4L2_AV1_REF_LAST_FRAME`: av1 ref last frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_REF_LAST2_FRAME``V4L2_AV1_REF_LAST2_FRAME`: av1 ref last2 frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_REF_LAST3_FRAME``V4L2_AV1_REF_LAST3_FRAME`: av1 ref last3 frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_REF_GOLDEN_FRAME``V4L2_AV1_REF_GOLDEN_FRAME`: av1 ref golden frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_REF_BWDREF_FRAME``V4L2_AV1_REF_BWDREF_FRAME`: av1 ref bwdref frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_REF_ALTREF2_FRAME``V4L2_AV1_REF_ALTREF2_FRAME`: av1 ref altref2 frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_REF_ALTREF_FRAME``V4L2_AV1_REF_ALTREF_FRAME`: av1 ref altref frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_TOTAL_REFS_PER_FRAME``V4L2_AV1_TOTAL_REFS_PER_FRAME`: av1 total refs per frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_GLOBAL_MOTION_IS_INVALID``V4L2_AV1_GLOBAL_MOTION_IS_INVALID`: av1 global motion is invalid에 대응하는 UAPI 상수입니다.
`V4L2_AV1_GLOBAL_MOTION_FLAG_IS_GLOBAL``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_GLOBAL`: av1 global motion flag is global 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_GLOBAL_MOTION_FLAG_IS_ROT_ZOOM``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_ROT_ZOOM`: av1 global motion flag is rot zoom 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_GLOBAL_MOTION_FLAG_IS_TRANSLATION``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_TRANSLATION`: av1 global motion flag is translation 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_RESTORE_NONE``V4L2_AV1_FRAME_RESTORE_NONE`: av1 frame restore none에 대응하는 UAPI 상수입니다.
`V4L2_AV1_FRAME_RESTORE_WIENER``V4L2_AV1_FRAME_RESTORE_WIENER`: av1 frame restore wiener에 대응하는 UAPI 상수입니다.
`V4L2_AV1_FRAME_RESTORE_SGRPROJ``V4L2_AV1_FRAME_RESTORE_SGRPROJ`: av1 frame restore sgrproj에 대응하는 UAPI 상수입니다.
`V4L2_AV1_FRAME_RESTORE_SWITCHABLE``V4L2_AV1_FRAME_RESTORE_SWITCHABLE`: av1 frame restore switchable에 대응하는 UAPI 상수입니다.
`V4L2_AV1_NUM_PLANES_MAX``V4L2_AV1_NUM_PLANES_MAX`: av1 num planes max에 대응하는 UAPI 상수입니다.
`V4L2_AV1_MAX_NUM_PLANES``V4L2_AV1_MAX_NUM_PLANES`: av1 max num planes에 대응하는 UAPI 상수입니다.
`V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR`: av1 loop restoration flag uses lr 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR`: av1 loop restoration flag uses chroma lr 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_CDEF_MAX``V4L2_AV1_CDEF_MAX`: av1 cdef max에 대응하는 UAPI 상수입니다.
`V4L2_AV1_SEG_LVL_ALT_Q``V4L2_AV1_SEG_LVL_ALT_Q`: av1 seg lvl alt q에 대응하는 UAPI 상수입니다.
`V4L2_AV1_SEG_LVL_ALT_LF_Y_V``V4L2_AV1_SEG_LVL_ALT_LF_Y_V`: av1 seg lvl alt lf y v에 대응하는 UAPI 상수입니다.
`V4L2_AV1_SEG_LVL_REF_FRAME``V4L2_AV1_SEG_LVL_REF_FRAME`: av1 seg lvl ref frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_SEG_LVL_REF_SKIP``V4L2_AV1_SEG_LVL_REF_SKIP`: av1 seg lvl ref skip에 대응하는 UAPI 상수입니다.
`V4L2_AV1_SEG_LVL_REF_GLOBALMV``V4L2_AV1_SEG_LVL_REF_GLOBALMV`: av1 seg lvl ref globalmv에 대응하는 UAPI 상수입니다.
`V4L2_AV1_SEG_LVL_MAX``V4L2_AV1_SEG_LVL_MAX`: av1 seg lvl max에 대응하는 UAPI 상수입니다.
`V4L2_AV1_MAX_SEGMENTS``V4L2_AV1_MAX_SEGMENTS`: av1 max segments에 대응하는 UAPI 상수입니다.
`V4L2_AV1_SEGMENT_FEATURE_ENABLED``V4L2_AV1_SEGMENT_FEATURE_ENABLED`: av1 segment feature enabled에 대응하는 UAPI 상수입니다.
`V4L2_AV1_SEGMENTATION_FLAG_ENABLED``V4L2_AV1_SEGMENTATION_FLAG_ENABLED`: av1 segmentation flag enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP`: av1 segmentation flag update map 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE``V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE`: av1 segmentation flag temporal update 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA`: av1 segmentation flag update data 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP``V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP`: av1 segmentation flag seg id pre skip 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED`: av1 loop filter flag delta enabled 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE`: av1 loop filter flag delta update 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT`: av1 loop filter flag delta lf present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI`: av1 loop filter flag delta lf multi 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA``V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA`: av1 quantization flag diff uv delta 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX``V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX`: av1 quantization flag using qmatrix 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT``V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT`: av1 quantization flag delta q present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_MAX_TILE_COLS``V4L2_AV1_MAX_TILE_COLS`: av1 max tile cols에 대응하는 UAPI 상수입니다.
`V4L2_AV1_MAX_TILE_ROWS``V4L2_AV1_MAX_TILE_ROWS`: av1 max tile rows에 대응하는 UAPI 상수입니다.
`V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING``V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING`: av1 tile info flag uniform tile spacing 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_KEY_FRAME``V4L2_AV1_KEY_FRAME`: av1 key frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_INTER_FRAME``V4L2_AV1_INTER_FRAME`: av1 inter frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_INTRA_ONLY_FRAME``V4L2_AV1_INTRA_ONLY_FRAME`: av1 intra only frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_SWITCH_FRAME``V4L2_AV1_SWITCH_FRAME`: av1 switch frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP`: av1 interpolation filter eighttap에 대응하는 UAPI 상수입니다.
`V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH`: av1 interpolation filter eighttap smooth에 대응하는 UAPI 상수입니다.
`V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP`: av1 interpolation filter eighttap sharp에 대응하는 UAPI 상수입니다.
`V4L2_AV1_INTERPOLATION_FILTER_BILINEAR``V4L2_AV1_INTERPOLATION_FILTER_BILINEAR`: av1 interpolation filter bilinear에 대응하는 UAPI 상수입니다.
`V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE``V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE`: av1 interpolation filter switchable에 대응하는 UAPI 상수입니다.
`V4L2_AV1_TX_MODE_ONLY_4X4``V4L2_AV1_TX_MODE_ONLY_4X4`: av1 tx mode only 4x4 동작 모드 선택값입니다.
`V4L2_AV1_TX_MODE_LARGEST``V4L2_AV1_TX_MODE_LARGEST`: av1 tx mode largest 동작 모드 선택값입니다.
`V4L2_AV1_TX_MODE_SELECT``V4L2_AV1_TX_MODE_SELECT`: av1 tx mode select 동작 모드 선택값입니다.
`V4L2_CID_STATELESS_AV1_FRAME``V4L2_CID_STATELESS_AV1_FRAME`: cid stateless av1 frame 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_AV1_MAX_OPERATING_POINTS``V4L2_AV1_MAX_OPERATING_POINTS`: av1 max operating points에 대응하는 UAPI 상수입니다.
`V4L2_AV1_REFS_PER_FRAME``V4L2_AV1_REFS_PER_FRAME`: av1 refs per frame에 대응하는 UAPI 상수입니다.
`V4L2_AV1_FRAME_FLAG_SHOW_FRAME``V4L2_AV1_FRAME_FLAG_SHOW_FRAME`: av1 frame flag show frame 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME``V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME`: av1 frame flag showable frame 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE``V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE`: av1 frame flag error resilient mode 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE``V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE`: av1 frame flag disable cdf update 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS``V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS`: av1 frame flag allow screen content tools 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV``V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV`: av1 frame flag force integer mv 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC``V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC`: av1 frame flag allow intrabc 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_USE_SUPERRES``V4L2_AV1_FRAME_FLAG_USE_SUPERRES`: av1 frame flag use superres 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV``V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV`: av1 frame flag allow high precision mv 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE``V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE`: av1 frame flag is motion mode switchable 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS``V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS`: av1 frame flag use ref frame mvs 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF``V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF`: av1 frame flag disable frame end update cdf 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION``V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION`: av1 frame flag allow warped motion 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT``V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT`: av1 frame flag reference select 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET``V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET`: av1 frame flag reduced tx set 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED``V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED`: av1 frame flag skip mode allowed 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT``V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT`: av1 frame flag skip mode present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE``V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE`: av1 frame flag frame size override 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT``V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT`: av1 frame flag buffer removal time present 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING``V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING`: av1 frame flag frame refs short signaling 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_CID_STATELESS_AV1_FILM_GRAIN``V4L2_CID_STATELESS_AV1_FILM_GRAIN`: cid stateless av1 film grain 제어 ID입니다. 제어 형식과 payload는 원문의 해당 항목을 따릅니다.
`V4L2_AV1_MAX_NUM_Y_POINTS``V4L2_AV1_MAX_NUM_Y_POINTS`: av1 max num y points에 대응하는 UAPI 상수입니다.
`V4L2_AV1_MAX_NUM_CB_POINTS``V4L2_AV1_MAX_NUM_CB_POINTS`: av1 max num cb points에 대응하는 UAPI 상수입니다.
`V4L2_AV1_MAX_NUM_CR_POINTS``V4L2_AV1_MAX_NUM_CR_POINTS`: av1 max num cr points에 대응하는 UAPI 상수입니다.
`V4L2_AV1_AR_COEFFS_SIZE``V4L2_AV1_AR_COEFFS_SIZE`: av1 ar coeffs size에 대응하는 UAPI 상수입니다.
`V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN``V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN`: av1 film grain flag apply grain 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN``V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN`: av1 film grain flag update grain 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA``V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA`: av1 film grain flag chroma scaling from luma 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP``V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP`: av1 film grain flag overlap 상태 또는 기능을 나타내는 비트 플래그입니다.
`V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE``V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE`: av1 film grain flag clip to restricted range 상태 또는 기능을 나타내는 비트 플래그입니다.

Sequence tool, motion, restoration, segmentation, frame과 film-grain 상수입니다.

AV1 frame request
Sequence header와 frame header 파싱Tile group entry와 tile layout 구성Quantization·segmentation·loop filter·CDEF·restoration 설정Global motion과 reference slot timestamp 연결Frame flags·크기·order hint·refresh mask 설정필요하면 film grain payload 추가Controls와 OUTPUT buffer를 request로 제출

Sequence 상태와 프레임별 도구를 reference slot 및 tile 데이터에 결합합니다.

.. _v4l2-codec-stateless-av1:

``V4L2_CID_STATELESS_AV1_SEQUENCE (struct)``
    Represents an AV1 Sequence OBU (Open Bitstream Unit). See section 5.5
    "Sequence header OBU syntax" in :ref:`av1` for more details.

.. c:type:: v4l2_ctrl_av1_sequence

.. cssclass:: longtable

.. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|

.. flat-table:: struct v4l2_ctrl_av1_sequence
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u32
      - ``flags``
      - See :ref:`AV1 Sequence Flags <av1_sequence_flags>`.
    * - __u8
      - ``seq_profile``
      - Specifies the features that can be used in the coded video sequence.
    * - __u8
      - ``order_hint_bits``
      - Specifies the number of bits used for the order_hint field at each frame.
    * - __u8
      - ``bit_depth``
      - the bit depth to use for the sequence as described in section 5.5.2
        "Color config syntax" in :ref:`av1` for more details.
    * - __u8
      - ``reserved``
      - Applications and drivers must set this to zero.
    * - __u16
      - ``max_frame_width_minus_1``
      - Specifies the maximum frame width minus 1 for the frames represented by
        this sequence header.
    * - __u16
      - ``max_frame_height_minus_1``
      - Specifies the maximum frame height minus 1 for the frames represented by
        this sequence header.

.. _av1_sequence_flags:

``AV1 Sequence Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE``
      - 0x00000001
      - If set, specifies that the coded video sequence contains only one coded
        frame. If not set, specifies that the coded video sequence contains one
        or more coded frames.
    * - ``V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK``
      - 0x00000002
      - If set, indicates that superblocks contain 128x128 luma samples.
        When equal to 0, it indicates that superblocks contain 64x64 luma
        samples. The number of contained chroma samples depends on
        subsampling_x and subsampling_y.
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA``
      - 0x00000004
      - If set, specifies that the use_filter_intra syntax element may be
        present. If not set, specifies that the use_filter_intra syntax element
        will not be present.
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER``
      - 0x00000008
      - Specifies whether the intra edge filtering process should be enabled.
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND``
      - 0x00000010
      - If set, specifies that the mode info for inter blocks may contain the
        syntax element interintra. If not set, specifies that the syntax element
        interintra will not be present.
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND``
      - 0x00000020
      - If set, specifies that the mode info for inter blocks may contain the
        syntax element compound_type. If not set, specifies that the syntax
        element compound_type will not be present.
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION``
      - 0x00000040
      - If set, indicates that the allow_warped_motion syntax element may be
        present. If not set, indicates that the allow_warped_motion syntax
        element will not be present.
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER``
      - 0x00000080
      - If set, indicates that the inter prediction filter type may be specified
        independently in the horizontal and vertical directions. If the flag is
        equal to 0, only one filter type may be specified, which is then used in
        both directions.
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT``
      - 0x00000100
      - If set, indicates that tools based on the values of order hints may be
        used. If not set, indicates that tools based on order hints are
        disabled.
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP``
      - 0x00000200
      - If set, indicates that the distance weights process may be used for
        inter prediction.
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS``
      - 0x00000400
      - If set, indicates that the use_ref_frame_mvs syntax element may be
        present. If not set, indicates that the use_ref_frame_mvs syntax element
        will not be present.
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES``
      - 0x00000800
      - If set, specifies that the use_superres syntax element will be present
        in the uncompressed header. If not set, specifies that the use_superres
        syntax element will not be present (instead use_superres will be set to
        0 in the uncompressed header without being read).
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF``
      - 0x00001000
      - If set, specifies that cdef filtering may be enabled. If not set,
        specifies that cdef filtering is disabled.
    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION``
      - 0x00002000
      - If set, specifies that loop restoration filtering may be enabled. If not
        set, specifies that loop restoration filtering is disabled.
    * - ``V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME``
      - 0x00004000
      - If set, indicates that the video does not contain U and V color planes.
        If not set, indicates that the video contains Y, U, and V color planes.
    * - ``V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE``
      - 0x00008000
      - If set, signals full swing representation, i.e. "Full Range
        Quantization". If not set, signals studio swing representation, i.e.
        "Limited Range Quantization".
    * - ``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X``
      - 0x00010000
      - Specify the chroma subsampling format.
    * - ``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y``
      - 0x00020000
      - Specify the chroma subsampling format.
    * - ``V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT``
      - 0x00040000
      - Specifies whether film grain parameters are present in the coded video
        sequence.
    * - ``V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q``
      - 0x00080000
      - If set, indicates that the U and V planes may have separate delta
        quantizer values. If not set, indicates that the U and V planes will share
        the same delta quantizer value.

``V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY (struct)``
    Represents a single AV1 tile inside an AV1 Tile Group. Note that MiRowStart,
    MiRowEnd, MiColStart and MiColEnd can be retrieved from struct
    v4l2_av1_tile_info in struct v4l2_ctrl_av1_frame using tile_row and
    tile_col. See section 6.10.1 "General tile group OBU semantics" in
    :ref:`av1` for more details.

.. c:type:: v4l2_ctrl_av1_tile_group_entry

.. cssclass:: longtable

.. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|

.. flat-table:: struct v4l2_ctrl_av1_tile_group_entry
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u32
      - ``tile_offset``
      - Offset from the OBU data, i.e. where the coded tile data actually starts.
    * - __u32
      - ``tile_size``
      - Specifies the size in bytes of the coded tile. Equivalent to "TileSize"
        in :ref:`av1`.
    * - __u32
      - ``tile_row``
      - Specifies the row of the current tile. Equivalent to "TileRow" in
        :ref:`av1`.
    * - __u32
      - ``tile_col``
      - Specifies the column of the current tile. Equivalent to "TileColumn" in
        :ref:`av1`.

.. c:type:: v4l2_av1_warp_model

	AV1 Warp Model as described in section 3 "Symbols and abbreviated terms" of
	:ref:`av1`.

.. raw:: latex

    \scriptsize

.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_WARP_MODEL_IDENTITY``
      - 0
      - Warp model is just an identity transform.
    * - ``V4L2_AV1_WARP_MODEL_TRANSLATION``
      - 1
      - Warp model is a pure translation.
    * - ``V4L2_AV1_WARP_MODEL_ROTZOOM``
      - 2
      - Warp model is a rotation + symmetric zoom + translation.
    * - ``V4L2_AV1_WARP_MODEL_AFFINE``
      - 3
      - Warp model is a general affine transform.

.. c:type:: v4l2_av1_reference_frame

AV1 Reference Frames as described in section 6.10.24 "Ref frames semantics"
of :ref:`av1`.

.. raw:: latex

    \scriptsize

.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_REF_INTRA_FRAME``
      - 0
      - Intra Frame Reference.
    * - ``V4L2_AV1_REF_LAST_FRAME``
      - 1
      - Last Frame Reference.
    * - ``V4L2_AV1_REF_LAST2_FRAME``
      - 2
      - Last2 Frame Reference.
    * - ``V4L2_AV1_REF_LAST3_FRAME``
      - 3
      - Last3 Frame Reference.
    * - ``V4L2_AV1_REF_GOLDEN_FRAME``
      - 4
      - Golden Frame Reference.
    * - ``V4L2_AV1_REF_BWDREF_FRAME``
      - 5
      - BWD Frame Reference.
    * - ``V4L2_AV1_REF_ALTREF2_FRAME``
      - 6
      - ALTREF2 Frame Reference.
    * - ``V4L2_AV1_REF_ALTREF_FRAME``
      - 7
      - ALTREF Frame Reference.

.. c:type:: v4l2_av1_global_motion

AV1 Global Motion parameters as described in section 6.8.17
"Global motion params semantics" of :ref:`av1`.

.. cssclass:: longtable

.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|

.. flat-table:: struct v4l2_av1_global_motion
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``flags[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
      - A bitfield containing the flags per reference frame. See
        :ref:`AV1 Global Motion Flags <av1_global_motion_flags>` for more
        details.
    * - enum :c:type:`v4l2_av1_warp_model`
      - ``type[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
      - The type of global motion transform used.
    * - __s32
      - ``params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6]``
      - This field has the same meaning as "gm_params" in :ref:`av1`.
    * - __u8
      - ``invalid``
      - Bitfield indicating whether the global motion params are invalid for a
        given reference frame. See section 7.11.3.6 Setup shear process and the
        variable "warpValid". Use V4L2_AV1_GLOBAL_MOTION_IS_INVALID(ref) to
        create a suitable mask.
    * - __u8
      - ``reserved[3]``
      - Applications and drivers must set this to zero.

.. _av1_global_motion_flags:

``AV1 Global Motion Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_GLOBAL``
      - 0x00000001
      - Specifies whether global motion parameters are present for a particular
        reference frame.
    * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_ROT_ZOOM``
      - 0x00000002
      - Specifies whether a particular reference frame uses rotation and zoom
        global motion.
    * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_TRANSLATION``
      - 0x00000004
      - Specifies whether a particular reference frame uses translation global
        motion

.. c:type:: v4l2_av1_frame_restoration_type

AV1 Frame Restoration Type.

.. raw:: latex

    \scriptsize

.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_FRAME_RESTORE_NONE``
      - 0
      - No filtering is applied.
    * - ``V4L2_AV1_FRAME_RESTORE_WIENER``
      - 1
      - Wiener filter process is invoked.
    * - ``V4L2_AV1_FRAME_RESTORE_SGRPROJ``
      - 2
      - Self guided filter process is invoked.
    * - ``V4L2_AV1_FRAME_RESTORE_SWITCHABLE``
      - 3
      - Restoration filter is swichtable.

.. c:type:: v4l2_av1_loop_restoration

AV1 Loop Restoration as described in section 6.10.15 "Loop restoration params
semantics" of :ref:`av1`.

.. cssclass:: longtable

.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|

.. flat-table:: struct v4l2_av1_loop_restoration
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``flags``
      - See :ref:`AV1 Loop Restoration Flags <av1_loop_restoration_flags>`.
    * - __u8
      - ``lr_unit_shift``
      - Specifies if the luma restoration size should be halved.
    * - __u8
      - ``lr_uv_shift``
      - Specifies if the chroma size should be half the luma size.
    * - __u8
      - ``reserved``
      - Applications and drivers must set this to zero.
    * - :c:type:`v4l2_av1_frame_restoration_type`
      - ``frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX]``
      - Specifies the type of restoration used for each plane.
    * - __u8
      - ``loop_restoration_size[V4L2_AV1_MAX_NUM_PLANES]``
      - Specifies the size of loop restoration units in units of samples in the
        current plane.

.. _av1_loop_restoration_flags:

``AV1 Loop Restoration Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR``
      - 0x00000001
      - Retains the same meaning as UsesLr in :ref:`av1`.
    * - ``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR``
      - 0x00000002
      - Retains the same meaning as UsesChromaLr in :ref:`av1`.

.. c:type:: v4l2_av1_cdef

AV1 CDEF params semantics as described in section 6.10.14 "CDEF params
semantics" of :ref:`av1`.

.. cssclass:: longtable

.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|

.. flat-table:: struct v4l2_av1_cdef
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``damping_minus_3``
      - Controls the amount of damping in the deringing filter.
    * - __u8
      - ``bits``
      - Specifies the number of bits needed to specify which CDEF filter to
        apply.
    * - __u8
      - ``y_pri_strength[V4L2_AV1_CDEF_MAX]``
      -  Specifies the strength of the primary filter.
    * - __u8
      - ``y_sec_strength[V4L2_AV1_CDEF_MAX]``
      -  Specifies the strength of the secondary filter.
    * - __u8
      - ``uv_pri_strength[V4L2_AV1_CDEF_MAX]``
      -  Specifies the strength of the primary filter.
    * - __u8
      - ``uv_sec_strength[V4L2_AV1_CDEF_MAX]``
      -  Specifies the strength of the secondary filter.

.. c:type:: v4l2_av1_segment_feature

AV1 segment features as described in section 3 "Symbols and abbreviated terms"
of :ref:`av1`.

.. raw:: latex

    \scriptsize

.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_SEG_LVL_ALT_Q``
      - 0
      - Index for quantizer segment feature.
    * - ``V4L2_AV1_SEG_LVL_ALT_LF_Y_V``
      - 1
      - Index for vertical luma loop filter segment feature.
    * - ``V4L2_AV1_SEG_LVL_REF_FRAME``
      - 5
      - Index for reference frame segment feature.
    * - ``V4L2_AV1_SEG_LVL_REF_SKIP``
      - 6
      - Index for skip segment feature.
    * - ``V4L2_AV1_SEG_LVL_REF_GLOBALMV``
      - 7
      - Index for global mv feature.
    * - ``V4L2_AV1_SEG_LVL_MAX``
      - 8
      - Number of segment features.

.. c:type:: v4l2_av1_segmentation

AV1 Segmentation params as defined in section 6.8.13 "Segmentation params
semantics" of :ref:`av1`.

.. cssclass:: longtable

.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|

.. flat-table:: struct v4l2_av1_segmentation
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``flags``
      - See :ref:`AV1 Segmentation Flags <av1_segmentation_flags>`
    * - __u8
      - ``last_active_seg_id``
      -  Indicates the highest numbered segment id that has some
         enabled feature. This is used when decoding the segment id to only decode
         choices corresponding to used segments.
    * - __u8
      - ``feature_enabled[V4L2_AV1_MAX_SEGMENTS]``
      - Bitmask defining which features are enabled in each segment. Use
        V4L2_AV1_SEGMENT_FEATURE_ENABLED to build a suitable mask.
    * - __u16
      - ``feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX]``
      -  Data attached to each feature. Data entry is only valid if the feature
         is enabled.

.. _av1_segmentation_flags:

``AV1 Segmentation Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_SEGMENTATION_FLAG_ENABLED``
      - 0x00000001
      - If set, indicates that this frame makes use of the segmentation tool. If
        not set, indicates that the frame does not use segmentation.
    * - ``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP``
      - 0x00000002
      - If set, indicates that the segmentation map are updated during the
        decoding of this frame. If not set, indicates that the segmentation map
        from the previous frame is used.
    * - ``V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE``
      - 0x00000004
      - If set, indicates that the updates to the segmentation map are coded
        relative to the existing segmentation map. If not set, indicates that
        the new segmentation map is coded without reference to the existing
        segmentation map.
    * - ``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA``
      - 0x00000008
      - If set, indicates that the updates to the segmentation map are coded
        relative to the existing segmentation map. If not set, indicates that
        the new segmentation map is coded without reference to the existing
        segmentation map.
    * - ``V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP``
      - 0x00000010
      - If set, indicates that the segment id will be read before the skip
        syntax element. If not set, indicates that the skip syntax element will
        be read first.

.. c:type:: v4l2_av1_loop_filter

AV1 Loop filter params as defined in section 6.8.10 "Loop filter semantics" of
:ref:`av1`.

.. cssclass:: longtable

.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|

.. flat-table:: struct v4l2_av1_loop_filter
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``flags``
      - See
        :ref:`AV1 Loop Filter flags <av1_loop_filter_flags>` for more details.
    * - __u8
      - ``level[4]``
      - An array containing loop filter strength values. Different loop
        filter strength values from the array are used depending on the image
        plane being filtered, and the edge direction (vertical or horizontal)
        being filtered.
    * - __u8
      - ``sharpness``
      - indicates the sharpness level. The loop_filter_level and
        loop_filter_sharpness together determine when a block edge is filtered,
        and by how much the filtering can change the sample values. The loop
        filter process is described in section 7.14 of :ref:`av1`.
    * - __u8
      - ``ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
      - contains the adjustment needed for the filter level based on the
        chosen reference frame. If this syntax element is not present, it
        maintains its previous value.
    * - __u8
      - ``mode_deltas[2]``
      - contains the adjustment needed for the filter level based on
        the chosen mode. If this syntax element is not present, it maintains its
        previous value.
    * - __u8
      - ``delta_lf_res``
      - specifies the left shift which should be applied to decoded loop filter
        delta values.

.. _av1_loop_filter_flags:

``AV1 Loop Filter Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED``
      - 0x00000001
      - If set, means that the filter level depends on the mode and reference
        frame used to predict a block. If not set, means that the filter level
        does not depend on the mode and reference frame.
    * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE``
      - 0x00000002
      - If set, means that additional syntax elements are present that specify
        which mode and reference frame deltas are to be updated. If not set,
        means that these syntax elements are not present.
    * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT``
      - 0x00000004
      - Specifies whether loop filter delta values are present
    * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI``
      - 0x00000008
      - A value equal to 1 specifies that separate loop filter
        deltas are sent for horizontal luma edges, vertical luma edges,
        the U edges, and the V edges. A value of delta_lf_multi equal to 0
        specifies that the same loop filter delta is used for all edges.

.. c:type:: v4l2_av1_quantization

AV1 Quantization params as defined in section 6.8.11 "Quantization params
semantics" of :ref:`av1`.

.. cssclass:: longtable

.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|

.. flat-table:: struct v4l2_av1_quantization
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``flags``
      - See
        :ref:`AV1 Loop Filter flags <av1_quantization_flags>` for more details.
    * - __u8
      - ``base_q_idx``
      - Indicates the base frame qindex. This is used for Y AC coefficients and
        as the base value for the other quantizers.
    * - __u8
      - ``delta_q_y_dc``
      - Indicates the Y DC quantizer relative to base_q_idx.
    * - __u8
      - ``delta_q_u_dc``
      - Indicates the U DC quantizer relative to base_q_idx.
    * - __u8
      - ``delta_q_u_ac``
      - Indicates the U AC quantizer relative to base_q_idx.
    * - __u8
      - ``delta_q_v_dc``
      - Indicates the V DC quantizer relative to base_q_idx.
    * - __u8
      - ``delta_q_v_ac``
      - Indicates the V AC quantizer relative to base_q_idx.
    * - __u8
      - ``qm_y``
      - Specifies the level in the quantizer matrix that should be used for
        luma plane decoding.
    * - __u8
      - ``qm_u``
      - Specifies the level in the quantizer matrix that should be used for
        chroma U plane decoding.
    * - __u8
      - ``qm_v``
      - Specifies the level in the quantizer matrix that should be used for
        chroma V plane decoding.
    * - __u8
      - ``delta_q_res``
      - Specifies the left shift which should be applied to decoded quantizer
        index delta values.

.. _av1_quantization_flags:

``AV1 Quantization Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA``
      - 0x00000001
      - If set, indicates that the U and V delta quantizer values are coded
        separately. If not set, indicates that the U and V delta quantizer
        values share a common value.
    * - ``V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX``
      - 0x00000002
      - If set, specifies that the quantizer matrix will be used to compute
        quantizers.
    * - ``V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT``
      - 0x00000004
      - Specifies whether quantizer index delta values are present.

.. c:type:: v4l2_av1_tile_info

AV1 Tile info as defined in section 6.8.14 "Tile info semantics" of ref:`av1`.

.. cssclass:: longtable

.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|

.. flat-table:: struct v4l2_av1_tile_info
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``flags``
      - See
        :ref:`AV1 Tile Info flags <av1_tile_info_flags>` for more details.
    * - __u8
      - ``context_update_tile_id``
      - Specifies which tile to use for the CDF update.
    * - __u8
      - ``tile_cols``
      - Specifies the number of tiles across the frame.
    * - __u8
      - ``tile_rows``
      - Specifies the number of tiles down the frame.
    * - __u32
      - ``mi_col_starts[V4L2_AV1_MAX_TILE_COLS + 1]``
      - An array specifying the start column (in units of 4x4 luma
        samples) for each tile across the image.
    * - __u32
      - ``mi_row_starts[V4L2_AV1_MAX_TILE_ROWS + 1]``
      - An array specifying the start row (in units of 4x4 luma
        samples) for each tile across the image.
    * - __u32
      - ``width_in_sbs_minus_1[V4L2_AV1_MAX_TILE_COLS]``
      - Specifies the width of a tile minus 1 in units of superblocks.
    * - __u32
      - ``height_in_sbs_minus_1[V4L2_AV1_MAX_TILE_ROWS]``
      - Specifies the height of a tile minus 1 in units of superblocks.
    * - __u8
      - ``tile_size_bytes``
      - Specifies the number of bytes needed to code each tile size.
    * - __u8
      - ``reserved[3]``
      - Applications and drivers must set this to zero.

.. _av1_tile_info_flags:

``AV1 Tile Info Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING``
      - 0x00000001
      - If set, means that the tiles are uniformly spaced across the frame. (In
        other words, all tiles are the same size except for the ones at the
        right and bottom edge which can be smaller). If not set means that the
        tile sizes are coded.

.. c:type:: v4l2_av1_frame_type

AV1 Frame Type

.. raw:: latex

    \scriptsize

.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_KEY_FRAME``
      - 0
      - Key frame.
    * - ``V4L2_AV1_INTER_FRAME``
      - 1
      - Inter frame.
    * - ``V4L2_AV1_INTRA_ONLY_FRAME``
      - 2
      - Intra-only frame.
    * - ``V4L2_AV1_SWITCH_FRAME``
      - 3
      - Switch frame.

.. c:type:: v4l2_av1_interpolation_filter

AV1 Interpolation Filter

.. raw:: latex

    \scriptsize

.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP``
      - 0
      - Eight tap filter.
    * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH``
      - 1
      - Eight tap smooth filter.
    * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP``
      - 2
      - Eight tap sharp filter.
    * - ``V4L2_AV1_INTERPOLATION_FILTER_BILINEAR``
      - 3
      - Bilinear filter.
    * - ``V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE``
      - 4
      - Filter selection is signaled at the block level.

.. c:type:: v4l2_av1_tx_mode

AV1 Tx mode as described in section 6.8.21 "TX mode semantics" of :ref:`av1`.

.. raw:: latex

    \scriptsize

.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_TX_MODE_ONLY_4X4``
      - 0
      -  The inverse transform will use only 4x4 transforms.
    * - ``V4L2_AV1_TX_MODE_LARGEST``
      - 1
      - The inverse transform will use the largest transform size that fits
        inside the block.
    * - ``V4L2_AV1_TX_MODE_SELECT``
      - 2
      - The choice of transform size is specified explicitly for each block.

``V4L2_CID_STATELESS_AV1_FRAME (struct)``
    Represents a Frame Header OBU. See 6.8 "Frame Header OBU semantics" of
    :ref:`av1` for more details.

.. c:type:: v4l2_ctrl_av1_frame

.. cssclass:: longtable

.. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|

.. flat-table:: struct v4l2_ctrl_av1_frame
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - struct :c:type:`v4l2_av1_tile_info`
      - ``tile_info``
      - Tile info
    * - struct :c:type:`v4l2_av1_quantization`
      - ``quantization``
      - Quantization parameters.
    * - __u8
      - ``superres_denom``
      - The denominator for the upscaling ratio.
    * - struct :c:type:`v4l2_av1_segmentation`
      - ``segmentation``
      - Segmentation parameters.
    * - struct :c:type:`v4l2_av1_loop_filter`
      - ``loop_filter``
      - Loop filter params
    * - struct :c:type:`v4l2_av1_cdef`
      - ``cdef``
      - CDEF params
    * - __u8
      - ``skip_mode_frame[2]``
      - Specifies the frames to use for compound prediction when skip_mode is
        equal to 1.
    * - __u8
      - ``primary_ref_frame``
      - Specifies which reference frame contains the CDF values and other state
        that should be loaded at the start of the frame.
    * - struct :c:type:`v4l2_av1_loop_restoration`
      - ``loop_restoration``
      - Loop restoration parameters.
    * - struct :c:type:`v4l2_av1_global_motion`
      - ``global_motion``
      - Global motion parameters.
    * - __u32
      - ``flags``
      - See
        :ref:`AV1 Frame flags <av1_frame_flags>` for more details.
    * - enum :c:type:`v4l2_av1_frame_type`
      - ``frame_type``
      - Specifies the AV1 frame type
    * - __u32
      - ``order_hint``
      - Specifies OrderHintBits least significant bits of the expected output
        order for this frame.
    * - __u32
      - ``upscaled_width``
      - The upscaled width.
    * - enum :c:type:`v4l2_av1_interpolation_filter`
      - ``interpolation_filter``
      - Specifies the filter selection used for performing inter prediction.
    * - enum :c:type:`v4l2_av1_tx_mode`
      - ``tx_mode``
      - Specifies how the transform size is determined.
    * - __u32
      - ``frame_width_minus_1``
      - Add 1 to get the frame's width.
    * - __u32
      - ``frame_height_minus_1``
      - Add 1 to get the frame's height.
    * - __u16
      - ``render_width_minus_1``
      - Add 1 to get the render width of the frame in luma samples.
    * - __u16
      - ``render_height_minus_1``
      - Add 1 to get the render height of the frame in luma samples.
    * - __u32
      - ``current_frame_id``
      - Specifies the frame id number for the current frame. Frame
        id numbers are additional information that do not affect the decoding
        process, but provide decoders with a way of detecting missing reference
        frames so that appropriate action can be taken.
    * - __u8
      - ``buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS]``
      - Specifies the frame removal time in units of DecCT clock ticks counted
        from the removal time of the last random access point for operating point
        opNum.
    * - __u8
      - ``reserved[4]``
      - Applications and drivers must set this to zero.
    * - __u32
      - ``order_hints[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
      - Specifies the expected output order hint for each reference frame.
        This field corresponds to the OrderHints variable from the specification
        (section 5.9.2  "Uncompressed header syntax"). As such, this is only
        used for non-intra frames and ignored otherwise. order_hints[0] is
        always ignored.
    * - __u64
      - ``reference_frame_ts[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
      - The V4L2 timestamp for each of the reference frames enumerated in
        enum :c:type:`v4l2_av1_reference_frame` starting at
        ``V4L2_AV1_REF_LAST_FRAME``. This represents the state of reference
        slot as described in the spec and updated by userland through the
        "Reference frame update process" in section 7.20 The timestamp refers
        to the ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
        :c:func:`v4l2_timeval_to_ns()` function to convert the struct
        :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
    * - __s8
      - ``ref_frame_idx[V4L2_AV1_REFS_PER_FRAME]``
      - An index into ``reference_frame_ts`` representing the ordered list of
        references used by inter-frame. Matches the bitstream syntax
        element of the same name.
    * - __u8
      - ``refresh_frame_flags``
      - Contains a bitmask that specifies which reference frame slots will be
        updated with the current frame after it is decoded.

.. _av1_frame_flags:

``AV1 Frame Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_FRAME_FLAG_SHOW_FRAME``
      - 0x00000001
      - If set, specifies that this frame should be immediately output once
        decoded. If not set, specifies that this frame should not be immediately
        output; it may be output later if a later uncompressed header uses
        show_existing_frame equal to 1.
    * - ``V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME``
      - 0x00000002
      - If set, specifies that the frame may be output using the
        show_existing_frame mechanism. If not set, specifies that this frame
        will not be output using the show_existing_frame mechanism.
    * - ``V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE``
      - 0x00000004
      - Specifies whether error resilient mode is enabled.
    * - ``V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE``
      - 0x00000008
      - Specifies whether the CDF update in the symbol decoding process should
        be disabled.
    * - ``V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS``
      - 0x00000010
      - If set, indicates that intra blocks may use palette encoding. If not
        set, indicates that palette encoding is never used.
    * - ``V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV``
      - 0x00000020
      - If set, specifies that motion vectors will always be integers. If not
        set, specifies that motion vectors can contain fractional bits.
    * - ``V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC``
      - 0x00000040
      - If set, indicates that intra block copy may be used in this frame. If
        not set, indicates that intra block copy is not allowed in this frame.
    * - ``V4L2_AV1_FRAME_FLAG_USE_SUPERRES``
      - 0x00000080
      - If set, indicates that upscaling is needed.
    * - ``V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV``
      - 0x00000100
      - If set, specifies that motion vectors are specified to eighth pel
        precision. If not set, specifies that motion vectors are specified to
        quarter pel precision;
    * - ``V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE``
      - 0x00000200
      - If not set, specifies that only the SIMPLE motion mode will be used.
    * - ``V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS``
      - 0x00000400
      - If set specifies that motion vector information from a previous frame
        can be used when decoding the current frame. If not set, specifies that
        this information will not be used.
    * - ``V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF``
      - 0x00000800
      - If set indicates that the end of frame CDF update is disabled. If not
        set, indicates that the end of frame CDF update is enabled
    * - ``V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION``
      - 0x00001000
      - If set, indicates that the syntax element motion_mode may be present, if
        not set, indicates that the syntax element motion_mode will not be
        present.
    * - ``V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT``
      - 0x00002000
      - If set, specifies that the mode info for inter blocks contains the
        syntax element comp_mode that indicates whether to use single or
        compound reference prediction. If not set, specifies that all inter
        blocks will use single prediction.
    * - ``V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET``
      - 0x00004000
      - If set, specifies that the frame is restricted to a reduced subset of
        the full set of transform types.
    * - ``V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED``
      - 0x00008000
      - This flag retains the same meaning as SkipModeAllowed in :ref:`av1`.
    * - ``V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT``
      - 0x00010000
      - If set, specifies that the syntax element skip_mode will be present, if
        not set, specifies that skip_mode will not be used for this frame.
    * - ``V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE``
      - 0x00020000
      - If set, specifies that the frame size will either be specified as the
        size of one of the reference frames, or computed from the
        frame_width_minus_1 and frame_height_minus_1 syntax elements. If not
        set, specifies that the frame size is equal to the size in the sequence
        header.
    * - ``V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT``
      - 0x00040000
      - If set, specifies that buffer_removal_time is present. If not set,
        specifies that buffer_removal_time is not present.
    * - ``V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING``
      - 0x00080000
      - If set, indicates that only two reference frames are explicitly
        signaled. If not set, indicates that all reference frames are explicitly
        signaled.

``V4L2_CID_STATELESS_AV1_FILM_GRAIN (struct)``
    Represents the optional film grain parameters. See section
    6.8.20 "Film grain params semantics" of :ref:`av1` for more details.

.. c:type:: v4l2_ctrl_av1_film_grain

.. cssclass:: longtable

.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|

.. flat-table:: struct v4l2_ctrl_av1_film_grain
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u8
      - ``flags``
      - See :ref:`AV1 Film Grain Flags <av1_film_grain_flags>`.
    * - __u8
      - ``cr_mult``
      - Represents a multiplier for the cr component used in derivation of the
        input index to the cr component scaling function.
    * - __u16
      - ``grain_seed``
      - Specifies the starting value for the pseudo-random numbers used during
        film grain synthesis.
    * - __u8
      - ``film_grain_params_ref_idx``
      - Indicates which reference frame contains the film grain parameters to be
	used for this frame.
    * - __u8
      - ``num_y_points``
      - Specifies the number of points for the piece-wise linear scaling
        function of the luma component.
    * - __u8
      - ``point_y_value[V4L2_AV1_MAX_NUM_Y_POINTS]``
      - Represents the x (luma value) coordinate for the i-th point
        of the piecewise linear scaling function for luma component. The values
        are signaled on the scale of 0..255. In case of 10 bit video, these
        values correspond to luma values divided by 4. In case of 12 bit video,
        these values correspond to luma values divided by 16.
    * - __u8
      - ``point_y_scaling[V4L2_AV1_MAX_NUM_Y_POINTS]``
      - Represents the scaling (output) value for the i-th point
        of the piecewise linear scaling function for luma component.
    * - __u8
      - ``num_cb_points``
      -  Specifies the number of points for the piece-wise linear scaling
         function of the cb component.
    * - __u8
      - ``point_cb_value[V4L2_AV1_MAX_NUM_CB_POINTS]``
      - Represents the x coordinate for the i-th point of the
        piece-wise linear scaling function for cb component. The values are
        signaled on the scale of 0..255.
    * - __u8
      - ``point_cb_scaling[V4L2_AV1_MAX_NUM_CB_POINTS]``
      - Represents the scaling (output) value for the i-th point of the
        piecewise linear scaling function for cb component.
    * - __u8
      - ``num_cr_points``
      - Represents the number of points for the piece-wise
        linear scaling function of the cr component.
    * - __u8
      - ``point_cr_value[V4L2_AV1_MAX_NUM_CR_POINTS]``
      - Represents the x coordinate for the i-th point of the
        piece-wise linear scaling function for cr component. The values are
        signaled on the scale of 0..255.
    * - __u8
      - ``point_cr_scaling[V4L2_AV1_MAX_NUM_CR_POINTS]``
      - Represents the scaling (output) value for the i-th point of the
        piecewise linear scaling function for cr component.
    * - __u8
      - ``grain_scaling_minus_8``
      - Represents the shift - 8 applied to the values of the chroma component.
        The grain_scaling_minus_8 can take values of 0..3 and determines the
        range and quantization step of the standard deviation of film grain.
    * - __u8
      - ``ar_coeff_lag``
      - Specifies the number of auto-regressive coefficients for luma and
        chroma.
    * - __u8
      - ``ar_coeffs_y_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
      - Specifies auto-regressive coefficients used for the Y plane.
    * - __u8
      - ``ar_coeffs_cb_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
      - Specifies auto-regressive coefficients used for the U plane.
    * - __u8
      - ``ar_coeffs_cr_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
      - Specifies auto-regressive coefficients used for the V plane.
    * - __u8
      - ``ar_coeff_shift_minus_6``
      - Specifies the range of the auto-regressive coefficients. Values of 0,
        1, 2, and 3 correspond to the ranges for auto-regressive coefficients of
        [-2, 2), [-1, 1), [-0.5, 0.5) and [-0.25, 0.25) respectively.
    * - __u8
      - ``grain_scale_shift``
      - Specifies how much the Gaussian random numbers should be scaled down
        during the grain synthesis process.
    * - __u8
      - ``cb_mult``
      - Represents a multiplier for the cb component used in derivation of the
        input index to the cb component scaling function.
    * - __u8
      - ``cb_luma_mult``
      - Represents a multiplier for the average luma component used in
        derivation of the input index to the cb component scaling function..
    * - __u8
      - ``cr_luma_mult``
      - Represents a multiplier for the average luma component used in
        derivation of the input index to the cr component scaling function.
    * - __u16
      - ``cb_offset``
      - Represents an offset used in derivation of the input index to the
        cb component scaling function.
    * - __u16
      - ``cr_offset``
      - Represents an offset used in derivation of the input index to the
        cr component scaling function.
    * - __u8
      - ``reserved[4]``
      - Applications and drivers must set this to zero.

.. _av1_film_grain_flags:

``AV1 Film Grain Flags``

.. cssclass:: longtable

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - ``V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN``
      - 0x00000001
      - If set, specifies that film grain should be added to this frame. If not
        set, specifies that film grain should not be added.
    * - ``V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN``
      - 0x00000002
      - If set, means that a new set of parameters should be sent. If not set,
        specifies that the previous set of parameters should be used.
    * - ``V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA``
      - 0x00000004
      - If set, specifies that the chroma scaling is inferred from the luma
        scaling.
    * - ``V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP``
      - 0x00000008
      - If set, indicates that the overlap between film grain blocks shall be
        applied. If not set, indicates that the overlap between film grain blocks
        shall not be applied.
    * - ``V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE``
      - 0x00000010
      - If set, indicates that clipping to the restricted (studio, i.e. limited)
        range shall be applied to the sample values after adding the film grain
        (see the semantics for color_range for an explanation of studio swing).
        If not set, indicates that clipping to the full range shall be applied
        to the sample values after adding the film grain.