STRUCT AMVDEC_SESSION(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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 the vdec core struct πŸ‘‘
  • fh β€” the v4l2 file handle
  • m2m_dev β€” the v4l2 m2m device
  • m2m_ctx β€” the v4l2 m2m context
  • ctrl_handler β€” the V4L2 control handler
  • ctrl_min_buf_capture β€” V4L2 control V4L2_CID_MIN_BUFFERS_FOR_CAPTURE
  • lock β€” cap & out queues lock πŸ”’
  • fmt_out β€” vdec pixel format for the OUTPUT queue
  • pixfmt_cap β€” V4L2 pixel format for the CAPTURE queue
  • src_buffer_size β€” size in bytes of the OUTPUT buffers' only plane
  • width β€” current picture width
  • height β€” current picture height
  • colorspace β€” current colorspace 🌈
  • ycbcr_enc β€” current ycbcr_enc
  • quantization β€” current quantization
  • xfer_func β€” current transfer function
  • pixelaspect β€” Pixel Aspect Ratio reported by the decoder
  • esparser_queued_bufs β€” number of buffers currently queued into ESPARSER
  • esparser_queue_work β€” work struct for the ESPARSER to process src buffers
  • streamon_cap β€” stream on flag for capture queue
  • streamon_out β€” stream on flag for output queue
  • sequence_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 buffers
  • changed_format β€” the format changed (iconic behavior honestly)
  • canvas_alloc β€” array of all the canvas IDs allocated 🎨
  • canvas_num β€” number of canvas IDs allocated
  • vififo_vaddr β€” virtual address for the VIFIFO
  • vififo_paddr β€” physical address for the VIFIFO
  • vififo_size β€” size of the VIFIFO dma alloc
  • bufs_recycle β€” list of buffers that need to be recycled ♻️
  • bufs_recycle_lock β€” lock for the bufs_recycle list πŸ”’
  • recycle_thread β€” task struct for the recycling thread
  • timestamps β€” chronological list of src timestamps ⏰
  • ts_spinlock β€” spinlock for the timestamps list
  • last_irq_jiffies β€” tracks last time the vdec triggered an IRQ ⚑
  • last_offset β€” tracks last offset of vififo
  • wrap_count β€” number of times the vififo wrapped around πŸŒ€
  • fw_idx_to_vb2_idx β€” firmware buffer index to vb2 buffer index
  • status β€” current decoding status
  • priv β€” 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