STRUCT V4L2_CTRL_HEVC_DECODE_PARAMS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct v4l2_ctrl_hevc_decode_params β€” HEVC decode parameters ✨

okay so this is from the Kernel API Manual (section 9, the kernel API one), and bestie, it's literally the struct that carries all your HEVC decode parameters 🎬 no cap, it's giving "everything the kernel needs to know about this frame" energy.


🌸 SYNOPSIS 🌸

here's the whole shape of it, verbatim, don't @ me:

struct v4l2_ctrl_hevc_decode_params {
    __s32 pic_order_cnt_val;
    __u16 short_term_ref_pic_set_size;
    __u16 long_term_ref_pic_set_size;
    __u8 num_active_dpb_entries;
    __u8 num_poc_st_curr_before;
    __u8 num_poc_st_curr_after;
    __u8 num_poc_lt_curr;
    __u8 poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
    __u8 poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
    __u8 poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
    __u8 num_delta_pocs_of_ref_rps_idx;
    __u8 reserved[3];
    struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
    __u64 flags;
};

πŸ¦‹ MEMBERS πŸ¦‹

okay let's go member by member, i got you 🫢

  • pic_order_cnt_val β€” the picture order count, periodt. that's literally it, that's the whole vibe.
  • short_term_ref_pic_set_size β€” says how big the short-term reference pictures set is, the one that's included in the SPS of the first slice πŸ“
  • long_term_ref_pic_set_size β€” same deal but long-term: the size of the long-term reference pictures set, included in the SPS of the first slice ✨
  • num_active_dpb_entries β€” how many entries are actually in dpb πŸ‘€
  • num_poc_st_curr_before β€” the number of reference pictures in the short-term set that come before the current frame βͺ
  • num_poc_st_curr_after β€” the number of reference pictures in the short-term set that come after the current frame ⏩
  • num_poc_lt_curr β€” the number of reference pictures in the long-term set πŸ•°οΈ
  • poc_st_curr_before β€” hands you the index of the short-term before references in the DPB array πŸ”
  • poc_st_curr_after β€” hands you the index of the short-term after references in the DPB array πŸ”Ž
  • poc_lt_curr β€” hands you the index of the long-term references in the DPB array 🧚
  • num_delta_pocs_of_ref_rps_idx β€” same as the derived value NumDeltaPocs[RefRpsIdx] πŸ‘‘ and here's the tea: you can use it to parse the RPS data in slice headers instead of skipping it with short_term_ref_pic_set_size.
  • reserved β€” padding field. should be zeroed by applications. like, zero it out, fr fr, don't leave it messy πŸ™ˆ
  • dpb β€” the decoded picture buffer, holding the meta-data about reference frames πŸ“¦
  • flags β€” see V4L2_HEVC_DECODE_PARAM_FLAG_{} 🚩

⭐ SEE ALSO ⭐

starting with the kernel file, icon behavior:

  • Kernel file ./include/uapi/linux/v4l2-controls.h
  • 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_hevc_pred_weight_table(9)
  • struct v4l2_ctrl_hevc_slice_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)

and that's the whole page bestie, you ate that πŸ’– this came out of ./include/uapi/linux, dated October 2026 β€” screaming, crying, throwing up, it's giving very much "the future is now" ⏰✨ mwah, go decode some HEVC, ily πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from