STRUCT VDEC_H264_VSI(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay bestie, welcome to the Kernel API Manual ✨ β€” yes we're reading kernel docs together, this is our bonding era 🫢

🌸 NAME 🌸

struct vdec_h264_vsi β€” it's the shared memory for decode information exchange between VPU and Host, no cap πŸ’…

So here's the tea: the memory is allocated by the VPU, then mapped to the Host inside vpu_dec_init(), and freed in vpu_dec_deinit() by the VPU. literally the whole lifecycle, managed for you πŸŽ€

And because kernel people love abbreviations, here's the legend iykyk:

  • AP-W/R β€” AP is the writer/reader on this item
  • VPU-W/R β€” VPU is the write/reader on this item
ngl keep those letters in your head, every member below tells you who's allowed to touch it πŸ‘€

✨ SYNOPSIS ✨

struct vdec_h264_vsi {
    u64 pred_buf_dma;
    u64 mv_buf_dma[H264_MAX_MV_NUM];
    struct vdec_h264_dec_info dec;
    struct vdec_pic_info pic;
    struct v4l2_rect crop;
    struct mtk_h264_dec_slice_param h264_slice_params;
 };

look at her. six members. main character energy πŸ‘‘ copy it exactly, don't be cute with it πŸ™ˆ


πŸ¦‹ Members πŸ¦‹

  • pred_buf_dma β€” HW working prediction buffer dma address. that's (AP-W, VPU-R) β€” the AP writes it, the VPU reads it, that's the whole arrangement πŸ’«
  • mv_buf_dma β€” HW working motion vector buffer dma address, and yes it's an array [H264_MAX_MV_NUM] because one buffer was never gonna be enough 😭 (AP-W, VPU-R)
  • dec β€” the decode information πŸ’œ (AP-R, VPU-W) β€” so the VPU writes, AP reads. flip-flop from the two above, keep up bestie 🩷
  • pic β€” picture information 🌈 (AP-R, VPU-W)
  • crop β€” crop information πŸŽ€ (AP-R, VPU-W)
  • h264_slice_params β€” the parameters that hardware use to decode πŸ”₯ like, the actual instructions, the moment of truth, the reason we're all here ⭐
vibe check: three members are AP-writes/VPU-reads, three are VPU-writes/AP-reads. do not mix them up or it's giving πŸ’€

🌟 SEE ALSO 🌟

  • Kernel file ./drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_h264_req_if.c β€” go read the source, it ate πŸ’…
  • struct vdec_h264_dec_info(9)
  • struct vdec_h264_slice_inst(9)

and that's the page, bestie πŸ§šπŸ’– this little gem lives over at ./drivers/media/platform/media... and the manual's dated October 2026 β€” so yeah, it's from the future, iconic behavior honestly πŸ¦‹βœ¨ periodt πŸ’…

πŸ“¦ where this page comes from