1.16. Stateless Codec Control Reference¶
The Stateless Codec control class is intended to support stateless decoder and encoders (i.e. hardware accelerators).
These drivers are typically supported by the Memory-to-memory Stateless Video Decoder Interface, and deal with parsed pixel formats such as V4L2_PIX_FMT_H264_SLICE.
1.16.1. Stateless Codec Control ID¶
V4L2_CID_CODEC_STATELESS_CLASS (class)
The Stateless Codec class descriptor.
V4L2_CID_STATELESS_H264_SPS (struct)
Specifies the sequence parameter set (as extracted from the bitstream) for the associated H264 slice data. This includes the necessary parameters for configuring a stateless hardware decoding pipeline for H264. The bitstream parameters are defined according to ITU-T Rec. H.264 Specification (04/2017 Edition), section 7.4.2.1.1 “Sequence Parameter Set Data Semantics”. For further documentation, refer to the above specification, unless there is an explicit comment stating otherwise.
-
type v4l2_ctrl_h264_sps¶
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__s32 |
|
|
__s32 |
|
|
__s32 |
|
|
__u16 |
|
|
__u16 |
|
|
__u32 |
|
Sequence Parameter Set Constraints Set Flags
|
0x00000001 |
|
|
0x00000002 |
|
|
0x00000004 |
|
|
0x00000008 |
|
|
0x00000010 |
|
|
0x00000020 |
Sequence Parameter Set Flags
|
0x00000001 |
|
|
0x00000002 |
|
|
0x00000004 |
|
|
0x00000008 |
|
|
0x00000010 |
|
|
0x00000020 |
|
|
0x00000040 |
V4L2_CID_STATELESS_H264_PPS (struct)
Specifies the picture parameter set (as extracted from the bitstream) for the associated H264 slice data. This includes the necessary parameters for configuring a stateless hardware decoding pipeline for H264. The bitstream parameters are defined according to ITU-T Rec. H.264 Specification (04/2017 Edition), section 7.4.2.2 “Picture Parameter Set RBSP Semantics”. For further documentation, refer to the above specification, unless there is an explicit comment stating otherwise.
-
type v4l2_ctrl_h264_pps¶
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__s8 |
|
|
__s8 |
|
|
__s8 |
|
|
__s8 |
|
|
__u16 |
|
Picture Parameter Set Flags
|
0x0001 |
|
|
0x0002 |
|
|
0x0004 |
|
|
0x0008 |
|
|
0x0010 |
|
|
0x0020 |
|
|
0x0040 |
|
|
0x0080 |
|
V4L2_CID_STATELESS_H264_SCALING_MATRIX (struct)
Specifies the scaling matrix (as extracted from the bitstream) for the associated H264 slice data. The bitstream parameters are defined according to ITU-T Rec. H.264 Specification (04/2017 Edition), section 7.4.2.1.1.1 “Scaling List Semantics”. For further documentation, refer to the above specification, unless there is an explicit comment stating otherwise.
-
type v4l2_ctrl_h264_scaling_matrix¶
__u8 |
|
Scaling matrix after applying the inverse scanning process. Expected list order is Intra Y, Intra Cb, Intra Cr, Inter Y, Inter Cb, Inter Cr. The values on each scaling list are expected in raster scan order. |
__u8 |
|
Scaling matrix after applying the inverse scanning process. Expected list order is Intra Y, Inter Y, Intra Cb, Inter Cb, Intra Cr, Inter Cr. The values on each scaling list are expected in raster scan order. |
V4L2_CID_STATELESS_H264_SLICE_PARAMS (struct)
Specifies the slice parameters (as extracted from the bitstream) for the associated H264 slice data. This includes the necessary parameters for configuring a stateless hardware decoding pipeline for H264. The bitstream parameters are defined according to ITU-T Rec. H.264 Specification (04/2017 Edition), section 7.4.3 “Slice Header Semantics”. For further documentation, refer to the above specification, unless there is an explicit comment stating otherwise.
-
type v4l2_ctrl_h264_slice_params¶
__u32 |
|
Offset in bits to slice_data() from the beginning of this slice. |
__u32 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__u8 |
|
|
__s8 |
|
|
__s8 |
|
|
__u8 |
|
|
__s8 |
|
|
__s8 |
|
|
__u8 |
|
If num_ref_idx_active_override_flag is not set, this field must be set to the value of num_ref_idx_l0_default_active_minus1 |
__u8 |
|
If num_ref_idx_active_override_flag is not set, this field must be set to the value of num_ref_idx_l1_default_active_minus1 |
__u8 |
|
Applications and drivers must set this to zero. |
struct |
|
Reference picture list after applying the per-slice modifications |
struct |
|
Reference picture list after applying the per-slice modifications |
__u32 |
|
Slice Parameter Set Flags
|
0x00000001 |
|
|
0x00000002 |
V4L2_CID_STATELESS_H264_PRED_WEIGHTS (struct)
Prediction weight table defined according to ITU-T Rec. H.264 Specification (04/2017 Edition), section 7.4.3.2 “Prediction Weight Table Semantics”. The prediction weight table must be passed by applications under the conditions explained in section 7.3.3 “Slice header syntax”.
-
type v4l2_ctrl_h264_pred_weights¶
__u16 |
|
|
__u16 |
|
|
struct |
|
The weight factors at index 0 are the weight factors for the reference list 0, the one at index 1 for the reference list 1. |
-
type v4l2_h264_weight_factors¶
__s16 |
|
|
__s16 |
|
|
__s16 |
|
|
__s16 |
|
Picture Reference
-
type v4l2_h264_reference¶
__u8 |
|
Specifies how the picture is referenced. See Reference Fields |
__u8 |
|
Index into the |
Reference Fields
|
0x1 |
The top field in field pair is used for short-term reference. |
|
0x2 |
The bottom field in field pair is used for short-term reference. |
|
0x3 |
The frame (or the top/bottom fields, if it’s a field pair) is used for short-term reference. |
V4L2_CID_STATELESS_H264_DECODE_PARAMS (struct)
Specifies the decode parameters (as extracted from the bitstream) for the associated H264 slice data. This includes the necessary parameters for configuring a stateless hardware decoding pipeline for H264. The bitstream parameters are defined according to ITU-T Rec. H.264 Specification (04/2017 Edition). For further documentation, refer to the above specification, unless there is an explicit comment stating otherwise.
-
type v4l2_ctrl_h264_decode_params¶
struct |
|
|
__u16 |
|
NAL reference ID value coming from the NAL Unit header |
__u16 |
|
|
__s32 |
|
Picture Order Count for the coded top field |
__s32 |
|
Picture Order Count for the coded bottom field |
__u16 |
|
|
__u16 |
|
|
__s32 |
|
|
__s32 |
|
|
__s32 |
|
|
__u32 |
|
Size in bits of the dec_ref_pic_marking() syntax element. |
__u32 |
|
Combined size in bits of the picture order count related syntax elements: pic_order_cnt_lsb, delta_pic_order_cnt_bottom, delta_pic_order_cnt0, and delta_pic_order_cnt1. |
__u32 |
|
|
__u32 |
|
Applications and drivers must set this to zero. |
__u32 |
|
Decode Parameters Flags
|
0x00000001 |
That picture is an IDR picture |
|
0x00000002 |
|
|
0x00000004 |
|
|
0x00000008 |
|
|
0x00000010 |
-
type v4l2_h264_dpb_entry¶
__u64 |
|
Timestamp of the V4L2 capture buffer to use as reference, used
with B-coded and P-coded frames. The timestamp refers to the
|
__u32 |
|
For short term references, this must match the derived value PicNum (8-28) and for long term references it must match the derived value LongTermPicNum (8-29). When decoding frames (as opposed to fields) pic_num is the same as FrameNumWrap. |
__u16 |
|
For short term references, this must match the frame_num value from the slice header syntax (the driver will wrap the value if needed). For long term references, this must be set to the value of long_term_frame_idx described in the dec_ref_pic_marking() syntax. |
__u8 |
|
Specifies how the DPB entry is referenced. See Reference Fields |
__u8 |
|
Applications and drivers must set this to zero. |
__s32 |
|
|
__s32 |
|
|
__u32 |
|
See DPB Entry Flags |
DPB Entries Flags
|
0x00000001 |
The DPB entry is valid (non-empty) and should be considered. |
|
0x00000002 |
The DPB entry is used for reference. |
|
0x00000004 |
The DPB entry is used for long-term reference. |
|
0x00000008 |
The DPB entry is a single field or a complementary field pair. |
V4L2_CID_STATELESS_H264_DECODE_MODE (enum)
Specifies the decoding mode to use. Currently exposes slice-based and frame-based decoding but new modes might be added later on. This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE are required to set this control in order to specify the decoding mode that is expected for the buffer. Drivers may expose a single or multiple decoding modes, depending on what they can support.
-
type v4l2_stateless_h264_decode_mode¶
|
0 |
Decoding is done at the slice granularity.
The OUTPUT buffer must contain a single slice.
When this mode is selected, the |
|
1 |
Decoding is done at the frame granularity,
The OUTPUT buffer must contain all slices needed to decode the
frame. The OUTPUT buffer must also contain both fields.
This mode will be supported by devices that
parse the slice(s) header(s) in hardware. When this mode is
selected, the |
V4L2_CID_STATELESS_H264_START_CODE (enum)
Specifies the H264 slice start code expected for each slice. This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE are required to set this control in order to specify the start code that is expected for the buffer. Drivers may expose a single or multiple start codes, depending on what they can support.
-
type v4l2_stateless_h264_start_code¶
|
0 |
Selecting this value specifies that H264 slices are passed to the driver without any start code. The bitstream data should be according to ITU-T Rec. H.264 Specification (04/2017 Edition) 7.3.1 NAL unit syntax, hence contains emulation prevention bytes when required. |
|
1 |
Selecting this value specifies that H264 slices are expected to be prefixed by Annex B start codes. According to ITU-T Rec. H.264 Specification (04/2017 Edition) valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001. |
V4L2_CID_STATELESS_FWHT_PARAMS (struct)
Specifies the FWHT (Fast Walsh Hadamard Transform) parameters (as extracted from the bitstream) for the associated FWHT data. This includes the necessary parameters for configuring a stateless hardware decoding pipeline for FWHT. This codec is specific to the vicodec test driver.
-
type v4l2_ctrl_fwht_params¶
__u64 |
|
Timestamp of the V4L2 capture buffer to use as backward reference, used
with P-coded frames. The timestamp refers to the
|
__u32 |
|
The version of the codec. Set to |
__u32 |
|
The width of the frame. |
__u32 |
|
The height of the frame. |
__u32 |
|
The flags of the frame, see FWHT Flags. |
__u32 |
|
The colorspace of the frame, from enum |
__u32 |
|
The transfer function, from enum |
__u32 |
|
The Y’CbCr encoding, from enum |
__u32 |
|
The quantization range, from enum |
1.16.2. FWHT Flags¶
|
0x00000001 |
Set if this is an interlaced format. |
|
0x00000002 |
Set if this is a bottom-first (NTSC) interlaced format. |
|
0x00000004 |
Set if each ‘frame’ contains just one field. |
|
0x00000008 |
If V4L2_FWHT_FL_IS_ALTERNATE was set, then this is set if this ‘frame’ is the bottom field, else it is the top field. |
|
0x00000010 |
Set if the Y’ (luma) plane is uncompressed. |
|
0x00000020 |
Set if the Cb plane is uncompressed. |
|
0x00000040 |
Set if the Cr plane is uncompressed. |
|
0x00000080 |
Set if the chroma plane has the same height as the luma plane, else the chroma plane is half the height of the luma plane. |
|
0x00000100 |
Set if the chroma plane has the same width as the luma plane, else the chroma plane is half the width of the luma plane. |
|
0x00000200 |
Set if the alpha plane is uncompressed. |
|
0x00000400 |
Set if this is an I-frame. |
|
0x00070000 |
The number of color components minus one. |
|
0x00180000 |
The mask for the pixel encoding. |
|
0x00080000 |
Set if the pixel encoding is YUV. |
|
0x00100000 |
Set if the pixel encoding is RGB. |
|
0x00180000 |
Set if the pixel encoding is HSV. |
V4L2_CID_STATELESS_VP8_FRAME (struct)
Specifies the frame parameters for the associated VP8 parsed frame data. This includes the necessary parameters for configuring a stateless hardware decoding pipeline for VP8. The bitstream parameters are defined according to VP8.
-
type v4l2_ctrl_vp8_frame¶
struct |
|
Structure with segment-based adjustments metadata. |
struct |
|
Structure with loop filter level adjustments metadata. |
struct |
|
Structure with VP8 dequantization indices metadata. |
struct |
|
Structure with VP8 entropy coder probabilities metadata. |
struct |
|
Structure with VP8 entropy coder state. |
__u16 |
|
The width of the frame. Must be set for all frames. |
__u16 |
|
The height of the frame. Must be set for all frames. |
__u8 |
|
Horizontal scaling factor. |
__u8 |
|
Vertical scale. |
__u8 |
|
Bitstream version. |
__u8 |
|
Indicates the probability that the macroblock is not skipped. |
__u8 |
|
Indicates the probability that a macroblock is intra-predicted. |
__u8 |
|
Indicates the probability that the last reference frame is used for inter-prediction |
__u8 |
|
Indicates the probability that the golden reference frame is used for inter-prediction |
__u8 |
|
Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8. |
__u32 |
|
Size of the first partition, i.e. the control partition. |
__u32 |
|
Size in bits of the first partition header portion. |
__u32 |
|
DCT coefficients sizes. |
__u64 |
|
Timestamp for the V4L2 capture buffer to use as last reference frame, used
with inter-coded frames. The timestamp refers to the |
__u64 |
|
Timestamp for the V4L2 capture buffer to use as last reference frame, used
with inter-coded frames. The timestamp refers to the |
__u64 |
|
Timestamp for the V4L2 capture buffer to use as alternate reference frame, used
with inter-coded frames. The timestamp refers to the |
__u64 |
|
See Frame Flags |
Frame Flags
|
0x01 |
Indicates if the frame is a key frame. |
|
0x02 |
Experimental bitstream. |
|
0x04 |
Show frame flag, indicates if the frame is for display. |
|
0x08 |
Enable/disable skipping of macroblocks with no non-zero coefficients. |
|
0x10 |
Sign of motion vectors when the golden frame is referenced. |
|
0x20 |
Sign of motion vectors when the alt frame is referenced. |
-
type v4l2_vp8_entropy_coder_state¶
__u8 |
|
coder state value for “Range” |
__u8 |
|
coder state value for “Value”- |
__u8 |
|
number of bits left. |
__u8 |
|
Applications and drivers must set this to zero. |
-
type v4l2_vp8_segment¶
__s8 |
|
Signed quantizer value update. |
__s8 |
|
Signed loop filter level value update. |
__u8 |
|
Segment probabilities. |
__u8 |
|
Applications and drivers must set this to zero. |
__u32 |
|
See Segment Flags |
Segment Flags
|
0x01 |
Enable/disable segment-based adjustments. |
|
0x02 |
Indicates if the macroblock segmentation map is updated in this frame. |
|
0x04 |
Indicates if the segment feature data is updated in this frame. |
|
0x08 |
If is set, the segment feature data mode is delta-value. If cleared, it’s absolute-value. |
-
type v4l2_vp8_loop_filter¶
__s8 |
|
Reference adjustment (signed) delta value. |
__s8 |
|
Macroblock prediction mode adjustment (signed) delta value. |
__u8 |
|
Sharpness level |
__u8 |
|
Filter level |
__u16 |
|
Applications and drivers must set this to zero. |
__u32 |
|
Loop Filter Flags
|
0x01 |
Enable/disable macroblock-level loop filter adjustment. |
|
0x02 |
Indicates if the delta values used in an adjustment are updated. |
|
0x04 |
If set, indicates the filter type is simple. If cleared, the filter type is normal. |
-
type v4l2_vp8_quantization¶
__u8 |
|
Luma AC coefficient table index. |
__s8 |
|
Luma DC delta vaue. |
__s8 |
|
Y2 block DC delta value. |
__s8 |
|
Y2 block AC delta value. |
__s8 |
|
Chroma DC delta value. |
__s8 |
|
Chroma AC delta value. |
__u16 |
|
Applications and drivers must set this to zero. |
-
type v4l2_vp8_entropy¶
__u8 |
|
Coefficient update probabilities. |
__u8 |
|
Luma mode update probabilities. |
__u8 |
|
Chroma mode update probabilities. |
__u8 |
|
MV decoding update probabilities. |
__u8 |
|
Applications and drivers must set this to zero. |
V4L2_CID_STATELESS_MPEG2_SEQUENCE (struct)
Specifies the sequence parameters (as extracted from the bitstream) for the associated MPEG-2 slice data. This includes fields matching the syntax elements from the sequence header and sequence extension parts of the bitstream as specified by ISO 13818-2.
-
type v4l2_ctrl_mpeg2_sequence¶
__u16 |
|
The width of the displayable part of the frame’s luminance component. |
__u16 |
|
The height of the displayable part of the frame’s luminance component. |
__u32 |
|
Used to calculate the required size of the video buffering verifier, defined (in bits) as: 16 * 1024 * vbv_buffer_size. |
__u16 |
|
The current profile and level indication as extracted from the bitstream. |
__u8 |
|
The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4). |
__u8 |
|
MPEG-2 Sequence Flags
|
0x01 |
Indication that all the frames for the sequence are progressive instead of interlaced. |
V4L2_CID_STATELESS_MPEG2_PICTURE (struct)
Specifies the picture parameters (as extracted from the bitstream) for the associated MPEG-2 slice data. This includes fields matching the syntax elements from the picture header and picture coding extension parts of the bitstream as specified by ISO 13818-2.
-
type v4l2_ctrl_mpeg2_picture¶
__u64 |
|
Timestamp of the V4L2 capture buffer to use as backward reference, used
with B-coded and P-coded frames. The timestamp refers to the
|
__u64 |
|
Timestamp for the V4L2 capture buffer to use as forward reference, used
with B-coded frames. The timestamp refers to the |
__u32 |
|
See MPEG-2 Picture Flags. |
__u8 |
|
Motion vector codes. |
__u8 |
|
Picture coding type for the frame covered by the current slice (V4L2_MPEG2_PIC_CODING_TYPE_I, V4L2_MPEG2_PIC_CODING_TYPE_P or V4L2_MPEG2_PIC_CODING_TYPE_B). |
__u8 |
|
Picture structure (1: interlaced top field, 2: interlaced bottom field, 3: progressive frame). |
__u8 |
|
Precision of Discrete Cosine transform (0: 8 bits precision, 1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision). |
__u8 |
|
Applications and drivers must set this to zero. |
MPEG-2 Picture Flags
|
0x00000001 |
If set and it’s an interlaced stream, top field is output first. |
|
0x00000002 |
If set only frame-DCT and frame prediction are used. |
|
0x00000004 |
If set motion vectors are coded for intra macroblocks. |
|
0x00000008 |
This flag affects the inverse quantization process. |
|
0x00000010 |
This flag affects the decoding of transform coefficient data. |
|
0x00000020 |
This flag affects the decoding of transform coefficient data. |
|
0x00000040 |
This flag affects the decoding process of progressive frames. |
|
0x00000080 |
Indicates whether the current frame is progressive. |
V4L2_CID_STATELESS_MPEG2_QUANTISATION (struct)
Specifies quantisation matrices, in zigzag scanning order, for the associated MPEG-2 slice data. This control is initialized by the kernel to the matrices default values. If a bitstream transmits a user-defined quantisation matrices load, applications are expected to use this control. Applications are also expected to set the control loading the default values, if the quantisation matrices need to be reset, for instance on a sequence header. This process is specified by section 6.3.7. “Quant matrix extension” of the specification.
-
type v4l2_ctrl_mpeg2_quantisation¶
__u8 |
|
The quantisation matrix coefficients for intra-coded frames, in zigzag scanning order. It is relevant for both luma and chroma components, although it can be superseded by the chroma-specific matrix for non-4:2:0 YUV formats. |
__u8 |
|
The quantisation matrix coefficients for non-intra-coded frames, in zigzag scanning order. It is relevant for both luma and chroma components, although it can be superseded by the chroma-specific matrix for non-4:2:0 YUV formats. |
__u8 |
|
The quantisation matrix coefficients for the chominance component of intra-coded frames, in zigzag scanning order. Only relevant for non-4:2:0 YUV formats. |
__u8 |
|
The quantisation matrix coefficients for the chrominance component of non-intra-coded frames, in zigzag scanning order. Only relevant for non-4:2:0 YUV formats. |
V4L2_CID_STATELESS_VP9_COMPRESSED_HDR (struct)
Stores VP9 probabilities updates as parsed from the current compressed frame header. A value of zero in an array element means no update of the relevant probability. Motion vector-related updates contain a new value or zero. All other updates contain values translated with inv_map_table[] (see 6.3.5 in VP9).
-
type v4l2_ctrl_vp9_compressed_hdr¶
__u8 |
|
Specifies the TX mode. See TX Mode for more details. |
__u8 |
|
TX 8x8 probabilities delta. |
__u8 |
|
TX 16x16 probabilities delta. |
__u8 |
|
TX 32x32 probabilities delta. |
__u8 |
|
Coefficient probabilities delta. |
__u8 |
|
Skip probabilities delta. |
__u8 |
|
Inter prediction mode probabilities delta. |
__u8 |
|
Interpolation filter probabilities delta. |
__u8 |
|
Is inter-block probabilities delta. |
__u8 |
|
Compound prediction mode probabilities delta. |
__u8 |
|
Single reference probabilities delta. |
__u8 |
|
Compound reference probabilities delta. |
__u8 |
|
Y prediction mode probabilities delta. |
__u8 |
|
UV prediction mode probabilities delta. |
__u8 |
|
Partition probabilities delta. |
__u8 |
|
Motion vector joint probabilities delta. |
__u8 |
|
Motion vector sign probabilities delta. |
__u8 |
|
Motion vector class probabilities delta. |
__u8 |
|
Motion vector class0 bit probabilities delta. |
__u8 |
|
Motion vector bits probabilities delta. |
__u8 |
|
Motion vector class0 fractional bit probabilities delta. |
__u8 |
|
Motion vector fractional bit probabilities delta. |
__u8 |
|
Motion vector class0 high precision fractional bit probabilities delta. |
__u8 |
|
Motion vector high precision fractional bit probabilities delta. |
TX Mode
|
0 |
Transform size is 4x4. |
|
1 |
Transform size can be up to 8x8. |
|
2 |
Transform size can be up to 16x16. |
|
3 |
transform size can be up to 32x32. |
|
4 |
Bitstream contains the transform size for each block. |
See section ‘7.3.1 Tx mode semantics’ of the VP9 specification for more details.
V4L2_CID_STATELESS_VP9_FRAME (struct)
Specifies the frame parameters for the associated VP9 frame decode request. This includes the necessary parameters for configuring a stateless hardware decoding pipeline for VP9. The bitstream parameters are defined according to VP9.
-
type v4l2_ctrl_vp9_frame¶
struct |
|
Loop filter parameters. See struct |
struct |
|
Quantization parameters. See |
struct |
|
Segmentation parameters. See |
__u32 |
|
Combination of V4L2_VP9_FRAME_FLAG_* flags. See Frame Flags. |
__u16 |
|
Compressed header size in bytes. |
__u16 |
|
Uncompressed header size in bytes. |
__u16 |
|
Add 1 to get the frame width expressed in pixels. See section 7.2.3 in VP9. |
__u16 |
|
Add 1 to get the frame height expressed in pixels. See section 7.2.3 in VP9. |
__u16 |
|
Add 1 to get the expected render width expressed in pixels. This is not used during the decoding process but might be used by HW scalers to prepare a frame that’s ready for scanout. See section 7.2.4 in VP9. |
__u16 |
render_height_minus_1 |
Add 1 to get the expected render height expressed in pixels. This is not used during the decoding process but might be used by HW scalers to prepare a frame that’s ready for scanout. See section 7.2.4 in VP9. |
__u64 |
|
“last” reference buffer timestamp.
The timestamp refers to the |
__u64 |
|
“golden” reference buffer timestamp.
The timestamp refers to the |
__u64 |
|
“alt” reference buffer timestamp.
The timestamp refers to the |
__u8 |
|
a bitfield specifying whether the sign bias is set for a given reference frame. See Reference Frame Sign Bias for more details. |
__u8 |
|
specifies whether the frame context should be reset to default values. See Reset Frame Context for more details. |
__u8 |
|
Frame context that should be used/updated. |
__u8 |
|
VP9 profile. Can be 0, 1, 2 or 3. |
__u8 |
|
Component depth in bits. Can be 8, 10 or 12. Note that not all profiles support 10 and/or 12 bits depths. |
__u8 |
|
Specifies the filter selection used for performing inter prediction. See Interpolation Filter for more details. |
__u8 |
|
Specifies the base 2 logarithm of the width of each tile (where the width is measured in units of 8x8 blocks). Shall be less than or equal to 6. |
__u8 |
|
Specifies the base 2 logarithm of the height of each tile (where the height is measured in units of 8x8 blocks). |
__u8 |
|
Specifies the type of inter prediction to be used. See Reference Mode for more details. Note that this is derived as part of the compressed header parsing process and for this reason should have been part of :c:type: v4l2_ctrl_vp9_compressed_hdr optional control. It is safe to set this value to zero if the driver does not require compressed headers. |
__u8 |
|
Applications and drivers must set this to zero. |
Frame Flags
|
0x001 |
The frame is a key frame. |
|
0x002 |
The frame should be displayed. |
|
0x004 |
The decoding should be error resilient. |
|
0x008 |
The frame does not reference other frames. |
|
0x010 |
The frame can use high precision motion vectors. |
|
0x020 |
Frame context should be updated after decoding. |
|
0x040 |
Parallel decoding is used. |
|
0x080 |
Vertical subsampling is enabled. |
|
0x100 |
Horizontal subsampling is enabled. |
|
0x200 |
The full UV range is used. |
Reference Frame Sign Bias
|
0x1 |
Sign bias is set for the last reference frame. |
|
0x2 |
Sign bias is set for the golden reference frame. |
|
0x2 |
Sign bias is set for the alt reference frame. |
Reset Frame Context
|
0 |
Do not reset any frame context. |
|
1 |
Reset the frame context pointed to by
|
|
2 |
Reset all frame contexts. |
See section ‘7.2 Uncompressed header semantics’ of the VP9 specification for more details.
Interpolation Filter
|
0 |
Eight tap filter. |
|
1 |
Eight tap smooth filter. |
|
2 |
Eeight tap sharp filter. |
|
3 |
Bilinear filter. |
|
4 |
Filter selection is signaled at the block level. |
See section ‘7.2.7 Interpolation filter semantics’ of the VP9 specification for more details.
Reference Mode
|
0 |
Indicates that all the inter blocks use only a single reference frame to generate motion compensated prediction. |
|
1 |
Requires all the inter blocks to use compound mode. Single reference frame prediction is not allowed. |
|
2 |
Allows each individual inter block to select between single and compound prediction modes. |
See section ‘7.3.6 Frame reference mode semantics’ of the VP9 specification for more details.
-
type v4l2_vp9_segmentation¶
Encodes the quantization parameters. See section ‘7.2.10 Segmentation params syntax’ of the VP9 specification for more details.
__u8 |
|
Data attached to each feature. Data entry is only valid if the feature is enabled. The array shall be indexed with segment number as the first dimension (0..7) and one of V4L2_VP9_SEG_* as the second dimension. See Segment Feature IDs. |
__u8 |
|
Bitmask defining which features are enabled in each segment. The value for each segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id) values where id is one of V4L2_VP9_SEG_*. See Segment Feature IDs. |
__u8 |
|
Specifies the probability values to be used when decoding a Segment-ID. See ‘5.15. Segmentation map’ section of VP9 for more details. |
__u8 |
|
Specifies the probability values to be used when decoding a Predicted-Segment-ID. See ‘6.4.14. Get segment id syntax’ section of VP9 for more details. |
__u8 |
|
Combination of V4L2_VP9_SEGMENTATION_FLAG_* flags. See Segmentation Flags. |
__u8 |
|
Applications and drivers must set this to zero. |
Segment feature IDs
|
0 |
Quantizer segment feature. |
|
1 |
Loop filter segment feature. |
|
2 |
Reference frame segment feature. |
|
3 |
Skip segment feature. |
|
4 |
Number of segment features. |
Segmentation Flags
|
0x01 |
Indicates that this frame makes use of the segmentation tool. |
|
0x02 |
Indicates that the segmentation map should be updated during the decoding of this frame. |
|
0x04 |
Indicates that the updates to the segmentation map are coded relative to the existing segmentation map. |
|
0x08 |
Indicates that new parameters are about to be specified for each segment. |
|
0x10 |
Indicates that the segmentation parameters represent the actual values to be used. |
-
type v4l2_vp9_quantization¶
Encodes the quantization parameters. See section ‘7.2.9 Quantization params syntax’ of the VP9 specification for more details.
__u8 |
|
Indicates the base frame qindex. |
__s8 |
|
Indicates the Y DC quantizer relative to base_q_idx. |
__s8 |
|
Indicates the UV DC quantizer relative to base_q_idx. |
__s8 |
|
Indicates the UV AC quantizer relative to base_q_idx. |
__u8 |
|
Applications and drivers must set this to zero. |
-
type v4l2_vp9_loop_filter¶
This structure contains all loop filter related parameters. See sections ‘7.2.8 Loop filter semantics’ of the VP9 specification for more details.
__s8 |
|
Contains the adjustment needed for the filter level based on the chosen reference frame. |
__s8 |
|
Contains the adjustment needed for the filter level based on the chosen mode. |
__u8 |
|
Indicates the loop filter strength. |
__u8 |
|
Indicates the sharpness level. |
__u8 |
|
Combination of V4L2_VP9_LOOP_FILTER_FLAG_* flags. See Loop Filter Flags. |
__u8 |
|
Applications and drivers must set this to zero. |
Loop Filter Flags
|
0x1 |
When set, the filter level depends on the mode and reference frame used to predict a block. |
|
0x2 |
When set, the bitstream contains additional syntax elements that specify which mode and reference frame deltas are to be updated. |
V4L2_CID_STATELESS_HEVC_SPS (struct)
Specifies the Sequence Parameter Set fields (as extracted from the bitstream) for the associated HEVC slice data. These bitstream parameters are defined according to ITU H.265/HEVC. They are described in section 7.4.3.2 “Sequence parameter set RBSP semantics” of the specification.
-
type v4l2_ctrl_hevc_sps¶
__u8 |
|
Specifies the value of the vps_video_parameter_set_id of the active VPS as described in section “7.4.3.2.1 General sequence parameter set RBSP semantics” of H.265 specifications. |
__u8 |
|
Provides an identifier for the SPS for reference by other syntax elements as described in section “7.4.3.2.1 General sequence parameter set RBSP semantics” of H.265 specifications. |
__u16 |
|
Specifies the width of each decoded picture in units of luma samples. |
__u16 |
|
Specifies the height of each decoded picture in units of luma samples. |
__u8 |
|
This value plus 8 specifies the bit depth of the samples of the luma array. |
__u8 |
|
This value plus 8 specifies the bit depth of the samples of the chroma arrays. |
__u8 |
|
Specifies the value of the variable MaxPicOrderCntLsb. |
__u8 |
|
This value plus 1 specifies the maximum required size of the decoded picture buffer for the coded video sequence (CVS). |
__u8 |
|
Indicates the maximum allowed number of pictures. |
__u8 |
|
Used to signal MaxLatencyPictures, which indicates the maximum number of pictures that can precede any picture in output order and follow that picture in decoding order. |
__u8 |
|
This value plus 3 specifies the minimum luma coding block size. |
__u8 |
|
Specifies the difference between the maximum and minimum luma coding block size. |
__u8 |
|
This value plus 2 specifies the minimum luma transform block size. |
__u8 |
|
Specifies the difference between the maximum and minimum luma transform block size. |
__u8 |
|
Specifies the maximum hierarchy depth for transform units of coding units coded in inter prediction mode. |
__u8 |
|
Specifies the maximum hierarchy depth for transform units of coding units coded in intra prediction mode. |
__u8 |
|
This value plus 1 specifies the number of bits used to represent each of PCM sample values of the luma component. |
__u8 |
|
Specifies the number of bits used to represent each of PCM sample values of the chroma components. |
__u8 |
|
Plus 3 specifies the minimum size of coding blocks. |
__u8 |
|
Specifies the difference between the maximum and minimum size of coding blocks. |
__u8 |
|
Specifies the number of st_ref_pic_set() syntax structures included in the SPS. |
__u8 |
|
Specifies the number of candidate long-term reference pictures that are specified in the SPS. |
__u8 |
|
Specifies the chroma sampling. |
__u8 |
|
This value plus 1 specifies the maximum number of temporal sub-layers. |
__u64 |
|
Sequence Parameter Set Flags
|
0x00000001 |
|
|
0x00000002 |
|
|
0x00000004 |
|
|
0x00000008 |
|
|
0x00000010 |
|
|
0x00000020 |
|
|
0x00000040 |
|
|
0x00000080 |
|
|
0x00000100 |
V4L2_CID_STATELESS_HEVC_PPS (struct)
Specifies the Picture Parameter Set fields (as extracted from the bitstream) for the associated HEVC slice data. These bitstream parameters are defined according to ITU H.265/HEVC. They are described in section 7.4.3.3 “Picture parameter set RBSP semantics” of the specification.
-
type v4l2_ctrl_hevc_pps¶
__u8 |
|
Identifies the PPS for reference by other syntax elements. |
__u8 |
|
Specifies the number of extra slice header bits that are present in the slice header RBSP for coded pictures referring to the PPS. |
__u8 |
|
This value plus 1 specifies the inferred value of num_ref_idx_l0_active_minus1. |
__u8 |
|
This value plus 1 specifies the inferred value of num_ref_idx_l1_active_minus1. |
__s8 |
|
This value plus 26 specifies the initial value of SliceQp Y for each slice referring to the PPS. |
__u8 |
|
Specifies the difference between the luma coding tree block size and the minimum luma coding block size of coding units that convey cu_qp_delta_abs and cu_qp_delta_sign_flag. |
__s8 |
|
Specifies the offsets to the luma quantization parameter Cb. |
__s8 |
|
Specifies the offsets to the luma quantization parameter Cr. |
__u8 |
|
This value plus 1 specifies the number of tile columns partitioning the picture. |
__u8 |
|
This value plus 1 specifies the number of tile rows partitioning the picture. |
__u8 |
|
This value plus 1 specifies the width of the i-th tile column in units of coding tree blocks. |
__u8 |
|
This value plus 1 specifies the height of the i-th tile row in units of coding tree blocks. |
__s8 |
|
Specifies the default deblocking parameter offsets for beta divided by 2. |
__s8 |
|
Specifies the default deblocking parameter offsets for tC divided by 2. |
__u8 |
|
This value plus 2 specifies the value of the variable Log2ParMrgLevel. |
__u8 |
|
Applications and drivers must set this to zero. |
__u64 |
|
Picture Parameter Set Flags
|
0x00000001 |
|
|
0x00000002 |
|
|
0x00000004 |
|
|
0x00000008 |
|
|
0x00000010 |
|
|
0x00000020 |
|
|
0x00000040 |
|
|
0x00000080 |
|
|
0x00000100 |
|
|
0x00000200 |
|
|
0x00000400 |
|
|
0x00000800 |
|
|
0x00001000 |
|
|
0x00002000 |
|
|
0x00004000 |
|
|
0x00008000 |
|
|
0x00010000 |
|
|
0x00020000 |
|
|
0x00040000 |
|
|
0x00080000 |
Specifies the presence of deblocking filter control syntax elements in the PPS |
|
0x00100000 |
Specifies that tile column boundaries and likewise tile row boundaries are distributed uniformly across the picture |
V4L2_CID_STATELESS_HEVC_SLICE_PARAMS (struct)
Specifies various slice-specific parameters, especially from the NAL unit header, general slice segment header and weighted prediction parameter parts of the bitstream. These bitstream parameters are defined according to ITU H.265/HEVC. They are described in section 7.4.7 “General slice segment header semantics” of the specification. This control is a dynamically sized 1-dimensional array, V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it.
-
type v4l2_ctrl_hevc_slice_params¶
__u32 |
|
Size (in bits) of the current slice data. |
__u32 |
|
Offset (in byte) to the video data in the current slice data. |
__u32 |
|
Specifies the number of entry point offset syntax elements in the slice header.
When the driver supports it, the |
__u8 |
|
Specifies the coding type of the slice (B, P or I). |
__u8 |
|
Minus 1 specifies a temporal identifier for the NAL unit. |
__u8 |
|
(V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or V4L2_HEVC_SLICE_TYPE_B). |
__u8 |
|
Specifies the colour plane associated with the current slice. |
__s32 |
|
Specifies the picture order count. |
__u8 |
|
This value plus 1 specifies the maximum reference index for reference picture list 0 that may be used to decode the slice. |
__u8 |
|
This value plus 1 specifies the maximum reference index for reference picture list 1 that may be used to decode the slice. |
__u8 |
|
Specifies the reference index of the collocated picture used for temporal motion vector prediction. |
__u8 |
|
Specifies the maximum number of merging motion vector prediction candidates supported in the slice subtracted from 5. |
__s8 |
|
Specifies the initial value of QpY to be used for the coding blocks in the slice. |
__s8 |
|
Specifies a difference to be added to the value of pps_cb_qp_offset. |
__s8 |
|
Specifies a difference to be added to the value of pps_cr_qp_offset. |
__s8 |
|
Specifies the offset to the luma of quantization parameter qP derived in section 8.6.2 |
__s8 |
|
Specifies the offset to the cb of quantization parameter qP derived in section 8.6.2 |
__s8 |
|
Specifies the offset to the cr of quantization parameter qP derived in section 8.6.2 |
__s8 |
|
Specifies the deblocking parameter offsets for beta divided by 2. |
__s8 |
|
Specifies the deblocking parameter offsets for tC divided by 2. |
__u8 |
|
Indicates whether a picture should be displayed as a frame or as one or more fields. |
__u32 |
|
Specifies the address of the first coding tree block in the slice segment. |
__u8 |
|
The list of L0 reference elements as indices in the DPB. |
__u8 |
|
The list of L1 reference elements as indices in the DPB. |
__u16 |
|
Specifies the size, in bits, of the short-term reference picture set, described as st_ref_pic_set() in the specification, included in the slice header or SPS (section 7.3.6.1). |
__u16 |
|
Specifies the size, in bits, of the long-term reference picture set include in the slice header or SPS. It is the number of bits in the conditional block if(long_term_ref_pics_present_flag) in section 7.3.6.1 of the specification. |
__u8 |
|
Applications and drivers must set this to zero. |
struct |
|
The prediction weight coefficients for inter-picture prediction. |
__u64 |
|
Slice Parameters Flags
|
0x00000001 |
|
|
0x00000002 |
|
|
0x00000004 |
|
|
0x00000008 |
|
|
0x00000010 |
|
|
0x00000020 |
|
|
0x00000040 |
|
|
0x00000080 |
|
|
0x00000100 |
|
|
0x00000200 |
V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (integer)
Specifies entry point offsets in bytes. This control is a dynamically sized array. The number of entry point offsets is reported by the
elems
field. This bitstream parameter is defined according to ITU H.265/HEVC. They are described in section 7.4.7.1 “General slice segment header semantics” of the specification. When multiple slices are submitted in a request, the length of this array must be the sum of num_entry_point_offsets of all the slices in the request.V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (struct)
Specifies the HEVC scaling matrix parameters used for the scaling process for transform coefficients. These matrix and parameters are defined according to ITU H.265/HEVC. They are described in section 7.4.5 “Scaling list data semantics” of the specification.
-
type v4l2_ctrl_hevc_scaling_matrix¶
__u8 |
|
Scaling list is used for the scaling process for transform coefficients. The values on each scaling list are expected in raster scan order. |
__u8 |
|
Scaling list is used for the scaling process for transform coefficients. The values on each scaling list are expected in raster scan order. |
__u8 |
|
Scaling list is used for the scaling process for transform coefficients. The values on each scaling list are expected in raster scan order. |
__u8 |
|
Scaling list is used for the scaling process for transform coefficients. The values on each scaling list are expected in raster scan order. |
__u8 |
|
Scaling list is used for the scaling process for transform coefficients. The values on each scaling list are expected in raster scan order. |
__u8 |
|
Scaling list is used for the scaling process for transform coefficients. The values on each scaling list are expected in raster scan order. |
-
type v4l2_hevc_dpb_entry¶
__u64 |
|
Timestamp of the V4L2 capture buffer to use as reference, used
with B-coded and P-coded frames. The timestamp refers to the
|
__u8 |
|
Long term flag for the reference frame (V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE). The flag is set as described in the ITU HEVC specification chapter “8.3.2 Decoding process for reference picture set”. |
__u8 |
|
Whether the reference is a field picture or a frame. See HEVC dpb field pic Flags |
__s32 |
|
The picture order count of the current picture. |
__u8 |
|
Applications and drivers must set this to zero. |
HEVC dpb field pic Flags
|
0 |
(progressive) Frame |
|
1 |
Top field |
|
2 |
Bottom field |
|
3 |
Top field, bottom field, in that order |
|
4 |
Bottom field, top field, in that order |
|
5 |
Top field, bottom field, top field repeated, in that order |
|
6 |
Bottom field, top field, bottom field repeated, in that order |
|
7 |
Frame doubling |
|
8 |
Frame tripling |
|
9 |
Top field paired with previous bottom field in output order |
|
10 |
Bottom field paired with previous top field in output order |
|
11 |
Top field paired with next bottom field in output order |
|
12 |
Bottom field paired with next top field in output order |
-
type v4l2_hevc_pred_weight_table¶
__s8 |
|
The difference of the weighting factor applied to the luma prediction value for list 0. |
__s8 |
|
The additive offset applied to the luma prediction value for list 0. |
__s8 |
|
The difference of the weighting factor applied to the chroma prediction value for list 0. |
__s8 |
|
The difference of the additive offset applied to the chroma prediction values for list 0. |
__s8 |
|
The difference of the weighting factor applied to the luma prediction value for list 1. |
__s8 |
|
The additive offset applied to the luma prediction value for list 1. |
__s8 |
|
The difference of the weighting factor applied to the chroma prediction value for list 1. |
__s8 |
|
The difference of the additive offset applied to the chroma prediction values for list 1. |
__u8 |
|
The base 2 logarithm of the denominator for all luma weighting factors. |
__s8 |
|
The difference of the base 2 logarithm of the denominator for all chroma weighting factors. |
__u8 |
|
Applications and drivers must set this to zero. |
V4L2_CID_STATELESS_HEVC_DECODE_MODE (enum)
Specifies the decoding mode to use. Currently exposes slice-based and frame-based decoding but new modes might be added later on. This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE are required to set this control in order to specify the decoding mode that is expected for the buffer. Drivers may expose a single or multiple decoding modes, depending on what they can support.
-
type v4l2_stateless_hevc_decode_mode¶
|
0 |
Decoding is done at the slice granularity. The OUTPUT buffer must contain a single slice. |
|
1 |
Decoding is done at the frame granularity. The OUTPUT buffer must contain all slices needed to decode the frame. |
V4L2_CID_STATELESS_HEVC_START_CODE (enum)
Specifies the HEVC slice start code expected for each slice. This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE are required to set this control in order to specify the start code that is expected for the buffer. Drivers may expose a single or multiple start codes, depending on what they can support.
-
type v4l2_stateless_hevc_start_code¶
|
0 |
Selecting this value specifies that HEVC slices are passed to the driver without any start code. The bitstream data should be according to ITU H.265/HEVC 7.3.1.1 General NAL unit syntax, hence contains emulation prevention bytes when required. |
|
1 |
Selecting this value specifies that HEVC slices are expected to be prefixed by Annex B start codes. According to ITU H.265/HEVC valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001. |
V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (integer)
Specifies a priority identifier for the NAL unit, which will be applied to the base layer. By default this value is set to 0 for the base layer, and the next layer will have the priority ID assigned as 1, 2, 3 and so on. The video encoder can’t decide the priority id to be applied to a layer, so this has to come from client. This is applicable to H264 and valid Range is from 0 to 63. Source Rec. ITU-T H.264 (06/2019); G.7.4.1.1, G.8.8.1.
V4L2_CID_MPEG_VIDEO_LTR_COUNT (integer)
Specifies the maximum number of Long Term Reference (LTR) frames at any given time that the encoder can keep. This is applicable to the H264 and HEVC encoders.
V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (integer)
After setting this control the frame that will be queued next will be marked as a Long Term Reference (LTR) frame and given this LTR index which ranges from 0 to LTR_COUNT-1. This is applicable to the H264 and HEVC encoders. Source Rec. ITU-T H.264 (06/2019); Table 7.9
V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (bitmask)
Specifies the Long Term Reference (LTR) frame(s) to be used for encoding the next frame queued after setting this control. This provides a bitmask which consists of bits [0, LTR_COUNT-1]. This is applicable to the H264 and HEVC encoders.
V4L2_CID_STATELESS_HEVC_DECODE_PARAMS (struct)
Specifies various decode parameters, especially the references picture order count (POC) for all the lists (short, long, before, current, after) and the number of entries for each of them. These parameters are defined according to ITU H.265/HEVC. They are described in section 8.3 “Slice decoding process” of the specification.
-
type v4l2_ctrl_hevc_decode_params¶
__s32 |
|
PicOrderCntVal as described in section 8.3.1 “Decoding process for picture order count” of the specification. |
__u16 |
|
Specifies the size, in bits, of the short-term reference picture set, of the first slice described as st_ref_pic_set() in the specification, included in the slice header or SPS (section 7.3.6.1). |
__u16 |
|
Specifies the size, in bits, of the long-term reference picture set, of the first slice included in the slice header or SPS. It is the number of bits in the conditional block if(long_term_ref_pics_present_flag) in section 7.3.6.1 of the specification. |
__u8 |
|
The number of entries in |
__u8 |
|
The number of reference pictures in the short-term set that come before the current frame. |
__u8 |
|
The number of reference pictures in the short-term set that come after the current frame. |
__u8 |
|
The number of reference pictures in the long-term set. |
__u8 |
|
PocStCurrBefore as described in section 8.3.2 “Decoding process for reference picture set”: provides the index of the short term before references in DPB array. |
__u8 |
|
PocStCurrAfter as described in section 8.3.2 “Decoding process for reference picture set”: provides the index of the short term after references in DPB array. |
__u8 |
|
PocLtCurr as described in section 8.3.2 “Decoding process for reference picture set”: provides the index of the long term references in DPB array. |
__u8 |
|
When the short_term_ref_pic_set_sps_flag in the slice header is equal to 0, it is the same as the derived value NumDeltaPocs[RefRpsIdx]. It can be used to parse the RPS data in slice headers instead of skipping it with @short_term_ref_pic_set_size. When the value of short_term_ref_pic_set_sps_flag in the slice header is equal to 1, num_delta_pocs_of_ref_rps_idx shall be set to 0. |
struct |
|
The decoded picture buffer, for meta-data about reference frames. |
__u64 |
|
Decode Parameters Flags
|
0x00000001 |
|
|
0x00000002 |
|
|
0x00000004 |