vdec_if_decode(9)
πΈ vdec_if_decode(9) π
okay bestie, welcome to the kernel API manual for vdec_if_decode β yes that's the page name and yes it's a whole manual page, ninth section, we're fancy now. Let's get into it β¨
β¨ NAME β¨
vdec_if_decode β trigger decode π¬
Like, it literally just... triggers the decode. That's the whole vibe. Main character energy fr.
π¦ SYNOPSIS π¦
int vdec_if_decode (struct mtk_vcodec_dec_ctx *ctx , struct
mtk_vcodec_mem *bs , struct vdec_fb *fb , bool *res_chg );
That's it, that's the whole signature π«Ά four params, one int coming back at you.
π ARGUMENTS π
ctx[in] β the v4l2 context. it's giving "the setup", the whole situation you're working inside πbs[in] β input bitstream. the actual data going in π₯fb[in] β frame buffer to store decoded frame. and here's the lil twist: when it's null, it means parse header only. so like, no buffer = just peeking at the header, no full decode. iykyk πres_chg[out] β resolution change. this one's an output bestie, so it's telling you something: it happens if the currentbshave different picture width/height. so if the bitstream switched up its dimensions, you'll hear about it here πβ¨
β NOTE β
To flush the decoder when reaching EOF, set input bitstream as NULL.
That's the trick, that's the move β EOF coming up? null that bs and let it flush π
don't forget it.
π RETURN π
0on success π slay-EIOon unrecoverable error π that's the "something is deeply wrong and we cannot save it" one
π SEE ALSO π
- Kernel file
./drivers/media/platform/mediatek/vcodec/decoder/vdec_drv_if.henum vdec_fb_status(9)struct vdec_fb_node(9)vdec_if_init(9)vdec_if_deinit(9)vdec_if_get_param(9)
go read those too, they're all part of the same little family π§
aaaand that's the page!! π this one came from ./drivers/media/platform/media... and the version/date stamp on it says October 2026, page vdec_if_decode(9). ty for coming to my ted talk, mwah ππ¦β¨
π¦ 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