1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
3 .. _codec-stateless-controls:
5 *********************************
6 Stateless Codec Control Reference
7 *********************************
9 The Stateless Codec control class is intended to support
10 stateless decoder and encoders (i.e. hardware accelerators).
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.
15 Stateless Codec Control ID
16 ==========================
18 .. _codec-stateless-control-id:
20 ``V4L2_CID_CODEC_STATELESS_CLASS (class)``
21 The Stateless Codec class descriptor.
23 .. _v4l2-codec-stateless-h264:
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
35 .. c:type:: v4l2_ctrl_h264_sps
41 .. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}|
43 .. flat-table:: struct v4l2_ctrl_h264_sps
52 - ``constraint_set_flags``
53 - See :ref:`Sequence Parameter Set Constraints Set Flags <h264_sps_constraints_set_flags>`
58 - ``seq_parameter_set_id``
61 - ``chroma_format_idc``
64 - ``bit_depth_luma_minus8``
67 - ``bit_depth_chroma_minus8``
70 - ``log2_max_frame_num_minus4``
73 - ``pic_order_cnt_type``
76 - ``log2_max_pic_order_cnt_lsb_minus4``
79 - ``max_num_ref_frames``
82 - ``num_ref_frames_in_pic_order_cnt_cycle``
85 - ``offset_for_ref_frame[255]``
88 - ``offset_for_non_ref_pic``
91 - ``offset_for_top_to_bottom_field``
94 - ``pic_width_in_mbs_minus1``
97 - ``pic_height_in_map_units_minus1``
101 - See :ref:`Sequence Parameter Set Flags <h264_sps_flags>`
107 .. _h264_sps_constraints_set_flags:
109 ``Sequence Parameter Set Constraints Set Flags``
111 .. cssclass:: longtable
118 * - ``V4L2_H264_SPS_CONSTRAINT_SET0_FLAG``
121 * - ``V4L2_H264_SPS_CONSTRAINT_SET1_FLAG``
124 * - ``V4L2_H264_SPS_CONSTRAINT_SET2_FLAG``
127 * - ``V4L2_H264_SPS_CONSTRAINT_SET3_FLAG``
130 * - ``V4L2_H264_SPS_CONSTRAINT_SET4_FLAG``
133 * - ``V4L2_H264_SPS_CONSTRAINT_SET5_FLAG``
139 ``Sequence Parameter Set Flags``
141 .. cssclass:: longtable
148 * - ``V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE``
151 * - ``V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS``
154 * - ``V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO``
157 * - ``V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED``
160 * - ``V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY``
163 * - ``V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD``
166 * - ``V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE``
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
180 .. c:type:: v4l2_ctrl_h264_pps
186 .. flat-table:: struct v4l2_ctrl_h264_pps
192 - ``pic_parameter_set_id``
195 - ``seq_parameter_set_id``
198 - ``num_slice_groups_minus1``
201 - ``num_ref_idx_l0_default_active_minus1``
204 - ``num_ref_idx_l1_default_active_minus1``
207 - ``weighted_bipred_idc``
210 - ``pic_init_qp_minus26``
213 - ``pic_init_qs_minus26``
216 - ``chroma_qp_index_offset``
219 - ``second_chroma_qp_index_offset``
223 - See :ref:`Picture Parameter Set Flags <h264_pps_flags>`
231 ``Picture Parameter Set Flags``
237 \setlength{\tabcolsep}{2pt}
239 .. tabularcolumns:: |p{9.8cm}|p{1.0cm}|p{6.5cm}|
246 * - ``V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE``
249 * - ``V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT``
252 * - ``V4L2_H264_PPS_FLAG_WEIGHTED_PRED``
255 * - ``V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
258 * - ``V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED``
261 * - ``V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT``
264 * - ``V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE``
267 * - ``V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT``
269 - ``V4L2_CID_STATELESS_H264_SCALING_MATRIX``
270 must be used for this picture.
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
284 .. c:type:: v4l2_ctrl_h264_scaling_matrix
290 .. tabularcolumns:: |p{0.6cm}|p{4.8cm}|p{11.9cm}|
292 .. flat-table:: struct v4l2_ctrl_h264_scaling_matrix
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.
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.
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.
319 .. c:type:: v4l2_ctrl_h264_slice_params
325 .. tabularcolumns:: |p{4.0cm}|p{5.9cm}|p{7.4cm}|
327 .. flat-table:: struct v4l2_ctrl_h264_slice_params
333 - ``header_bit_size``
334 - Offset in bits to slice_data() from the beginning of this slice.
336 - ``first_mb_in_slice``
342 - ``colour_plane_id``
345 - ``redundant_pic_cnt``
357 - ``disable_deblocking_filter_idc``
360 - ``slice_alpha_c0_offset_div2``
363 - ``slice_beta_offset_div2``
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
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
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
384 - See :ref:`Slice Parameter Flags <h264_slice_flags>`
390 .. _h264_slice_flags:
392 ``Slice Parameter Set Flags``
394 .. cssclass:: longtable
401 * - ``V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED``
404 * - ``V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH``
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
415 .. c:type:: v4l2_ctrl_h264_pred_weights
421 .. tabularcolumns:: |p{4.9cm}|p{4.9cm}|p{7.5cm}|
423 .. flat-table:: struct v4l2_ctrl_h264_pred_weights
429 - ``luma_log2_weight_denom``
432 - ``chroma_log2_weight_denom``
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.
443 .. c:type:: v4l2_h264_weight_factors
449 .. tabularcolumns:: |p{1.0cm}|p{4.5cm}|p{11.8cm}|
451 .. flat-table:: struct v4l2_h264_weight_factors
457 - ``luma_weight[32]``
460 - ``luma_offset[32]``
463 - ``chroma_weight[32][2]``
466 - ``chroma_offset[32][2]``
473 ``Picture Reference``
475 .. c:type:: v4l2_h264_reference
477 .. cssclass:: longtable
479 .. flat-table:: struct v4l2_h264_reference
486 - Specifies how the picture is referenced. See :ref:`Reference Fields <h264_ref_fields>`
489 - Index into the :c:type:`v4l2_ctrl_h264_decode_params`.dpb array.
499 .. tabularcolumns:: |p{5.4cm}|p{0.8cm}|p{11.1cm}|
506 * - ``V4L2_H264_TOP_FIELD_REF``
508 - The top field in field pair is used for short-term reference.
509 * - ``V4L2_H264_BOTTOM_FIELD_REF``
511 - The bottom field in field pair is used for short-term reference.
512 * - ``V4L2_H264_FRAME_REF``
514 - The frame (or the top/bottom fields, if it's a field pair)
515 is used for short-term reference.
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
530 .. c:type:: v4l2_ctrl_h264_decode_params
536 .. tabularcolumns:: |p{4.0cm}|p{5.9cm}|p{7.4cm}|
538 .. flat-table:: struct v4l2_ctrl_h264_decode_params
543 * - struct :c:type:`v4l2_h264_dpb_entry`
548 - NAL reference ID value coming from the NAL Unit header
553 - ``top_field_order_cnt``
554 - Picture Order Count for the coded top field
556 - ``bottom_field_order_cnt``
557 - Picture Order Count for the coded bottom field
562 - ``pic_order_cnt_lsb``
565 - ``delta_pic_order_cnt_bottom``
568 - ``delta_pic_order_cnt0``
571 - ``delta_pic_order_cnt1``
574 - ``dec_ref_pic_marking_bit_size``
575 - Size in bits of the dec_ref_pic_marking() syntax element.
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.
582 - ``slice_group_change_cycle``
586 - Applications and drivers must set this to zero.
589 - See :ref:`Decode Parameters Flags <h264_decode_params_flags>`
595 .. _h264_decode_params_flags:
597 ``Decode Parameters Flags``
603 .. tabularcolumns:: |p{8.3cm}|p{2.1cm}|p{6.9cm}|
610 * - ``V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC``
612 - That picture is an IDR picture
613 * - ``V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC``
616 * - ``V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD``
619 * - ``V4L2_H264_DECODE_PARAM_FLAG_PFRAME``
622 * - ``V4L2_H264_DECODE_PARAM_FLAG_BFRAME``
630 .. c:type:: v4l2_h264_dpb_entry
636 .. tabularcolumns:: |p{1.0cm}|p{4.9cm}|p{11.4cm}|
638 .. flat-table:: struct v4l2_h264_dpb_entry
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.
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.
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.
664 - Specifies how the DPB entry is referenced. See :ref:`Reference Fields <h264_ref_fields>`
667 - Applications and drivers must set this to zero.
669 - ``top_field_order_cnt``
672 - ``bottom_field_order_cnt``
676 - See :ref:`DPB Entry Flags <h264_dpb_flags>`
684 ``DPB Entries Flags``
690 .. tabularcolumns:: |p{7.7cm}|p{2.1cm}|p{7.5cm}|
697 * - ``V4L2_H264_DPB_ENTRY_FLAG_VALID``
699 - The DPB entry is valid (non-empty) and should be considered.
700 * - ``V4L2_H264_DPB_ENTRY_FLAG_ACTIVE``
702 - The DPB entry is used for reference.
703 * - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``
705 - The DPB entry is used for long-term reference.
706 * - ``V4L2_H264_DPB_ENTRY_FLAG_FIELD``
708 - The DPB entry is a single field or a complementary field pair.
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.
724 .. c:type:: v4l2_stateless_h264_decode_mode
730 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
737 * - ``V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED``
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
745 * - ``V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED``
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.
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.
768 .. c:type:: v4l2_stateless_h264_start_code
774 .. tabularcolumns:: |p{7.9cm}|p{0.4cm}|p{9.0cm}|
781 * - ``V4L2_STATELESS_H264_START_CODE_NONE``
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``
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.
797 .. _codec-stateless-fwht:
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.
805 .. c:type:: v4l2_ctrl_fwht_params
811 .. tabularcolumns:: |p{1.4cm}|p{3.9cm}|p{12.0cm}|
813 .. flat-table:: struct v4l2_ctrl_fwht_params
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.
827 - The version of the codec. Set to ``V4L2_FWHT_VERSION``.
830 - The width of the frame.
833 - The height of the frame.
836 - The flags of the frame, see :ref:`fwht-flags`.
839 - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.
842 - The transfer function, from enum :c:type:`v4l2_xfer_func`.
845 - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
848 - The quantization range, from enum :c:type:`v4l2_quantization`.
863 .. tabularcolumns:: |p{7.0cm}|p{2.3cm}|p{8.0cm}|
870 * - ``V4L2_FWHT_FL_IS_INTERLACED``
872 - Set if this is an interlaced format.
873 * - ``V4L2_FWHT_FL_IS_BOTTOM_FIRST``
875 - Set if this is a bottom-first (NTSC) interlaced format.
876 * - ``V4L2_FWHT_FL_IS_ALTERNATE``
878 - Set if each 'frame' contains just one field.
879 * - ``V4L2_FWHT_FL_IS_BOTTOM_FIELD``
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``
885 - Set if the Y' (luma) plane is uncompressed.
886 * - ``V4L2_FWHT_FL_CB_IS_UNCOMPRESSED``
888 - Set if the Cb plane is uncompressed.
889 * - ``V4L2_FWHT_FL_CR_IS_UNCOMPRESSED``
891 - Set if the Cr plane is uncompressed.
892 * - ``V4L2_FWHT_FL_CHROMA_FULL_HEIGHT``
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``
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``
902 - Set if the alpha plane is uncompressed.
903 * - ``V4L2_FWHT_FL_I_FRAME``
905 - Set if this is an I-frame.
906 * - ``V4L2_FWHT_FL_COMPONENTS_NUM_MSK``
908 - The number of color components minus one.
909 * - ``V4L2_FWHT_FL_PIXENC_MSK``
911 - The mask for the pixel encoding.
912 * - ``V4L2_FWHT_FL_PIXENC_YUV``
914 - Set if the pixel encoding is YUV.
915 * - ``V4L2_FWHT_FL_PIXENC_RGB``
917 - Set if the pixel encoding is RGB.
918 * - ``V4L2_FWHT_FL_PIXENC_HSV``
920 - Set if the pixel encoding is HSV.
926 .. _v4l2-codec-stateless-vp8:
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`.
934 .. c:type:: v4l2_ctrl_vp8_frame
940 .. tabularcolumns:: |p{7.0cm}|p{4.6cm}|p{5.7cm}|
942 .. cssclass:: longtable
944 .. flat-table:: struct v4l2_ctrl_vp8_frame
949 * - struct :c:type:`v4l2_vp8_segment`
951 - Structure with segment-based adjustments metadata.
952 * - struct :c:type:`v4l2_vp8_loop_filter`
954 - Structure with loop filter level adjustments metadata.
955 * - struct :c:type:`v4l2_vp8_quantization`
957 - Structure with VP8 dequantization indices metadata.
958 * - struct :c:type:`v4l2_vp8_entropy`
960 - Structure with VP8 entropy coder probabilities metadata.
961 * - struct :c:type:`v4l2_vp8_entropy_coder_state`
963 - Structure with VP8 entropy coder state.
966 - The width of the frame. Must be set for all frames.
969 - The height of the frame. Must be set for all frames.
971 - ``horizontal_scale``
972 - Horizontal scaling factor.
974 - ``vertical_scaling factor``
980 - ``prob_skip_false``
981 - Indicates the probability that the macroblock is not skipped.
984 - Indicates the probability that a macroblock is intra-predicted.
987 - Indicates the probability that the last reference frame is used
991 - Indicates the probability that the golden reference frame is used
995 - Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8.
997 - ``first_part_size``
998 - Size of the first partition, i.e. the control partition.
1000 - ``first_part_header_bits``
1001 - Size in bits of the first partition header portion.
1003 - ``dct_part_sizes[8]``
1004 - DCT coefficients sizes.
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.
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.
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.
1028 - See :ref:`Frame Flags <vp8_frame_flags>`
1034 .. _vp8_frame_flags:
1038 .. tabularcolumns:: |p{9.8cm}|p{0.8cm}|p{6.7cm}|
1040 .. cssclass:: longtable
1047 * - ``V4L2_VP8_FRAME_FLAG_KEY_FRAME``
1049 - Indicates if the frame is a key frame.
1050 * - ``V4L2_VP8_FRAME_FLAG_EXPERIMENTAL``
1052 - Experimental bitstream.
1053 * - ``V4L2_VP8_FRAME_FLAG_SHOW_FRAME``
1055 - Show frame flag, indicates if the frame is for display.
1056 * - ``V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF``
1058 - Enable/disable skipping of macroblocks with no non-zero coefficients.
1059 * - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN``
1061 - Sign of motion vectors when the golden frame is referenced.
1062 * - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT``
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
1079 - coder state value for "Range"
1082 - coder state value for "Value"-
1085 - number of bits left.
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
1102 - ``quant_update[4]``
1103 - Signed quantizer value update.
1106 - Signed loop filter level value update.
1108 - ``segment_probs[3]``
1109 - Segment probabilities.
1112 - Applications and drivers must set this to zero.
1115 - See :ref:`Segment Flags <vp8_segment_flags>`
1117 .. _vp8_segment_flags:
1125 .. tabularcolumns:: |p{10cm}|p{1.0cm}|p{6.3cm}|
1132 * - ``V4L2_VP8_SEGMENT_FLAG_ENABLED``
1134 - Enable/disable segment-based adjustments.
1135 * - ``V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP``
1137 - Indicates if the macroblock segmentation map is updated in this frame.
1138 * - ``V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA``
1140 - Indicates if the segment feature data is updated in this frame.
1141 * - ``V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE``
1143 - If is set, the segment feature data mode is delta-value.
1144 If cleared, it's absolute-value.
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
1162 - ``ref_frm_delta[4]``
1163 - Reference adjustment (signed) delta value.
1165 - ``mb_mode_delta[4]``
1166 - Macroblock prediction mode adjustment (signed) delta value.
1168 - ``sharpness_level``
1175 - Applications and drivers must set this to zero.
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}|
1191 * - ``V4L2_VP8_LF_ADJ_ENABLE``
1193 - Enable/disable macroblock-level loop filter adjustment.
1194 * - ``V4L2_VP8_LF_DELTA_UPDATE``
1196 - Indicates if the delta values used in an adjustment are updated.
1197 * - ``V4L2_VP8_LF_FILTER_TYPE_SIMPLE``
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
1213 - Luma AC coefficient table index.
1216 - Luma DC delta value.
1219 - Y2 block DC delta value.
1222 - Y2 block AC delta value.
1225 - Chroma DC delta value.
1228 - Chroma AC delta value.
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
1245 - ``coeff_probs[4][8][3][11]``
1246 - Coefficient update probabilities.
1248 - ``y_mode_probs[4]``
1249 - Luma mode update probabilities.
1251 - ``uv_mode_probs[3]``
1252 - Chroma mode update probabilities.
1254 - ``mv_probs[2][19]``
1255 - MV decoding update probabilities.
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
1274 .. cssclass:: longtable
1276 .. tabularcolumns:: |p{1.4cm}|p{6.5cm}|p{9.4cm}|
1278 .. flat-table:: struct v4l2_ctrl_mpeg2_sequence
1284 - ``horizontal_size``
1285 - The width of the displayable part of the frame's luminance component.
1288 - The height of the displayable part of the frame's luminance component.
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.
1294 - ``profile_and_level_indication``
1295 - The current profile and level indication as extracted from the
1299 - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
1302 - See :ref:`MPEG-2 Sequence Flags <mpeg2_sequence_flags>`.
1304 .. _mpeg2_sequence_flags:
1306 ``MPEG-2 Sequence Flags``
1308 .. cssclass:: longtable
1315 * - ``V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE``
1317 - Indication that all the frames for the sequence are progressive instead
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
1336 .. cssclass:: longtable
1338 .. tabularcolumns:: |p{1.0cm}|p{5.6cm}|p{10.7cm}|
1340 .. flat-table:: struct v4l2_ctrl_mpeg2_picture
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.
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.
1361 - See :ref:`MPEG-2 Picture Flags <mpeg2_picture_flags>`.
1364 - Motion vector codes.
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).
1371 - ``picture_structure``
1372 - Picture structure (1: interlaced top field, 2: interlaced bottom field,
1373 3: progressive frame).
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).
1380 - Applications and drivers must set this to zero.
1382 .. _mpeg2_picture_flags:
1384 ``MPEG-2 Picture Flags``
1386 .. cssclass:: longtable
1393 * - ``V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST``
1395 - If set and it's an interlaced stream, top field is output first.
1396 * - ``V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT``
1398 - If set only frame-DCT and frame prediction are used.
1399 * - ``V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV``
1401 - If set motion vectors are coded for intra macroblocks.
1402 * - ``V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE``
1404 - This flag affects the inverse quantization process.
1405 * - ``V4L2_MPEG2_PIC_FLAG_INTRA_VLC``
1407 - This flag affects the decoding of transform coefficient data.
1408 * - ``V4L2_MPEG2_PIC_FLAG_ALT_SCAN``
1410 - This flag affects the decoding of transform coefficient data.
1411 * - ``V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST``
1413 - This flag affects the decoding process of progressive frames.
1414 * - ``V4L2_MPEG2_PIC_FLAG_PROGRESSIVE``
1416 - Indicates whether the current frame is progressive.
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
1442 .. flat-table:: struct v4l2_ctrl_mpeg2_quantisation
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.
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.
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.
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.
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
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
1496 - Specifies the TX mode. See :ref:`TX Mode <vp9_tx_mode>` for more details.
1499 - TX 8x8 probabilities delta.
1502 - TX 16x16 probabilities delta.
1505 - TX 32x32 probabilities delta.
1507 - ``coef[4][2][2][6][6][3]``
1508 - Coefficient probabilities delta.
1511 - Skip probabilities delta.
1513 - ``inter_mode[7][3]``
1514 - Inter prediction mode probabilities delta.
1516 - ``interp_filter[4][2]``
1517 - Interpolation filter probabilities delta.
1520 - Is inter-block probabilities delta.
1523 - Compound prediction mode probabilities delta.
1525 - ``single_ref[5][2]``
1526 - Single reference probabilities delta.
1529 - Compound reference probabilities delta.
1532 - Y prediction mode probabilities delta.
1534 - ``uv_mode[10][9]``
1535 - UV prediction mode probabilities delta.
1537 - ``partition[16][3]``
1538 - Partition probabilities delta.
1541 - Motion vector joint probabilities delta.
1544 - Motion vector sign probabilities delta.
1546 - ``mv.classes[2][10]``
1547 - Motion vector class probabilities delta.
1549 - ``mv.class0_bit[2]``
1550 - Motion vector class0 bit probabilities delta.
1552 - ``mv.bits[2][10]``
1553 - Motion vector bits probabilities delta.
1555 - ``mv.class0_fr[2][2][3]``
1556 - Motion vector class0 fractional bit probabilities delta.
1559 - Motion vector fractional bit probabilities delta.
1561 - ``mv.class0_hp[2]``
1562 - Motion vector class0 high precision fractional bit probabilities delta.
1565 - Motion vector high precision fractional bit probabilities delta.
1571 .. tabularcolumns:: |p{6.5cm}|p{0.5cm}|p{10.3cm}|
1578 * - ``V4L2_VP9_TX_MODE_ONLY_4X4``
1580 - Transform size is 4x4.
1581 * - ``V4L2_VP9_TX_MODE_ALLOW_8X8``
1583 - Transform size can be up to 8x8.
1584 * - ``V4L2_VP9_TX_MODE_ALLOW_16X16``
1586 - Transform size can be up to 16x16.
1587 * - ``V4L2_VP9_TX_MODE_ALLOW_32X32``
1589 - transform size can be up to 32x32.
1590 * - ``V4L2_VP9_TX_MODE_SELECT``
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
1602 .. c:type:: v4l2_ctrl_vp9_frame
1608 .. tabularcolumns:: |p{4.7cm}|p{5.5cm}|p{7.1cm}|
1610 .. cssclass:: longtable
1612 .. flat-table:: struct v4l2_ctrl_vp9_frame
1617 * - struct :c:type:`v4l2_vp9_loop_filter`
1619 - Loop filter parameters. See struct :c:type:`v4l2_vp9_loop_filter` for more details.
1620 * - struct :c:type:`v4l2_vp9_quantization`
1622 - Quantization parameters. See :c:type:`v4l2_vp9_quantization` for more details.
1623 * - struct :c:type:`v4l2_vp9_segmentation`
1625 - Segmentation parameters. See :c:type:`v4l2_vp9_segmentation` for more details.
1628 - Combination of V4L2_VP9_FRAME_FLAG_* flags. See :ref:`Frame Flags<vp9_frame_flags>`.
1630 - ``compressed_header_size``
1631 - Compressed header size in bytes.
1633 - ``uncompressed_header_size``
1634 - Uncompressed header size in bytes.
1636 - ``frame_width_minus_1``
1637 - Add 1 to get the frame width expressed in pixels. See section 7.2.3 in :ref:`vp9`.
1639 - ``frame_height_minus_1``
1640 - Add 1 to get the frame height expressed in pixels. See section 7.2.3 in :ref:`vp9`.
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`.
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`.
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.
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.
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.
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>`
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.
1682 - ``frame_context_idx``
1683 - Frame context that should be used/updated.
1686 - VP9 profile. Can be 0, 1, 2 or 3.
1689 - Component depth in bits. Can be 8, 10 or 12. Note that not all profiles
1690 support 10 and/or 12 bits depths.
1692 - ``interpolation_filter``
1693 - Specifies the filter selection used for performing inter prediction. See
1694 :ref:`Interpolation Filter<vp9_interpolation_filter>` for more details.
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
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).
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
1715 - Applications and drivers must set this to zero.
1721 .. _vp9_frame_flags:
1725 .. tabularcolumns:: |p{10.0cm}|p{1.2cm}|p{6.1cm}|
1732 * - ``V4L2_VP9_FRAME_FLAG_KEY_FRAME``
1734 - The frame is a key frame.
1735 * - ``V4L2_VP9_FRAME_FLAG_SHOW_FRAME``
1737 - The frame should be displayed.
1738 * - ``V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT``
1740 - The decoding should be error resilient.
1741 * - ``V4L2_VP9_FRAME_FLAG_INTRA_ONLY``
1743 - The frame does not reference other frames.
1744 * - ``V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV``
1746 - The frame can use high precision motion vectors.
1747 * - ``V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX``
1749 - Frame context should be updated after decoding.
1750 * - ``V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE``
1752 - Parallel decoding is used.
1753 * - ``V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING``
1755 - Vertical subsampling is enabled.
1756 * - ``V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING``
1758 - Horizontal subsampling is enabled.
1759 * - ``V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING``
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}|
1774 * - ``V4L2_VP9_SIGN_BIAS_LAST``
1776 - Sign bias is set for the last reference frame.
1777 * - ``V4L2_VP9_SIGN_BIAS_GOLDEN``
1779 - Sign bias is set for the golden reference frame.
1780 * - ``V4L2_VP9_SIGN_BIAS_ALT``
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}|
1795 * - ``V4L2_VP9_RESET_FRAME_CTX_NONE``
1797 - Do not reset any frame context.
1798 * - ``V4L2_VP9_RESET_FRAME_CTX_SPEC``
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``
1804 - Reset all frame contexts.
1806 See section '7.2 Uncompressed header semantics' of the :ref:`vp9` specification
1809 .. _vp9_interpolation_filter:
1811 ``Interpolation Filter``
1813 .. tabularcolumns:: |p{9.0cm}|p{1.2cm}|p{7.1cm}|
1820 * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP``
1823 * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH``
1825 - Eight tap smooth filter.
1826 * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP``
1828 - Eeight tap sharp filter.
1829 * - ``V4L2_VP9_INTERP_FILTER_BILINEAR``
1832 * - ``V4L2_VP9_INTERP_FILTER_SWITCHABLE``
1834 - Filter selection is signaled at the block level.
1836 See section '7.2.7 Interpolation filter semantics' of the :ref:`vp9` specification
1839 .. _vp9_reference_mode:
1843 .. tabularcolumns:: |p{9.6cm}|p{0.5cm}|p{7.2cm}|
1850 * - ``V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE``
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``
1856 - Requires all the inter blocks to use compound mode. Single reference
1857 frame prediction is not allowed.
1858 * - ``V4L2_VP9_REFERENCE_MODE_SELECT``
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
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>`.
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>`.
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.
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.
1901 - Combination of V4L2_VP9_SEGMENTATION_FLAG_* flags. See
1902 :ref:`Segmentation Flags<vp9_segmentation_flags>`.
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}|
1918 * - ``V4L2_VP9_SEG_LVL_ALT_Q``
1920 - Quantizer segment feature.
1921 * - ``V4L2_VP9_SEG_LVL_ALT_L``
1923 - Loop filter segment feature.
1924 * - ``V4L2_VP9_SEG_LVL_REF_FRAME``
1926 - Reference frame segment feature.
1927 * - ``V4L2_VP9_SEG_LVL_SKIP``
1929 - Skip segment feature.
1930 * - ``V4L2_VP9_SEG_LVL_MAX``
1932 - Number of segment features.
1934 .. _vp9_segmentation_flags:
1936 ``Segmentation Flags``
1938 .. tabularcolumns:: |p{10.6cm}|p{0.8cm}|p{5.9cm}|
1945 * - ``V4L2_VP9_SEGMENTATION_FLAG_ENABLED``
1947 - Indicates that this frame makes use of the segmentation tool.
1948 * - ``V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP``
1950 - Indicates that the segmentation map should be updated during the
1951 decoding of this frame.
1952 * - ``V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE``
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``
1958 - Indicates that new parameters are about to be specified for each
1960 * - ``V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE``
1962 - Indicates that the segmentation parameters represent the actual values
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
1981 - Indicates the base frame qindex.
1984 - Indicates the Y DC quantizer relative to base_q_idx.
1987 - Indicates the UV DC quantizer relative to base_q_idx.
1990 - Indicates the UV AC quantizer relative to base_q_idx.
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
2011 - Contains the adjustment needed for the filter level based on the chosen
2014 - ``mode_deltas[2]``
2015 - Contains the adjustment needed for the filter level based on the chosen
2019 - Indicates the loop filter strength.
2022 - Indicates the sharpness level.
2025 - Combination of V4L2_VP9_LOOP_FILTER_FLAG_* flags.
2026 See :ref:`Loop Filter Flags <vp9_loop_filter_flags>`.
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}|
2043 * - ``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED``
2045 - When set, the filter level depends on the mode and reference frame used
2047 * - ``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE``
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
2067 .. tabularcolumns:: |p{1.2cm}|p{9.2cm}|p{6.9cm}|
2069 .. cssclass:: longtable
2071 .. flat-table:: struct v4l2_ctrl_hevc_sps
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.
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.
2087 - ``pic_width_in_luma_samples``
2088 - Specifies the width of each decoded picture in units of luma samples.
2090 - ``pic_height_in_luma_samples``
2091 - Specifies the height of each decoded picture in units of luma samples.
2093 - ``bit_depth_luma_minus8``
2094 - This value plus 8 specifies the bit depth of the samples of the luma array.
2096 - ``bit_depth_chroma_minus8``
2097 - This value plus 8 specifies the bit depth of the samples of the chroma arrays.
2099 - ``log2_max_pic_order_cnt_lsb_minus4``
2100 - Specifies the value of the variable MaxPicOrderCntLsb.
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).
2106 - ``sps_max_num_reorder_pics``
2107 - Indicates the maximum allowed number of pictures.
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.
2114 - ``log2_min_luma_coding_block_size_minus3``
2115 - This value plus 3 specifies the minimum luma coding block size.
2117 - ``log2_diff_max_min_luma_coding_block_size``
2118 - Specifies the difference between the maximum and minimum luma coding block size.
2120 - ``log2_min_luma_transform_block_size_minus2``
2121 - This value plus 2 specifies the minimum luma transform block size.
2123 - ``log2_diff_max_min_luma_transform_block_size``
2124 - Specifies the difference between the maximum and minimum luma transform block size.
2126 - ``max_transform_hierarchy_depth_inter``
2127 - Specifies the maximum hierarchy depth for transform units of coding units coded
2128 in inter prediction mode.
2130 - ``max_transform_hierarchy_depth_intra``
2131 - Specifies the maximum hierarchy depth for transform units of coding units coded in
2132 intra prediction mode.
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
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.
2142 - ``log2_min_pcm_luma_coding_block_size_minus3``
2143 - Plus 3 specifies the minimum size of coding blocks.
2145 - ``log2_diff_max_min_pcm_luma_coding_block_size``
2146 - Specifies the difference between the maximum and minimum size of coding blocks.
2148 - ``num_short_term_ref_pic_sets``
2149 - Specifies the number of st_ref_pic_set() syntax structures included in the SPS.
2151 - ``num_long_term_ref_pics_sps``
2152 - Specifies the number of candidate long-term reference pictures that are
2153 specified in the SPS.
2155 - ``chroma_format_idc``
2156 - Specifies the chroma sampling.
2158 - ``sps_max_sub_layers_minus1``
2159 - This value plus 1 specifies the maximum number of temporal sub-layers.
2162 - See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>`
2170 ``Sequence Parameter Set Flags``
2176 .. cssclass:: longtable
2183 * - ``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE``
2186 * - ``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED``
2189 * - ``V4L2_HEVC_SPS_FLAG_AMP_ENABLED``
2192 * - ``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET``
2195 * - ``V4L2_HEVC_SPS_FLAG_PCM_ENABLED``
2198 * - ``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED``
2201 * - ``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT``
2204 * - ``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED``
2207 * - ``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED``
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
2234 - ``pic_parameter_set_id``
2235 - Identifies the PPS for reference by other syntax elements.
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.
2241 - ``num_ref_idx_l0_default_active_minus1``
2242 - This value plus 1 specifies the inferred value of num_ref_idx_l0_active_minus1.
2244 - ``num_ref_idx_l1_default_active_minus1``
2245 - This value plus 1 specifies the inferred value of num_ref_idx_l1_active_minus1.
2247 - ``init_qp_minus26``
2248 - This value plus 26 specifies the initial value of SliceQp Y for each slice
2249 referring to the PPS.
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.
2256 - ``pps_cb_qp_offset``
2257 - Specifies the offsets to the luma quantization parameter Cb.
2259 - ``pps_cr_qp_offset``
2260 - Specifies the offsets to the luma quantization parameter Cr.
2262 - ``num_tile_columns_minus1``
2263 - This value plus 1 specifies the number of tile columns partitioning the picture.
2265 - ``num_tile_rows_minus1``
2266 - This value plus 1 specifies the number of tile rows partitioning the picture.
2268 - ``column_width_minus1[20]``
2269 - This value plus 1 specifies the width of the i-th tile column in units of
2272 - ``row_height_minus1[22]``
2273 - This value plus 1 specifies the height of the i-th tile row in units of coding
2276 - ``pps_beta_offset_div2``
2277 - Specifies the default deblocking parameter offsets for beta divided by 2.
2279 - ``pps_tc_offset_div2``
2280 - Specifies the default deblocking parameter offsets for tC divided by 2.
2282 - ``log2_parallel_merge_level_minus2``
2283 - This value plus 2 specifies the value of the variable Log2ParMrgLevel.
2286 - Applications and drivers must set this to zero.
2289 - See :ref:`Picture Parameter Set Flags <hevc_pps_flags>`
2293 ``Picture Parameter Set Flags``
2304 * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED``
2307 * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``
2310 * - ``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED``
2313 * - ``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT``
2316 * - ``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED``
2319 * - ``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED``
2322 * - ``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED``
2325 * - ``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT``
2328 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED``
2331 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED``
2334 * - ``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED``
2337 * - ``V4L2_HEVC_PPS_FLAG_TILES_ENABLED``
2340 * - ``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED``
2343 * - ``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED``
2346 * - ``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED``
2349 * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED``
2352 * - ``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER``
2355 * - ``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT``
2358 * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``
2361 * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
2363 - Specifies the presence of deblocking filter control syntax elements in
2365 * - ``V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING``
2367 - Specifies that tile column boundaries and likewise tile row boundaries
2368 are distributed uniformly across the picture
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
2390 .. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|
2392 .. cssclass:: longtable
2394 .. flat-table:: struct v4l2_ctrl_hevc_slice_params
2401 - Size (in bits) of the current slice data.
2403 - ``data_byte_offset``
2404 - Offset (in byte) to the video data in the current slice data.
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``
2412 - Specifies the coding type of the slice (B, P or I).
2414 - ``nuh_temporal_id_plus1``
2415 - Minus 1 specifies a temporal identifier for the NAL unit.
2419 (V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or
2420 V4L2_HEVC_SLICE_TYPE_B).
2422 - ``colour_plane_id``
2423 - Specifies the colour plane associated with the current slice.
2425 - ``slice_pic_order_cnt``
2426 - Specifies the picture order count.
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.
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.
2436 - ``collocated_ref_idx``
2437 - Specifies the reference index of the collocated picture used for
2438 temporal motion vector prediction.
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.
2444 - ``slice_qp_delta``
2445 - Specifies the initial value of QpY to be used for the coding blocks in the slice.
2447 - ``slice_cb_qp_offset``
2448 - Specifies a difference to be added to the value of pps_cb_qp_offset.
2450 - ``slice_cr_qp_offset``
2451 - Specifies a difference to be added to the value of pps_cr_qp_offset.
2453 - ``slice_act_y_qp_offset``
2454 - Specifies the offset to the luma of quantization parameter qP derived in section 8.6.2
2456 - ``slice_act_cb_qp_offset``
2457 - Specifies the offset to the cb of quantization parameter qP derived in section 8.6.2
2459 - ``slice_act_cr_qp_offset``
2460 - Specifies the offset to the cr of quantization parameter qP derived in section 8.6.2
2462 - ``slice_beta_offset_div2``
2463 - Specifies the deblocking parameter offsets for beta divided by 2.
2465 - ``slice_tc_offset_div2``
2466 - Specifies the deblocking parameter offsets for tC divided by 2.
2469 - Indicates whether a picture should be displayed as a frame or as one or more fields.
2471 - ``slice_segment_addr``
2472 - Specifies the address of the first coding tree block in the slice segment.
2474 - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2475 - The list of L0 reference elements as indices in the DPB.
2477 - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2478 - The list of L1 reference elements as indices in the DPB.
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).
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.
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.
2496 - See :ref:`Slice Parameters Flags <hevc_slice_params_flags>`
2502 .. _hevc_slice_params_flags:
2504 ``Slice Parameters Flags``
2515 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA``
2518 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA``
2521 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED``
2524 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO``
2527 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT``
2530 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0``
2533 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV``
2536 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED``
2539 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``
2542 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT``
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
2568 .. c:type:: v4l2_ctrl_hevc_scaling_matrix
2574 .. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|
2576 .. cssclass:: longtable
2578 .. flat-table:: struct v4l2_ctrl_hevc_scaling_matrix
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.
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.
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.
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.
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.
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.
2618 .. c:type:: v4l2_hevc_dpb_entry
2624 .. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{12.1cm}|
2626 .. flat-table:: struct v4l2_hevc_dpb_entry
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.
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".
2646 - Whether the reference is a field picture or a frame.
2647 See :ref:`HEVC dpb field pic Flags <hevc_dpb_field_pic_flags>`
2649 - ``pic_order_cnt_val``
2650 - The picture order count of the current picture.
2653 - Applications and drivers must set this to zero.
2659 .. _hevc_dpb_field_pic_flags:
2661 ``HEVC dpb field pic Flags``
2672 * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME``
2674 - (progressive) Frame
2675 * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD``
2678 * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD``
2681 * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM``
2683 - Top field, bottom field, in that order
2684 * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP``
2686 - Bottom field, top field, in that order
2687 * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP``
2689 - Top field, bottom field, top field repeated, in that order
2690 * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM``
2692 - Bottom field, top field, bottom field repeated, in that order
2693 * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING``
2696 * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING``
2699 * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM``
2701 - Top field paired with previous bottom field in output order
2702 * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP``
2704 - Bottom field paired with previous top field in output order
2705 * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM``
2707 - Top field paired with next bottom field in output order
2708 * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP``
2710 - Bottom field paired with next top field in output order
2712 .. c:type:: v4l2_hevc_pred_weight_table
2718 .. tabularcolumns:: |p{0.8cm}|p{10.6cm}|p{5.9cm}|
2720 .. flat-table:: struct v4l2_hevc_pred_weight_table
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.
2730 - ``luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2731 - The additive offset applied to the luma prediction value for list 0.
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.
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.
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.
2745 - ``luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
2746 - The additive offset applied to the luma prediction value for list 1.
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.
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.
2756 - ``luma_log2_weight_denom``
2757 - The base 2 logarithm of the denominator for all luma weighting
2760 - ``delta_chroma_log2_weight_denom``
2761 - The difference of the base 2 logarithm of the denominator for
2762 all chroma weighting factors.
2765 - Applications and drivers must set this to zero.
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
2787 .. tabularcolumns:: |p{9.4cm}|p{0.6cm}|p{7.3cm}|
2794 * - ``V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED``
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``
2800 - Decoding is done at the frame granularity.
2801 The OUTPUT buffer must contain all slices needed to decode the
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}|
2826 * - ``V4L2_STATELESS_HEVC_START_CODE_NONE``
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``
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.
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
2877 .. c:type:: v4l2_ctrl_hevc_decode_params
2879 .. cssclass:: longtable
2881 .. flat-table:: struct v4l2_ctrl_hevc_decode_params
2887 - ``pic_order_cnt_val``
2888 - PicOrderCntVal as described in section 8.3.1 "Decoding process
2889 for picture order count" of the specification.
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).
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.
2901 - ``num_active_dpb_entries``
2902 - The number of entries in ``dpb``.
2904 - ``num_poc_st_curr_before``
2905 - The number of reference pictures in the short-term set that come before
2908 - ``num_poc_st_curr_after``
2909 - The number of reference pictures in the short-term set that come after
2912 - ``num_poc_lt_curr``
2913 - The number of reference pictures in the long-term set.
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.
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.
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.
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.
2938 - See :ref:`Decode Parameters Flags <hevc_decode_params_flags>`
2940 .. _hevc_decode_params_flags:
2942 ``Decode Parameters Flags``
2944 .. cssclass:: longtable
2951 * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC``
2954 * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC``
2957 * - ``V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR``
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
2980 - See :ref:`AV1 Sequence Flags <av1_sequence_flags>`.
2983 - Specifies the features that can be used in the coded video sequence.
2985 - ``order_hint_bits``
2986 - Specifies the number of bits used for the order_hint field at each frame.
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.
2993 - Applications and drivers must set this to zero.
2995 - ``max_frame_width_minus_1``
2996 - specifies the maximum frame width minus 1 for the frames represented by
2997 this sequence header.
2999 .. _av1_sequence_flags:
3001 ``AV1 Sequence Flags``
3003 .. cssclass:: longtable
3010 * - ``V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE``
3012 - If set, specifies that the coded video sequence contains only one coded
3013 frame. If not set, specifies that the coded video sequence contains one
3014 or more coded frames.
3015 * - ``V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK``
3017 - If set, indicates that superblocks contain 128x128 luma samples.
3018 When equal to 0, it indicates that superblocks contain 64x64 luma
3019 samples. The number of contained chroma samples depends on
3020 subsampling_x and subsampling_y.
3021 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA``
3023 - If set, specifies that the use_filter_intra syntax element may be
3024 present. If not set, specifies that the use_filter_intra syntax element
3025 will not be present.
3026 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER``
3028 - Specifies whether the intra edge filtering process should be enabled.
3029 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND``
3031 - If set, specifies that the mode info for inter blocks may contain the
3032 syntax element interintra. If not set, specifies that the syntax element
3033 interintra will not be present.
3034 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND``
3036 - If set, specifies that the mode info for inter blocks may contain the
3037 syntax element compound_type. If not set, specifies that the syntax
3038 element compound_type will not be present.
3039 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION``
3041 - If set, indicates that the allow_warped_motion syntax element may be
3042 present. If not set, indicates that the allow_warped_motion syntax
3043 element will not be present.
3044 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER``
3046 - If set, indicates that the inter prediction filter type may be specified
3047 independently in the horizontal and vertical directions. If the flag is
3048 equal to 0, only one filter type may be specified, which is then used in
3050 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT``
3052 - If set, indicates that tools based on the values of order hints may be
3053 used. If not set, indicates that tools based on order hints are
3055 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP``
3057 - If set, indicates that the distance weights process may be used for
3059 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS``
3061 - If set, indicates that the use_ref_frame_mvs syntax element may be
3062 present. If not set, indicates that the use_ref_frame_mvs syntax element
3063 will not be present.
3064 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES``
3066 - If set, specifies that the use_superres syntax element will be present
3067 in the uncompressed header. If not set, specifies that the use_superres
3068 syntax element will not be present (instead use_superres will be set to
3069 0 in the uncompressed header without being read).
3070 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF``
3072 - If set, specifies that cdef filtering may be enabled. If not set,
3073 specifies that cdef filtering is disabled.
3074 * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION``
3076 - If set, specifies that loop restoration filtering may be enabled. If not
3077 set, specifies that loop restoration filtering is disabled.
3078 * - ``V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME``
3080 - If set, indicates that the video does not contain U and V color planes.
3081 If not set, indicates that the video contains Y, U, and V color planes.
3082 * - ``V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE``
3084 - If set, signals full swing representation, i.e. "Full Range
3085 Quantization". If not set, signals studio swing representation, i.e.
3086 "Limited Range Quantization".
3087 * - ``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X``
3089 - Specify the chroma subsampling format.
3090 * - ``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y``
3092 - Specify the chroma subsampling format.
3093 * - ``V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT``
3095 - Specifies whether film grain parameters are present in the coded video
3097 * - ``V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q``
3099 - If set, indicates that the U and V planes may have separate delta
3100 quantizer values. If not set, indicates that the U and V planes will share
3101 the same delta quantizer value.
3103 ``V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY (struct)``
3104 Represents a single AV1 tile inside an AV1 Tile Group. Note that MiRowStart,
3105 MiRowEnd, MiColStart and MiColEnd can be retrieved from struct
3106 v4l2_av1_tile_info in struct v4l2_ctrl_av1_frame using tile_row and
3107 tile_col. See section 6.10.1 "General tile group OBU semantics" in
3108 :ref:`av1` for more details.
3110 .. c:type:: v4l2_ctrl_av1_tile_group_entry
3112 .. cssclass:: longtable
3114 .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
3116 .. flat-table:: struct v4l2_ctrl_av1_tile_group_entry
3123 - Offset from the OBU data, i.e. where the coded tile data actually starts.
3126 - Specifies the size in bytes of the coded tile. Equivalent to "TileSize"
3130 - Specifies the row of the current tile. Equivalent to "TileRow" in
3134 - Specifies the column of the current tile. Equivalent to "TileColumn" in
3137 .. c:type:: v4l2_av1_warp_model
3139 AV1 Warp Model as described in section 3 "Symbols and abbreviated terms" of
3146 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3153 * - ``V4L2_AV1_WARP_MODEL_IDENTITY``
3155 - Warp model is just an identity transform.
3156 * - ``V4L2_AV1_WARP_MODEL_TRANSLATION``
3158 - Warp model is a pure translation.
3159 * - ``V4L2_AV1_WARP_MODEL_ROTZOOM``
3161 - Warp model is a rotation + symmetric zoom + translation.
3162 * - ``V4L2_AV1_WARP_MODEL_AFFINE``
3164 - Warp model is a general affine transform.
3166 .. c:type:: v4l2_av1_reference_frame
3168 AV1 Reference Frames as described in section 6.10.24 "Ref frames semantics"
3175 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3182 * - ``V4L2_AV1_REF_INTRA_FRAME``
3184 - Intra Frame Reference.
3185 * - ``V4L2_AV1_REF_LAST_FRAME``
3187 - Last Frame Reference.
3188 * - ``V4L2_AV1_REF_LAST2_FRAME``
3190 - Last2 Frame Reference.
3191 * - ``V4L2_AV1_REF_LAST3_FRAME``
3193 - Last3 Frame Reference.
3194 * - ``V4L2_AV1_REF_GOLDEN_FRAME``
3196 - Golden Frame Reference.
3197 * - ``V4L2_AV1_REF_BWDREF_FRAME``
3199 - BWD Frame Reference.
3200 * - ``V4L2_AV1_REF_ALTREF2_FRAME``
3202 - ALTREF2 Frame Reference.
3203 * - ``V4L2_AV1_REF_ALTREF_FRAME``
3205 - ALTREF Frame Reference.
3207 .. c:type:: v4l2_av1_global_motion
3209 AV1 Global Motion parameters as described in section 6.8.17
3210 "Global motion params semantics" of :ref:`av1`.
3212 .. cssclass:: longtable
3214 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3216 .. flat-table:: struct v4l2_av1_global_motion
3222 - ``flags[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
3223 - A bitfield containing the flags per reference frame. See
3224 :ref:`AV1 Global Motion Flags <av1_global_motion_flags>` for more
3226 * - enum :c:type:`v4l2_av1_warp_model`
3227 - ``type[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
3228 - The type of global motion transform used.
3230 - ``params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6]``
3231 - This field has the same meaning as "gm_params" in :ref:`av1`.
3234 - Bitfield indicating whether the global motion params are invalid for a
3235 given reference frame. See section 7.11.3.6 Setup shear process and the
3236 variable "warpValid". Use V4L2_AV1_GLOBAL_MOTION_IS_INVALID(ref) to
3237 create a suitable mask.
3240 - Applications and drivers must set this to zero.
3242 .. _av1_global_motion_flags:
3244 ``AV1 Global Motion Flags``
3246 .. cssclass:: longtable
3253 * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_GLOBAL``
3255 - Specifies whether global motion parameters are present for a particular
3257 * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_ROT_ZOOM``
3259 - Specifies whether a particular reference frame uses rotation and zoom
3261 * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_TRANSLATION``
3263 - Specifies whether a particular reference frame uses translation global
3266 .. c:type:: v4l2_av1_frame_restoration_type
3268 AV1 Frame Restoration Type.
3274 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3281 * - ``V4L2_AV1_FRAME_RESTORE_NONE``
3283 - No filtering is applied.
3284 * - ``V4L2_AV1_FRAME_RESTORE_WIENER``
3286 - Wiener filter process is invoked.
3287 * - ``V4L2_AV1_FRAME_RESTORE_SGRPROJ``
3289 - Self guided filter process is invoked.
3290 * - ``V4L2_AV1_FRAME_RESTORE_SWITCHABLE``
3292 - Restoration filter is swichtable.
3294 .. c:type:: v4l2_av1_loop_restoration
3296 AV1 Loop Restoration as described in section 6.10.15 "Loop restoration params
3297 semantics" of :ref:`av1`.
3299 .. cssclass:: longtable
3301 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3303 .. flat-table:: struct v4l2_av1_loop_restoration
3310 - See :ref:`AV1 Loop Restoration Flags <av1_loop_restoration_flags>`.
3313 - Specifies if the luma restoration size should be halved.
3316 - Specifies if the chroma size should be half the luma size.
3319 - Applications and drivers must set this to zero.
3320 * - :c:type:`v4l2_av1_frame_restoration_type`
3321 - ``frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX]``
3322 - Specifies the type of restoration used for each plane.
3324 - ``loop_restoration_size[V4L2_AV1_MAX_NUM_PLANES]``
3325 - Specifies the size of loop restoration units in units of samples in the
3328 .. _av1_loop_restoration_flags:
3330 ``AV1 Loop Restoration Flags``
3332 .. cssclass:: longtable
3339 * - ``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR``
3341 - Retains the same meaning as UsesLr in :ref:`av1`.
3342 * - ``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR``
3344 - Retains the same meaning as UsesChromaLr in :ref:`av1`.
3346 .. c:type:: v4l2_av1_cdef
3348 AV1 CDEF params semantics as described in section 6.10.14 "CDEF params
3349 semantics" of :ref:`av1`.
3351 .. cssclass:: longtable
3353 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3355 .. flat-table:: struct v4l2_av1_cdef
3361 - ``damping_minus_3``
3362 - Controls the amount of damping in the deringing filter.
3365 - Specifies the number of bits needed to specify which CDEF filter to
3368 - ``y_pri_strength[V4L2_AV1_CDEF_MAX]``
3369 - Specifies the strength of the primary filter.
3371 - ``y_sec_strength[V4L2_AV1_CDEF_MAX]``
3372 - Specifies the strength of the secondary filter.
3374 - ``uv_pri_strength[V4L2_AV1_CDEF_MAX]``
3375 - Specifies the strength of the primary filter.
3377 - ``uv_secondary_strength[V4L2_AV1_CDEF_MAX]``
3378 - Specifies the strength of the secondary filter.
3380 .. c:type:: v4l2_av1_segment_feature
3382 AV1 segment features as described in section 3 "Symbols and abbreviated terms"
3389 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3396 * - ``V4L2_AV1_SEG_LVL_ALT_Q``
3398 - Index for quantizer segment feature.
3399 * - ``V4L2_AV1_SEG_LVL_ALT_LF_Y_V``
3401 - Index for vertical luma loop filter segment feature.
3402 * - ``V4L2_AV1_SEG_LVL_REF_FRAME``
3404 - Index for reference frame segment feature.
3405 * - ``V4L2_AV1_SEG_LVL_REF_SKIP``
3407 - Index for skip segment feature.
3408 * - ``V4L2_AV1_SEG_LVL_REF_GLOBALMV``
3410 - Index for global mv feature.
3411 * - ``V4L2_AV1_SEG_LVL_MAX``
3413 - Number of segment features.
3415 .. c:type:: v4l2_av1_segmentation
3417 AV1 Segmentation params as defined in section 6.8.13 "Segmentation params
3418 semantics" of :ref:`av1`.
3420 .. cssclass:: longtable
3422 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3424 .. flat-table:: struct v4l2_av1_segmentation
3431 - See :ref:`AV1 Segmentation Flags <av1_segmentation_flags>`
3433 - ``last_active_seg_id``
3434 - Indicates the highest numbered segment id that has some
3435 enabled feature. This is used when decoding the segment id to only decode
3436 choices corresponding to used segments.
3438 - ``feature_enabled[V4L2_AV1_MAX_SEGMENTS]``
3439 - Bitmask defining which features are enabled in each segment. Use
3440 V4L2_AV1_SEGMENT_FEATURE_ENABLED to build a suitable mask.
3442 - `feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX]``
3443 - Data attached to each feature. Data entry is only valid if the feature
3446 .. _av1_segmentation_flags:
3448 ``AV1 Segmentation Flags``
3450 .. cssclass:: longtable
3457 * - ``V4L2_AV1_SEGMENTATION_FLAG_ENABLED``
3459 - If set, indicates that this frame makes use of the segmentation tool. If
3460 not set, indicates that the frame does not use segmentation.
3461 * - ``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP``
3463 - If set, indicates that the segmentation map are updated during the
3464 decoding of this frame. If not set, indicates that the segmentation map
3465 from the previous frame is used.
3466 * - ``V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE``
3468 - If set, indicates that the updates to the segmentation map are coded
3469 relative to the existing segmentation map. If not set, indicates that
3470 the new segmentation map is coded without reference to the existing
3472 * - ``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA``
3474 - If set, indicates that the updates to the segmentation map are coded
3475 relative to the existing segmentation map. If not set, indicates that
3476 the new segmentation map is coded without reference to the existing
3478 * - ``V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP``
3480 - If set, indicates that the segment id will be read before the skip
3481 syntax element. If not set, indicates that the skip syntax element will
3484 .. c:type:: v4l2_av1_loop_filter
3486 AV1 Loop filter params as defined in section 6.8.10 "Loop filter semantics" of
3489 .. cssclass:: longtable
3491 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3493 .. flat-table:: struct v4l2_av1_global_motion
3501 :ref:`AV1 Loop Filter flags <av1_loop_filter_flags>` for more details.
3504 - An array containing loop filter strength values. Different loop
3505 filter strength values from the array are used depending on the image
3506 plane being filtered, and the edge direction (vertical or horizontal)
3510 - indicates the sharpness level. The loop_filter_level and
3511 loop_filter_sharpness together determine when a block edge is filtered,
3512 and by how much the filtering can change the sample values. The loop
3513 filter process is described in section 7.14 of :ref:`av1`.
3515 - ``ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
3516 - contains the adjustment needed for the filter level based on the
3517 chosen reference frame. If this syntax element is not present, it
3518 maintains its previous value.
3520 - ``mode_deltas[2]``
3521 - contains the adjustment needed for the filter level based on
3522 the chosen mode. If this syntax element is not present, it maintains its
3526 - specifies the left shift which should be applied to decoded loop filter
3529 .. _av1_loop_filter_flags:
3531 ``AV1 Loop Filter Flags``
3533 .. cssclass:: longtable
3540 * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED``
3542 - If set, means that the filter level depends on the mode and reference
3543 frame used to predict a block. If not set, means that the filter level
3544 does not depend on the mode and reference frame.
3545 * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE``
3547 - If set, means that additional syntax elements are present that specify
3548 which mode and reference frame deltas are to be updated. If not set,
3549 means that these syntax elements are not present.
3550 * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT``
3552 - Specifies whether loop filter delta values are present
3553 * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI``
3555 - A value equal to 1 specifies that separate loop filter
3556 deltas are sent for horizontal luma edges, vertical luma edges,
3557 the U edges, and the V edges. A value of delta_lf_multi equal to 0
3558 specifies that the same loop filter delta is used for all edges.
3560 .. c:type:: v4l2_av1_quantization
3562 AV1 Quantization params as defined in section 6.8.11 "Quantization params
3563 semantics" of :ref:`av1`.
3565 .. cssclass:: longtable
3567 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3569 .. flat-table:: struct v4l2_av1_quantization
3577 :ref:`AV1 Loop Filter flags <av1_quantization_flags>` for more details.
3580 - Indicates the base frame qindex. This is used for Y AC coefficients and
3581 as the base value for the other quantizers.
3584 - Indicates the Y DC quantizer relative to base_q_idx.
3587 - Indicates the U DC quantizer relative to base_q_idx.
3590 - Indicates the U AC quantizer relative to base_q_idx.
3593 - Indicates the V DC quantizer relative to base_q_idx.
3596 - Indicates the V AC quantizer relative to base_q_idx.
3599 - Specifies the level in the quantizer matrix that should be used for
3600 luma plane decoding.
3603 - Specifies the level in the quantizer matrix that should be used for
3604 chroma U plane decoding.
3607 - Specifies the level in the quantizer matrix that should be used for
3608 chroma V plane decoding.
3611 - Specifies the left shift which should be applied to decoded quantizer
3614 .. _av1_quantization_flags:
3616 ``AV1 Quantization Flags``
3618 .. cssclass:: longtable
3625 * - ``V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA``
3627 - If set, indicates that the U and V delta quantizer values are coded
3628 separately. If not set, indicates that the U and V delta quantizer
3629 values share a common value.
3630 * - ``V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX``
3632 - If set, specifies that the quantizer matrix will be used to compute
3634 * - ``V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT``
3636 - Specifies whether quantizer index delta values are present.
3638 .. c:type:: v4l2_av1_tile_info
3640 AV1 Tile info as defined in section 6.8.14 "Tile info semantics" of ref:`av1`.
3642 .. cssclass:: longtable
3644 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
3646 .. flat-table:: struct v4l2_av1_tile_info
3654 :ref:`AV1 Tile Info flags <av1_tile_info_flags>` for more details.
3656 - ``context_update_tile_id``
3657 - Specifies which tile to use for the CDF update.
3660 - Specifies the number of tiles across the frame.
3663 - Specifies the number of tiles down the frame.
3665 - ``mi_col_starts[V4L2_AV1_MAX_TILE_COLS + 1]``
3666 - An array specifying the start column (in units of 4x4 luma
3667 samples) for each tile across the image.
3669 - ``mi_row_starts[V4L2_AV1_MAX_TILE_ROWS + 1]``
3670 - An array specifying the start row (in units of 4x4 luma
3671 samples) for each tile across the image.
3673 - ``width_in_sbs_minus_1[V4L2_AV1_MAX_TILE_COLS]``
3674 - Specifies the width of a tile minus 1 in units of superblocks.
3676 - ``height_in_sbs_minus_1[V4L2_AV1_MAX_TILE_ROWS]``
3677 - Specifies the height of a tile minus 1 in units of superblocks.
3679 - ``tile_size_bytes``
3680 - Specifies the number of bytes needed to code each tile size.
3683 - Applications and drivers must set this to zero.
3685 .. _av1_tile_info_flags:
3687 ``AV1 Tile Info Flags``
3689 .. cssclass:: longtable
3696 * - ``V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING``
3698 - If set, means that the tiles are uniformly spaced across the frame. (In
3699 other words, all tiles are the same size except for the ones at the
3700 right and bottom edge which can be smaller). If not set means that the
3701 tile sizes are coded.
3703 .. c:type:: v4l2_av1_frame_type
3711 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3718 * - ``V4L2_AV1_KEY_FRAME``
3721 * - ``V4L2_AV1_INTER_FRAME``
3724 * - ``V4L2_AV1_INTRA_ONLY_FRAME``
3727 * - ``V4L2_AV1_SWITCH_FRAME``
3731 .. c:type:: v4l2_av1_interpolation_filter
3733 AV1 Interpolation Filter
3739 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3746 * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP``
3749 * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH``
3751 - Eight tap smooth filter.
3752 * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP``
3754 - Eight tap sharp filter.
3755 * - ``V4L2_AV1_INTERPOLATION_FILTER_BILINEAR``
3758 * - ``V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE``
3760 - Filter selection is signaled at the block level.
3762 .. c:type:: v4l2_av1_tx_mode
3764 AV1 Tx mode as described in section 6.8.21 "TX mode semantics" of :ref:`av1`.
3770 .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
3777 * - ``V4L2_AV1_TX_MODE_ONLY_4X4``
3779 - The inverse transform will use only 4x4 transforms.
3780 * - ``V4L2_AV1_TX_MODE_LARGEST``
3782 - The inverse transform will use the largest transform size that fits
3784 * - ``V4L2_AV1_TX_MODE_SELECT``
3786 - The choice of transform size is specified explicitly for each block.
3788 ``V4L2_CID_STATELESS_AV1_FRAME (struct)``
3789 Represents a Frame Header OBU. See 6.8 "Frame Header OBU semantics" of
3790 :ref:`av1` for more details.
3792 .. c:type:: v4l2_ctrl_av1_frame
3794 .. cssclass:: longtable
3796 .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
3798 .. flat-table:: struct v4l2_ctrl_av1_frame
3803 * - struct :c:type:`v4l2_av1_tile_info`
3806 * - struct :c:type:`v4l2_av1_quantization`
3808 - Quantization parameters.
3809 * - struct :c:type:`v4l2_av1_segmentation`
3811 - Segmentation parameters.
3813 - ``superres_denom``
3814 - The denominator for the upscaling ratio.
3815 * - struct :c:type:`v4l2_av1_loop_filter`
3817 - Loop filter params
3818 * - struct :c:type:`v4l2_av1_cdef`
3822 - ``skip_mode_frame[2]``
3823 - Specifies the frames to use for compound prediction when skip_mode is
3826 - ``primary_ref_frame``
3827 - Specifies which reference frame contains the CDF values and other state
3828 that should be loaded at the start of the frame.
3829 * - struct :c:type:`v4l2_av1_loop_restoration`
3830 - ``loop_restoration``
3831 - Loop restoration parameters.
3832 * - struct :c:type:`v4l2_av1_loop_global_motion`
3834 - Global motion parameters.
3838 :ref:`AV1 Frame flags <av1_frame_flags>` for more details.
3839 * - enum :c:type:`v4l2_av1_frame_type`
3841 - Specifies the AV1 frame type
3844 - Specifies OrderHintBits least significant bits of the expected output
3845 order for this frame.
3847 - ``upscaled_width``
3848 - The upscaled width.
3849 * - enum :c:type:`v4l2_av1_interpolation_filter`
3850 - ``interpolation_filter``
3851 - Specifies the filter selection used for performing inter prediction.
3852 * - enum :c:type:`v4l2_av1_tx_mode`
3854 - Specifies how the transform size is determined.
3856 - ``frame_width_minus_1``
3857 - Add 1 to get the frame's width.
3859 - ``frame_height_minus_1``
3860 - Add 1 to get the frame's height.
3862 - ``render_width_minus_1``
3863 - Add 1 to get the render width of the frame in luma samples.
3865 - ``render_height_minus_1``
3866 - Add 1 to get the render height of the frame in luma samples.
3868 - ``current_frame_id``
3869 - Specifies the frame id number for the current frame. Frame
3870 id numbers are additional information that do not affect the decoding
3871 process, but provide decoders with a way of detecting missing reference
3872 frames so that appropriate action can be taken.
3874 - ``buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS]``
3875 - Specifies the frame removal time in units of DecCT clock ticks counted
3876 from the removal time of the last random access point for operating point
3880 - Applications and drivers must set this to zero.
3882 - ``order_hints[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
3883 - Specifies the expected output order hint for each reference frame.
3884 This field corresponds to the OrderHints variable from the specification
3885 (section 5.9.2 "Uncompressed header syntax"). As such, this is only
3886 used for non-intra frames and ignored otherwise. order_hints[0] is
3889 - ``reference_frame_ts[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
3890 - The V4L2 timestamp for each of the reference frames enumerated in
3891 enum :c:type:`v4l2_av1_reference_frame` starting at
3892 ``V4L2_AV1_REF_LAST_FRAME``. This represents the state of reference
3893 slot as described in the spec and updated by userland through the
3894 "Reference frame update process" in section 7.20 The timestamp refers
3895 to the ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
3896 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
3897 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
3899 - ``ref_frame_idx[V4L2_AV1_REFS_PER_FRAME]``
3900 - An index into ``reference_frame_ts`` representing the ordered list of
3901 references used by inter-frame. Matches the bitstream syntax
3902 element of the same name.
3904 - ``refresh_frame_flags``
3905 - Contains a bitmask that specifies which reference frame slots will be
3906 updated with the current frame after it is decoded.
3908 .. _av1_frame_flags:
3912 .. cssclass:: longtable
3919 * - ``V4L2_AV1_FRAME_FLAG_SHOW_FRAME``
3921 - If set, specifies that this frame should be immediately output once
3922 decoded. If not set, specifies that this frame should not be immediately
3923 output; it may be output later if a later uncompressed header uses
3924 show_existing_frame equal to 1.
3925 * - ``V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME``
3927 - If set, specifies that the frame may be output using the
3928 show_existing_frame mechanism. If not set, specifies that this frame
3929 will not be output using the show_existing_frame mechanism.
3930 * - ``V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE``
3932 - Specifies whether error resilient mode is enabled.
3933 * - ``V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE``
3935 - Specifies whether the CDF update in the symbol decoding process should
3937 * - ``V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS``
3939 - If set, indicates that intra blocks may use palette encoding. If not
3940 set, indicates that palette encoding is never used.
3941 * - ``V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV``
3943 - If set, specifies that motion vectors will always be integers. If not
3944 set, specifies that motion vectors can contain fractional bits.
3945 * - ``V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC``
3947 - If set, indicates that intra block copy may be used in this frame. If
3948 not set, indicates that intra block copy is not allowed in this frame.
3949 * - ``V4L2_AV1_FRAME_FLAG_USE_SUPERRES``
3951 - If set, indicates that upscaling is needed.
3952 * - ``V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV``
3954 - If set, specifies that motion vectors are specified to eighth pel
3955 precision. If not set, specifies that motion vectors are specified to
3956 quarter pel precision;
3957 * - ``V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE``
3959 - If not set, specifies that only the SIMPLE motion mode will be used.
3960 * - ``V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS``
3962 - If set specifies that motion vector information from a previous frame
3963 can be used when decoding the current frame. If not set, specifies that
3964 this information will not be used.
3965 * - ``V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF``
3967 - If set indicates that the end of frame CDF update is disabled. If not
3968 set, indicates that the end of frame CDF update is enabled
3969 * - ``V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION``
3971 - If set, indicates that the syntax element motion_mode may be present, if
3972 not set, indicates that the syntax element motion_mode will not be
3974 * - ``V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT``
3976 - If set, specifies that the mode info for inter blocks contains the
3977 syntax element comp_mode that indicates whether to use single or
3978 compound reference prediction. If not set, specifies that all inter
3979 blocks will use single prediction.
3980 * - ``V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET``
3982 - If set, specifies that the frame is restricted to a reduced subset of
3983 the full set of transform types.
3984 * - ``V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED``
3986 - This flag retains the same meaning as SkipModeAllowed in :ref:`av1`.
3987 * - ``V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT``
3989 - If set, specifies that the syntax element skip_mode will be present, if
3990 not set, specifies that skip_mode will not be used for this frame.
3991 * - ``V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE``
3993 - If set, specifies that the frame size will either be specified as the
3994 size of one of the reference frames, or computed from the
3995 frame_width_minus_1 and frame_height_minus_1 syntax elements. If not
3996 set, specifies that the frame size is equal to the size in the sequence
3998 * - ``V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT``
4000 - If set, specifies that buffer_removal_time is present. If not set,
4001 specifies that buffer_removal_time is not present.
4002 * - ``V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING``
4004 - If set, indicates that only two reference frames are explicitly
4005 signaled. If not set, indicates that all reference frames are explicitly
4008 ``V4L2_CID_STATELESS_AV1_FILM_GRAIN (struct)``
4009 Represents the optional film grain parameters. See section
4010 6.8.20 "Film grain params semantics" of :ref:`av1` for more details.
4012 .. c:type:: v4l2_ctrl_av1_film_grain
4014 .. cssclass:: longtable
4016 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
4018 .. flat-table:: struct v4l2_ctrl_av1_film_grain
4025 - See :ref:`AV1 Film Grain Flags <av1_film_grain_flags>`.
4028 - Represents a multiplier for the cr component used in derivation of the
4029 input index to the cr component scaling function.
4032 - Specifies the starting value for the pseudo-random numbers used during
4033 film grain synthesis.
4035 - ``film_grain_params_ref_idx``
4036 - Indicates which reference frame contains the film grain parameters to be
4037 used for this frame.
4040 - Specifies the number of points for the piece-wise linear scaling
4041 function of the luma component.
4043 - ``point_y_value[V4L2_AV1_MAX_NUM_Y_POINTS]``
4044 - Represents the x (luma value) coordinate for the i-th point
4045 of the piecewise linear scaling function for luma component. The values
4046 are signaled on the scale of 0..255. In case of 10 bit video, these
4047 values correspond to luma values divided by 4. In case of 12 bit video,
4048 these values correspond to luma values divided by 16.
4050 - ``point_y_scaling[V4L2_AV1_MAX_NUM_Y_POINTS]``
4051 - Represents the scaling (output) value for the i-th point
4052 of the piecewise linear scaling function for luma component.
4055 - Specifies the number of points for the piece-wise linear scaling
4056 function of the cb component.
4058 - ``point_cb_value[V4L2_AV1_MAX_NUM_CB_POINTS]``
4059 - Represents the x coordinate for the i-th point of the
4060 piece-wise linear scaling function for cb component. The values are
4061 signaled on the scale of 0..255.
4063 - ``point_cb_scaling[V4L2_AV1_MAX_NUM_CB_POINTS]``
4064 - Represents the scaling (output) value for the i-th point of the
4065 piecewise linear scaling function for cb component.
4068 - Represents the number of points for the piece-wise
4069 linear scaling function of the cr component.
4071 - ``point_cr_value[V4L2_AV1_MAX_NUM_CR_POINTS]``
4072 - Represents the x coordinate for the i-th point of the
4073 piece-wise linear scaling function for cr component. The values are
4074 signaled on the scale of 0..255.
4076 - ``point_cr_scaling[V4L2_AV1_MAX_NUM_CR_POINTS]``
4077 - Represents the scaling (output) value for the i-th point of the
4078 piecewise linear scaling function for cr component.
4080 - ``grain_scaling_minus_8``
4081 - Represents the shift - 8 applied to the values of the chroma component.
4082 The grain_scaling_minus_8 can take values of 0..3 and determines the
4083 range and quantization step of the standard deviation of film grain.
4086 - Specifies the number of auto-regressive coefficients for luma and
4089 - ``ar_coeffs_y_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
4090 - Specifies auto-regressive coefficients used for the Y plane.
4092 - ``ar_coeffs_cb_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
4093 - Specifies auto-regressive coefficients used for the U plane.
4095 - ``ar_coeffs_cr_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
4096 - Specifies auto-regressive coefficients used for the V plane.
4098 - ``ar_coeff_shift_minus_6``
4099 - Specifies the range of the auto-regressive coefficients. Values of 0,
4100 1, 2, and 3 correspond to the ranges for auto-regressive coefficients of
4101 [-2, 2), [-1, 1), [-0.5, 0.5) and [-0.25, 0.25) respectively.
4103 - ``grain_scale_shift``
4104 - Specifies how much the Gaussian random numbers should be scaled down
4105 during the grain synthesis process.
4108 - Represents a multiplier for the cb component used in derivation of the
4109 input index to the cb component scaling function.
4112 - Represents a multiplier for the average luma component used in
4113 derivation of the input index to the cb component scaling function..
4116 - Represents a multiplier for the average luma component used in
4117 derivation of the input index to the cr component scaling function.
4120 - Represents an offset used in derivation of the input index to the
4121 cb component scaling function.
4124 - Represents an offset used in derivation of the input index to the
4125 cr component scaling function.
4128 - Applications and drivers must set this to zero.
4130 .. _av1_film_grain_flags:
4132 ``AV1 Film Grain Flags``
4134 .. cssclass:: longtable
4141 * - ``V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN``
4143 - If set, specifies that film grain should be added to this frame. If not
4144 set, specifies that film grain should not be added.
4145 * - ``V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN``
4147 - If set, means that a new set of parameters should be sent. If not set,
4148 specifies that the previous set of parameters should be used.
4149 * - ``V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA``
4151 - If set, specifies that the chroma scaling is inferred from the luma
4153 * - ``V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP``
4155 - If set, indicates that the overlap between film grain blocks shall be
4156 applied. If not set, indicates that the overlap between film grain blocks
4157 shall not be applied.
4158 * - ``V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE``
4160 - If set, indicates that clipping to the restricted (studio, i.e. limited)
4161 range shall be applied to the sample values after adding the film grain
4162 (see the semantics for color_range for an explanation of studio swing).
4163 If not set, indicates that clipping to the full range shall be applied
4164 to the sample values after adding the film grain.