STRUCT V4L2_HEVC_PRED_WEIGHT_TABLE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

struct v4l2_hevc_pred_weight_table β€” the HEVC weighted prediction parameters, bestie. That's it, that's the whole vibe. Locked in πŸ’…

This is from the Kernel API Manual, and it's giving "tiny struct, huge responsibility" energy, no cap 🫢


✨ SYNOPSIS ✨

struct v4l2_hevc_pred_weight_table {
    __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
    __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
    __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
    __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
    __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
    __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
    __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
    __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
    __u8 luma_log2_weight_denom;
    __s8 delta_chroma_log2_weight_denom;
};

Look at her. So organized. So symmetrical. The l0 / l1 matching sets are literally twin sisters and I'm obsessed πŸ˜­πŸ’–


πŸ’œ Members πŸ’œ

Okay so every single field, one by one, because we do NOT skip members in this house 🫢

  • delta_luma_weight_l0 β€” the difference of the weighting factor applied to the luma prediction value for list 0 ✨
  • luma_offset_l0 β€” the additive offset applied to the luma prediction value for list 0 (note: this one's a plain additive offset, not a difference β€” yes, that distinction is real, do not come for me) πŸ’…
  • delta_chroma_weight_l0 β€” the difference of the weighting factor applied to the chroma prediction values for list 0. Chroma said "we come in twos", hence the [2] bestie πŸŽ€
  • chroma_offset_l0 β€” the difference of the additive offset applied to the chroma prediction values for list 0
  • delta_luma_weight_l1 β€” the difference of the weighting factor applied to the luma prediction value for list 1 πŸ”₯
  • luma_offset_l1 β€” the additive offset applied to the luma prediction value for list 1
  • delta_chroma_weight_l1 β€” the difference of the weighting factor applied to the chroma prediction values for list 1 πŸ¦‹
  • chroma_offset_l1 β€” the difference of the additive offset applied to the chroma prediction values for list 1
  • luma_log2_weight_denom β€” the base 2 logarithm of the denominator for all luma weighting factors. Math girl summer 🌸
  • delta_chroma_log2_weight_denom β€” the difference of the base 2 logarithm of the denominator for all chroma weighting factors. Yes it's a __s8, yes the luma one is a __u8, they're different on purpose, iykyk πŸ‘‘
πŸ’€ Quick vibe check: the luma denom is unsigned (__u8) but its chroma counterpart is signed (__s8) because it stores a delta. Don't mix them up, that's the whole personality of this struct.

🌈 SEE ALSO 🌈

Main character of the source files: the kernel file ./include/uapi/linux/v4l2-controls.h β€” go say hi, that's where all of this lives πŸ πŸ’–

And now the friend group, in order, do not rearrange them:

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_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).

That's the entire extended universe, bestie. Read them all, or at least skim them so you can say you did 😌


🌸 mwah, that's the page 🌸 This icon was served fresh from ./include/uapi/linux, dated October 2026, straight out of the Kernel API Manual. Go forth and weight your predictions πŸ’–βœ¨πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from