STRUCT MTK_JPEG_CTX(9)
π struct mtk_jpeg_ctx(9) π
okay so bestie, welcome to the Kernel API Manual β this little cutie is struct mtk_jpeg_ctx, and it's literally the device context data. that's the whole vibe. it's the main character struct that holds all the state for one JPEG device context π
β¨ SYNOPSIS β¨
struct mtk_jpeg_ctx {
struct mtk_jpeg_dev *jpeg;
struct mtk_jpeg_q_data out_q;
struct mtk_jpeg_q_data cap_q;
struct v4l2_fh fh;
enum mtk_jpeg_ctx_state state;
bool enable_exif;
u8 enc_quality;
u8 restart_interval;
struct v4l2_ctrl_handler ctrl_hdl;
struct work_struct jpeg_work;
u32 total_frame_num;
struct list_head dst_done_queue;
spinlock_t done_queue_lock;
u32 last_done_frame_num;
};
no cap, that's the whole struct π
πΈ Members πΈ
okay so member by member, here's the tea:
jpegβ the JPEG IP device for this context. like, the actual hardware bae this whole thing belongs to π«Άout_qβ source (output) queue informationcap_qβ destination queue informationfhβ the V4L2 file handlestateβ the state of the context (iykyk, it's giving "where are we at rn")enable_exifβ enables exif mode of the jpeg encoder β¨enc_qualityβ jpeg encoder qualityrestart_intervalβ jpeg encoder restart intervalctrl_hdlβ controls handlerjpeg_workβ jpeg encoder workqueue (she's working, periodt π )total_frame_numβ encoded frame numberdst_done_queueβ encoded frame buffer queuedone_queue_lockβ encoded frame operation spinlock πlast_done_frame_numβ the last encoded frame number
π¦ SEE ALSO π¦
- Kernel file
./drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.henummtk_jpeg_ctx_state(9),struct mtk_jpeg_variant(9),struct mtk_jpegenc_clk(9),struct mtk_jpegdec_clk(9),struct mtk_jpegenc_comp_dev(9),struct mtk_jpegdec_comp_dev(9),struct mtk_jpeg_dev(9),struct mtk_jpeg_fmt(9),struct mtk_jpeg_q_data(9)
like, go read the whole friend group, they all ate π₯
bestie this one's short and sweet β no scary warnings, no deprecated drama, just a struct living her best life in the MediaTek JPEG driver π
and that's the page! shoutout to ./drivers/media/platform/media... for the source, version vibes from October 2026 π
, and the icon herself, struct mtk_jpeg_ctx(9) β she's booked, she's blessed, she's in the kernel ππ§ββοΈ
π¦ 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