1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3.. _codec-stateless-controls:
4
5*********************************
6Stateless Codec Control Reference
7*********************************
8
9The Stateless Codec control class is intended to support
10stateless decoder and encoders (i.e. hardware accelerators).
11
12These drivers are typically supported by the :ref:`stateless_decoder`,
13and deal with parsed pixel formats such as V4L2_PIX_FMT_H264_SLICE.
14
15Stateless 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.. cssclass:: longtable
38
39.. flat-table:: struct v4l2_ctrl_h264_sps
40    :header-rows:  0
41    :stub-columns: 0
42    :widths:       1 1 2
43
44    * - __u8
45      - ``profile_idc``
46      -
47    * - __u8
48      - ``constraint_set_flags``
49      - See :ref:`Sequence Parameter Set Constraints Set Flags <h264_sps_constraints_set_flags>`
50    * - __u8
51      - ``level_idc``
52      -
53    * - __u8
54      - ``seq_parameter_set_id``
55      -
56    * - __u8
57      - ``chroma_format_idc``
58      -
59    * - __u8
60      - ``bit_depth_luma_minus8``
61      -
62    * - __u8
63      - ``bit_depth_chroma_minus8``
64      -
65    * - __u8
66      - ``log2_max_frame_num_minus4``
67      -
68    * - __u8
69      - ``pic_order_cnt_type``
70      -
71    * - __u8
72      - ``log2_max_pic_order_cnt_lsb_minus4``
73      -
74    * - __u8
75      - ``max_num_ref_frames``
76      -
77    * - __u8
78      - ``num_ref_frames_in_pic_order_cnt_cycle``
79      -
80    * - __s32
81      - ``offset_for_ref_frame[255]``
82      -
83    * - __s32
84      - ``offset_for_non_ref_pic``
85      -
86    * - __s32
87      - ``offset_for_top_to_bottom_field``
88      -
89    * - __u16
90      - ``pic_width_in_mbs_minus1``
91      -
92    * - __u16
93      - ``pic_height_in_map_units_minus1``
94      -
95    * - __u32
96      - ``flags``
97      - See :ref:`Sequence Parameter Set Flags <h264_sps_flags>`
98
99.. _h264_sps_constraints_set_flags:
100
101``Sequence Parameter Set Constraints Set Flags``
102
103.. cssclass:: longtable
104
105.. flat-table::
106    :header-rows:  0
107    :stub-columns: 0
108    :widths:       1 1 2
109
110    * - ``V4L2_H264_SPS_CONSTRAINT_SET0_FLAG``
111      - 0x00000001
112      -
113    * - ``V4L2_H264_SPS_CONSTRAINT_SET1_FLAG``
114      - 0x00000002
115      -
116    * - ``V4L2_H264_SPS_CONSTRAINT_SET2_FLAG``
117      - 0x00000004
118      -
119    * - ``V4L2_H264_SPS_CONSTRAINT_SET3_FLAG``
120      - 0x00000008
121      -
122    * - ``V4L2_H264_SPS_CONSTRAINT_SET4_FLAG``
123      - 0x00000010
124      -
125    * - ``V4L2_H264_SPS_CONSTRAINT_SET5_FLAG``
126      - 0x00000020
127      -
128
129.. _h264_sps_flags:
130
131``Sequence Parameter Set Flags``
132
133.. cssclass:: longtable
134
135.. flat-table::
136    :header-rows:  0
137    :stub-columns: 0
138    :widths:       1 1 2
139
140    * - ``V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE``
141      - 0x00000001
142      -
143    * - ``V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS``
144      - 0x00000002
145      -
146    * - ``V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO``
147      - 0x00000004
148      -
149    * - ``V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED``
150      - 0x00000008
151      -
152    * - ``V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY``
153      - 0x00000010
154      -
155    * - ``V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD``
156      - 0x00000020
157      -
158    * - ``V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE``
159      - 0x00000040
160      -
161
162``V4L2_CID_STATELESS_H264_PPS (struct)``
163    Specifies the picture parameter set (as extracted from the
164    bitstream) for the associated H264 slice data. This includes the
165    necessary parameters for configuring a stateless hardware decoding
166    pipeline for H264.  The bitstream parameters are defined according
167    to :ref:`h264`, section 7.4.2.2 "Picture Parameter Set RBSP
168    Semantics". For further documentation, refer to the above
169    specification, unless there is an explicit comment stating
170    otherwise.
171
172.. c:type:: v4l2_ctrl_h264_pps
173
174.. cssclass:: longtable
175
176.. flat-table:: struct v4l2_ctrl_h264_pps
177    :header-rows:  0
178    :stub-columns: 0
179    :widths:       1 1 2
180
181    * - __u8
182      - ``pic_parameter_set_id``
183      -
184    * - __u8
185      - ``seq_parameter_set_id``
186      -
187    * - __u8
188      - ``num_slice_groups_minus1``
189      -
190    * - __u8
191      - ``num_ref_idx_l0_default_active_minus1``
192      -
193    * - __u8
194      - ``num_ref_idx_l1_default_active_minus1``
195      -
196    * - __u8
197      - ``weighted_bipred_idc``
198      -
199    * - __s8
200      - ``pic_init_qp_minus26``
201      -
202    * - __s8
203      - ``pic_init_qs_minus26``
204      -
205    * - __s8
206      - ``chroma_qp_index_offset``
207      -
208    * - __s8
209      - ``second_chroma_qp_index_offset``
210      -
211    * - __u16
212      - ``flags``
213      - See :ref:`Picture Parameter Set Flags <h264_pps_flags>`
214
215.. _h264_pps_flags:
216
217``Picture Parameter Set Flags``
218
219.. cssclass:: longtable
220
221.. flat-table::
222    :header-rows:  0
223    :stub-columns: 0
224    :widths:       1 1 2
225
226    * - ``V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE``
227      - 0x00000001
228      -
229    * - ``V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT``
230      - 0x00000002
231      -
232    * - ``V4L2_H264_PPS_FLAG_WEIGHTED_PRED``
233      - 0x00000004
234      -
235    * - ``V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
236      - 0x00000008
237      -
238    * - ``V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED``
239      - 0x00000010
240      -
241    * - ``V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT``
242      - 0x00000020
243      -
244    * - ``V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE``
245      - 0x00000040
246      -
247    * - ``V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT``
248      - 0x00000080
249      - Indicates that ``V4L2_CID_STATELESS_H264_SCALING_MATRIX``
250        must be used for this picture.
251
252``V4L2_CID_STATELESS_H264_SCALING_MATRIX (struct)``
253    Specifies the scaling matrix (as extracted from the bitstream) for
254    the associated H264 slice data. The bitstream parameters are
255    defined according to :ref:`h264`, section 7.4.2.1.1.1 "Scaling
256    List Semantics". For further documentation, refer to the above
257    specification, unless there is an explicit comment stating
258    otherwise.
259
260.. c:type:: v4l2_ctrl_h264_scaling_matrix
261
262.. cssclass:: longtable
263
264.. flat-table:: struct v4l2_ctrl_h264_scaling_matrix
265    :header-rows:  0
266    :stub-columns: 0
267    :widths:       1 1 2
268
269    * - __u8
270      - ``scaling_list_4x4[6][16]``
271      - Scaling matrix after applying the inverse scanning process.
272        Expected list order is Intra Y, Intra Cb, Intra Cr, Inter Y,
273        Inter Cb, Inter Cr. The values on each scaling list are
274        expected in raster scan order.
275    * - __u8
276      - ``scaling_list_8x8[6][64]``
277      - Scaling matrix after applying the inverse scanning process.
278        Expected list order is Intra Y, Inter Y, Intra Cb, Inter Cb,
279        Intra Cr, Inter Cr. The values on each scaling list are
280        expected in raster scan order.
281
282``V4L2_CID_STATELESS_H264_SLICE_PARAMS (struct)``
283    Specifies the slice parameters (as extracted from the bitstream)
284    for the associated H264 slice data. This includes the necessary
285    parameters for configuring a stateless hardware decoding pipeline
286    for H264.  The bitstream parameters are defined according to
287    :ref:`h264`, section 7.4.3 "Slice Header Semantics". For further
288    documentation, refer to the above specification, unless there is
289    an explicit comment stating otherwise.
290
291.. c:type:: v4l2_ctrl_h264_slice_params
292
293.. cssclass:: longtable
294
295.. flat-table:: struct v4l2_ctrl_h264_slice_params
296    :header-rows:  0
297    :stub-columns: 0
298    :widths:       1 1 2
299
300    * - __u32
301      - ``header_bit_size``
302      - Offset in bits to slice_data() from the beginning of this slice.
303    * - __u32
304      - ``first_mb_in_slice``
305      -
306    * - __u8
307      - ``slice_type``
308      -
309    * - __u8
310      - ``colour_plane_id``
311      -
312    * - __u8
313      - ``redundant_pic_cnt``
314      -
315    * - __u8
316      - ``cabac_init_idc``
317      -
318    * - __s8
319      - ``slice_qp_delta``
320      -
321    * - __s8
322      - ``slice_qs_delta``
323      -
324    * - __u8
325      - ``disable_deblocking_filter_idc``
326      -
327    * - __s8
328      - ``slice_alpha_c0_offset_div2``
329      -
330    * - __s8
331      - ``slice_beta_offset_div2``
332      -
333    * - __u8
334      - ``num_ref_idx_l0_active_minus1``
335      - If num_ref_idx_active_override_flag is not set, this field must be
336        set to the value of num_ref_idx_l0_default_active_minus1.
337    * - __u8
338      - ``num_ref_idx_l1_active_minus1``
339      - If num_ref_idx_active_override_flag is not set, this field must be
340        set to the value of num_ref_idx_l1_default_active_minus1.
341    * - __u8
342      - ``reserved``
343      - Applications and drivers must set this to zero.
344    * - struct :c:type:`v4l2_h264_reference`
345      - ``ref_pic_list0[32]``
346      - Reference picture list after applying the per-slice modifications
347    * - struct :c:type:`v4l2_h264_reference`
348      - ``ref_pic_list1[32]``
349      - Reference picture list after applying the per-slice modifications
350    * - __u32
351      - ``flags``
352      - See :ref:`Slice Parameter Flags <h264_slice_flags>`
353
354.. _h264_slice_flags:
355
356``Slice Parameter Set Flags``
357
358.. cssclass:: longtable
359
360.. flat-table::
361    :header-rows:  0
362    :stub-columns: 0
363    :widths:       1 1 2
364
365    * - ``V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED``
366      - 0x00000001
367      -
368    * - ``V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH``
369      - 0x00000002
370      -
371
372``V4L2_CID_STATELESS_H264_PRED_WEIGHTS (struct)``
373    Prediction weight table defined according to :ref:`h264`,
374    section 7.4.3.2 "Prediction Weight Table Semantics".
375    The prediction weight table must be passed by applications
376    under the conditions explained in section 7.3.3 "Slice header
377    syntax".
378
379.. c:type:: v4l2_ctrl_h264_pred_weights
380
381.. cssclass:: longtable
382
383.. flat-table:: struct v4l2_ctrl_h264_pred_weights
384    :header-rows:  0
385    :stub-columns: 0
386    :widths:       1 1 2
387
388    * - __u16
389      - ``luma_log2_weight_denom``
390      -
391    * - __u16
392      - ``chroma_log2_weight_denom``
393      -
394    * - struct :c:type:`v4l2_h264_weight_factors`
395      - ``weight_factors[2]``
396      - The weight factors at index 0 are the weight factors for the reference
397        list 0, the one at index 1 for the reference list 1.
398
399.. c:type:: v4l2_h264_weight_factors
400
401.. cssclass:: longtable
402
403.. flat-table:: struct v4l2_h264_weight_factors
404    :header-rows:  0
405    :stub-columns: 0
406    :widths:       1 1 2
407
408    * - __s16
409      - ``luma_weight[32]``
410      -
411    * - __s16
412      - ``luma_offset[32]``
413      -
414    * - __s16
415      - ``chroma_weight[32][2]``
416      -
417    * - __s16
418      - ``chroma_offset[32][2]``
419      -
420
421``Picture Reference``
422
423.. c:type:: v4l2_h264_reference
424
425.. cssclass:: longtable
426
427.. flat-table:: struct v4l2_h264_reference
428    :header-rows:  0
429    :stub-columns: 0
430    :widths:       1 1 2
431
432    * - __u8
433      - ``fields``
434      - Specifies how the picture is referenced. See :ref:`Reference Fields <h264_ref_fields>`
435    * - __u8
436      - ``index``
437      - Index into the :c:type:`v4l2_ctrl_h264_decode_params`.dpb array.
438
439.. _h264_ref_fields:
440
441``Reference Fields``
442
443.. cssclass:: longtable
444
445.. flat-table::
446    :header-rows:  0
447    :stub-columns: 0
448    :widths:       1 1 2
449
450    * - ``V4L2_H264_TOP_FIELD_REF``
451      - 0x1
452      - The top field in field pair is used for short-term reference.
453    * - ``V4L2_H264_BOTTOM_FIELD_REF``
454      - 0x2
455      - The bottom field in field pair is used for short-term reference.
456    * - ``V4L2_H264_FRAME_REF``
457      - 0x3
458      - The frame (or the top/bottom fields, if it's a field pair)
459        is used for short-term reference.
460
461``V4L2_CID_STATELESS_H264_DECODE_PARAMS (struct)``
462    Specifies the decode parameters (as extracted from the bitstream)
463    for the associated H264 slice data. This includes the necessary
464    parameters for configuring a stateless hardware decoding pipeline
465    for H264. The bitstream parameters are defined according to
466    :ref:`h264`. For further documentation, refer to the above
467    specification, unless there is an explicit comment stating
468    otherwise.
469
470.. c:type:: v4l2_ctrl_h264_decode_params
471
472.. cssclass:: longtable
473
474.. flat-table:: struct v4l2_ctrl_h264_decode_params
475    :header-rows:  0
476    :stub-columns: 0
477    :widths:       1 1 2
478
479    * - struct :c:type:`v4l2_h264_dpb_entry`
480      - ``dpb[16]``
481      -
482    * - __u16
483      - ``nal_ref_idc``
484      - NAL reference ID value coming from the NAL Unit header
485    * - __u16
486      - ``frame_num``
487      -
488    * - __s32
489      - ``top_field_order_cnt``
490      - Picture Order Count for the coded top field
491    * - __s32
492      - ``bottom_field_order_cnt``
493      - Picture Order Count for the coded bottom field
494    * - __u16
495      - ``idr_pic_id``
496      -
497    * - __u16
498      - ``pic_order_cnt_lsb``
499      -
500    * - __s32
501      - ``delta_pic_order_cnt_bottom``
502      -
503    * - __s32
504      - ``delta_pic_order_cnt0``
505      -
506    * - __s32
507      - ``delta_pic_order_cnt1``
508      -
509    * - __u32
510      - ``dec_ref_pic_marking_bit_size``
511      - Size in bits of the dec_ref_pic_marking() syntax element.
512    * - __u32
513      - ``pic_order_cnt_bit_size``
514      - Combined size in bits of the picture order count related syntax
515        elements: pic_order_cnt_lsb, delta_pic_order_cnt_bottom,
516        delta_pic_order_cnt0, and delta_pic_order_cnt1.
517    * - __u32
518      - ``slice_group_change_cycle``
519      -
520    * - __u32
521      - ``reserved``
522      - Applications and drivers must set this to zero.
523    * - __u32
524      - ``flags``
525      - See :ref:`Decode Parameters Flags <h264_decode_params_flags>`
526
527.. _h264_decode_params_flags:
528
529``Decode Parameters Flags``
530
531.. cssclass:: longtable
532
533.. flat-table::
534    :header-rows:  0
535    :stub-columns: 0
536    :widths:       1 1 2
537
538    * - ``V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC``
539      - 0x00000001
540      - That picture is an IDR picture
541    * - ``V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC``
542      - 0x00000002
543      -
544    * - ``V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD``
545      - 0x00000004
546      -
547
548.. c:type:: v4l2_h264_dpb_entry
549
550.. cssclass:: longtable
551
552.. flat-table:: struct v4l2_h264_dpb_entry
553    :header-rows:  0
554    :stub-columns: 0
555    :widths:       1 1 2
556
557    * - __u64
558      - ``reference_ts``
559      - Timestamp of the V4L2 capture buffer to use as reference, used
560        with B-coded and P-coded frames. The timestamp refers to the
561        ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
562        :c:func:`v4l2_timeval_to_ns()` function to convert the struct
563        :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
564    * - __u32
565      - ``pic_num``
566      -
567    * - __u16
568      - ``frame_num``
569      -
570    * - __u8
571      - ``fields``
572      - Specifies how the DPB entry is referenced. See :ref:`Reference Fields <h264_ref_fields>`
573    * - __u8
574      - ``reserved[5]``
575      - Applications and drivers must set this to zero.
576    * - __s32
577      - ``top_field_order_cnt``
578      -
579    * - __s32
580      - ``bottom_field_order_cnt``
581      -
582    * - __u32
583      - ``flags``
584      - See :ref:`DPB Entry Flags <h264_dpb_flags>`
585
586.. _h264_dpb_flags:
587
588``DPB Entries Flags``
589
590.. cssclass:: longtable
591
592.. flat-table::
593    :header-rows:  0
594    :stub-columns: 0
595    :widths:       1 1 2
596
597    * - ``V4L2_H264_DPB_ENTRY_FLAG_VALID``
598      - 0x00000001
599      - The DPB entry is valid (non-empty) and should be considered.
600    * - ``V4L2_H264_DPB_ENTRY_FLAG_ACTIVE``
601      - 0x00000002
602      - The DPB entry is used for reference.
603    * - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``
604      - 0x00000004
605      - The DPB entry is used for long-term reference.
606    * - ``V4L2_H264_DPB_ENTRY_FLAG_FIELD``
607      - 0x00000008
608      - The DPB entry is a single field or a complementary field pair.
609
610``V4L2_CID_STATELESS_H264_DECODE_MODE (enum)``
611    Specifies the decoding mode to use. Currently exposes slice-based and
612    frame-based decoding but new modes might be added later on.
613    This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
614    pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
615    are required to set this control in order to specify the decoding mode
616    that is expected for the buffer.
617    Drivers may expose a single or multiple decoding modes, depending
618    on what they can support.
619
620.. c:type:: v4l2_stateless_h264_decode_mode
621
622.. cssclass:: longtable
623
624.. flat-table::
625    :header-rows:  0
626    :stub-columns: 0
627    :widths:       1 1 2
628
629    * - ``V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED``
630      - 0
631      - Decoding is done at the slice granularity.
632        The OUTPUT buffer must contain a single slice.
633        When this mode is selected, the ``V4L2_CID_STATELESS_H264_SLICE_PARAMS``
634        control shall be set. When multiple slices compose a frame,
635        use of ``V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF`` flag
636        is required.
637    * - ``V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED``
638      - 1
639      - Decoding is done at the frame granularity,
640        The OUTPUT buffer must contain all slices needed to decode the
641        frame. The OUTPUT buffer must also contain both fields.
642        This mode will be supported by devices that
643        parse the slice(s) header(s) in hardware. When this mode is
644        selected, the ``V4L2_CID_STATELESS_H264_SLICE_PARAMS``
645        control shall not be set.
646
647``V4L2_CID_STATELESS_H264_START_CODE (enum)``
648    Specifies the H264 slice start code expected for each slice.
649    This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
650    pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
651    are required to set this control in order to specify the start code
652    that is expected for the buffer.
653    Drivers may expose a single or multiple start codes, depending
654    on what they can support.
655
656.. c:type:: v4l2_stateless_h264_start_code
657
658.. cssclass:: longtable
659
660.. flat-table::
661    :header-rows:  0
662    :stub-columns: 0
663    :widths:       1 1 2
664
665    * - ``V4L2_STATELESS_H264_START_CODE_NONE``
666      - 0
667      - Selecting this value specifies that H264 slices are passed
668        to the driver without any start code.
669    * - ``V4L2_STATELESS_H264_START_CODE_ANNEX_B``
670      - 1
671      - Selecting this value specifies that H264 slices are expected
672        to be prefixed by Annex B start codes. According to :ref:`h264`
673        valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
674
675
676.. _codec-stateless-fwht:
677
678``V4L2_CID_STATELESS_FWHT_PARAMS (struct)``
679    Specifies the FWHT (Fast Walsh Hadamard Transform) parameters (as extracted
680    from the bitstream) for the associated FWHT data. This includes the necessary
681    parameters for configuring a stateless hardware decoding pipeline for FWHT.
682    This codec is specific to the vicodec test driver.
683
684.. c:type:: v4l2_ctrl_fwht_params
685
686.. cssclass:: longtable
687
688.. tabularcolumns:: |p{1.4cm}|p{4.3cm}|p{11.8cm}|
689
690.. flat-table:: struct v4l2_ctrl_fwht_params
691    :header-rows:  0
692    :stub-columns: 0
693    :widths:       1 1 2
694
695    * - __u64
696      - ``backward_ref_ts``
697      - Timestamp of the V4L2 capture buffer to use as backward reference, used
698        with P-coded frames. The timestamp refers to the
699	``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
700	:c:func:`v4l2_timeval_to_ns()` function to convert the struct
701	:c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
702    * - __u32
703      - ``version``
704      - The version of the codec. Set to ``V4L2_FWHT_VERSION``.
705    * - __u32
706      - ``width``
707      - The width of the frame.
708    * - __u32
709      - ``height``
710      - The height of the frame.
711    * - __u32
712      - ``flags``
713      - The flags of the frame, see :ref:`fwht-flags`.
714    * - __u32
715      - ``colorspace``
716      - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.
717    * - __u32
718      - ``xfer_func``
719      - The transfer function, from enum :c:type:`v4l2_xfer_func`.
720    * - __u32
721      - ``ycbcr_enc``
722      - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
723    * - __u32
724      - ``quantization``
725      - The quantization range, from enum :c:type:`v4l2_quantization`.
726
727
728
729.. _fwht-flags:
730
731FWHT Flags
732==========
733
734.. cssclass:: longtable
735
736.. tabularcolumns:: |p{6.8cm}|p{2.4cm}|p{8.3cm}|
737
738.. flat-table::
739    :header-rows:  0
740    :stub-columns: 0
741    :widths:       3 1 4
742
743    * - ``V4L2_FWHT_FL_IS_INTERLACED``
744      - 0x00000001
745      - Set if this is an interlaced format.
746    * - ``V4L2_FWHT_FL_IS_BOTTOM_FIRST``
747      - 0x00000002
748      - Set if this is a bottom-first (NTSC) interlaced format.
749    * - ``V4L2_FWHT_FL_IS_ALTERNATE``
750      - 0x00000004
751      - Set if each 'frame' contains just one field.
752    * - ``V4L2_FWHT_FL_IS_BOTTOM_FIELD``
753      - 0x00000008
754      - If V4L2_FWHT_FL_IS_ALTERNATE was set, then this is set if this 'frame' is the
755	bottom field, else it is the top field.
756    * - ``V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED``
757      - 0x00000010
758      - Set if the Y' (luma) plane is uncompressed.
759    * - ``V4L2_FWHT_FL_CB_IS_UNCOMPRESSED``
760      - 0x00000020
761      - Set if the Cb plane is uncompressed.
762    * - ``V4L2_FWHT_FL_CR_IS_UNCOMPRESSED``
763      - 0x00000040
764      - Set if the Cr plane is uncompressed.
765    * - ``V4L2_FWHT_FL_CHROMA_FULL_HEIGHT``
766      - 0x00000080
767      - Set if the chroma plane has the same height as the luma plane,
768	else the chroma plane is half the height of the luma plane.
769    * - ``V4L2_FWHT_FL_CHROMA_FULL_WIDTH``
770      - 0x00000100
771      - Set if the chroma plane has the same width as the luma plane,
772	else the chroma plane is half the width of the luma plane.
773    * - ``V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED``
774      - 0x00000200
775      - Set if the alpha plane is uncompressed.
776    * - ``V4L2_FWHT_FL_I_FRAME``
777      - 0x00000400
778      - Set if this is an I-frame.
779    * - ``V4L2_FWHT_FL_COMPONENTS_NUM_MSK``
780      - 0x00070000
781      - The number of color components - 1.
782    * - ``V4L2_FWHT_FL_PIXENC_MSK``
783      - 0x00180000
784      - The mask for the pixel encoding.
785    * - ``V4L2_FWHT_FL_PIXENC_YUV``
786      - 0x00080000
787      - Set if the pixel encoding is YUV.
788    * - ``V4L2_FWHT_FL_PIXENC_RGB``
789      - 0x00100000
790      - Set if the pixel encoding is RGB.
791    * - ``V4L2_FWHT_FL_PIXENC_HSV``
792      - 0x00180000
793      - Set if the pixel encoding is HSV.
794