STRUCT V4L2_CTRL_MPEG2_PICTURE(9)
π struct v4l2_ctrl_mpeg2_picture(9) β the Kernel API Manual, bestie edition π
okay so you're deep in the kernel docs (iconic of you, honestly) and you've stumbled into the Kernel API Manual page for struct v4l2_ctrl_mpeg2_picture β say it with me, it's the MPEG-2 picture header π¦. yes it's a mouthful. no we're not skipping it. let's go β¨
πΈ NAME πΈ
struct v4l2_ctrl_mpeg2_picture β MPEG-2 picture header, literally exactly what it says on the tin π
β SYNOPSIS β
here's the whole struct, bestie, character for character, no edits no cap π
struct v4l2_ctrl_mpeg2_picture {
__u64 backward_ref_ts;
__u64 forward_ref_ts;
__u32 flags;
__u8 f_code[2][2];
__u8 picture_coding_type;
__u8 picture_structure;
__u8 intra_dc_precision;
__u8 reserved[5];
};
π«Ά Members π«Ά
backward_ref_tsβ timestamp of the V4L2 capture buffer you're using as the reference for backward prediction. that's your time-travel-in-reverse buddy βͺforward_ref_tsβ timestamp of the V4L2 capture buffer you're using as the reference for forward prediction. heads up (this is the important bit π): these timestamps refer to thetimestampfield instruct v4l2_buffer. usev4l2_timeval_to_nsto convert thestruct timevalto a__u64β do not freestyle this, fr fr.flagsβ seeV4L2_MPEG2_PIC_FLAG_{}. the curly braces are the manpage being mysterious, not me, i promise πf_codeβ see MPEG-2 specification. that's the whole vibe. the spec has the tea βpicture_coding_typeβ also see MPEG-2 specification β¨picture_structureβ seeV4L2_MPEG2_PIC_{}_FIELDπintra_dc_precisionβ see MPEG-2 specification (again, yes, it's a spec household here) πreservedβ padding field. Should be zeroed by applications. that's not a suggestion, bestie, zero it out π
π₯ Description π₯
all of the members on this structure match the picture header and picture coding extension syntaxes as specified by the MPEG-2 specification. that's it. that's the whole description. it's giving "the spec is the spec" and honestly? respect. π
π SEE ALSO π
the reading list is long, but every single one of these is here because you deserve the full set, no gatekeeping in this house π
first up, the file itself: Kernel file ./include/uapi/linux/v4l2-controls.h
then, alphabetically-ish by video-codec friend group:
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_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)
ngl that's a lot of cross-references but every one of them is real and every one of them is staying. iykyk π§
and that's the whole page, bestie β you ate π
this cutie came out of ./include/uapi/linux, dated October 2026, which is honestly future energy of the highest order βπΈπ go forth and decode your picture headers, main character π«Άππ
π¦ 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