STRUCT V4L2_CTRL_HEVC_SPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct v4l2_ctrl_hevc_sps(9) πŸ’–

okay bestie, welcome to the Linux Kernel API Manual ✨ β€” this one's from struct v4l2_ctrl_hevc_sps(9), and it's about to be your new obsession if you're doing HEVC/H.265 stuff. no cap.


🌸 NAME 🌸

struct v4l2_ctrl_hevc_sps β€” ITU-T Rec. H.265: Sequence parameter set. literally the SPS. the blueprint. the main character of your decode pipeline πŸŽ€


✨ SYNOPSIS ✨

struct v4l2_ctrl_hevc_sps {
    __u8 video_parameter_set_id;
    __u8 seq_parameter_set_id;
    __u16 pic_width_in_luma_samples;
    __u16 pic_height_in_luma_samples;
    __u8 bit_depth_luma_minus8;
    __u8 bit_depth_chroma_minus8;
    __u8 log2_max_pic_order_cnt_lsb_minus4;
    __u8 sps_max_dec_pic_buffering_minus1;
    __u8 sps_max_num_reorder_pics;
    __u8 sps_max_latency_increase_plus1;
    __u8 log2_min_luma_coding_block_size_minus3;
    __u8 log2_diff_max_min_luma_coding_block_size;
    __u8 log2_min_luma_transform_block_size_minus2;
    __u8 log2_diff_max_min_luma_transform_block_size;
    __u8 max_transform_hierarchy_depth_inter;
    __u8 max_transform_hierarchy_depth_intra;
    __u8 pcm_sample_bit_depth_luma_minus1;
    __u8 pcm_sample_bit_depth_chroma_minus1;
    __u8 log2_min_pcm_luma_coding_block_size_minus3;
    __u8 log2_diff_max_min_pcm_luma_coding_block_size;
    __u8 num_short_term_ref_pic_sets;
    __u8 num_long_term_ref_pics_sps;
    __u8 chroma_format_idc;
    __u8 sps_max_sub_layers_minus1;
    __u8 reserved[6];
    __u64 flags;
};

look at all those fields, it's giving structured-data couture πŸ’…


πŸ¦‹ MEMBERS πŸ¦‹

okay so here's the field-by-field breakdown, no skipping, we're doing all of them:

  • video_parameter_set_id β€” specifies the value of the vps_video_parameter_set_id of the active VPS. yes, it points at the VPS, bestie 🫢
  • seq_parameter_set_id β€” provides an identifier for the SPS so other syntax elements can reference it. it's the SPS's little name tag 🏷️
  • pic_width_in_luma_samples β€” specifies the width of each decoded picture, measured in units of luma samples ✨
  • pic_height_in_luma_samples β€” specifies the height of each decoded picture, also in units of luma samples. width's partner in crime πŸ’œ
  • bit_depth_luma_minus8 β€” this value plus 8 specifies the bit depth of the samples of the luma array. the "minus8" is doing so much heavy lifting here 😭
  • bit_depth_chroma_minus8 β€” this value plus 8 specifies the bit depth of the samples of the chroma arrays. same energy, chroma edition 🌈
  • log2_max_pic_order_cnt_lsb_minus4 β€” this value plus 4 specifies the value of the variable MaxPicOrderCntLsb. iconic variable name ngl
  • sps_max_dec_pic_buffering_minus1 β€” this value plus 1 specifies the maximum required size of the decoded picture buffer for the codec video sequence. buffer budgeting, we love to see it πŸ’–
  • sps_max_num_reorder_pics β€” indicates the maximum allowed number of pictures. that's it, that's the field πŸŽ€
  • sps_max_latency_increase_plus1 β€” when it's not equal to 0, it's used to compute the value of the SpsMaxLatencyPictures array. zero means it's sitting this one out πŸ¦‹
  • log2_min_luma_coding_block_size_minus3 β€” plus 3 specifies the minimum luma coding block size. block size, minimized, slay πŸ”₯
  • log2_diff_max_min_luma_coding_block_size β€” specifies the difference between the maximum and the minimum luma coding block size. it's literally just the gap between them πŸ’…
  • log2_min_luma_transform_block_size_minus2 β€” plus 2 specifies the minimum luma transform block size. yes, minus 2 this time, not minus 3, stay focused πŸ‘‘
  • log2_diff_max_min_luma_transform_block_size β€” specifies the difference between the maximum and the minimum luma transform block size. diff-but-make-it-transform 🌸
  • max_transform_hierarchy_depth_inter β€” specifies the maximum hierarchy depth for transform units of coding units coded in inter prediction mode. big depth energy 🧚
  • max_transform_hierarchy_depth_intra β€” specifies the maximum hierarchy depth for transform units of coding units coded in intra prediction mode. the intra twin, equally iconic πŸ’œ
  • pcm_sample_bit_depth_luma_minus1 β€” this value plus 1 specifies the number of bits used to represent each of the PCM sample values of the luma component. PCM besties rise πŸ“
  • pcm_sample_bit_depth_chroma_minus1 β€” this value plus 1 specifies the number of bits used to represent each of the PCM sample values of the chroma components πŸŽ€
  • log2_min_pcm_luma_coding_block_size_minus3 β€” this value plus 3 specifies the minimum size of coding blocks. (still the PCM corner of the struct, iykyk) ✨
  • log2_diff_max_min_pcm_luma_coding_block_size β€” specifies the difference between the maximum and the minimum size of coding blocks πŸ¦‹
  • num_short_term_ref_pic_sets β€” specifies the number of st_ref_pic_set syntax structures included in the SPS. count 'em 🌟
  • num_long_term_ref_pics_sps β€” specifies the number of candidate long-term reference pictures that are specified in the SPS. long-term commitment, we respect it πŸ’–
  • chroma_format_idc β€” specifies the chroma sampling 🌈
  • sps_max_sub_layers_minus1 β€” this value plus 1 specifies the maximum number of temporal sub-layers. layers on layers on layers πŸ§šβ€β™€οΈ
  • reserved β€” padding field. Should be zeroed by applications. like, actually zero it, bestie, don't leave it messy πŸ™ˆ
  • flags β€” see V4L2_HEVC_SPS_FLAG_{} πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/uapi/linux/v4l2-controls.h β€” and the whole extended universe of friends, in order:

  • 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_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, the whole codec friend group showed up πŸ’€πŸ’–


and that's the whole page bestie!! every field, every flag, every reference, all present and accounted for. go forth and parse your sequence parameter sets, you gorgeous nerd πŸ«ΆπŸ’…

and finally, the cute sign-off: this masterpiece lives at ./include/uapi/linux, dated October 2026, and it's page struct v4l2_ctrl_hevc_sps(9) β€” catch you in the group chat πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from