STRUCT V4L2_CTRL_HEVC_SPS(9)
π 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 thevps_video_parameter_set_idof 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 variableMaxPicOrderCntLsb. iconic variable name nglsps_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 theSpsMaxLatencyPicturesarray. 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 ofst_ref_pic_setsyntax 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β seeV4L2_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
- 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