STRUCT V4L2_HEVC_PRED_WEIGHT_TABLE(9)
π 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 0delta_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 1delta_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 1luma_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
- 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