STRUCT AMVDEC_SESSION(9)
π struct amvdec_session(9) β Kernel API Manual π
okay bestie, so this is a page from the Kernel API Manual and it's literally all about struct amvdec_session β the struct that holds all your decoding session parameters. no cap, it's giving "one struct to rule them all" energy π
β¨ NAME β¨
struct amvdec_session β decoding session parameters π¦
πΈ SYNOPSIS πΈ
struct amvdec_session {
struct amvdec_core *core;
struct v4l2_fh fh;
struct v4l2_m2m_dev *m2m_dev;
struct v4l2_m2m_ctx *m2m_ctx;
struct v4l2_ctrl_handler ctrl_handler;
struct v4l2_ctrl *ctrl_min_buf_capture;
struct mutex lock;
const struct amvdec_format *fmt_out;
u32 pixfmt_cap;
u32 src_buffer_size;
u32 width;
u32 height;
u32 colorspace;
u8 ycbcr_enc;
u8 quantization;
u8 xfer_func;
struct v4l2_fract pixelaspect;
atomic_t esparser_queued_bufs;
struct work_struct esparser_queue_work;
unsigned int streamon_cap, streamon_out;
unsigned int sequence_cap, sequence_out;
unsigned int should_stop;
unsigned int keyframe_found;
unsigned int num_dst_bufs;
unsigned int changed_format;
u8 canvas_alloc[MAX_CANVAS];
u32 canvas_num;
void *vififo_vaddr;
dma_addr_t vififo_paddr;
u32 vififo_size;
struct list_head bufs_recycle;
struct mutex bufs_recycle_lock;
struct task_struct *recycle_thread;
struct list_head timestamps;
spinlock_t ts_spinlock;
u64 last_irq_jiffies;
u32 last_offset;
u32 wrap_count;
u32 fw_idx_to_vb2_idx[32];
enum amvdec_status status;
void *priv;
};
π Members π
bestie there are SO many fields, grab a snack π β let's go through every single one, no skips:
coreβ a reference to thevdeccore struct πfhβ the v4l2 file handlem2m_devβ the v4l2 m2m devicem2m_ctxβ the v4l2 m2m contextctrl_handlerβ the V4L2 control handlerctrl_min_buf_captureβ V4L2 controlV4L2_CID_MIN_BUFFERS_FOR_CAPTURElockβ cap & out queues lock πfmt_outβ vdec pixel format for the OUTPUT queuepixfmt_capβ V4L2 pixel format for the CAPTURE queuesrc_buffer_sizeβ size in bytes of the OUTPUT buffers' only planewidthβ current picture widthheightβ current picture heightcolorspaceβ current colorspace πycbcr_encβ currentycbcr_encquantizationβ current quantizationxfer_funcβ current transfer functionpixelaspectβ Pixel Aspect Ratio reported by the decoderesparser_queued_bufsβ number of buffers currently queued into ESPARSEResparser_queue_workβ work struct for the ESPARSER to process src buffersstreamon_capβ stream on flag for capture queuestreamon_outβ stream on flag for output queuesequence_capβ capture sequence counter π’sequence_outβ output sequence counter π’should_stopβ flag set if userspace signaled EOS via command or empty buffer πkeyframe_foundβ flag set once a keyframe has been parsed πnum_dst_bufsβ number of destination bufferschanged_formatβ the format changed (iconic behavior honestly)canvas_allocβ array of all the canvas IDs allocated π¨canvas_numβ number of canvas IDs allocatedvififo_vaddrβ virtual address for the VIFIFOvififo_paddrβ physical address for the VIFIFOvififo_sizeβ size of the VIFIFO dma allocbufs_recycleβ list of buffers that need to be recycled β»οΈbufs_recycle_lockβ lock for thebufs_recyclelist πrecycle_threadβ task struct for the recycling threadtimestampsβ chronological list of src timestamps β°ts_spinlockβ spinlock for thetimestampslistlast_irq_jiffiesβ tracks last time the vdec triggered an IRQ β‘last_offsetβ tracks last offset of vififowrap_countβ number of times the vififo wrapped around πfw_idx_to_vb2_idxβ firmware buffer index to vb2 buffer indexstatusβ current decoding statusprivβ codec private data π
π¦ SEE ALSO π¦
Kernel file ./drivers/staging/media/meson/vdec/vdec.h struct amvdec_timestamp(9), struct amvdec_core(9), struct amvdec_ops(9), struct amvdec_codec_ops(9), struct amvdec_format(9)
and that's the whole vibe check bestie π this little icon came from ./drivers/staging/media/meson/..., October 2026, and the page itself is struct amvdec_session(9) β go slay your decoding session fr fr π
β¨π
π¦ 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