STRUCT V4L2_CTRL_AV1_FRAME(9)
β¨ struct v4l2_ctrl_av1_frame(9) β¨
okay so this is from the Kernel API Manual, and bestie, it's literally the blueprint for an AV1 Frame Header OBU π stay with me, it's a lot but we're gonna slay it together.
πΈ NAME πΈ
struct v4l2_ctrl_av1_frame β this whole struct is the representation of an AV1 Frame Header OBU. like, it's giving "the frame header, but make it C" π
π¦ SYNOPSIS π¦
struct v4l2_ctrl_av1_frame {
struct v4l2_av1_tile_info tile_info;
struct v4l2_av1_quantization quantization;
__u8 superres_denom;
struct v4l2_av1_segmentation segmentation;
struct v4l2_av1_loop_filter loop_filter;
struct v4l2_av1_cdef cdef;
__u8 skip_mode_frame[2];
__u8 primary_ref_frame;
struct v4l2_av1_loop_restoration loop_restoration;
struct v4l2_av1_global_motion global_motion;
__u32 flags;
enum v4l2_av1_frame_type frame_type;
__u32 order_hint;
__u32 upscaled_width;
enum v4l2_av1_interpolation_filter interpolation_filter;
enum v4l2_av1_tx_mode tx_mode;
__u32 frame_width_minus_1;
__u32 frame_height_minus_1;
__u16 render_width_minus_1;
__u16 render_height_minus_1;
__u32 current_frame_id;
__u32 buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS];
__u8 reserved[4];
__u32 order_hints[V4L2_AV1_TOTAL_REFS_PER_FRAME];
__u64 reference_frame_ts[V4L2_AV1_TOTAL_REFS_PER_FRAME];
__s8 ref_frame_idx[V4L2_AV1_REFS_PER_FRAME];
__u8 refresh_frame_flags;
};
π MEMBERS π
get comfy, we're going through every single one π₯
tile_infoβ the tile info, bestie. tiles!! that's the vibe.quantizationβ the quantization params πsuperres_denomβ the denominator for the upscaling ratio.segmentationβ segmentation params β¨loop_filterβ loop filter params π«cdefβ cdef params π§skip_mode_frameβ tells you which frames to use for compound prediction whenskip_modeis equal to1.primary_ref_frameβ specifies which reference frame contains the CDF values and other state that should be loaded at the start of the frame. (main character reference frame tbh π)loop_restorationβ loop restoration paramsglobal_motionβ global motion params πflagsβ seeV4L2_AV1_FRAME_FLAG_{}frame_typeβ specifies the AV1 frame typeorder_hintβ specifiesOrderHintBitsleast significant bits of the expected output order for this frame.upscaled_widthβ the upscaled width.interpolation_filterβ specifies the filter selection used for performing inter prediction.tx_modeβ specifies how the transform size is determined.frame_width_minus_1β add1to get the frame's width.frame_height_minus_1β add1to get the frame's heightrender_width_minus_1β add1to get the render width of the frame in luma samples.render_height_minus_1β add1to get the render height of the frame in luma samples.current_frame_idβ specifies the frame id number for the current frame. Frame id numbers are additional information that do not affect the decoding process, but they do provide decoders with a way of detecting missing reference frames so that appropriate action can be taken. so like, it's a vibe check for your reference frames πbuffer_removal_timeβ specifies the frame removal time in units ofDecCTclock ticks counted from the removal time of the last random access point for operating pointopNum.reservedβ padding field. Should be zeroed by applications. π«Ά
no cap: zero it out. applications should zero it β that's the whole assignment.
order_hintsβ specifies the expected output order hint for each reference frame. This field corresponds to theOrderHintsvariable from the specification (section 5.9.2 "Uncompressed header syntax"). As such, this is only used for non-intra frames and ignored otherwise.order_hints[0]is always ignored. π yeah, slot zero gets no love, that's just how it is.reference_frame_tsβ the V4L2 timestamp of the reference frame slots.ref_frame_idxβ used to index intoreference_frame_tswhen decoding inter-frames. The meaning of this array is the same as in the specification. The timestamp refers to thetimestampfield instruct v4l2_buffer. Usev4l2_timeval_to_nsto convert thestruct timevalto a__u64. π that conversion is not optional, bestie, write it down.refresh_frame_flagsβ contains a bitmask that specifies which reference frame slots will be updated with the current frame after it is decoded. glow-up in progress π₯
π SEE ALSO π
Kernel file ./include/uapi/linux/v4l2-controls.h enum v4l2_mpeg_video_av1_profile(9), enum v4l2_mpeg_video_av1_level(9), enum v4l2_stateless_h264_decode_mode(9), enum v4l2_stateless_h264_start_code(9), struct v4l2_ctrl_h264_sps(9), struct v4l2_ctrl_h264_pps(9), struct v4l2_ctrl_h264_scaling_matrix(9), struct v4l2_ctrl_h264_pred_weights(9), struct v4l2_h264_reference(9), struct v4l2_ctrl_h264_slice_params(9), struct v4l2_h264_dpb_entry(9), struct v4l2_ctrl_h264_decode_params(9), struct v4l2_ctrl_fwht_params(9), struct v4l2_vp8_segment(9), struct v4l2_vp8_loop_filter(9), struct v4l2_vp8_quantization(9), struct v4l2_vp8_entropy(9), struct v4l2_vp8_entropy_coder_state(9), struct v4l2_ctrl_vp8_frame(9), struct v4l2_ctrl_mpeg2_sequence(9), struct v4l2_ctrl_mpeg2_picture(9), struct v4l2_ctrl_mpeg2_quantisation(9), struct v4l2_ctrl_hevc_sps(9), struct v4l2_ctrl_hevc_pps(9), struct v4l2_hevc_dpb_entry(9), struct v4l2_hevc_pred_weight_table(9), struct v4l2_ctrl_hevc_slice_params(9), struct v4l2_ctrl_hevc_decode_params(9), struct v4l2_ctrl_hevc_scaling_matrix(9), struct v4l2_vp9_loop_filter(9), struct v4l2_vp9_quantization(9), struct v4l2_vp9_segmentation(9), struct v4l2_ctrl_vp9_frame(9), struct v4l2_vp9_mv_probs(9), struct v4l2_ctrl_vp9_compressed_hdr(9), struct v4l2_ctrl_av1_sequence(9), struct v4l2_ctrl_av1_tile_group_entry(9), enum v4l2_av1_warp_model(9), enum v4l2_av1_reference_frame(9), struct v4l2_av1_global_motion(9), enum v4l2_av1_frame_restoration_type(9), struct v4l2_av1_loop_restoration(9), struct v4l2_av1_cdef(9), enum v4l2_av1_segment_feature(9), struct v4l2_av1_segmentation(9), struct v4l2_av1_loop_filter(9), struct v4l2_av1_quantization(9), struct v4l2_av1_tile_info(9), enum v4l2_av1_frame_type(9), enum v4l2_av1_interpolation_filter(9), enum v4l2_av1_tx_mode(9), struct v4l2_ctrl_av1_film_grain(9)
that's the whole page, bestie β go forth and decode π¦π
mwah π this page came from ./include/uapi/linux and it's dated October 2026, and the page itself is struct v4l2_ctrl_av1_frame(9). ily, go read the spec π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms