STRUCT V4L2_CTRL_AV1_FRAME(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 when skip_mode is equal to 1.
  • 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 params
  • global_motion β€” global motion params 🌍
  • flags β€” see V4L2_AV1_FRAME_FLAG_{}
  • frame_type β€” specifies the AV1 frame type
  • order_hint β€” specifies OrderHintBits least 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 β€” add 1 to get the frame's width.
  • frame_height_minus_1 β€” add 1 to get the frame's height
  • render_width_minus_1 β€” add 1 to get the render width of the frame in luma samples.
  • render_height_minus_1 β€” add 1 to 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 of DecCT clock ticks counted from the removal time of the last random access point for operating point opNum.
  • 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 the OrderHints variable 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 into reference_frame_ts when decoding inter-frames. The meaning of this array is the same as in the specification. The timestamp refers to the timestamp field in struct v4l2_buffer. Use v4l2_timeval_to_ns to convert the struct timeval to 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