brintos

brintos / linux-shallow public Read only

0
0
Text · 130.6 KiB · 0da6356 Raw
4169 lines · plain
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later2 3.. _codec-stateless-controls:4 5*********************************6Stateless Codec Control Reference7*********************************8 9The Stateless Codec control class is intended to support10stateless decoder and encoders (i.e. hardware accelerators).11 12These drivers are typically supported by the :ref:`stateless_decoder`,13and deal with parsed pixel formats such as V4L2_PIX_FMT_H264_SLICE.14 15Stateless Codec Control ID16==========================17 18.. _codec-stateless-control-id:19 20``V4L2_CID_CODEC_STATELESS_CLASS (class)``21    The Stateless Codec class descriptor.22 23.. _v4l2-codec-stateless-h264:24 25``V4L2_CID_STATELESS_H264_SPS (struct)``26    Specifies the sequence parameter set (as extracted from the27    bitstream) for the associated H264 slice data. This includes the28    necessary parameters for configuring a stateless hardware decoding29    pipeline for H264. The bitstream parameters are defined according30    to :ref:`h264`, section 7.4.2.1.1 "Sequence Parameter Set Data31    Semantics". For further documentation, refer to the above32    specification, unless there is an explicit comment stating33    otherwise.34 35.. c:type:: v4l2_ctrl_h264_sps36 37.. raw:: latex38 39    \small40 41.. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}|42 43.. flat-table:: struct v4l2_ctrl_h264_sps44    :header-rows:  045    :stub-columns: 046    :widths:       1 1 247 48    * - __u849      - ``profile_idc``50      -51    * - __u852      - ``constraint_set_flags``53      - See :ref:`Sequence Parameter Set Constraints Set Flags <h264_sps_constraints_set_flags>`54    * - __u855      - ``level_idc``56      -57    * - __u858      - ``seq_parameter_set_id``59      -60    * - __u861      - ``chroma_format_idc``62      -63    * - __u864      - ``bit_depth_luma_minus8``65      -66    * - __u867      - ``bit_depth_chroma_minus8``68      -69    * - __u870      - ``log2_max_frame_num_minus4``71      -72    * - __u873      - ``pic_order_cnt_type``74      -75    * - __u876      - ``log2_max_pic_order_cnt_lsb_minus4``77      -78    * - __u879      - ``max_num_ref_frames``80      -81    * - __u882      - ``num_ref_frames_in_pic_order_cnt_cycle``83      -84    * - __s3285      - ``offset_for_ref_frame[255]``86      -87    * - __s3288      - ``offset_for_non_ref_pic``89      -90    * - __s3291      - ``offset_for_top_to_bottom_field``92      -93    * - __u1694      - ``pic_width_in_mbs_minus1``95      -96    * - __u1697      - ``pic_height_in_map_units_minus1``98      -99    * - __u32100      - ``flags``101      - See :ref:`Sequence Parameter Set Flags <h264_sps_flags>`102 103.. raw:: latex104 105    \normalsize106 107.. _h264_sps_constraints_set_flags:108 109``Sequence Parameter Set Constraints Set Flags``110 111.. cssclass:: longtable112 113.. flat-table::114    :header-rows:  0115    :stub-columns: 0116    :widths:       1 1 2117 118    * - ``V4L2_H264_SPS_CONSTRAINT_SET0_FLAG``119      - 0x00000001120      -121    * - ``V4L2_H264_SPS_CONSTRAINT_SET1_FLAG``122      - 0x00000002123      -124    * - ``V4L2_H264_SPS_CONSTRAINT_SET2_FLAG``125      - 0x00000004126      -127    * - ``V4L2_H264_SPS_CONSTRAINT_SET3_FLAG``128      - 0x00000008129      -130    * - ``V4L2_H264_SPS_CONSTRAINT_SET4_FLAG``131      - 0x00000010132      -133    * - ``V4L2_H264_SPS_CONSTRAINT_SET5_FLAG``134      - 0x00000020135      -136 137.. _h264_sps_flags:138 139``Sequence Parameter Set Flags``140 141.. cssclass:: longtable142 143.. flat-table::144    :header-rows:  0145    :stub-columns: 0146    :widths:       1 1 2147 148    * - ``V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE``149      - 0x00000001150      -151    * - ``V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS``152      - 0x00000002153      -154    * - ``V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO``155      - 0x00000004156      -157    * - ``V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED``158      - 0x00000008159      -160    * - ``V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY``161      - 0x00000010162      -163    * - ``V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD``164      - 0x00000020165      -166    * - ``V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE``167      - 0x00000040168      -169 170``V4L2_CID_STATELESS_H264_PPS (struct)``171    Specifies the picture parameter set (as extracted from the172    bitstream) for the associated H264 slice data. This includes the173    necessary parameters for configuring a stateless hardware decoding174    pipeline for H264.  The bitstream parameters are defined according175    to :ref:`h264`, section 7.4.2.2 "Picture Parameter Set RBSP176    Semantics". For further documentation, refer to the above177    specification, unless there is an explicit comment stating178    otherwise.179 180.. c:type:: v4l2_ctrl_h264_pps181 182.. raw:: latex183 184    \small185 186.. flat-table:: struct v4l2_ctrl_h264_pps187    :header-rows:  0188    :stub-columns: 0189    :widths:       1 1 2190 191    * - __u8192      - ``pic_parameter_set_id``193      -194    * - __u8195      - ``seq_parameter_set_id``196      -197    * - __u8198      - ``num_slice_groups_minus1``199      -200    * - __u8201      - ``num_ref_idx_l0_default_active_minus1``202      -203    * - __u8204      - ``num_ref_idx_l1_default_active_minus1``205      -206    * - __u8207      - ``weighted_bipred_idc``208      -209    * - __s8210      - ``pic_init_qp_minus26``211      -212    * - __s8213      - ``pic_init_qs_minus26``214      -215    * - __s8216      - ``chroma_qp_index_offset``217      -218    * - __s8219      - ``second_chroma_qp_index_offset``220      -221    * - __u16222      - ``flags``223      - See :ref:`Picture Parameter Set Flags <h264_pps_flags>`224 225.. raw:: latex226 227    \normalsize228 229.. _h264_pps_flags:230 231``Picture Parameter Set Flags``232 233.. raw:: latex234 235    \begingroup236    \scriptsize237    \setlength{\tabcolsep}{2pt}238 239.. tabularcolumns:: |p{9.8cm}|p{1.0cm}|p{6.5cm}|240 241.. flat-table::242    :header-rows:  0243    :stub-columns: 0244    :widths:       10 1 4245 246    * - ``V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE``247      - 0x0001248      -249    * - ``V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT``250      - 0x0002251      -252    * - ``V4L2_H264_PPS_FLAG_WEIGHTED_PRED``253      - 0x0004254      -255    * - ``V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``256      - 0x0008257      -258    * - ``V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED``259      - 0x0010260      -261    * - ``V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT``262      - 0x0020263      -264    * - ``V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE``265      - 0x0040266      -267    * - ``V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT``268      - 0x0080269      - ``V4L2_CID_STATELESS_H264_SCALING_MATRIX``270        must be used for this picture.271 272.. raw:: latex273 274    \endgroup275 276``V4L2_CID_STATELESS_H264_SCALING_MATRIX (struct)``277    Specifies the scaling matrix (as extracted from the bitstream) for278    the associated H264 slice data. The bitstream parameters are279    defined according to :ref:`h264`, section 7.4.2.1.1.1 "Scaling280    List Semantics". For further documentation, refer to the above281    specification, unless there is an explicit comment stating282    otherwise.283 284.. c:type:: v4l2_ctrl_h264_scaling_matrix285 286.. raw:: latex287 288    \small289 290.. tabularcolumns:: |p{0.6cm}|p{4.8cm}|p{11.9cm}|291 292.. flat-table:: struct v4l2_ctrl_h264_scaling_matrix293    :header-rows:  0294    :stub-columns: 0295    :widths:       1 1 2296 297    * - __u8298      - ``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 are302        expected in raster scan order.303    * - __u8304      - ``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 are308        expected in raster scan order.309 310``V4L2_CID_STATELESS_H264_SLICE_PARAMS (struct)``311    Specifies the slice parameters (as extracted from the bitstream)312    for the associated H264 slice data. This includes the necessary313    parameters for configuring a stateless hardware decoding pipeline314    for H264.  The bitstream parameters are defined according to315    :ref:`h264`, section 7.4.3 "Slice Header Semantics". For further316    documentation, refer to the above specification, unless there is317    an explicit comment stating otherwise.318 319.. c:type:: v4l2_ctrl_h264_slice_params320 321.. raw:: latex322 323    \small324 325.. tabularcolumns:: |p{4.0cm}|p{5.9cm}|p{7.4cm}|326 327.. flat-table:: struct v4l2_ctrl_h264_slice_params328    :header-rows:  0329    :stub-columns: 0330    :widths:       1 1 2331 332    * - __u32333      - ``header_bit_size``334      - Offset in bits to slice_data() from the beginning of this slice.335    * - __u32336      - ``first_mb_in_slice``337      -338    * - __u8339      - ``slice_type``340      -341    * - __u8342      - ``colour_plane_id``343      -344    * - __u8345      - ``redundant_pic_cnt``346      -347    * - __u8348      - ``cabac_init_idc``349      -350    * - __s8351      - ``slice_qp_delta``352      -353    * - __s8354      - ``slice_qs_delta``355      -356    * - __u8357      - ``disable_deblocking_filter_idc``358      -359    * - __s8360      - ``slice_alpha_c0_offset_div2``361      -362    * - __s8363      - ``slice_beta_offset_div2``364      -365    * - __u8366      - ``num_ref_idx_l0_active_minus1``367      - If num_ref_idx_active_override_flag is not set, this field must be368        set to the value of num_ref_idx_l0_default_active_minus1369    * - __u8370      - ``num_ref_idx_l1_active_minus1``371      - If num_ref_idx_active_override_flag is not set, this field must be372        set to the value of num_ref_idx_l1_default_active_minus1373    * - __u8374      - ``reserved``375      - Applications and drivers must set this to zero.376    * - struct :c:type:`v4l2_h264_reference`377      - ``ref_pic_list0[32]``378      - Reference picture list after applying the per-slice modifications379    * - struct :c:type:`v4l2_h264_reference`380      - ``ref_pic_list1[32]``381      - Reference picture list after applying the per-slice modifications382    * - __u32383      - ``flags``384      - See :ref:`Slice Parameter Flags <h264_slice_flags>`385 386.. raw:: latex387 388    \normalsize389 390.. _h264_slice_flags:391 392``Slice Parameter Set Flags``393 394.. cssclass:: longtable395 396.. flat-table::397    :header-rows:  0398    :stub-columns: 0399    :widths:       1 1 2400 401    * - ``V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED``402      - 0x00000001403      -404    * - ``V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH``405      - 0x00000002406      -407 408``V4L2_CID_STATELESS_H264_PRED_WEIGHTS (struct)``409    Prediction weight table defined according to :ref:`h264`,410    section 7.4.3.2 "Prediction Weight Table Semantics".411    The prediction weight table must be passed by applications412    under the conditions explained in section 7.3.3 "Slice header413    syntax".414 415.. c:type:: v4l2_ctrl_h264_pred_weights416 417.. raw:: latex418 419    \small420 421.. tabularcolumns:: |p{4.9cm}|p{4.9cm}|p{7.5cm}|422 423.. flat-table:: struct v4l2_ctrl_h264_pred_weights424    :header-rows:  0425    :stub-columns: 0426    :widths:       1 1 2427 428    * - __u16429      - ``luma_log2_weight_denom``430      -431    * - __u16432      - ``chroma_log2_weight_denom``433      -434    * - struct :c:type:`v4l2_h264_weight_factors`435      - ``weight_factors[2]``436      - The weight factors at index 0 are the weight factors for the reference437        list 0, the one at index 1 for the reference list 1.438 439.. raw:: latex440 441    \normalsize442 443.. c:type:: v4l2_h264_weight_factors444 445.. raw:: latex446 447    \small448 449.. tabularcolumns:: |p{1.0cm}|p{4.5cm}|p{11.8cm}|450 451.. flat-table:: struct v4l2_h264_weight_factors452    :header-rows:  0453    :stub-columns: 0454    :widths:       1 1 2455 456    * - __s16457      - ``luma_weight[32]``458      -459    * - __s16460      - ``luma_offset[32]``461      -462    * - __s16463      - ``chroma_weight[32][2]``464      -465    * - __s16466      - ``chroma_offset[32][2]``467      -468 469.. raw:: latex470 471    \normalsize472 473``Picture Reference``474 475.. c:type:: v4l2_h264_reference476 477.. cssclass:: longtable478 479.. flat-table:: struct v4l2_h264_reference480    :header-rows:  0481    :stub-columns: 0482    :widths:       1 1 2483 484    * - __u8485      - ``fields``486      - Specifies how the picture is referenced. See :ref:`Reference Fields <h264_ref_fields>`487    * - __u8488      - ``index``489      - Index into the :c:type:`v4l2_ctrl_h264_decode_params`.dpb array.490 491.. _h264_ref_fields:492 493``Reference Fields``494 495.. raw:: latex496 497    \small498 499.. tabularcolumns:: |p{5.4cm}|p{0.8cm}|p{11.1cm}|500 501.. flat-table::502    :header-rows:  0503    :stub-columns: 0504    :widths:       1 1 2505 506    * - ``V4L2_H264_TOP_FIELD_REF``507      - 0x1508      - The top field in field pair is used for short-term reference.509    * - ``V4L2_H264_BOTTOM_FIELD_REF``510      - 0x2511      - The bottom field in field pair is used for short-term reference.512    * - ``V4L2_H264_FRAME_REF``513      - 0x3514      - The frame (or the top/bottom fields, if it's a field pair)515        is used for short-term reference.516 517.. raw:: latex518 519    \normalsize520 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 necessary524    parameters for configuring a stateless hardware decoding pipeline525    for H264. The bitstream parameters are defined according to526    :ref:`h264`. For further documentation, refer to the above527    specification, unless there is an explicit comment stating528    otherwise.529 530.. c:type:: v4l2_ctrl_h264_decode_params531 532.. raw:: latex533 534    \small535 536.. tabularcolumns:: |p{4.0cm}|p{5.9cm}|p{7.4cm}|537 538.. flat-table:: struct v4l2_ctrl_h264_decode_params539    :header-rows:  0540    :stub-columns: 0541    :widths:       1 1 2542 543    * - struct :c:type:`v4l2_h264_dpb_entry`544      - ``dpb[16]``545      -546    * - __u16547      - ``nal_ref_idc``548      - NAL reference ID value coming from the NAL Unit header549    * - __u16550      - ``frame_num``551      -552    * - __s32553      - ``top_field_order_cnt``554      - Picture Order Count for the coded top field555    * - __s32556      - ``bottom_field_order_cnt``557      - Picture Order Count for the coded bottom field558    * - __u16559      - ``idr_pic_id``560      -561    * - __u16562      - ``pic_order_cnt_lsb``563      -564    * - __s32565      - ``delta_pic_order_cnt_bottom``566      -567    * - __s32568      - ``delta_pic_order_cnt0``569      -570    * - __s32571      - ``delta_pic_order_cnt1``572      -573    * - __u32574      - ``dec_ref_pic_marking_bit_size``575      - Size in bits of the dec_ref_pic_marking() syntax element.576    * - __u32577      - ``pic_order_cnt_bit_size``578      - Combined size in bits of the picture order count related syntax579        elements: pic_order_cnt_lsb, delta_pic_order_cnt_bottom,580        delta_pic_order_cnt0, and delta_pic_order_cnt1.581    * - __u32582      - ``slice_group_change_cycle``583      -584    * - __u32585      - ``reserved``586      - Applications and drivers must set this to zero.587    * - __u32588      - ``flags``589      - See :ref:`Decode Parameters Flags <h264_decode_params_flags>`590 591.. raw:: latex592 593    \normalsize594 595.. _h264_decode_params_flags:596 597``Decode Parameters Flags``598 599.. raw:: latex600 601    \small602 603.. tabularcolumns:: |p{8.3cm}|p{2.1cm}|p{6.9cm}|604 605.. flat-table::606    :header-rows:  0607    :stub-columns: 0608    :widths:       1 1 2609 610    * - ``V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC``611      - 0x00000001612      - That picture is an IDR picture613    * - ``V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC``614      - 0x00000002615      -616    * - ``V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD``617      - 0x00000004618      -619    * - ``V4L2_H264_DECODE_PARAM_FLAG_PFRAME``620      - 0x00000008621      -622    * - ``V4L2_H264_DECODE_PARAM_FLAG_BFRAME``623      - 0x00000010624      -625 626.. raw:: latex627 628    \normalsize629 630.. c:type:: v4l2_h264_dpb_entry631 632.. raw:: latex633 634    \small635 636.. tabularcolumns:: |p{1.0cm}|p{4.9cm}|p{11.4cm}|637 638.. flat-table:: struct v4l2_h264_dpb_entry639    :header-rows:  0640    :stub-columns: 0641    :widths:       1 1 2642 643    * - __u64644      - ``reference_ts``645      - Timestamp of the V4L2 capture buffer to use as reference, used646        with B-coded and P-coded frames. The timestamp refers to the647        ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the648        :c:func:`v4l2_timeval_to_ns()` function to convert the struct649        :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.650    * - __u32651      - ``pic_num``652      - For short term references, this must match the derived value PicNum653	(8-28) and for long term references it must match the derived value654	LongTermPicNum (8-29). When decoding frames (as opposed to fields)655	pic_num is the same as FrameNumWrap.656    * - __u16657      - ``frame_num``658      - For short term references, this must match the frame_num value from659	the slice header syntax (the driver will wrap the value if needed). For660	long term references, this must be set to the value of661	long_term_frame_idx described in the dec_ref_pic_marking() syntax.662    * - __u8663      - ``fields``664      - Specifies how the DPB entry is referenced. See :ref:`Reference Fields <h264_ref_fields>`665    * - __u8666      - ``reserved[5]``667      - Applications and drivers must set this to zero.668    * - __s32669      - ``top_field_order_cnt``670      -671    * - __s32672      - ``bottom_field_order_cnt``673      -674    * - __u32675      - ``flags``676      - See :ref:`DPB Entry Flags <h264_dpb_flags>`677 678.. raw:: latex679 680    \normalsize681 682.. _h264_dpb_flags:683 684``DPB Entries Flags``685 686.. raw:: latex687 688    \small689 690.. tabularcolumns:: |p{7.7cm}|p{2.1cm}|p{7.5cm}|691 692.. flat-table::693    :header-rows:  0694    :stub-columns: 0695    :widths:       1 1 2696 697    * - ``V4L2_H264_DPB_ENTRY_FLAG_VALID``698      - 0x00000001699      - The DPB entry is valid (non-empty) and should be considered.700    * - ``V4L2_H264_DPB_ENTRY_FLAG_ACTIVE``701      - 0x00000002702      - The DPB entry is used for reference.703    * - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``704      - 0x00000004705      - The DPB entry is used for long-term reference.706    * - ``V4L2_H264_DPB_ENTRY_FLAG_FIELD``707      - 0x00000008708      - The DPB entry is a single field or a complementary field pair.709 710.. raw:: latex711 712    \normalsize713 714``V4L2_CID_STATELESS_H264_DECODE_MODE (enum)``715    Specifies the decoding mode to use. Currently exposes slice-based and716    frame-based decoding but new modes might be added later on.717    This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE718    pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE719    are required to set this control in order to specify the decoding mode720    that is expected for the buffer.721    Drivers may expose a single or multiple decoding modes, depending722    on what they can support.723 724.. c:type:: v4l2_stateless_h264_decode_mode725 726.. raw:: latex727 728    \scriptsize729 730.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|731 732.. flat-table::733    :header-rows:  0734    :stub-columns: 0735    :widths:       1 1 2736 737    * - ``V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED``738      - 0739      - 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`` flag744        is required.745    * - ``V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED``746      - 1747      - Decoding is done at the frame granularity,748        The OUTPUT buffer must contain all slices needed to decode the749        frame. The OUTPUT buffer must also contain both fields.750        This mode will be supported by devices that751        parse the slice(s) header(s) in hardware. When this mode is752        selected, the ``V4L2_CID_STATELESS_H264_SLICE_PARAMS``753        control shall not be set.754 755.. raw:: latex756 757    \normalsize758 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_SLICE762    pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE763    are required to set this control in order to specify the start code764    that is expected for the buffer.765    Drivers may expose a single or multiple start codes, depending766    on what they can support.767 768.. c:type:: v4l2_stateless_h264_start_code769 770.. raw:: latex771 772    \small773 774.. tabularcolumns:: |p{7.9cm}|p{0.4cm}|p{9.0cm}|775 776.. flat-table::777    :header-rows:  0778    :stub-columns: 0779    :widths:       4 1 4780 781    * - ``V4L2_STATELESS_H264_START_CODE_NONE``782      - 0783      - Selecting this value specifies that H264 slices are passed784        to the driver without any start code. The bitstream data should be785        according to :ref:`h264` 7.3.1 NAL unit syntax, hence contains786        emulation prevention bytes when required.787    * - ``V4L2_STATELESS_H264_START_CODE_ANNEX_B``788      - 1789      - Selecting this value specifies that H264 slices are expected790        to be prefixed by Annex B start codes. According to :ref:`h264`791        valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.792 793.. raw:: latex794 795    \normalsize796 797.. _codec-stateless-fwht:798 799``V4L2_CID_STATELESS_FWHT_PARAMS (struct)``800    Specifies the FWHT (Fast Walsh Hadamard Transform) parameters (as extracted801    from the bitstream) for the associated FWHT data. This includes the necessary802    parameters for configuring a stateless hardware decoding pipeline for FWHT.803    This codec is specific to the vicodec test driver.804 805.. c:type:: v4l2_ctrl_fwht_params806 807.. raw:: latex808 809    \small810 811.. tabularcolumns:: |p{1.4cm}|p{3.9cm}|p{12.0cm}|812 813.. flat-table:: struct v4l2_ctrl_fwht_params814    :header-rows:  0815    :stub-columns: 0816    :widths:       1 1 2817 818    * - __u64819      - ``backward_ref_ts``820      - Timestamp of the V4L2 capture buffer to use as backward reference, used821        with P-coded frames. The timestamp refers to the822	``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the823	:c:func:`v4l2_timeval_to_ns()` function to convert the struct824	:c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.825    * - __u32826      - ``version``827      - The version of the codec. Set to ``V4L2_FWHT_VERSION``.828    * - __u32829      - ``width``830      - The width of the frame.831    * - __u32832      - ``height``833      - The height of the frame.834    * - __u32835      - ``flags``836      - The flags of the frame, see :ref:`fwht-flags`.837    * - __u32838      - ``colorspace``839      - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.840    * - __u32841      - ``xfer_func``842      - The transfer function, from enum :c:type:`v4l2_xfer_func`.843    * - __u32844      - ``ycbcr_enc``845      - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.846    * - __u32847      - ``quantization``848      - The quantization range, from enum :c:type:`v4l2_quantization`.849 850.. raw:: latex851 852    \normalsize853 854.. _fwht-flags:855 856FWHT Flags857==========858 859.. raw:: latex860 861    \small862 863.. tabularcolumns:: |p{7.0cm}|p{2.3cm}|p{8.0cm}|864 865.. flat-table::866    :header-rows:  0867    :stub-columns: 0868    :widths:       3 1 4869 870    * - ``V4L2_FWHT_FL_IS_INTERLACED``871      - 0x00000001872      - Set if this is an interlaced format.873    * - ``V4L2_FWHT_FL_IS_BOTTOM_FIRST``874      - 0x00000002875      - Set if this is a bottom-first (NTSC) interlaced format.876    * - ``V4L2_FWHT_FL_IS_ALTERNATE``877      - 0x00000004878      - Set if each 'frame' contains just one field.879    * - ``V4L2_FWHT_FL_IS_BOTTOM_FIELD``880      - 0x00000008881      - If V4L2_FWHT_FL_IS_ALTERNATE was set, then this is set if this 'frame' is the882	bottom field, else it is the top field.883    * - ``V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED``884      - 0x00000010885      - Set if the Y' (luma) plane is uncompressed.886    * - ``V4L2_FWHT_FL_CB_IS_UNCOMPRESSED``887      - 0x00000020888      - Set if the Cb plane is uncompressed.889    * - ``V4L2_FWHT_FL_CR_IS_UNCOMPRESSED``890      - 0x00000040891      - Set if the Cr plane is uncompressed.892    * - ``V4L2_FWHT_FL_CHROMA_FULL_HEIGHT``893      - 0x00000080894      - Set if the chroma plane has the same height as the luma plane,895	else the chroma plane is half the height of the luma plane.896    * - ``V4L2_FWHT_FL_CHROMA_FULL_WIDTH``897      - 0x00000100898      - Set if the chroma plane has the same width as the luma plane,899	else the chroma plane is half the width of the luma plane.900    * - ``V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED``901      - 0x00000200902      - Set if the alpha plane is uncompressed.903    * - ``V4L2_FWHT_FL_I_FRAME``904      - 0x00000400905      - Set if this is an I-frame.906    * - ``V4L2_FWHT_FL_COMPONENTS_NUM_MSK``907      - 0x00070000908      - The number of color components minus one.909    * - ``V4L2_FWHT_FL_PIXENC_MSK``910      - 0x00180000911      - The mask for the pixel encoding.912    * - ``V4L2_FWHT_FL_PIXENC_YUV``913      - 0x00080000914      - Set if the pixel encoding is YUV.915    * - ``V4L2_FWHT_FL_PIXENC_RGB``916      - 0x00100000917      - Set if the pixel encoding is RGB.918    * - ``V4L2_FWHT_FL_PIXENC_HSV``919      - 0x00180000920      - Set if the pixel encoding is HSV.921 922.. raw:: latex923 924    \normalsize925 926.. _v4l2-codec-stateless-vp8:927 928``V4L2_CID_STATELESS_VP8_FRAME (struct)``929    Specifies the frame parameters for the associated VP8 parsed frame data.930    This includes the necessary parameters for931    configuring a stateless hardware decoding pipeline for VP8.932    The bitstream parameters are defined according to :ref:`vp8`.933 934.. c:type:: v4l2_ctrl_vp8_frame935 936.. raw:: latex937 938    \small939 940.. tabularcolumns:: |p{7.0cm}|p{4.6cm}|p{5.7cm}|941 942.. cssclass:: longtable943 944.. flat-table:: struct v4l2_ctrl_vp8_frame945    :header-rows:  0946    :stub-columns: 0947    :widths:       1 1 2948 949    * - struct :c:type:`v4l2_vp8_segment`950      - ``segment``951      - Structure with segment-based adjustments metadata.952    * - struct :c:type:`v4l2_vp8_loop_filter`953      - ``lf``954      - Structure with loop filter level adjustments metadata.955    * - struct :c:type:`v4l2_vp8_quantization`956      - ``quant``957      - Structure with VP8 dequantization indices metadata.958    * - struct :c:type:`v4l2_vp8_entropy`959      - ``entropy``960      - Structure with VP8 entropy coder probabilities metadata.961    * - struct :c:type:`v4l2_vp8_entropy_coder_state`962      - ``coder_state``963      - Structure with VP8 entropy coder state.964    * - __u16965      - ``width``966      - The width of the frame. Must be set for all frames.967    * - __u16968      - ``height``969      - The height of the frame. Must be set for all frames.970    * - __u8971      - ``horizontal_scale``972      - Horizontal scaling factor.973    * - __u8974      - ``vertical_scale``975      - Vertical scaling factor.976    * - __u8977      - ``version``978      - Bitstream version.979    * - __u8980      - ``prob_skip_false``981      - Indicates the probability that the macroblock is not skipped.982    * - __u8983      - ``prob_intra``984      - Indicates the probability that a macroblock is intra-predicted.985    * - __u8986      - ``prob_last``987      - Indicates the probability that the last reference frame is used988        for inter-prediction989    * - __u8990      - ``prob_gf``991      - Indicates the probability that the golden reference frame is used992        for inter-prediction993    * - __u8994      - ``num_dct_parts``995      - Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8.996    * - __u32997      - ``first_part_size``998      - Size of the first partition, i.e. the control partition.999    * - __u321000      - ``first_part_header_bits``1001      - Size in bits of the first partition header portion.1002    * - __u321003      - ``dct_part_sizes[8]``1004      - DCT coefficients sizes.1005    * - __u641006      - ``last_frame_ts``1007      - Timestamp for the V4L2 capture buffer to use as last reference frame, used1008        with inter-coded frames. The timestamp refers to the ``timestamp`` field in1009	struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`1010	function to convert the struct :c:type:`timeval` in struct1011	:c:type:`v4l2_buffer` to a __u64.1012    * - __u641013      - ``golden_frame_ts``1014      - Timestamp for the V4L2 capture buffer to use as last reference frame, used1015        with inter-coded frames. The timestamp refers to the ``timestamp`` field in1016	struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`1017	function to convert the struct :c:type:`timeval` in struct1018	:c:type:`v4l2_buffer` to a __u64.1019    * - __u641020      - ``alt_frame_ts``1021      - Timestamp for the V4L2 capture buffer to use as alternate reference frame, used1022        with inter-coded frames. The timestamp refers to the ``timestamp`` field in1023	struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`1024	function to convert the struct :c:type:`timeval` in struct1025	:c:type:`v4l2_buffer` to a __u64.1026    * - __u641027      - ``flags``1028      - See :ref:`Frame Flags <vp8_frame_flags>`1029 1030.. raw:: latex1031 1032    \normalsize1033 1034.. _vp8_frame_flags:1035 1036``Frame Flags``1037 1038.. tabularcolumns:: |p{9.8cm}|p{0.8cm}|p{6.7cm}|1039 1040.. cssclass:: longtable1041 1042.. flat-table::1043    :header-rows:  01044    :stub-columns: 01045    :widths:       1 1 21046 1047    * - ``V4L2_VP8_FRAME_FLAG_KEY_FRAME``1048      - 0x011049      - Indicates if the frame is a key frame.1050    * - ``V4L2_VP8_FRAME_FLAG_EXPERIMENTAL``1051      - 0x021052      - Experimental bitstream.1053    * - ``V4L2_VP8_FRAME_FLAG_SHOW_FRAME``1054      - 0x041055      - Show frame flag, indicates if the frame is for display.1056    * - ``V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF``1057      - 0x081058      - Enable/disable skipping of macroblocks with no non-zero coefficients.1059    * - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN``1060      - 0x101061      - Sign of motion vectors when the golden frame is referenced.1062    * - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT``1063      - 0x201064      - Sign of motion vectors when the alt frame is referenced.1065 1066.. c:type:: v4l2_vp8_entropy_coder_state1067 1068.. cssclass:: longtable1069 1070.. tabularcolumns:: |p{1.0cm}|p{2.0cm}|p{14.3cm}|1071 1072.. flat-table:: struct v4l2_vp8_entropy_coder_state1073    :header-rows:  01074    :stub-columns: 01075    :widths:       1 1 21076 1077    * - __u81078      - ``range``1079      - coder state value for "Range"1080    * - __u81081      - ``value``1082      - coder state value for "Value"-1083    * - __u81084      - ``bit_count``1085      - number of bits left.1086    * - __u81087      - ``padding``1088      - Applications and drivers must set this to zero.1089 1090.. c:type:: v4l2_vp8_segment1091 1092.. cssclass:: longtable1093 1094.. tabularcolumns:: |p{1.2cm}|p{4.0cm}|p{12.1cm}|1095 1096.. flat-table:: struct v4l2_vp8_segment1097    :header-rows:  01098    :stub-columns: 01099    :widths:       1 1 21100 1101    * - __s81102      - ``quant_update[4]``1103      - Signed quantizer value update.1104    * - __s81105      - ``lf_update[4]``1106      - Signed loop filter level value update.1107    * - __u81108      - ``segment_probs[3]``1109      - Segment probabilities.1110    * - __u81111      - ``padding``1112      - Applications and drivers must set this to zero.1113    * - __u321114      - ``flags``1115      - See :ref:`Segment Flags <vp8_segment_flags>`1116 1117.. _vp8_segment_flags:1118 1119``Segment Flags``1120 1121.. raw:: latex1122 1123    \small1124 1125.. tabularcolumns:: |p{10cm}|p{1.0cm}|p{6.3cm}|1126 1127.. flat-table::1128    :header-rows:  01129    :stub-columns: 01130    :widths:       1 1 21131 1132    * - ``V4L2_VP8_SEGMENT_FLAG_ENABLED``1133      - 0x011134      - Enable/disable segment-based adjustments.1135    * - ``V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP``1136      - 0x021137      - Indicates if the macroblock segmentation map is updated in this frame.1138    * - ``V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA``1139      - 0x041140      - Indicates if the segment feature data is updated in this frame.1141    * - ``V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE``1142      - 0x081143      - If is set, the segment feature data mode is delta-value.1144        If cleared, it's absolute-value.1145 1146.. raw:: latex1147 1148    \normalsize1149 1150.. c:type:: v4l2_vp8_loop_filter1151 1152.. cssclass:: longtable1153 1154.. tabularcolumns:: |p{1.5cm}|p{3.9cm}|p{11.9cm}|1155 1156.. flat-table:: struct v4l2_vp8_loop_filter1157    :header-rows:  01158    :stub-columns: 01159    :widths:       1 1 21160 1161    * - __s81162      - ``ref_frm_delta[4]``1163      - Reference adjustment (signed) delta value.1164    * - __s81165      - ``mb_mode_delta[4]``1166      - Macroblock prediction mode adjustment (signed) delta value.1167    * - __u81168      - ``sharpness_level``1169      - Sharpness level1170    * - __u81171      - ``level``1172      - Filter level1173    * - __u161174      - ``padding``1175      - Applications and drivers must set this to zero.1176    * - __u321177      - ``flags``1178      - See :ref:`Loop Filter Flags <vp8_loop_filter_flags>`1179 1180.. _vp8_loop_filter_flags:1181 1182``Loop Filter Flags``1183 1184.. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|1185 1186.. flat-table::1187    :header-rows:  01188    :stub-columns: 01189    :widths:       1 1 21190 1191    * - ``V4L2_VP8_LF_ADJ_ENABLE``1192      - 0x011193      - Enable/disable macroblock-level loop filter adjustment.1194    * - ``V4L2_VP8_LF_DELTA_UPDATE``1195      - 0x021196      - Indicates if the delta values used in an adjustment are updated.1197    * - ``V4L2_VP8_LF_FILTER_TYPE_SIMPLE``1198      - 0x041199      - If set, indicates the filter type is simple.1200        If cleared, the filter type is normal.1201 1202.. c:type:: v4l2_vp8_quantization1203 1204.. tabularcolumns:: |p{1.5cm}|p{3.5cm}|p{12.3cm}|1205 1206.. flat-table:: struct v4l2_vp8_quantization1207    :header-rows:  01208    :stub-columns: 01209    :widths:       1 1 21210 1211    * - __u81212      - ``y_ac_qi``1213      - Luma AC coefficient table index.1214    * - __s81215      - ``y_dc_delta``1216      - Luma DC delta value.1217    * - __s81218      - ``y2_dc_delta``1219      - Y2 block DC delta value.1220    * - __s81221      - ``y2_ac_delta``1222      - Y2 block AC delta value.1223    * - __s81224      - ``uv_dc_delta``1225      - Chroma DC delta value.1226    * - __s81227      - ``uv_ac_delta``1228      - Chroma AC delta value.1229    * - __u161230      - ``padding``1231      - Applications and drivers must set this to zero.1232 1233.. c:type:: v4l2_vp8_entropy1234 1235.. cssclass:: longtable1236 1237.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|1238 1239.. flat-table:: struct v4l2_vp8_entropy1240    :header-rows:  01241    :stub-columns: 01242    :widths:       1 1 21243 1244    * - __u81245      - ``coeff_probs[4][8][3][11]``1246      - Coefficient update probabilities.1247    * - __u81248      - ``y_mode_probs[4]``1249      - Luma mode update probabilities.1250    * - __u81251      - ``uv_mode_probs[3]``1252      - Chroma mode update probabilities.1253    * - __u81254      - ``mv_probs[2][19]``1255      - MV decoding update probabilities.1256    * - __u81257      - ``padding[3]``1258      - Applications and drivers must set this to zero.1259 1260.. _v4l2-codec-stateless-mpeg2:1261 1262``V4L2_CID_STATELESS_MPEG2_SEQUENCE (struct)``1263    Specifies the sequence parameters (as extracted from the bitstream) for the1264    associated MPEG-2 slice data. This includes fields matching the syntax1265    elements from the sequence header and sequence extension parts of the1266    bitstream as specified by :ref:`mpeg2part2`.1267 1268.. c:type:: v4l2_ctrl_mpeg2_sequence1269 1270.. raw:: latex1271 1272    \small1273 1274.. cssclass:: longtable1275 1276.. tabularcolumns:: |p{1.4cm}|p{6.5cm}|p{9.4cm}|1277 1278.. flat-table:: struct v4l2_ctrl_mpeg2_sequence1279    :header-rows:  01280    :stub-columns: 01281    :widths:       1 1 21282 1283    * - __u161284      - ``horizontal_size``1285      - The width of the displayable part of the frame's luminance component.1286    * - __u161287      - ``vertical_size``1288      - The height of the displayable part of the frame's luminance component.1289    * - __u321290      - ``vbv_buffer_size``1291      - Used to calculate the required size of the video buffering verifier,1292	defined (in bits) as: 16 * 1024 * vbv_buffer_size.1293    * - __u161294      - ``profile_and_level_indication``1295      - The current profile and level indication as extracted from the1296	bitstream.1297    * - __u81298      - ``chroma_format``1299      - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).1300    * - __u81301      - ``flags``1302      - See :ref:`MPEG-2 Sequence Flags <mpeg2_sequence_flags>`.1303 1304.. _mpeg2_sequence_flags:1305 1306``MPEG-2 Sequence Flags``1307 1308.. cssclass:: longtable1309 1310.. flat-table::1311    :header-rows:  01312    :stub-columns: 01313    :widths:       1 1 21314 1315    * - ``V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE``1316      - 0x011317      - Indication that all the frames for the sequence are progressive instead1318	of interlaced.1319 1320.. raw:: latex1321 1322    \normalsize1323 1324``V4L2_CID_STATELESS_MPEG2_PICTURE (struct)``1325    Specifies the picture parameters (as extracted from the bitstream) for the1326    associated MPEG-2 slice data. This includes fields matching the syntax1327    elements from the picture header and picture coding extension parts of the1328    bitstream as specified by :ref:`mpeg2part2`.1329 1330.. c:type:: v4l2_ctrl_mpeg2_picture1331 1332.. raw:: latex1333 1334    \small1335 1336.. cssclass:: longtable1337 1338.. tabularcolumns:: |p{1.0cm}|p{5.6cm}|p{10.7cm}|1339 1340.. flat-table:: struct v4l2_ctrl_mpeg2_picture1341    :header-rows:  01342    :stub-columns: 01343    :widths:       1 1 21344 1345    * - __u641346      - ``backward_ref_ts``1347      - Timestamp of the V4L2 capture buffer to use as backward reference, used1348        with B-coded and P-coded frames. The timestamp refers to the1349	``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the1350	:c:func:`v4l2_timeval_to_ns()` function to convert the struct1351	:c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.1352    * - __u641353      - ``forward_ref_ts``1354      - Timestamp for the V4L2 capture buffer to use as forward reference, used1355        with B-coded frames. The timestamp refers to the ``timestamp`` field in1356	struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`1357	function to convert the struct :c:type:`timeval` in struct1358	:c:type:`v4l2_buffer` to a __u64.1359    * - __u321360      - ``flags``1361      - See :ref:`MPEG-2 Picture Flags <mpeg2_picture_flags>`.1362    * - __u81363      - ``f_code[2][2]``1364      - Motion vector codes.1365    * - __u81366      - ``picture_coding_type``1367      - Picture coding type for the frame covered by the current slice1368	(V4L2_MPEG2_PIC_CODING_TYPE_I, V4L2_MPEG2_PIC_CODING_TYPE_P or1369	V4L2_MPEG2_PIC_CODING_TYPE_B).1370    * - __u81371      - ``picture_structure``1372      - Picture structure (1: interlaced top field, 2: interlaced bottom field,1373	3: progressive frame).1374    * - __u81375      - ``intra_dc_precision``1376      - Precision of Discrete Cosine transform (0: 8 bits precision,1377	1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).1378    * - __u81379      - ``reserved[5]``1380      - Applications and drivers must set this to zero.1381 1382.. _mpeg2_picture_flags:1383 1384``MPEG-2 Picture Flags``1385 1386.. cssclass:: longtable1387 1388.. flat-table::1389    :header-rows:  01390    :stub-columns: 01391    :widths:       1 1 21392 1393    * - ``V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST``1394      - 0x000000011395      - If set and it's an interlaced stream, top field is output first.1396    * - ``V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT``1397      - 0x000000021398      - If set only frame-DCT and frame prediction are used.1399    * - ``V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV``1400      - 0x000000041401      -  If set motion vectors are coded for intra macroblocks.1402    * - ``V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE``1403      - 0x000000081404      - This flag affects the inverse quantization process.1405    * - ``V4L2_MPEG2_PIC_FLAG_INTRA_VLC``1406      - 0x000000101407      - This flag affects the decoding of transform coefficient data.1408    * - ``V4L2_MPEG2_PIC_FLAG_ALT_SCAN``1409      - 0x000000201410      - This flag affects the decoding of transform coefficient data.1411    * - ``V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST``1412      - 0x000000401413      - This flag affects the decoding process of progressive frames.1414    * - ``V4L2_MPEG2_PIC_FLAG_PROGRESSIVE``1415      - 0x000000801416      - Indicates whether the current frame is progressive.1417 1418.. raw:: latex1419 1420    \normalsize1421 1422``V4L2_CID_STATELESS_MPEG2_QUANTISATION (struct)``1423    Specifies quantisation matrices, in zigzag scanning order, for the1424    associated MPEG-2 slice data. This control is initialized by the kernel1425    to the matrices default values. If a bitstream transmits a user-defined1426    quantisation matrices load, applications are expected to use this control.1427    Applications are also expected to set the control loading the default1428    values, if the quantisation matrices need to be reset, for instance on a1429    sequence header. This process is specified by section 6.3.7.1430    "Quant matrix extension" of the specification.1431 1432.. c:type:: v4l2_ctrl_mpeg2_quantisation1433 1434.. tabularcolumns:: |p{0.8cm}|p{8.0cm}|p{8.5cm}|1435 1436.. cssclass:: longtable1437 1438.. raw:: latex1439 1440    \small1441 1442.. flat-table:: struct v4l2_ctrl_mpeg2_quantisation1443    :header-rows:  01444    :stub-columns: 01445    :widths:       1 1 21446 1447    * - __u81448      - ``intra_quantiser_matrix[64]``1449      - The quantisation matrix coefficients for intra-coded frames, in zigzag1450	scanning order. It is relevant for both luma and chroma components,1451	although it can be superseded by the chroma-specific matrix for1452	non-4:2:0 YUV formats.1453    * - __u81454      - ``non_intra_quantiser_matrix[64]``1455      - The quantisation matrix coefficients for non-intra-coded frames, in1456	zigzag scanning order. It is relevant for both luma and chroma1457	components, although it can be superseded by the chroma-specific matrix1458	for non-4:2:0 YUV formats.1459    * - __u81460      - ``chroma_intra_quantiser_matrix[64]``1461      - The quantisation matrix coefficients for the chominance component of1462	intra-coded frames, in zigzag scanning order. Only relevant for1463	non-4:2:0 YUV formats.1464    * - __u81465      - ``chroma_non_intra_quantiser_matrix[64]``1466      - The quantisation matrix coefficients for the chrominance component of1467	non-intra-coded frames, in zigzag scanning order. Only relevant for1468	non-4:2:0 YUV formats.1469 1470.. raw:: latex1471 1472    \normalsize1473 1474.. _v4l2-codec-stateless-vp9:1475 1476``V4L2_CID_STATELESS_VP9_COMPRESSED_HDR (struct)``1477    Stores VP9 probabilities updates as parsed from the current compressed frame1478    header. A value of zero in an array element means no update of the relevant1479    probability. Motion vector-related updates contain a new value or zero. All1480    other updates contain values translated with inv_map_table[] (see 6.3.5 in1481    :ref:`vp9`).1482 1483.. c:type:: v4l2_ctrl_vp9_compressed_hdr1484 1485.. tabularcolumns:: |p{1cm}|p{4.8cm}|p{11.4cm}|1486 1487.. cssclass:: longtable1488 1489.. flat-table:: struct v4l2_ctrl_vp9_compressed_hdr1490    :header-rows:  01491    :stub-columns: 01492    :widths:       1 1 21493 1494    * - __u81495      - ``tx_mode``1496      - Specifies the TX mode. See :ref:`TX Mode <vp9_tx_mode>` for more details.1497    * - __u81498      - ``tx8[2][1]``1499      - TX 8x8 probabilities delta.1500    * - __u81501      - ``tx16[2][2]``1502      - TX 16x16 probabilities delta.1503    * - __u81504      - ``tx32[2][3]``1505      - TX 32x32 probabilities delta.1506    * - __u81507      - ``coef[4][2][2][6][6][3]``1508      - Coefficient probabilities delta.1509    * - __u81510      - ``skip[3]``1511      - Skip probabilities delta.1512    * - __u81513      - ``inter_mode[7][3]``1514      - Inter prediction mode probabilities delta.1515    * - __u81516      - ``interp_filter[4][2]``1517      - Interpolation filter probabilities delta.1518    * - __u81519      - ``is_inter[4]``1520      - Is inter-block probabilities delta.1521    * - __u81522      - ``comp_mode[5]``1523      - Compound prediction mode probabilities delta.1524    * - __u81525      - ``single_ref[5][2]``1526      - Single reference probabilities delta.1527    * - __u81528      - ``comp_ref[5]``1529      - Compound reference probabilities delta.1530    * - __u81531      - ``y_mode[4][9]``1532      - Y prediction mode probabilities delta.1533    * - __u81534      - ``uv_mode[10][9]``1535      - UV prediction mode probabilities delta.1536    * - __u81537      - ``partition[16][3]``1538      - Partition probabilities delta.1539    * - __u81540      - ``mv.joint[3]``1541      - Motion vector joint probabilities delta.1542    * - __u81543      - ``mv.sign[2]``1544      - Motion vector sign probabilities delta.1545    * - __u81546      - ``mv.classes[2][10]``1547      - Motion vector class probabilities delta.1548    * - __u81549      - ``mv.class0_bit[2]``1550      - Motion vector class0 bit probabilities delta.1551    * - __u81552      - ``mv.bits[2][10]``1553      - Motion vector bits probabilities delta.1554    * - __u81555      - ``mv.class0_fr[2][2][3]``1556      - Motion vector class0 fractional bit probabilities delta.1557    * - __u81558      - ``mv.fr[2][3]``1559      - Motion vector fractional bit probabilities delta.1560    * - __u81561      - ``mv.class0_hp[2]``1562      - Motion vector class0 high precision fractional bit probabilities delta.1563    * - __u81564      - ``mv.hp[2]``1565      - Motion vector high precision fractional bit probabilities delta.1566 1567.. _vp9_tx_mode:1568 1569``TX Mode``1570 1571.. tabularcolumns:: |p{6.5cm}|p{0.5cm}|p{10.3cm}|1572 1573.. flat-table::1574    :header-rows:  01575    :stub-columns: 01576    :widths:       1 1 21577 1578    * - ``V4L2_VP9_TX_MODE_ONLY_4X4``1579      - 01580      - Transform size is 4x4.1581    * - ``V4L2_VP9_TX_MODE_ALLOW_8X8``1582      - 11583      - Transform size can be up to 8x8.1584    * - ``V4L2_VP9_TX_MODE_ALLOW_16X16``1585      - 21586      - Transform size can be up to 16x16.1587    * - ``V4L2_VP9_TX_MODE_ALLOW_32X32``1588      - 31589      - transform size can be up to 32x32.1590    * - ``V4L2_VP9_TX_MODE_SELECT``1591      - 41592      - Bitstream contains the transform size for each block.1593 1594See section '7.3.1 Tx mode semantics' of the :ref:`vp9` specification for more details.1595 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 hardware1599    decoding pipeline for VP9. The bitstream parameters are defined according1600    to :ref:`vp9`.1601 1602.. c:type:: v4l2_ctrl_vp9_frame1603 1604.. raw:: latex1605 1606    \small1607 1608.. tabularcolumns:: |p{4.7cm}|p{5.5cm}|p{7.1cm}|1609 1610.. cssclass:: longtable1611 1612.. flat-table:: struct v4l2_ctrl_vp9_frame1613    :header-rows:  01614    :stub-columns: 01615    :widths:       1 1 21616 1617    * - struct :c:type:`v4l2_vp9_loop_filter`1618      - ``lf``1619      - Loop filter parameters. See struct :c:type:`v4l2_vp9_loop_filter` for more details.1620    * - struct :c:type:`v4l2_vp9_quantization`1621      - ``quant``1622      - Quantization parameters. See :c:type:`v4l2_vp9_quantization` for more details.1623    * - struct :c:type:`v4l2_vp9_segmentation`1624      - ``seg``1625      - Segmentation parameters. See :c:type:`v4l2_vp9_segmentation` for more details.1626    * - __u321627      - ``flags``1628      - Combination of V4L2_VP9_FRAME_FLAG_* flags. See :ref:`Frame Flags<vp9_frame_flags>`.1629    * - __u161630      - ``compressed_header_size``1631      - Compressed header size in bytes.1632    * - __u161633      - ``uncompressed_header_size``1634      - Uncompressed header size in bytes.1635    * - __u161636      - ``frame_width_minus_1``1637      - Add 1 to get the frame width expressed in pixels. See section 7.2.3 in :ref:`vp9`.1638    * - __u161639      - ``frame_height_minus_1``1640      - Add 1 to get the frame height expressed in pixels. See section 7.2.3 in :ref:`vp9`.1641    * - __u161642      - ``render_width_minus_1``1643      - Add 1 to get the expected render width expressed in pixels. This is1644        not used during the decoding process but might be used by HW scalers to1645        prepare a frame that's ready for scanout. See section 7.2.4 in :ref:`vp9`.1646    * - __u161647      - render_height_minus_11648      - Add 1 to get the expected render height expressed in pixels. This is1649        not used during the decoding process but might be used by HW scalers to1650        prepare a frame that's ready for scanout. See section 7.2.4 in :ref:`vp9`.1651    * - __u641652      - ``last_frame_ts``1653      - "last" reference buffer timestamp.1654	The timestamp refers to the ``timestamp`` field in1655        struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`1656        function to convert the struct :c:type:`timeval` in struct1657        :c:type:`v4l2_buffer` to a __u64.1658    * - __u641659      - ``golden_frame_ts``1660      - "golden" reference buffer timestamp.1661	The timestamp refers to the ``timestamp`` field in1662        struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`1663        function to convert the struct :c:type:`timeval` in struct1664        :c:type:`v4l2_buffer` to a __u64.1665    * - __u641666      - ``alt_frame_ts``1667      - "alt" reference buffer timestamp.1668	The timestamp refers to the ``timestamp`` field in1669        struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`1670        function to convert the struct :c:type:`timeval` in struct1671        :c:type:`v4l2_buffer` to a __u64.1672    * - __u81673      - ``ref_frame_sign_bias``1674      - a bitfield specifying whether the sign bias is set for a given1675        reference frame. See :ref:`Reference Frame Sign Bias<vp9_ref_frame_sign_bias>`1676        for more details.1677    * - __u81678      - ``reset_frame_context``1679      - specifies whether the frame context should be reset to default values. See1680        :ref:`Reset Frame Context<vp9_reset_frame_context>` for more details.1681    * - __u81682      - ``frame_context_idx``1683      - Frame context that should be used/updated.1684    * - __u81685      - ``profile``1686      - VP9 profile. Can be 0, 1, 2 or 3.1687    * - __u81688      - ``bit_depth``1689      - Component depth in bits. Can be 8, 10 or 12. Note that not all profiles1690        support 10 and/or 12 bits depths.1691    * - __u81692      - ``interpolation_filter``1693      - Specifies the filter selection used for performing inter prediction. See1694        :ref:`Interpolation Filter<vp9_interpolation_filter>` for more details.1695    * - __u81696      - ``tile_cols_log2``1697      - Specifies the base 2 logarithm of the width of each tile (where the1698        width is measured in units of 8x8 blocks). Shall be less than or equal1699        to 6.1700    * - __u81701      - ``tile_rows_log2``1702      - Specifies the base 2 logarithm of the height of each tile (where the1703        height is measured in units of 8x8 blocks).1704    * - __u81705      - ``reference_mode``1706      - Specifies the type of inter prediction to be used. See1707        :ref:`Reference Mode<vp9_reference_mode>` for more details. Note that1708	this is derived as part of the compressed header parsing process and1709	for this reason should have been part of1710	:c:type: `v4l2_ctrl_vp9_compressed_hdr` optional control. It is safe to1711	set this value to zero if the driver does not require compressed1712	headers.1713    * - __u81714      - ``reserved[7]``1715      - Applications and drivers must set this to zero.1716 1717.. raw:: latex1718 1719    \normalsize1720 1721.. _vp9_frame_flags:1722 1723``Frame Flags``1724 1725.. tabularcolumns:: |p{10.0cm}|p{1.2cm}|p{6.1cm}|1726 1727.. flat-table::1728    :header-rows:  01729    :stub-columns: 01730    :widths:       1 1 21731 1732    * - ``V4L2_VP9_FRAME_FLAG_KEY_FRAME``1733      - 0x0011734      - The frame is a key frame.1735    * - ``V4L2_VP9_FRAME_FLAG_SHOW_FRAME``1736      - 0x0021737      - The frame should be displayed.1738    * - ``V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT``1739      - 0x0041740      - The decoding should be error resilient.1741    * - ``V4L2_VP9_FRAME_FLAG_INTRA_ONLY``1742      - 0x0081743      - The frame does not reference other frames.1744    * - ``V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV``1745      - 0x0101746      - The frame can use high precision motion vectors.1747    * - ``V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX``1748      - 0x0201749      - Frame context should be updated after decoding.1750    * - ``V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE``1751      - 0x0401752      - Parallel decoding is used.1753    * - ``V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING``1754      - 0x0801755      - Vertical subsampling is enabled.1756    * - ``V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING``1757      - 0x1001758      - Horizontal subsampling is enabled.1759    * - ``V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING``1760      - 0x2001761      - The full UV range is used.1762 1763.. _vp9_ref_frame_sign_bias:1764 1765``Reference Frame Sign Bias``1766 1767.. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|1768 1769.. flat-table::1770    :header-rows:  01771    :stub-columns: 01772    :widths:       1 1 21773 1774    * - ``V4L2_VP9_SIGN_BIAS_LAST``1775      - 0x11776      - Sign bias is set for the last reference frame.1777    * - ``V4L2_VP9_SIGN_BIAS_GOLDEN``1778      - 0x21779      - Sign bias is set for the golden reference frame.1780    * - ``V4L2_VP9_SIGN_BIAS_ALT``1781      - 0x21782      - Sign bias is set for the alt reference frame.1783 1784.. _vp9_reset_frame_context:1785 1786``Reset Frame Context``1787 1788.. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|1789 1790.. flat-table::1791    :header-rows:  01792    :stub-columns: 01793    :widths:       1 1 21794 1795    * - ``V4L2_VP9_RESET_FRAME_CTX_NONE``1796      - 01797      - Do not reset any frame context.1798    * - ``V4L2_VP9_RESET_FRAME_CTX_SPEC``1799      - 11800      - Reset the frame context pointed to by1801        :c:type:`v4l2_ctrl_vp9_frame`.frame_context_idx.1802    * - ``V4L2_VP9_RESET_FRAME_CTX_ALL``1803      - 21804      - Reset all frame contexts.1805 1806See section '7.2 Uncompressed header semantics' of the :ref:`vp9` specification1807for more details.1808 1809.. _vp9_interpolation_filter:1810 1811``Interpolation Filter``1812 1813.. tabularcolumns:: |p{9.0cm}|p{1.2cm}|p{7.1cm}|1814 1815.. flat-table::1816    :header-rows:  01817    :stub-columns: 01818    :widths:       1 1 21819 1820    * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP``1821      - 01822      - Eight tap filter.1823    * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH``1824      - 11825      - Eight tap smooth filter.1826    * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP``1827      - 21828      - Eeight tap sharp filter.1829    * - ``V4L2_VP9_INTERP_FILTER_BILINEAR``1830      - 31831      - Bilinear filter.1832    * - ``V4L2_VP9_INTERP_FILTER_SWITCHABLE``1833      - 41834      - Filter selection is signaled at the block level.1835 1836See section '7.2.7 Interpolation filter semantics' of the :ref:`vp9` specification1837for more details.1838 1839.. _vp9_reference_mode:1840 1841``Reference Mode``1842 1843.. tabularcolumns:: |p{9.6cm}|p{0.5cm}|p{7.2cm}|1844 1845.. flat-table::1846    :header-rows:  01847    :stub-columns: 01848    :widths:       1 1 21849 1850    * - ``V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE``1851      - 01852      - Indicates that all the inter blocks use only a single reference frame1853        to generate motion compensated prediction.1854    * - ``V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE``1855      - 11856      - Requires all the inter blocks to use compound mode. Single reference1857        frame prediction is not allowed.1858    * - ``V4L2_VP9_REFERENCE_MODE_SELECT``1859      - 21860      - Allows each individual inter block to select between single and1861        compound prediction modes.1862 1863See section '7.3.6 Frame reference mode semantics' of the :ref:`vp9` specification for more details.1864 1865.. c:type:: v4l2_vp9_segmentation1866 1867Encodes the quantization parameters. See section '7.2.10 Segmentation1868params syntax' of the :ref:`vp9` specification for more details.1869 1870.. tabularcolumns:: |p{0.8cm}|p{5cm}|p{11.4cm}|1871 1872.. cssclass:: longtable1873 1874.. flat-table:: struct v4l2_vp9_segmentation1875    :header-rows:  01876    :stub-columns: 01877    :widths:       1 1 21878 1879    * - __u81880      - ``feature_data[8][4]``1881      - Data attached to each feature. Data entry is only valid if the feature1882        is enabled. The array shall be indexed with segment number as the first dimension1883        (0..7) and one of V4L2_VP9_SEG_* as the second dimension.1884        See :ref:`Segment Feature IDs<vp9_segment_feature>`.1885    * - __u81886      - ``feature_enabled[8]``1887      - Bitmask defining which features are enabled in each segment. The value for each1888        segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id) values where id is1889        one of V4L2_VP9_SEG_*. See :ref:`Segment Feature IDs<vp9_segment_feature>`.1890    * - __u81891      - ``tree_probs[7]``1892      - Specifies the probability values to be used when decoding a Segment-ID.1893        See '5.15 Segmentation map' section of :ref:`vp9` for more details.1894    * - __u81895      - ``pred_probs[3]``1896      - Specifies the probability values to be used when decoding a1897        Predicted-Segment-ID. See '6.4.14 Get segment id syntax'1898        section of :ref:`vp9` for more details.1899    * - __u81900      - ``flags``1901      - Combination of V4L2_VP9_SEGMENTATION_FLAG_* flags. See1902        :ref:`Segmentation Flags<vp9_segmentation_flags>`.1903    * - __u81904      - ``reserved[5]``1905      - Applications and drivers must set this to zero.1906 1907.. _vp9_segment_feature:1908 1909``Segment feature IDs``1910 1911.. tabularcolumns:: |p{6.0cm}|p{1cm}|p{10.3cm}|1912 1913.. flat-table::1914    :header-rows:  01915    :stub-columns: 01916    :widths:       1 1 21917 1918    * - ``V4L2_VP9_SEG_LVL_ALT_Q``1919      - 01920      - Quantizer segment feature.1921    * - ``V4L2_VP9_SEG_LVL_ALT_L``1922      - 11923      - Loop filter segment feature.1924    * - ``V4L2_VP9_SEG_LVL_REF_FRAME``1925      - 21926      - Reference frame segment feature.1927    * - ``V4L2_VP9_SEG_LVL_SKIP``1928      - 31929      - Skip segment feature.1930    * - ``V4L2_VP9_SEG_LVL_MAX``1931      - 41932      - Number of segment features.1933 1934.. _vp9_segmentation_flags:1935 1936``Segmentation Flags``1937 1938.. tabularcolumns:: |p{10.6cm}|p{0.8cm}|p{5.9cm}|1939 1940.. flat-table::1941    :header-rows:  01942    :stub-columns: 01943    :widths:       1 1 21944 1945    * - ``V4L2_VP9_SEGMENTATION_FLAG_ENABLED``1946      - 0x011947      - Indicates that this frame makes use of the segmentation tool.1948    * - ``V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP``1949      - 0x021950      - Indicates that the segmentation map should be updated during the1951        decoding of this frame.1952    * - ``V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE``1953      - 0x041954      - Indicates that the updates to the segmentation map are coded1955        relative to the existing segmentation map.1956    * - ``V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA``1957      - 0x081958      - Indicates that new parameters are about to be specified for each1959        segment.1960    * - ``V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE``1961      - 0x101962      - Indicates that the segmentation parameters represent the actual values1963        to be used.1964 1965.. c:type:: v4l2_vp9_quantization1966 1967Encodes the quantization parameters. See section '7.2.9 Quantization params1968syntax' of the VP9 specification for more details.1969 1970.. tabularcolumns:: |p{0.8cm}|p{4cm}|p{12.4cm}|1971 1972.. cssclass:: longtable1973 1974.. flat-table:: struct v4l2_vp9_quantization1975    :header-rows:  01976    :stub-columns: 01977    :widths:       1 1 21978 1979    * - __u81980      - ``base_q_idx``1981      - Indicates the base frame qindex.1982    * - __s81983      - ``delta_q_y_dc``1984      - Indicates the Y DC quantizer relative to base_q_idx.1985    * - __s81986      - ``delta_q_uv_dc``1987      - Indicates the UV DC quantizer relative to base_q_idx.1988    * - __s81989      - ``delta_q_uv_ac``1990      - Indicates the UV AC quantizer relative to base_q_idx.1991    * - __u81992      - ``reserved[4]``1993      - Applications and drivers must set this to zero.1994 1995.. c:type:: v4l2_vp9_loop_filter1996 1997This structure contains all loop filter related parameters. See sections1998'7.2.8 Loop filter semantics' of the :ref:`vp9` specification for more details.1999 2000.. tabularcolumns:: |p{0.8cm}|p{4cm}|p{12.4cm}|2001 2002.. cssclass:: longtable2003 2004.. flat-table:: struct v4l2_vp9_loop_filter2005    :header-rows:  02006    :stub-columns: 02007    :widths:       1 1 22008 2009    * - __s82010      - ``ref_deltas[4]``2011      - Contains the adjustment needed for the filter level based on the chosen2012        reference frame.2013    * - __s82014      - ``mode_deltas[2]``2015      - Contains the adjustment needed for the filter level based on the chosen2016        mode.2017    * - __u82018      - ``level``2019      - Indicates the loop filter strength.2020    * - __u82021      - ``sharpness``2022      - Indicates the sharpness level.2023    * - __u82024      - ``flags``2025      - Combination of V4L2_VP9_LOOP_FILTER_FLAG_* flags.2026        See :ref:`Loop Filter Flags <vp9_loop_filter_flags>`.2027    * - __u82028      - ``reserved[7]``2029      - Applications and drivers must set this to zero.2030 2031 2032.. _vp9_loop_filter_flags:2033 2034``Loop Filter Flags``2035 2036.. tabularcolumns:: |p{9.6cm}|p{0.5cm}|p{7.2cm}|2037 2038.. flat-table::2039    :header-rows:  02040    :stub-columns: 02041    :widths:       1 1 22042 2043    * - ``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED``2044      - 0x12045      - When set, the filter level depends on the mode and reference frame used2046        to predict a block.2047    * - ``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE``2048      - 0x22049      - When set, the bitstream contains additional syntax elements that2050        specify which mode and reference frame deltas are to be updated.2051 2052.. _v4l2-codec-stateless-hevc:2053 2054``V4L2_CID_STATELESS_HEVC_SPS (struct)``2055    Specifies the Sequence Parameter Set fields (as extracted from the2056    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 RBSP2059    semantics" of the specification.2060 2061.. c:type:: v4l2_ctrl_hevc_sps2062 2063.. raw:: latex2064 2065    \small2066 2067.. tabularcolumns:: |p{1.2cm}|p{9.2cm}|p{6.9cm}|2068 2069.. cssclass:: longtable2070 2071.. flat-table:: struct v4l2_ctrl_hevc_sps2072    :header-rows:  02073    :stub-columns: 02074    :widths:       1 1 22075 2076    * - __u82077      - ``video_parameter_set_id``2078      - Specifies the value of the vps_video_parameter_set_id of the active VPS2079        as described in section "7.4.3.2.1 General sequence parameter set RBSP semantics"2080        of H.265 specifications.2081    * - __u82082      - ``seq_parameter_set_id``2083      - Provides an identifier for the SPS for reference by other syntax elements2084        as described in section "7.4.3.2.1 General sequence parameter set RBSP semantics"2085        of H.265 specifications.2086    * - __u162087      - ``pic_width_in_luma_samples``2088      - Specifies the width of each decoded picture in units of luma samples.2089    * - __u162090      - ``pic_height_in_luma_samples``2091      - Specifies the height of each decoded picture in units of luma samples.2092    * - __u82093      - ``bit_depth_luma_minus8``2094      - This value plus 8 specifies the bit depth of the samples of the luma array.2095    * - __u82096      - ``bit_depth_chroma_minus8``2097      - This value plus 8 specifies the bit depth of the samples of the chroma arrays.2098    * - __u82099      - ``log2_max_pic_order_cnt_lsb_minus4``2100      - Specifies the value of the variable MaxPicOrderCntLsb.2101    * - __u82102      - ``sps_max_dec_pic_buffering_minus1``2103      - This value plus 1 specifies the maximum required size of the decoded picture buffer for2104        the coded video sequence (CVS).2105    * - __u82106      - ``sps_max_num_reorder_pics``2107      - Indicates the maximum allowed number of pictures.2108    * - __u82109      - ``sps_max_latency_increase_plus1``2110      - Used to signal MaxLatencyPictures, which indicates the maximum number of2111        pictures that can precede any picture in output order and follow that2112        picture in decoding order.2113    * - __u82114      - ``log2_min_luma_coding_block_size_minus3``2115      - This value plus 3 specifies the minimum luma coding block size.2116    * - __u82117      - ``log2_diff_max_min_luma_coding_block_size``2118      - Specifies the difference between the maximum and minimum luma coding block size.2119    * - __u82120      - ``log2_min_luma_transform_block_size_minus2``2121      - This value plus 2 specifies the minimum luma transform block size.2122    * - __u82123      - ``log2_diff_max_min_luma_transform_block_size``2124      - Specifies the difference between the maximum and minimum luma transform block size.2125    * - __u82126      - ``max_transform_hierarchy_depth_inter``2127      - Specifies the maximum hierarchy depth for transform units of coding units coded2128        in inter prediction mode.2129    * - __u82130      - ``max_transform_hierarchy_depth_intra``2131      - Specifies the maximum hierarchy depth for transform units of coding units coded in2132        intra prediction mode.2133    * - __u82134      - ``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 the2136        luma component.2137    * - __u82138      - ``pcm_sample_bit_depth_chroma_minus1``2139      - Specifies the number of bits used to represent each of PCM sample values of2140        the chroma components.2141    * - __u82142      - ``log2_min_pcm_luma_coding_block_size_minus3``2143      - Plus 3 specifies the minimum size of coding blocks.2144    * - __u82145      - ``log2_diff_max_min_pcm_luma_coding_block_size``2146      - Specifies the difference between the maximum and minimum size of coding blocks.2147    * - __u82148      - ``num_short_term_ref_pic_sets``2149      - Specifies the number of st_ref_pic_set() syntax structures included in the SPS.2150    * - __u82151      - ``num_long_term_ref_pics_sps``2152      - Specifies the number of candidate long-term reference pictures that are2153        specified in the SPS.2154    * - __u82155      - ``chroma_format_idc``2156      - Specifies the chroma sampling.2157    * - __u82158      - ``sps_max_sub_layers_minus1``2159      - This value plus 1 specifies the maximum number of temporal sub-layers.2160    * - __u642161      - ``flags``2162      - See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>`2163 2164.. raw:: latex2165 2166    \normalsize2167 2168.. _hevc_sps_flags:2169 2170``Sequence Parameter Set Flags``2171 2172.. raw:: latex2173 2174    \small2175 2176.. cssclass:: longtable2177 2178.. flat-table::2179    :header-rows:  02180    :stub-columns: 02181    :widths:       1 1 22182 2183    * - ``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE``2184      - 0x000000012185      -2186    * - ``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED``2187      - 0x000000022188      -2189    * - ``V4L2_HEVC_SPS_FLAG_AMP_ENABLED``2190      - 0x000000042191      -2192    * - ``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET``2193      - 0x000000082194      -2195    * - ``V4L2_HEVC_SPS_FLAG_PCM_ENABLED``2196      - 0x000000102197      -2198    * - ``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED``2199      - 0x000000202200      -2201    * - ``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT``2202      - 0x000000402203      -2204    * - ``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED``2205      - 0x000000802206      -2207    * - ``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED``2208      - 0x000001002209      -2210 2211.. raw:: latex2212 2213    \normalsize2214 2215``V4L2_CID_STATELESS_HEVC_PPS (struct)``2216    Specifies the Picture Parameter Set fields (as extracted from the2217    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 RBSP2220    semantics" of the specification.2221 2222.. c:type:: v4l2_ctrl_hevc_pps2223 2224.. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}|2225 2226.. cssclass:: longtable2227 2228.. flat-table:: struct v4l2_ctrl_hevc_pps2229    :header-rows:  02230    :stub-columns: 02231    :widths:       1 1 22232 2233    * - __u82234      - ``pic_parameter_set_id``2235      - Identifies the PPS for reference by other syntax elements.2236    * - __u82237      - ``num_extra_slice_header_bits``2238      - Specifies the number of extra slice header bits that are present2239        in the slice header RBSP for coded pictures referring to the PPS.2240    * - __u82241      - ``num_ref_idx_l0_default_active_minus1``2242      - This value plus 1 specifies the inferred value of num_ref_idx_l0_active_minus1.2243    * - __u82244      - ``num_ref_idx_l1_default_active_minus1``2245      - This value plus 1 specifies the inferred value of num_ref_idx_l1_active_minus1.2246    * - __s82247      - ``init_qp_minus26``2248      - This value plus 26 specifies the initial value of SliceQp Y for each slice2249        referring to the PPS.2250    * - __u82251      - ``diff_cu_qp_delta_depth``2252      - Specifies the difference between the luma coding tree block size2253        and the minimum luma coding block size of coding units that2254        convey cu_qp_delta_abs and cu_qp_delta_sign_flag.2255    * - __s82256      - ``pps_cb_qp_offset``2257      - Specifies the offsets to the luma quantization parameter Cb.2258    * - __s82259      - ``pps_cr_qp_offset``2260      - Specifies the offsets to the luma quantization parameter Cr.2261    * - __u82262      - ``num_tile_columns_minus1``2263      - This value plus 1 specifies the number of tile columns partitioning the picture.2264    * - __u82265      - ``num_tile_rows_minus1``2266      - This value plus 1 specifies the number of tile rows partitioning the picture.2267    * - __u82268      - ``column_width_minus1[20]``2269      - This value plus 1 specifies the width of the i-th tile column in units of2270        coding tree blocks.2271    * - __u82272      - ``row_height_minus1[22]``2273      - This value plus 1 specifies the height of the i-th tile row in units of coding2274        tree blocks.2275    * - __s82276      - ``pps_beta_offset_div2``2277      - Specifies the default deblocking parameter offsets for beta divided by 2.2278    * - __s82279      - ``pps_tc_offset_div2``2280      - Specifies the default deblocking parameter offsets for tC divided by 2.2281    * - __u82282      - ``log2_parallel_merge_level_minus2``2283      - This value plus 2 specifies the value of the variable Log2ParMrgLevel.2284    * - __u82285      - ``padding[4]``2286      - Applications and drivers must set this to zero.2287    * - __u642288      - ``flags``2289      - See :ref:`Picture Parameter Set Flags <hevc_pps_flags>`2290 2291.. _hevc_pps_flags:2292 2293``Picture Parameter Set Flags``2294 2295.. raw:: latex2296 2297    \small2298 2299.. flat-table::2300    :header-rows:  02301    :stub-columns: 02302    :widths:       1 1 22303 2304    * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED``2305      - 0x000000012306      -2307    * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``2308      - 0x000000022309      -2310    * - ``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED``2311      - 0x000000042312      -2313    * - ``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT``2314      - 0x000000082315      -2316    * - ``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED``2317      - 0x000000102318      -2319    * - ``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED``2320      - 0x000000202321      -2322    * - ``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED``2323      - 0x000000402324      -2325    * - ``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT``2326      - 0x000000802327      -2328    * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED``2329      - 0x000001002330      -2331    * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED``2332      - 0x000002002333      -2334    * - ``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED``2335      - 0x000004002336      -2337    * - ``V4L2_HEVC_PPS_FLAG_TILES_ENABLED``2338      - 0x000008002339      -2340    * - ``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED``2341      - 0x000010002342      -2343    * - ``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED``2344      - 0x000020002345      -2346    * - ``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED``2347      - 0x000040002348      -2349    * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED``2350      - 0x000080002351      -2352    * - ``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER``2353      - 0x000100002354      -2355    * - ``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT``2356      - 0x000200002357      -2358    * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``2359      - 0x000400002360      -2361    * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``2362      - 0x000800002363      - Specifies the presence of deblocking filter control syntax elements in2364        the PPS2365    * - ``V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING``2366      - 0x001000002367      - Specifies that tile column boundaries and likewise tile row boundaries2368        are distributed uniformly across the picture2369 2370.. raw:: latex2371 2372    \normalsize2373 2374``V4L2_CID_STATELESS_HEVC_SLICE_PARAMS (struct)``2375    Specifies various slice-specific parameters, especially from the NAL unit2376    header, general slice segment header and weighted prediction parameter2377    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 header2380    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.2383 2384.. c:type:: v4l2_ctrl_hevc_slice_params2385 2386.. raw:: latex2387 2388    \scriptsize2389 2390.. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|2391 2392.. cssclass:: longtable2393 2394.. flat-table:: struct v4l2_ctrl_hevc_slice_params2395    :header-rows:  02396    :stub-columns: 02397    :widths:       1 1 22398 2399    * - __u322400      - ``bit_size``2401      - Size (in bits) of the current slice data.2402    * - __u322403      - ``data_byte_offset``2404      - Offset (in byte) to the video data in the current slice data.2405    * - __u322406      - ``num_entry_point_offsets``2407      - Specifies the number of entry point offset syntax elements in the slice header.2408        When the driver supports it, the ``V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS``2409        must be set.2410    * - __u82411      - ``nal_unit_type``2412      - Specifies the coding type of the slice (B, P or I).2413    * - __u82414      - ``nuh_temporal_id_plus1``2415      - Minus 1 specifies a temporal identifier for the NAL unit.2416    * - __u82417      - ``slice_type``2418      -2419	(V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or2420	V4L2_HEVC_SLICE_TYPE_B).2421    * - __u82422      - ``colour_plane_id``2423      - Specifies the colour plane associated with the current slice.2424    * - __s322425      - ``slice_pic_order_cnt``2426      - Specifies the picture order count.2427    * - __u82428      - ``num_ref_idx_l0_active_minus1``2429      - This value plus 1 specifies the maximum reference index for reference picture list 02430        that may be used to decode the slice.2431    * - __u82432      - ``num_ref_idx_l1_active_minus1``2433      - This value plus 1 specifies the maximum reference index for reference picture list 12434        that may be used to decode the slice.2435    * - __u82436      - ``collocated_ref_idx``2437      - Specifies the reference index of the collocated picture used for2438        temporal motion vector prediction.2439    * - __u82440      - ``five_minus_max_num_merge_cand``2441      - Specifies the maximum number of merging motion vector prediction2442        candidates supported in the slice subtracted from 5.2443    * - __s82444      - ``slice_qp_delta``2445      - Specifies the initial value of QpY to be used for the coding blocks in the slice.2446    * - __s82447      - ``slice_cb_qp_offset``2448      - Specifies a difference to be added to the value of pps_cb_qp_offset.2449    * - __s82450      - ``slice_cr_qp_offset``2451      - Specifies a difference to be added to the value of pps_cr_qp_offset.2452    * - __s82453      - ``slice_act_y_qp_offset``2454      - Specifies the offset to the luma of quantization parameter qP derived in section 8.6.22455    * - __s82456      - ``slice_act_cb_qp_offset``2457      - Specifies the offset to the cb of quantization parameter qP derived in section 8.6.22458    * - __s82459      - ``slice_act_cr_qp_offset``2460      - Specifies the offset to the cr of quantization parameter qP derived in section 8.6.22461    * - __s82462      - ``slice_beta_offset_div2``2463      - Specifies the deblocking parameter offsets for beta divided by 2.2464    * - __s82465      - ``slice_tc_offset_div2``2466      - Specifies the deblocking parameter offsets for tC divided by 2.2467    * - __u82468      - ``pic_struct``2469      - Indicates whether a picture should be displayed as a frame or as one or more fields.2470    * - __u322471      - ``slice_segment_addr``2472      - Specifies the address of the first coding tree block in the slice segment.2473    * - __u82474      - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``2475      - The list of L0 reference elements as indices in the DPB.2476    * - __u82477      - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``2478      - The list of L1 reference elements as indices in the DPB.2479    * - __u162480      - ``short_term_ref_pic_set_size``2481      - Specifies the size, in bits, of the short-term reference picture set, described as st_ref_pic_set()2482        in the specification, included in the slice header or SPS (section 7.3.6.1).2483    * - __u162484      - ``long_term_ref_pic_set_size``2485      - Specifies the size, in bits, of the long-term reference picture set include in the slice header2486        or SPS. It is the number of bits in the conditional block if(long_term_ref_pics_present_flag)2487        in section 7.3.6.1 of the specification.2488    * - __u82489      - ``padding``2490      - Applications and drivers must set this to zero.2491    * - struct :c:type:`v4l2_hevc_pred_weight_table`2492      - ``pred_weight_table``2493      - The prediction weight coefficients for inter-picture prediction.2494    * - __u642495      - ``flags``2496      - See :ref:`Slice Parameters Flags <hevc_slice_params_flags>`2497 2498.. raw:: latex2499 2500    \normalsize2501 2502.. _hevc_slice_params_flags:2503 2504``Slice Parameters Flags``2505 2506.. raw:: latex2507 2508    \scriptsize2509 2510.. flat-table::2511    :header-rows:  02512    :stub-columns: 02513    :widths:       1 1 22514 2515    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA``2516      - 0x000000012517      -2518    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA``2519      - 0x000000022520      -2521    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED``2522      - 0x000000042523      -2524    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO``2525      - 0x000000082526      -2527    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT``2528      - 0x000000102529      -2530    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0``2531      - 0x000000202532      -2533    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV``2534      - 0x000000402535      -2536    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED``2537      - 0x000000802538      -2539    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``2540      - 0x000001002541      -2542    * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT``2543      - 0x000002002544      -2545 2546.. raw:: latex2547 2548    \normalsize2549 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 point2553    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 header2556    semantics" of the specification.2557    When multiple slices are submitted in a request, the length of2558    this array must be the sum of num_entry_point_offsets of all the2559    slices in the request.2560 2561``V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (struct)``2562    Specifies the HEVC scaling matrix parameters used for the scaling process2563    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" of2566    the specification.2567 2568.. c:type:: v4l2_ctrl_hevc_scaling_matrix2569 2570.. raw:: latex2571 2572    \scriptsize2573 2574.. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|2575 2576.. cssclass:: longtable2577 2578.. flat-table:: struct v4l2_ctrl_hevc_scaling_matrix2579    :header-rows:  02580    :stub-columns: 02581    :widths:       1 1 22582 2583    * - __u82584      - ``scaling_list_4x4[6][16]``2585      - Scaling list is used for the scaling process for transform2586        coefficients. The values on each scaling list are expected2587        in raster scan order.2588    * - __u82589      - ``scaling_list_8x8[6][64]``2590      - Scaling list is used for the scaling process for transform2591        coefficients. The values on each scaling list are expected2592        in raster scan order.2593    * - __u82594      - ``scaling_list_16x16[6][64]``2595      - Scaling list is used for the scaling process for transform2596        coefficients. The values on each scaling list are expected2597        in raster scan order.2598    * - __u82599      - ``scaling_list_32x32[2][64]``2600      - Scaling list is used for the scaling process for transform2601        coefficients. The values on each scaling list are expected2602        in raster scan order.2603    * - __u82604      - ``scaling_list_dc_coef_16x16[6]``2605      - Scaling list is used for the scaling process for transform2606        coefficients. The values on each scaling list are expected2607        in raster scan order.2608    * - __u82609      - ``scaling_list_dc_coef_32x32[2]``2610      - Scaling list is used for the scaling process for transform2611        coefficients. The values on each scaling list are expected2612        in raster scan order.2613 2614.. raw:: latex2615 2616    \normalsize2617 2618.. c:type:: v4l2_hevc_dpb_entry2619 2620.. raw:: latex2621 2622    \small2623 2624.. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{12.1cm}|2625 2626.. flat-table:: struct v4l2_hevc_dpb_entry2627    :header-rows:  02628    :stub-columns: 02629    :widths:       1 1 22630 2631    * - __u642632      - ``timestamp``2633      - Timestamp of the V4L2 capture buffer to use as reference, used2634        with B-coded and P-coded frames. The timestamp refers to the2635	``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the2636	:c:func:`v4l2_timeval_to_ns()` function to convert the struct2637	:c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.2638    * - __u82639      - ``flags``2640      - Long term flag for the reference frame2641        (V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE). The flag is set as2642        described in the ITU HEVC specification chapter "8.3.2 Decoding2643        process for reference picture set".2644    * - __u82645      - ``field_pic``2646      - Whether the reference is a field picture or a frame.2647        See :ref:`HEVC dpb field pic Flags <hevc_dpb_field_pic_flags>`2648    * - __s322649      - ``pic_order_cnt_val``2650      - The picture order count of the current picture.2651    * - __u82652      - ``padding[2]``2653      - Applications and drivers must set this to zero.2654 2655.. raw:: latex2656 2657    \normalsize2658 2659.. _hevc_dpb_field_pic_flags:2660 2661``HEVC dpb field pic Flags``2662 2663.. raw:: latex2664 2665    \scriptsize2666 2667.. flat-table::2668    :header-rows:  02669    :stub-columns: 02670    :widths:       1 1 22671 2672    * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME``2673      - 02674      - (progressive) Frame2675    * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD``2676      - 12677      - Top field2678    * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD``2679      - 22680      - Bottom field2681    * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM``2682      - 32683      - Top field, bottom field, in that order2684    * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP``2685      - 42686      - Bottom field, top field, in that order2687    * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP``2688      - 52689      - Top field, bottom field, top field repeated, in that order2690    * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM``2691      - 62692      - Bottom field, top field, bottom field repeated, in that order2693    * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING``2694      - 72695      - Frame doubling2696    * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING``2697      - 82698      - Frame tripling2699    * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM``2700      - 92701      - Top field paired with previous bottom field in output order2702    * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP``2703      - 102704      - Bottom field paired with previous top field in output order2705    * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM``2706      - 112707      - Top field paired with next bottom field in output order2708    * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP``2709      - 122710      - Bottom field paired with next top field in output order2711 2712.. c:type:: v4l2_hevc_pred_weight_table2713 2714.. raw:: latex2715 2716    \footnotesize2717 2718.. tabularcolumns:: |p{0.8cm}|p{10.6cm}|p{5.9cm}|2719 2720.. flat-table:: struct v4l2_hevc_pred_weight_table2721    :header-rows:  02722    :stub-columns: 02723    :widths:       1 1 22724 2725    * - __s82726      - ``delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``2727      - The difference of the weighting factor applied to the luma2728        prediction value for list 0.2729    * - __s82730      - ``luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``2731      - The additive offset applied to the luma prediction value for list 0.2732    * - __s82733      - ``delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``2734      - The difference of the weighting factor applied to the chroma2735        prediction value for list 0.2736    * - __s82737      - ``chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``2738      - The difference of the additive offset applied to the chroma2739        prediction values for list 0.2740    * - __s82741      - ``delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``2742      - The difference of the weighting factor applied to the luma2743        prediction value for list 1.2744    * - __s82745      - ``luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``2746      - The additive offset applied to the luma prediction value for list 1.2747    * - __s82748      - ``delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``2749      - The difference of the weighting factor applied to the chroma2750        prediction value for list 1.2751    * - __s82752      - ``chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``2753      - The difference of the additive offset applied to the chroma2754        prediction values for list 1.2755    * - __u82756      - ``luma_log2_weight_denom``2757      - The base 2 logarithm of the denominator for all luma weighting2758        factors.2759    * - __s82760      - ``delta_chroma_log2_weight_denom``2761      - The difference of the base 2 logarithm of the denominator for2762        all chroma weighting factors.2763    * - __u82764      - ``padding[6]``2765      - Applications and drivers must set this to zero.2766 2767.. raw:: latex2768 2769    \normalsize2770 2771``V4L2_CID_STATELESS_HEVC_DECODE_MODE (enum)``2772    Specifies the decoding mode to use. Currently exposes slice-based and2773    frame-based decoding but new modes might be added later on.2774    This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE2775    pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE2776    are required to set this control in order to specify the decoding mode2777    that is expected for the buffer.2778    Drivers may expose a single or multiple decoding modes, depending2779    on what they can support.2780 2781.. c:type:: v4l2_stateless_hevc_decode_mode2782 2783.. raw:: latex2784 2785    \small2786 2787.. tabularcolumns:: |p{9.4cm}|p{0.6cm}|p{7.3cm}|2788 2789.. flat-table::2790    :header-rows:  02791    :stub-columns: 02792    :widths:       1 1 22793 2794    * - ``V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED``2795      - 02796      - Decoding is done at the slice granularity.2797        The OUTPUT buffer must contain a single slice.2798    * - ``V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED``2799      - 12800      - Decoding is done at the frame granularity.2801        The OUTPUT buffer must contain all slices needed to decode the2802        frame.2803 2804.. raw:: latex2805 2806    \normalsize2807 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_SLICE2811    pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE2812    are required to set this control in order to specify the start code2813    that is expected for the buffer.2814    Drivers may expose a single or multiple start codes, depending2815    on what they can support.2816 2817.. c:type:: v4l2_stateless_hevc_start_code2818 2819.. tabularcolumns:: |p{9.2cm}|p{0.6cm}|p{7.5cm}|2820 2821.. flat-table::2822    :header-rows:  02823    :stub-columns: 02824    :widths:       1 1 22825 2826    * - ``V4L2_STATELESS_HEVC_START_CODE_NONE``2827      - 02828      - Selecting this value specifies that HEVC slices are passed2829        to the driver without any start code. The bitstream data should be2830        according to :ref:`hevc` 7.3.1.1 General NAL unit syntax, hence2831        contains emulation prevention bytes when required.2832    * - ``V4L2_STATELESS_HEVC_START_CODE_ANNEX_B``2833      - 12834      - Selecting this value specifies that HEVC slices are expected2835        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.2837 2838.. raw:: latex2839 2840    \normalsize2841 2842``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (integer)``2843    Specifies a priority identifier for the NAL unit, which will be applied to2844    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.2850 2851``V4L2_CID_MPEG_VIDEO_LTR_COUNT (integer)``2852    Specifies the maximum number of Long Term Reference (LTR) frames at any2853    given time that the encoder can keep.2854    This is applicable to the H264 and HEVC encoders.2855 2856``V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (integer)``2857    After setting this control the frame that will be queued next2858    will be marked as a Long Term Reference (LTR) frame2859    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.92862 2863``V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (bitmask)``2864    Specifies the Long Term Reference (LTR) frame(s) to be used for2865    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.2868 2869``V4L2_CID_STATELESS_HEVC_DECODE_PARAMS (struct)``2870    Specifies various decode parameters, especially the references picture order2871    count (POC) for all the lists (short, long, before, current, after) and the2872    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 the2875    specification.2876 2877.. c:type:: v4l2_ctrl_hevc_decode_params2878 2879.. cssclass:: longtable2880 2881.. flat-table:: struct v4l2_ctrl_hevc_decode_params2882    :header-rows:  02883    :stub-columns: 02884    :widths:       1 1 22885 2886    * - __s322887      - ``pic_order_cnt_val``2888      - PicOrderCntVal as described in section 8.3.1 "Decoding process2889        for picture order count" of the specification.2890    * - __u162891      - ``short_term_ref_pic_set_size``2892      - Specifies the size, in bits, of the short-term reference picture set, of the first slice2893        described as st_ref_pic_set() in the specification, included in the slice header2894        or SPS (section 7.3.6.1).2895    * - __u162896      - ``long_term_ref_pic_set_size``2897      - Specifies the size, in bits, of the long-term reference picture set, of the first slice2898        included in the slice header or SPS. It is the number of bits in the conditional block2899        if(long_term_ref_pics_present_flag) in section 7.3.6.1 of the specification.2900    * - __u82901      - ``num_active_dpb_entries``2902      - The number of entries in ``dpb``.2903    * - __u82904      - ``num_poc_st_curr_before``2905      - The number of reference pictures in the short-term set that come before2906        the current frame.2907    * - __u82908      - ``num_poc_st_curr_after``2909      - The number of reference pictures in the short-term set that come after2910        the current frame.2911    * - __u82912      - ``num_poc_lt_curr``2913      - The number of reference pictures in the long-term set.2914    * - __u82915      - ``poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``2916      - PocStCurrBefore as described in section 8.3.2 "Decoding process for reference2917        picture set": provides the index of the short term before references in DPB array.2918    * - __u82919      - ``poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``2920      - PocStCurrAfter as described in section 8.3.2 "Decoding process for reference2921        picture set": provides the index of the short term after references in DPB array.2922    * - __u82923      - ``poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``2924      - PocLtCurr as described in section 8.3.2 "Decoding process for reference2925        picture set": provides the index of the long term references in DPB array.2926    * - __u82927      - ``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 parse2930        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 is2932        equal to 1, num_delta_pocs_of_ref_rps_idx shall be set to 0.2933    * - struct :c:type:`v4l2_hevc_dpb_entry`2934      - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``2935      - The decoded picture buffer, for meta-data about reference frames.2936    * - __u642937      - ``flags``2938      - See :ref:`Decode Parameters Flags <hevc_decode_params_flags>`2939 2940.. _hevc_decode_params_flags:2941 2942``Decode Parameters Flags``2943 2944.. cssclass:: longtable2945 2946.. flat-table::2947    :header-rows:  02948    :stub-columns: 02949    :widths:       1 1 22950 2951    * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC``2952      - 0x000000012953      -2954    * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC``2955      - 0x000000022956      -2957    * - ``V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR``2958      - 0x000000042959      -2960 2961.. _v4l2-codec-stateless-av1:2962 2963``V4L2_CID_STATELESS_AV1_SEQUENCE (struct)``2964    Represents an AV1 Sequence OBU (Open Bitstream Unit). See section 5.52965    "Sequence header OBU syntax" in :ref:`av1` for more details.2966 2967.. c:type:: v4l2_ctrl_av1_sequence2968 2969.. cssclass:: longtable2970 2971.. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|2972 2973.. flat-table:: struct v4l2_ctrl_av1_sequence2974    :header-rows:  02975    :stub-columns: 02976    :widths:       1 1 22977 2978    * - __u322979      - ``flags``2980      - See :ref:`AV1 Sequence Flags <av1_sequence_flags>`.2981    * - __u82982      - ``seq_profile``2983      - Specifies the features that can be used in the coded video sequence.2984    * - __u82985      - ``order_hint_bits``2986      - Specifies the number of bits used for the order_hint field at each frame.2987    * - __u82988      - ``bit_depth``2989      - the bit depth to use for the sequence as described in section 5.5.22990        "Color config syntax" in :ref:`av1` for more details.2991    * - __u82992      - ``reserved``2993      - Applications and drivers must set this to zero.2994    * - __u162995      - ``max_frame_width_minus_1``2996      - Specifies the maximum frame width minus 1 for the frames represented by2997        this sequence header.2998    * - __u162999      - ``max_frame_height_minus_1``3000      - Specifies the maximum frame height minus 1 for the frames represented by3001        this sequence header.3002 3003.. _av1_sequence_flags:3004 3005``AV1 Sequence Flags``3006 3007.. cssclass:: longtable3008 3009.. flat-table::3010    :header-rows:  03011    :stub-columns: 03012    :widths:       1 1 23013 3014    * - ``V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE``3015      - 0x000000013016      - If set, specifies that the coded video sequence contains only one coded3017        frame. If not set, specifies that the coded video sequence contains one3018        or more coded frames.3019    * - ``V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK``3020      - 0x000000023021      - If set, indicates that superblocks contain 128x128 luma samples.3022        When equal to 0, it indicates that superblocks contain 64x64 luma3023        samples. The number of contained chroma samples depends on3024        subsampling_x and subsampling_y.3025    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA``3026      - 0x000000043027      - If set, specifies that the use_filter_intra syntax element may be3028        present. If not set, specifies that the use_filter_intra syntax element3029        will not be present.3030    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER``3031      - 0x000000083032      - Specifies whether the intra edge filtering process should be enabled.3033    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND``3034      - 0x000000103035      - If set, specifies that the mode info for inter blocks may contain the3036        syntax element interintra. If not set, specifies that the syntax element3037        interintra will not be present.3038    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND``3039      - 0x000000203040      - If set, specifies that the mode info for inter blocks may contain the3041        syntax element compound_type. If not set, specifies that the syntax3042        element compound_type will not be present.3043    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION``3044      - 0x000000403045      - If set, indicates that the allow_warped_motion syntax element may be3046        present. If not set, indicates that the allow_warped_motion syntax3047        element will not be present.3048    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER``3049      - 0x000000803050      - If set, indicates that the inter prediction filter type may be specified3051        independently in the horizontal and vertical directions. If the flag is3052        equal to 0, only one filter type may be specified, which is then used in3053        both directions.3054    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT``3055      - 0x000001003056      - If set, indicates that tools based on the values of order hints may be3057        used. If not set, indicates that tools based on order hints are3058        disabled.3059    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP``3060      - 0x000002003061      - If set, indicates that the distance weights process may be used for3062        inter prediction.3063    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS``3064      - 0x000004003065      - If set, indicates that the use_ref_frame_mvs syntax element may be3066        present. If not set, indicates that the use_ref_frame_mvs syntax element3067        will not be present.3068    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES``3069      - 0x000008003070      - If set, specifies that the use_superres syntax element will be present3071        in the uncompressed header. If not set, specifies that the use_superres3072        syntax element will not be present (instead use_superres will be set to3073        0 in the uncompressed header without being read).3074    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF``3075      - 0x000010003076      - If set, specifies that cdef filtering may be enabled. If not set,3077        specifies that cdef filtering is disabled.3078    * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION``3079      - 0x000020003080      - If set, specifies that loop restoration filtering may be enabled. If not3081        set, specifies that loop restoration filtering is disabled.3082    * - ``V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME``3083      - 0x000040003084      - If set, indicates that the video does not contain U and V color planes.3085        If not set, indicates that the video contains Y, U, and V color planes.3086    * - ``V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE``3087      - 0x000080003088      - If set, signals full swing representation, i.e. "Full Range3089        Quantization". If not set, signals studio swing representation, i.e.3090        "Limited Range Quantization".3091    * - ``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X``3092      - 0x000100003093      - Specify the chroma subsampling format.3094    * - ``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y``3095      - 0x000200003096      - Specify the chroma subsampling format.3097    * - ``V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT``3098      - 0x000400003099      - Specifies whether film grain parameters are present in the coded video3100        sequence.3101    * - ``V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q``3102      - 0x000800003103      - If set, indicates that the U and V planes may have separate delta3104        quantizer values. If not set, indicates that the U and V planes will share3105        the same delta quantizer value.3106 3107``V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY (struct)``3108    Represents a single AV1 tile inside an AV1 Tile Group. Note that MiRowStart,3109    MiRowEnd, MiColStart and MiColEnd can be retrieved from struct3110    v4l2_av1_tile_info in struct v4l2_ctrl_av1_frame using tile_row and3111    tile_col. See section 6.10.1 "General tile group OBU semantics" in3112    :ref:`av1` for more details.3113 3114.. c:type:: v4l2_ctrl_av1_tile_group_entry3115 3116.. cssclass:: longtable3117 3118.. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|3119 3120.. flat-table:: struct v4l2_ctrl_av1_tile_group_entry3121    :header-rows:  03122    :stub-columns: 03123    :widths:       1 1 23124 3125    * - __u323126      - ``tile_offset``3127      - Offset from the OBU data, i.e. where the coded tile data actually starts.3128    * - __u323129      - ``tile_size``3130      - Specifies the size in bytes of the coded tile. Equivalent to "TileSize"3131        in :ref:`av1`.3132    * - __u323133      - ``tile_row``3134      - Specifies the row of the current tile. Equivalent to "TileRow" in3135        :ref:`av1`.3136    * - __u323137      - ``tile_col``3138      - Specifies the column of the current tile. Equivalent to "TileColumn" in3139        :ref:`av1`.3140 3141.. c:type:: v4l2_av1_warp_model3142 3143	AV1 Warp Model as described in section 3 "Symbols and abbreviated terms" of3144	:ref:`av1`.3145 3146.. raw:: latex3147 3148    \scriptsize3149 3150.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|3151 3152.. flat-table::3153    :header-rows:  03154    :stub-columns: 03155    :widths:       1 1 23156 3157    * - ``V4L2_AV1_WARP_MODEL_IDENTITY``3158      - 03159      - Warp model is just an identity transform.3160    * - ``V4L2_AV1_WARP_MODEL_TRANSLATION``3161      - 13162      - Warp model is a pure translation.3163    * - ``V4L2_AV1_WARP_MODEL_ROTZOOM``3164      - 23165      - Warp model is a rotation + symmetric zoom + translation.3166    * - ``V4L2_AV1_WARP_MODEL_AFFINE``3167      - 33168      - Warp model is a general affine transform.3169 3170.. c:type:: v4l2_av1_reference_frame3171 3172AV1 Reference Frames as described in section 6.10.24 "Ref frames semantics"3173of :ref:`av1`.3174 3175.. raw:: latex3176 3177    \scriptsize3178 3179.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|3180 3181.. flat-table::3182    :header-rows:  03183    :stub-columns: 03184    :widths:       1 1 23185 3186    * - ``V4L2_AV1_REF_INTRA_FRAME``3187      - 03188      - Intra Frame Reference.3189    * - ``V4L2_AV1_REF_LAST_FRAME``3190      - 13191      - Last Frame Reference.3192    * - ``V4L2_AV1_REF_LAST2_FRAME``3193      - 23194      - Last2 Frame Reference.3195    * - ``V4L2_AV1_REF_LAST3_FRAME``3196      - 33197      - Last3 Frame Reference.3198    * - ``V4L2_AV1_REF_GOLDEN_FRAME``3199      - 43200      - Golden Frame Reference.3201    * - ``V4L2_AV1_REF_BWDREF_FRAME``3202      - 53203      - BWD Frame Reference.3204    * - ``V4L2_AV1_REF_ALTREF2_FRAME``3205      - 63206      - ALTREF2 Frame Reference.3207    * - ``V4L2_AV1_REF_ALTREF_FRAME``3208      - 73209      - ALTREF Frame Reference.3210 3211.. c:type:: v4l2_av1_global_motion3212 3213AV1 Global Motion parameters as described in section 6.8.173214"Global motion params semantics" of :ref:`av1`.3215 3216.. cssclass:: longtable3217 3218.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|3219 3220.. flat-table:: struct v4l2_av1_global_motion3221    :header-rows:  03222    :stub-columns: 03223    :widths:       1 1 23224 3225    * - __u83226      - ``flags[V4L2_AV1_TOTAL_REFS_PER_FRAME]``3227      - A bitfield containing the flags per reference frame. See3228        :ref:`AV1 Global Motion Flags <av1_global_motion_flags>` for more3229        details.3230    * - enum :c:type:`v4l2_av1_warp_model`3231      - ``type[V4L2_AV1_TOTAL_REFS_PER_FRAME]``3232      - The type of global motion transform used.3233    * - __s323234      - ``params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6]``3235      - This field has the same meaning as "gm_params" in :ref:`av1`.3236    * - __u83237      - ``invalid``3238      - Bitfield indicating whether the global motion params are invalid for a3239        given reference frame. See section 7.11.3.6 Setup shear process and the3240        variable "warpValid". Use V4L2_AV1_GLOBAL_MOTION_IS_INVALID(ref) to3241        create a suitable mask.3242    * - __u83243      - ``reserved[3]``3244      - Applications and drivers must set this to zero.3245 3246.. _av1_global_motion_flags:3247 3248``AV1 Global Motion Flags``3249 3250.. cssclass:: longtable3251 3252.. flat-table::3253    :header-rows:  03254    :stub-columns: 03255    :widths:       1 1 23256 3257    * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_GLOBAL``3258      - 0x000000013259      - Specifies whether global motion parameters are present for a particular3260        reference frame.3261    * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_ROT_ZOOM``3262      - 0x000000023263      - Specifies whether a particular reference frame uses rotation and zoom3264        global motion.3265    * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_TRANSLATION``3266      - 0x000000043267      - Specifies whether a particular reference frame uses translation global3268        motion3269 3270.. c:type:: v4l2_av1_frame_restoration_type3271 3272AV1 Frame Restoration Type.3273 3274.. raw:: latex3275 3276    \scriptsize3277 3278.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|3279 3280.. flat-table::3281    :header-rows:  03282    :stub-columns: 03283    :widths:       1 1 23284 3285    * - ``V4L2_AV1_FRAME_RESTORE_NONE``3286      - 03287      - No filtering is applied.3288    * - ``V4L2_AV1_FRAME_RESTORE_WIENER``3289      - 13290      - Wiener filter process is invoked.3291    * - ``V4L2_AV1_FRAME_RESTORE_SGRPROJ``3292      - 23293      - Self guided filter process is invoked.3294    * - ``V4L2_AV1_FRAME_RESTORE_SWITCHABLE``3295      - 33296      - Restoration filter is swichtable.3297 3298.. c:type:: v4l2_av1_loop_restoration3299 3300AV1 Loop Restoration as described in section 6.10.15 "Loop restoration params3301semantics" of :ref:`av1`.3302 3303.. cssclass:: longtable3304 3305.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|3306 3307.. flat-table:: struct v4l2_av1_loop_restoration3308    :header-rows:  03309    :stub-columns: 03310    :widths:       1 1 23311 3312    * - __u83313      - ``flags``3314      - See :ref:`AV1 Loop Restoration Flags <av1_loop_restoration_flags>`.3315    * - __u83316      - ``lr_unit_shift``3317      - Specifies if the luma restoration size should be halved.3318    * - __u83319      - ``lr_uv_shift``3320      - Specifies if the chroma size should be half the luma size.3321    * - __u83322      - ``reserved``3323      - Applications and drivers must set this to zero.3324    * - :c:type:`v4l2_av1_frame_restoration_type`3325      - ``frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX]``3326      - Specifies the type of restoration used for each plane.3327    * - __u83328      - ``loop_restoration_size[V4L2_AV1_MAX_NUM_PLANES]``3329      - Specifies the size of loop restoration units in units of samples in the3330        current plane.3331 3332.. _av1_loop_restoration_flags:3333 3334``AV1 Loop Restoration Flags``3335 3336.. cssclass:: longtable3337 3338.. flat-table::3339    :header-rows:  03340    :stub-columns: 03341    :widths:       1 1 23342 3343    * - ``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR``3344      - 0x000000013345      - Retains the same meaning as UsesLr in :ref:`av1`.3346    * - ``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR``3347      - 0x000000023348      - Retains the same meaning as UsesChromaLr in :ref:`av1`.3349 3350.. c:type:: v4l2_av1_cdef3351 3352AV1 CDEF params semantics as described in section 6.10.14 "CDEF params3353semantics" of :ref:`av1`.3354 3355.. cssclass:: longtable3356 3357.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|3358 3359.. flat-table:: struct v4l2_av1_cdef3360    :header-rows:  03361    :stub-columns: 03362    :widths:       1 1 23363 3364    * - __u83365      - ``damping_minus_3``3366      - Controls the amount of damping in the deringing filter.3367    * - __u83368      - ``bits``3369      - Specifies the number of bits needed to specify which CDEF filter to3370        apply.3371    * - __u83372      - ``y_pri_strength[V4L2_AV1_CDEF_MAX]``3373      -  Specifies the strength of the primary filter.3374    * - __u83375      - ``y_sec_strength[V4L2_AV1_CDEF_MAX]``3376      -  Specifies the strength of the secondary filter.3377    * - __u83378      - ``uv_pri_strength[V4L2_AV1_CDEF_MAX]``3379      -  Specifies the strength of the primary filter.3380    * - __u83381      - ``uv_sec_strength[V4L2_AV1_CDEF_MAX]``3382      -  Specifies the strength of the secondary filter.3383 3384.. c:type:: v4l2_av1_segment_feature3385 3386AV1 segment features as described in section 3 "Symbols and abbreviated terms"3387of :ref:`av1`.3388 3389.. raw:: latex3390 3391    \scriptsize3392 3393.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|3394 3395.. flat-table::3396    :header-rows:  03397    :stub-columns: 03398    :widths:       1 1 23399 3400    * - ``V4L2_AV1_SEG_LVL_ALT_Q``3401      - 03402      - Index for quantizer segment feature.3403    * - ``V4L2_AV1_SEG_LVL_ALT_LF_Y_V``3404      - 13405      - Index for vertical luma loop filter segment feature.3406    * - ``V4L2_AV1_SEG_LVL_REF_FRAME``3407      - 53408      - Index for reference frame segment feature.3409    * - ``V4L2_AV1_SEG_LVL_REF_SKIP``3410      - 63411      - Index for skip segment feature.3412    * - ``V4L2_AV1_SEG_LVL_REF_GLOBALMV``3413      - 73414      - Index for global mv feature.3415    * - ``V4L2_AV1_SEG_LVL_MAX``3416      - 83417      - Number of segment features.3418 3419.. c:type:: v4l2_av1_segmentation3420 3421AV1 Segmentation params as defined in section 6.8.13 "Segmentation params3422semantics" of :ref:`av1`.3423 3424.. cssclass:: longtable3425 3426.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|3427 3428.. flat-table:: struct v4l2_av1_segmentation3429    :header-rows:  03430    :stub-columns: 03431    :widths:       1 1 23432 3433    * - __u83434      - ``flags``3435      - See :ref:`AV1 Segmentation Flags <av1_segmentation_flags>`3436    * - __u83437      - ``last_active_seg_id``3438      -  Indicates the highest numbered segment id that has some3439         enabled feature. This is used when decoding the segment id to only decode3440         choices corresponding to used segments.3441    * - __u83442      - ``feature_enabled[V4L2_AV1_MAX_SEGMENTS]``3443      - Bitmask defining which features are enabled in each segment. Use3444        V4L2_AV1_SEGMENT_FEATURE_ENABLED to build a suitable mask.3445    * - __u163446      - ``feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX]``3447      -  Data attached to each feature. Data entry is only valid if the feature3448         is enabled.3449 3450.. _av1_segmentation_flags:3451 3452``AV1 Segmentation Flags``3453 3454.. cssclass:: longtable3455 3456.. flat-table::3457    :header-rows:  03458    :stub-columns: 03459    :widths:       1 1 23460 3461    * - ``V4L2_AV1_SEGMENTATION_FLAG_ENABLED``3462      - 0x000000013463      - If set, indicates that this frame makes use of the segmentation tool. If3464        not set, indicates that the frame does not use segmentation.3465    * - ``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP``3466      - 0x000000023467      - If set, indicates that the segmentation map are updated during the3468        decoding of this frame. If not set, indicates that the segmentation map3469        from the previous frame is used.3470    * - ``V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE``3471      - 0x000000043472      - If set, indicates that the updates to the segmentation map are coded3473        relative to the existing segmentation map. If not set, indicates that3474        the new segmentation map is coded without reference to the existing3475        segmentation map.3476    * - ``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA``3477      - 0x000000083478      - If set, indicates that the updates to the segmentation map are coded3479        relative to the existing segmentation map. If not set, indicates that3480        the new segmentation map is coded without reference to the existing3481        segmentation map.3482    * - ``V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP``3483      - 0x000000103484      - If set, indicates that the segment id will be read before the skip3485        syntax element. If not set, indicates that the skip syntax element will3486        be read first.3487 3488.. c:type:: v4l2_av1_loop_filter3489 3490AV1 Loop filter params as defined in section 6.8.10 "Loop filter semantics" of3491:ref:`av1`.3492 3493.. cssclass:: longtable3494 3495.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|3496 3497.. flat-table:: struct v4l2_av1_loop_filter3498    :header-rows:  03499    :stub-columns: 03500    :widths:       1 1 23501 3502    * - __u83503      - ``flags``3504      - See3505        :ref:`AV1 Loop Filter flags <av1_loop_filter_flags>` for more details.3506    * - __u83507      - ``level[4]``3508      - An array containing loop filter strength values. Different loop3509        filter strength values from the array are used depending on the image3510        plane being filtered, and the edge direction (vertical or horizontal)3511        being filtered.3512    * - __u83513      - ``sharpness``3514      - indicates the sharpness level. The loop_filter_level and3515        loop_filter_sharpness together determine when a block edge is filtered,3516        and by how much the filtering can change the sample values. The loop3517        filter process is described in section 7.14 of :ref:`av1`.3518    * - __u83519      - ``ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME]``3520      - contains the adjustment needed for the filter level based on the3521        chosen reference frame. If this syntax element is not present, it3522        maintains its previous value.3523    * - __u83524      - ``mode_deltas[2]``3525      - contains the adjustment needed for the filter level based on3526        the chosen mode. If this syntax element is not present, it maintains its3527        previous value.3528    * - __u83529      - ``delta_lf_res``3530      - specifies the left shift which should be applied to decoded loop filter3531        delta values.3532 3533.. _av1_loop_filter_flags:3534 3535``AV1 Loop Filter Flags``3536 3537.. cssclass:: longtable3538 3539.. flat-table::3540    :header-rows:  03541    :stub-columns: 03542    :widths:       1 1 23543 3544    * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED``3545      - 0x000000013546      - If set, means that the filter level depends on the mode and reference3547        frame used to predict a block. If not set, means that the filter level3548        does not depend on the mode and reference frame.3549    * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE``3550      - 0x000000023551      - If set, means that additional syntax elements are present that specify3552        which mode and reference frame deltas are to be updated. If not set,3553        means that these syntax elements are not present.3554    * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT``3555      - 0x000000043556      - Specifies whether loop filter delta values are present3557    * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI``3558      - 0x000000083559      - A value equal to 1 specifies that separate loop filter3560        deltas are sent for horizontal luma edges, vertical luma edges,3561        the U edges, and the V edges. A value of delta_lf_multi equal to 03562        specifies that the same loop filter delta is used for all edges.3563 3564.. c:type:: v4l2_av1_quantization3565 3566AV1 Quantization params as defined in section 6.8.11 "Quantization params3567semantics" of :ref:`av1`.3568 3569.. cssclass:: longtable3570 3571.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|3572 3573.. flat-table:: struct v4l2_av1_quantization3574    :header-rows:  03575    :stub-columns: 03576    :widths:       1 1 23577 3578    * - __u83579      - ``flags``3580      - See3581        :ref:`AV1 Loop Filter flags <av1_quantization_flags>` for more details.3582    * - __u83583      - ``base_q_idx``3584      - Indicates the base frame qindex. This is used for Y AC coefficients and3585        as the base value for the other quantizers.3586    * - __u83587      - ``delta_q_y_dc``3588      - Indicates the Y DC quantizer relative to base_q_idx.3589    * - __u83590      - ``delta_q_u_dc``3591      - Indicates the U DC quantizer relative to base_q_idx.3592    * - __u83593      - ``delta_q_u_ac``3594      - Indicates the U AC quantizer relative to base_q_idx.3595    * - __u83596      - ``delta_q_v_dc``3597      - Indicates the V DC quantizer relative to base_q_idx.3598    * - __u83599      - ``delta_q_v_ac``3600      - Indicates the V AC quantizer relative to base_q_idx.3601    * - __u83602      - ``qm_y``3603      - Specifies the level in the quantizer matrix that should be used for3604        luma plane decoding.3605    * - __u83606      - ``qm_u``3607      - Specifies the level in the quantizer matrix that should be used for3608        chroma U plane decoding.3609    * - __u83610      - ``qm_v``3611      - Specifies the level in the quantizer matrix that should be used for3612        chroma V plane decoding.3613    * - __u83614      - ``delta_q_res``3615      - Specifies the left shift which should be applied to decoded quantizer3616        index delta values.3617 3618.. _av1_quantization_flags:3619 3620``AV1 Quantization Flags``3621 3622.. cssclass:: longtable3623 3624.. flat-table::3625    :header-rows:  03626    :stub-columns: 03627    :widths:       1 1 23628 3629    * - ``V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA``3630      - 0x000000013631      - If set, indicates that the U and V delta quantizer values are coded3632        separately. If not set, indicates that the U and V delta quantizer3633        values share a common value.3634    * - ``V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX``3635      - 0x000000023636      - If set, specifies that the quantizer matrix will be used to compute3637        quantizers.3638    * - ``V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT``3639      - 0x000000043640      - Specifies whether quantizer index delta values are present.3641 3642.. c:type:: v4l2_av1_tile_info3643 3644AV1 Tile info as defined in section 6.8.14 "Tile info semantics" of ref:`av1`.3645 3646.. cssclass:: longtable3647 3648.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|3649 3650.. flat-table:: struct v4l2_av1_tile_info3651    :header-rows:  03652    :stub-columns: 03653    :widths:       1 1 23654 3655    * - __u83656      - ``flags``3657      - See3658        :ref:`AV1 Tile Info flags <av1_tile_info_flags>` for more details.3659    * - __u83660      - ``context_update_tile_id``3661      - Specifies which tile to use for the CDF update.3662    * - __u83663      - ``tile_cols``3664      - Specifies the number of tiles across the frame.3665    * - __u83666      - ``tile_rows``3667      - Specifies the number of tiles down the frame.3668    * - __u323669      - ``mi_col_starts[V4L2_AV1_MAX_TILE_COLS + 1]``3670      - An array specifying the start column (in units of 4x4 luma3671        samples) for each tile across the image.3672    * - __u323673      - ``mi_row_starts[V4L2_AV1_MAX_TILE_ROWS + 1]``3674      - An array specifying the start row (in units of 4x4 luma3675        samples) for each tile across the image.3676    * - __u323677      - ``width_in_sbs_minus_1[V4L2_AV1_MAX_TILE_COLS]``3678      - Specifies the width of a tile minus 1 in units of superblocks.3679    * - __u323680      - ``height_in_sbs_minus_1[V4L2_AV1_MAX_TILE_ROWS]``3681      - Specifies the height of a tile minus 1 in units of superblocks.3682    * - __u83683      - ``tile_size_bytes``3684      - Specifies the number of bytes needed to code each tile size.3685    * - __u83686      - ``reserved[3]``3687      - Applications and drivers must set this to zero.3688 3689.. _av1_tile_info_flags:3690 3691``AV1 Tile Info Flags``3692 3693.. cssclass:: longtable3694 3695.. flat-table::3696    :header-rows:  03697    :stub-columns: 03698    :widths:       1 1 23699 3700    * - ``V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING``3701      - 0x000000013702      - If set, means that the tiles are uniformly spaced across the frame. (In3703        other words, all tiles are the same size except for the ones at the3704        right and bottom edge which can be smaller). If not set means that the3705        tile sizes are coded.3706 3707.. c:type:: v4l2_av1_frame_type3708 3709AV1 Frame Type3710 3711.. raw:: latex3712 3713    \scriptsize3714 3715.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|3716 3717.. flat-table::3718    :header-rows:  03719    :stub-columns: 03720    :widths:       1 1 23721 3722    * - ``V4L2_AV1_KEY_FRAME``3723      - 03724      - Key frame.3725    * - ``V4L2_AV1_INTER_FRAME``3726      - 13727      - Inter frame.3728    * - ``V4L2_AV1_INTRA_ONLY_FRAME``3729      - 23730      - Intra-only frame.3731    * - ``V4L2_AV1_SWITCH_FRAME``3732      - 33733      - Switch frame.3734 3735.. c:type:: v4l2_av1_interpolation_filter3736 3737AV1 Interpolation Filter3738 3739.. raw:: latex3740 3741    \scriptsize3742 3743.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|3744 3745.. flat-table::3746    :header-rows:  03747    :stub-columns: 03748    :widths:       1 1 23749 3750    * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP``3751      - 03752      - Eight tap filter.3753    * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH``3754      - 13755      - Eight tap smooth filter.3756    * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP``3757      - 23758      - Eight tap sharp filter.3759    * - ``V4L2_AV1_INTERPOLATION_FILTER_BILINEAR``3760      - 33761      - Bilinear filter.3762    * - ``V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE``3763      - 43764      - Filter selection is signaled at the block level.3765 3766.. c:type:: v4l2_av1_tx_mode3767 3768AV1 Tx mode as described in section 6.8.21 "TX mode semantics" of :ref:`av1`.3769 3770.. raw:: latex3771 3772    \scriptsize3773 3774.. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|3775 3776.. flat-table::3777    :header-rows:  03778    :stub-columns: 03779    :widths:       1 1 23780 3781    * - ``V4L2_AV1_TX_MODE_ONLY_4X4``3782      - 03783      -  The inverse transform will use only 4x4 transforms.3784    * - ``V4L2_AV1_TX_MODE_LARGEST``3785      - 13786      - The inverse transform will use the largest transform size that fits3787        inside the block.3788    * - ``V4L2_AV1_TX_MODE_SELECT``3789      - 23790      - The choice of transform size is specified explicitly for each block.3791 3792``V4L2_CID_STATELESS_AV1_FRAME (struct)``3793    Represents a Frame Header OBU. See 6.8 "Frame Header OBU semantics" of3794    :ref:`av1` for more details.3795 3796.. c:type:: v4l2_ctrl_av1_frame3797 3798.. cssclass:: longtable3799 3800.. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|3801 3802.. flat-table:: struct v4l2_ctrl_av1_frame3803    :header-rows:  03804    :stub-columns: 03805    :widths:       1 1 23806 3807    * - struct :c:type:`v4l2_av1_tile_info`3808      - ``tile_info``3809      - Tile info3810    * - struct :c:type:`v4l2_av1_quantization`3811      - ``quantization``3812      - Quantization parameters.3813    * - __u83814      - ``superres_denom``3815      - The denominator for the upscaling ratio.3816    * - struct :c:type:`v4l2_av1_segmentation`3817      - ``segmentation``3818      - Segmentation parameters.3819    * - struct :c:type:`v4l2_av1_loop_filter`3820      - ``loop_filter``3821      - Loop filter params3822    * - struct :c:type:`v4l2_av1_cdef`3823      - ``cdef``3824      - CDEF params3825    * - __u83826      - ``skip_mode_frame[2]``3827      - Specifies the frames to use for compound prediction when skip_mode is3828        equal to 1.3829    * - __u83830      - ``primary_ref_frame``3831      - Specifies which reference frame contains the CDF values and other state3832        that should be loaded at the start of the frame.3833    * - struct :c:type:`v4l2_av1_loop_restoration`3834      - ``loop_restoration``3835      - Loop restoration parameters.3836    * - struct :c:type:`v4l2_av1_global_motion`3837      - ``global_motion``3838      - Global motion parameters.3839    * - __u323840      - ``flags``3841      - See3842        :ref:`AV1 Frame flags <av1_frame_flags>` for more details.3843    * - enum :c:type:`v4l2_av1_frame_type`3844      - ``frame_type``3845      - Specifies the AV1 frame type3846    * - __u323847      - ``order_hint``3848      - Specifies OrderHintBits least significant bits of the expected output3849        order for this frame.3850    * - __u323851      - ``upscaled_width``3852      - The upscaled width.3853    * - enum :c:type:`v4l2_av1_interpolation_filter`3854      - ``interpolation_filter``3855      - Specifies the filter selection used for performing inter prediction.3856    * - enum :c:type:`v4l2_av1_tx_mode`3857      - ``tx_mode``3858      - Specifies how the transform size is determined.3859    * - __u323860      - ``frame_width_minus_1``3861      - Add 1 to get the frame's width.3862    * - __u323863      - ``frame_height_minus_1``3864      - Add 1 to get the frame's height.3865    * - __u163866      - ``render_width_minus_1``3867      - Add 1 to get the render width of the frame in luma samples.3868    * - __u163869      - ``render_height_minus_1``3870      - Add 1 to get the render height of the frame in luma samples.3871    * - __u323872      - ``current_frame_id``3873      - Specifies the frame id number for the current frame. Frame3874        id numbers are additional information that do not affect the decoding3875        process, but provide decoders with a way of detecting missing reference3876        frames so that appropriate action can be taken.3877    * - __u83878      - ``buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS]``3879      - Specifies the frame removal time in units of DecCT clock ticks counted3880        from the removal time of the last random access point for operating point3881        opNum.3882    * - __u83883      - ``reserved[4]``3884      - Applications and drivers must set this to zero.3885    * - __u323886      - ``order_hints[V4L2_AV1_TOTAL_REFS_PER_FRAME]``3887      - Specifies the expected output order hint for each reference frame.3888        This field corresponds to the OrderHints variable from the specification3889        (section 5.9.2  "Uncompressed header syntax"). As such, this is only3890        used for non-intra frames and ignored otherwise. order_hints[0] is3891        always ignored.3892    * - __u643893      - ``reference_frame_ts[V4L2_AV1_TOTAL_REFS_PER_FRAME]``3894      - The V4L2 timestamp for each of the reference frames enumerated in3895        enum :c:type:`v4l2_av1_reference_frame` starting at3896        ``V4L2_AV1_REF_LAST_FRAME``. This represents the state of reference3897        slot as described in the spec and updated by userland through the3898        "Reference frame update process" in section 7.20 The timestamp refers3899        to the ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the3900        :c:func:`v4l2_timeval_to_ns()` function to convert the struct3901        :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.3902    * - __s83903      - ``ref_frame_idx[V4L2_AV1_REFS_PER_FRAME]``3904      - An index into ``reference_frame_ts`` representing the ordered list of3905        references used by inter-frame. Matches the bitstream syntax3906        element of the same name.3907    * - __u83908      - ``refresh_frame_flags``3909      - Contains a bitmask that specifies which reference frame slots will be3910        updated with the current frame after it is decoded.3911 3912.. _av1_frame_flags:3913 3914``AV1 Frame Flags``3915 3916.. cssclass:: longtable3917 3918.. flat-table::3919    :header-rows:  03920    :stub-columns: 03921    :widths:       1 1 23922 3923    * - ``V4L2_AV1_FRAME_FLAG_SHOW_FRAME``3924      - 0x000000013925      - If set, specifies that this frame should be immediately output once3926        decoded. If not set, specifies that this frame should not be immediately3927        output; it may be output later if a later uncompressed header uses3928        show_existing_frame equal to 1.3929    * - ``V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME``3930      - 0x000000023931      - If set, specifies that the frame may be output using the3932        show_existing_frame mechanism. If not set, specifies that this frame3933        will not be output using the show_existing_frame mechanism.3934    * - ``V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE``3935      - 0x000000043936      - Specifies whether error resilient mode is enabled.3937    * - ``V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE``3938      - 0x000000083939      - Specifies whether the CDF update in the symbol decoding process should3940        be disabled.3941    * - ``V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS``3942      - 0x000000103943      - If set, indicates that intra blocks may use palette encoding. If not3944        set, indicates that palette encoding is never used.3945    * - ``V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV``3946      - 0x000000203947      - If set, specifies that motion vectors will always be integers. If not3948        set, specifies that motion vectors can contain fractional bits.3949    * - ``V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC``3950      - 0x000000403951      - If set, indicates that intra block copy may be used in this frame. If3952        not set, indicates that intra block copy is not allowed in this frame.3953    * - ``V4L2_AV1_FRAME_FLAG_USE_SUPERRES``3954      - 0x000000803955      - If set, indicates that upscaling is needed.3956    * - ``V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV``3957      - 0x000001003958      - If set, specifies that motion vectors are specified to eighth pel3959        precision. If not set, specifies that motion vectors are specified to3960        quarter pel precision;3961    * - ``V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE``3962      - 0x000002003963      - If not set, specifies that only the SIMPLE motion mode will be used.3964    * - ``V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS``3965      - 0x000004003966      - If set specifies that motion vector information from a previous frame3967        can be used when decoding the current frame. If not set, specifies that3968        this information will not be used.3969    * - ``V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF``3970      - 0x000008003971      - If set indicates that the end of frame CDF update is disabled. If not3972        set, indicates that the end of frame CDF update is enabled3973    * - ``V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION``3974      - 0x000010003975      - If set, indicates that the syntax element motion_mode may be present, if3976        not set, indicates that the syntax element motion_mode will not be3977        present.3978    * - ``V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT``3979      - 0x000020003980      - If set, specifies that the mode info for inter blocks contains the3981        syntax element comp_mode that indicates whether to use single or3982        compound reference prediction. If not set, specifies that all inter3983        blocks will use single prediction.3984    * - ``V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET``3985      - 0x000040003986      - If set, specifies that the frame is restricted to a reduced subset of3987        the full set of transform types.3988    * - ``V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED``3989      - 0x000080003990      - This flag retains the same meaning as SkipModeAllowed in :ref:`av1`.3991    * - ``V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT``3992      - 0x000100003993      - If set, specifies that the syntax element skip_mode will be present, if3994        not set, specifies that skip_mode will not be used for this frame.3995    * - ``V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE``3996      - 0x000200003997      - If set, specifies that the frame size will either be specified as the3998        size of one of the reference frames, or computed from the3999        frame_width_minus_1 and frame_height_minus_1 syntax elements. If not4000        set, specifies that the frame size is equal to the size in the sequence4001        header.4002    * - ``V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT``4003      - 0x000400004004      - If set, specifies that buffer_removal_time is present. If not set,4005        specifies that buffer_removal_time is not present.4006    * - ``V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING``4007      - 0x000800004008      - If set, indicates that only two reference frames are explicitly4009        signaled. If not set, indicates that all reference frames are explicitly4010        signaled.4011 4012``V4L2_CID_STATELESS_AV1_FILM_GRAIN (struct)``4013    Represents the optional film grain parameters. See section4014    6.8.20 "Film grain params semantics" of :ref:`av1` for more details.4015 4016.. c:type:: v4l2_ctrl_av1_film_grain4017 4018.. cssclass:: longtable4019 4020.. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|4021 4022.. flat-table:: struct v4l2_ctrl_av1_film_grain4023    :header-rows:  04024    :stub-columns: 04025    :widths:       1 1 24026 4027    * - __u84028      - ``flags``4029      - See :ref:`AV1 Film Grain Flags <av1_film_grain_flags>`.4030    * - __u84031      - ``cr_mult``4032      - Represents a multiplier for the cr component used in derivation of the4033        input index to the cr component scaling function.4034    * - __u164035      - ``grain_seed``4036      - Specifies the starting value for the pseudo-random numbers used during4037        film grain synthesis.4038    * - __u84039      - ``film_grain_params_ref_idx``4040      - Indicates which reference frame contains the film grain parameters to be4041	used for this frame.4042    * - __u84043      - ``num_y_points``4044      - Specifies the number of points for the piece-wise linear scaling4045        function of the luma component.4046    * - __u84047      - ``point_y_value[V4L2_AV1_MAX_NUM_Y_POINTS]``4048      - Represents the x (luma value) coordinate for the i-th point4049        of the piecewise linear scaling function for luma component. The values4050        are signaled on the scale of 0..255. In case of 10 bit video, these4051        values correspond to luma values divided by 4. In case of 12 bit video,4052        these values correspond to luma values divided by 16.4053    * - __u84054      - ``point_y_scaling[V4L2_AV1_MAX_NUM_Y_POINTS]``4055      - Represents the scaling (output) value for the i-th point4056        of the piecewise linear scaling function for luma component.4057    * - __u84058      - ``num_cb_points``4059      -  Specifies the number of points for the piece-wise linear scaling4060         function of the cb component.4061    * - __u84062      - ``point_cb_value[V4L2_AV1_MAX_NUM_CB_POINTS]``4063      - Represents the x coordinate for the i-th point of the4064        piece-wise linear scaling function for cb component. The values are4065        signaled on the scale of 0..255.4066    * - __u84067      - ``point_cb_scaling[V4L2_AV1_MAX_NUM_CB_POINTS]``4068      - Represents the scaling (output) value for the i-th point of the4069        piecewise linear scaling function for cb component.4070    * - __u84071      - ``num_cr_points``4072      - Represents the number of points for the piece-wise4073        linear scaling function of the cr component.4074    * - __u84075      - ``point_cr_value[V4L2_AV1_MAX_NUM_CR_POINTS]``4076      - Represents the x coordinate for the i-th point of the4077        piece-wise linear scaling function for cr component. The values are4078        signaled on the scale of 0..255.4079    * - __u84080      - ``point_cr_scaling[V4L2_AV1_MAX_NUM_CR_POINTS]``4081      - Represents the scaling (output) value for the i-th point of the4082        piecewise linear scaling function for cr component.4083    * - __u84084      - ``grain_scaling_minus_8``4085      - Represents the shift - 8 applied to the values of the chroma component.4086        The grain_scaling_minus_8 can take values of 0..3 and determines the4087        range and quantization step of the standard deviation of film grain.4088    * - __u84089      - ``ar_coeff_lag``4090      - Specifies the number of auto-regressive coefficients for luma and4091        chroma.4092    * - __u84093      - ``ar_coeffs_y_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``4094      - Specifies auto-regressive coefficients used for the Y plane.4095    * - __u84096      - ``ar_coeffs_cb_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``4097      - Specifies auto-regressive coefficients used for the U plane.4098    * - __u84099      - ``ar_coeffs_cr_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``4100      - Specifies auto-regressive coefficients used for the V plane.4101    * - __u84102      - ``ar_coeff_shift_minus_6``4103      - Specifies the range of the auto-regressive coefficients. Values of 0,4104        1, 2, and 3 correspond to the ranges for auto-regressive coefficients of4105        [-2, 2), [-1, 1), [-0.5, 0.5) and [-0.25, 0.25) respectively.4106    * - __u84107      - ``grain_scale_shift``4108      - Specifies how much the Gaussian random numbers should be scaled down4109        during the grain synthesis process.4110    * - __u84111      - ``cb_mult``4112      - Represents a multiplier for the cb component used in derivation of the4113        input index to the cb component scaling function.4114    * - __u84115      - ``cb_luma_mult``4116      - Represents a multiplier for the average luma component used in4117        derivation of the input index to the cb component scaling function..4118    * - __u84119      - ``cr_luma_mult``4120      - Represents a multiplier for the average luma component used in4121        derivation of the input index to the cr component scaling function.4122    * - __u164123      - ``cb_offset``4124      - Represents an offset used in derivation of the input index to the4125        cb component scaling function.4126    * - __u164127      - ``cr_offset``4128      - Represents an offset used in derivation of the input index to the4129        cr component scaling function.4130    * - __u84131      - ``reserved[4]``4132      - Applications and drivers must set this to zero.4133 4134.. _av1_film_grain_flags:4135 4136``AV1 Film Grain Flags``4137 4138.. cssclass:: longtable4139 4140.. flat-table::4141    :header-rows:  04142    :stub-columns: 04143    :widths:       1 1 24144 4145    * - ``V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN``4146      - 0x000000014147      - If set, specifies that film grain should be added to this frame. If not4148        set, specifies that film grain should not be added.4149    * - ``V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN``4150      - 0x000000024151      - If set, means that a new set of parameters should be sent. If not set,4152        specifies that the previous set of parameters should be used.4153    * - ``V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA``4154      - 0x000000044155      - If set, specifies that the chroma scaling is inferred from the luma4156        scaling.4157    * - ``V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP``4158      - 0x000000084159      - If set, indicates that the overlap between film grain blocks shall be4160        applied. If not set, indicates that the overlap between film grain blocks4161        shall not be applied.4162    * - ``V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE``4163      - 0x000000104164      - If set, indicates that clipping to the restricted (studio, i.e. limited)4165        range shall be applied to the sample values after adding the film grain4166        (see the semantics for color_range for an explanation of studio swing).4167        If not set, indicates that clipping to the full range shall be applied4168        to the sample values after adding the film grain.4169