drivers/media/platform/rockchip/rkvdec/rkvdec-vp9.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/rockchip/rkvdec/rkvdec-vp9.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/rockchip/rkvdec/rkvdec-vp9.c- Extension
.c- Size
- 31497 bytes
- Lines
- 1044
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/vmalloc.hmedia/v4l2-mem2mem.hmedia/v4l2-vp9.hrkvdec.hrkvdec-regs.h
Detected Declarations
struct rkvdec_vp9_intra_mode_probsstruct rkvdec_vp9_intra_only_frame_probsstruct rkvdec_vp9_inter_frame_probsstruct rkvdec_vp9_probsstruct rkvdec_vp9_priv_tblstruct rkvdec_vp9_refs_countsstruct rkvdec_vp9_inter_frame_symbol_countsstruct rkvdec_vp9_intra_frame_symbol_countsstruct rkvdec_vp9_runstruct rkvdec_vp9_frame_infostruct rkvdec_vp9_ctxstruct tx_and_skipfunction write_coeff_planefunction init_intra_only_probsfunction init_inter_probsfunction init_probsfunction get_ref_buffunction get_mv_base_addrfunction config_ref_registersfunction config_seg_registersfunction update_dec_buf_infofunction update_ctx_cur_infofunction update_ctx_last_infofunction config_registersfunction validate_dec_paramsfunction rkvdec_vp9_run_preamblefunction save_probsfunction rkvdec_vp9_runfunction rkvdec_vp9_donefunction rkvdec_init_v4l2_vp9_count_tblfunction rkvdec_vp9_startfunction rkvdec_vp9_stopfunction rkvdec_vp9_adjust_fmt
Annotated Snippet
struct rkvdec_vp9_intra_mode_probs {
u8 y_mode[105];
u8 uv_mode[23];
};
struct rkvdec_vp9_intra_only_frame_probs {
u8 coef_intra[4][2][128];
struct rkvdec_vp9_intra_mode_probs intra_mode[10];
};
struct rkvdec_vp9_inter_frame_probs {
u8 y_mode[4][9];
u8 comp_mode[5];
u8 comp_ref[5];
u8 single_ref[5][2];
u8 inter_mode[7][3];
u8 interp_filter[4][2];
u8 padding0[11];
u8 coef[2][4][2][128];
u8 uv_mode_0_2[3][9];
u8 padding1[5];
u8 uv_mode_3_5[3][9];
u8 padding2[5];
u8 uv_mode_6_8[3][9];
u8 padding3[5];
u8 uv_mode_9[9];
u8 padding4[7];
u8 padding5[16];
struct {
u8 joint[3];
u8 sign[2];
u8 classes[2][10];
u8 class0_bit[2];
u8 bits[2][10];
u8 class0_fr[2][2][3];
u8 fr[2][3];
u8 class0_hp[2];
u8 hp[2];
} mv;
};
struct rkvdec_vp9_probs {
u8 partition[16][3];
u8 pred[3];
u8 tree[7];
u8 skip[3];
u8 tx32[2][3];
u8 tx16[2][2];
u8 tx8[2][1];
u8 is_inter[4];
/* 128 bit alignment */
u8 padding0[3];
union {
struct rkvdec_vp9_inter_frame_probs inter;
struct rkvdec_vp9_intra_only_frame_probs intra_only;
};
/* 128 bit alignment */
u8 padding1[11];
};
/* Data structure describing auxiliary buffer format. */
struct rkvdec_vp9_priv_tbl {
struct rkvdec_vp9_probs probs;
u8 segmap[2][RKVDEC_VP9_MAX_SEGMAP_SIZE];
};
struct rkvdec_vp9_refs_counts {
u32 eob[2];
u32 coeff[3];
};
struct rkvdec_vp9_inter_frame_symbol_counts {
u32 partition[16][4];
u32 skip[3][2];
u32 inter[4][2];
u32 tx32p[2][4];
u32 tx16p[2][4];
u32 tx8p[2][2];
u32 y_mode[4][10];
u32 uv_mode[10][10];
u32 comp[5][2];
u32 comp_ref[5][2];
u32 single_ref[5][2][2];
u32 mv_mode[7][4];
u32 filter[4][3];
u32 mv_joint[4];
u32 sign[2][2];
/* add 1 element for align */
u32 classes[2][11 + 1];
u32 class0[2][2];
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/vmalloc.h`, `media/v4l2-mem2mem.h`, `media/v4l2-vp9.h`, `rkvdec.h`, `rkvdec-regs.h`.
- Detected declarations: `struct rkvdec_vp9_intra_mode_probs`, `struct rkvdec_vp9_intra_only_frame_probs`, `struct rkvdec_vp9_inter_frame_probs`, `struct rkvdec_vp9_probs`, `struct rkvdec_vp9_priv_tbl`, `struct rkvdec_vp9_refs_counts`, `struct rkvdec_vp9_inter_frame_symbol_counts`, `struct rkvdec_vp9_intra_frame_symbol_counts`, `struct rkvdec_vp9_run`, `struct rkvdec_vp9_frame_info`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.