STRUCT VDEC_H264_VSI(9)
π 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
- 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