STRUCT V4L2_CTRL_H264_SCALING_MATRIX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct v4l2_ctrl_h264_scaling_matrix(9) β€” Kernel API Manual πŸŽ€

okay so this is a page from the Kernel API Manual, and bestie, it's all about the H264 scaling matrices. tiny struct, big personality. let's get into it ✨


🌸 NAME 🌸

struct v4l2_ctrl_h264_scaling_matrix β€” H264 scaling matrices. that's literally it, that's the whole name. iconic.


✨ SYNOPSIS ✨

struct v4l2_ctrl_h264_scaling_matrix {
    __u8 scaling_list_4x4[6][16];
    __u8 scaling_list_8x8[6][64];
 };

look at her. two arrays, six lists each, and she knows exactly what she's doing πŸ’…


🫢 Members 🫢

  • scaling_list_4x4 β€” the scaling matrix after applying the inverse scanning process, no cap. expected list order is Intra Y, Intra Cb, Intra Cr, Inter Y, Inter Cb, Inter Cr β€” memorize that order, it's giving choreography. the values on each scaling list are expected in raster scan order. πŸŽ€
  • scaling_list_8x8 β€” same deal, scaling matrix after applying the inverse scanning process. but the list order is Intra Y, Inter Y, Intra Cb, Inter Cb, Intra Cr, Inter Cr β€” yes it's different from the 4x4 one, keep up bestie 😭 and the values on each scaling list are expected in raster scan order too. ✨

πŸ”₯ Description πŸ”₯

real talk: the list order is different for the 4x4 and 8x8 matrices, and that's not a vibe check fail, that's per the H264 specification. check table 7-2 "Assignment of mnemonic names to scaling list indices and specification of fall-back rule" β€” the spec said what it said, we're just respecting it πŸ’€

do not mix up the two orders. the 4x4 list and the 8x8 list are NOT arranged the same way and the spec table is right there, go read it 🌸

🌈 SEE ALSO 🌈

starting with the kernel file: ./include/uapi/linux/v4l2-controls.h

then the whole extended friend group, in order, no skips:

  • 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_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_frame(9)
  • struct v4l2_ctrl_av1_film_grain(9)

like I said. the whole group chat. 🫢


and that's the page!! tysm for reading, mwah πŸ’– this one came from ./include/uapi/linux, version dated October 2026, under the title struct v4l2_...aling_matrix(9) β€” slay, go decode some h264, ily, bye πŸŽ€πŸŒ·βœ¨

πŸ“¦ where this page comes from