drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c- Extension
.c- Size
- 61317 bytes
- Lines
- 2210
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/module.hlinux/slab.hmedia/videobuf2-dma-contig.hmedia/v4l2-vp9.h../mtk_vcodec_dec.h../../common/mtk_vcodec_intr.h../vdec_drv_base.h../vdec_drv_if.h../vdec_vpu_if.h
Detected Declarations
struct vdec_vp9_slice_frame_ctxstruct vdec_vp9_slice_frame_countsstruct vdec_vp9_slice_counts_mapstruct vdec_vp9_slice_uncompressed_headerstruct vdec_vp9_slice_compressed_headerstruct vdec_vp9_slice_tilesstruct vdec_vp9_slice_referencestruct vdec_vp9_slice_framestruct vdec_vp9_slice_init_vsistruct vdec_vp9_slice_memstruct vdec_vp9_slice_bsstruct vdec_vp9_slice_fbstruct vdec_vp9_slice_statestruct vdec_vp9_slice_vsistruct vdec_vp9_slice_pfcstruct vdec_vp9_slice_refstruct vdec_vp9_slice_instanceenum vdec_vp9_slice_resolution_levelfunction vdec_vp9_slice_init_default_frame_ctxfunction vdec_vp9_slice_alloc_working_bufferfunction vdec_vp9_slice_free_working_bufferfunction vdec_vp9_slice_vsi_from_remotefunction vdec_vp9_slice_vsi_to_remotefunction vdec_vp9_slice_tile_offsetfunction vdec_vp9_slice_setup_single_from_src_to_dstfunction vdec_vp9_slice_setup_lat_from_src_buffunction vdec_vp9_slice_setup_hdrfunction vdec_vp9_slice_setup_frame_ctxfunction vdec_vp9_slice_setup_loop_filterfunction vdec_vp9_slice_setup_quantizationfunction vdec_vp9_slice_setup_segmentationfunction vdec_vp9_slice_setup_tilefunction vdec_vp9_slice_setup_statefunction vdec_vp9_slice_setup_ref_idxfunction vdec_vp9_slice_setup_pfcfunction vdec_vp9_slice_setup_lat_bufferfunction vdec_vp9_slice_setup_prob_bufferfunction vdec_vp9_slice_setup_seg_bufferfunction vdec_vp9_slice_setup_tile_bufferfunction vdec_vp9_slice_setup_latfunction vdec_vp9_slice_map_counts_eob_coeffunction vdec_vp9_slice_counts_map_helperfunction vdec_vp9_slice_map_to_coeffunction vdec_vp9_slice_map_from_coeffunction vdec_vp9_slice_framectx_map_helperfunction vdec_vp9_slice_helper_map_framectxfunction vdec_vp9_slice_update_probfunction vdec_vp9_slice_update_single
Annotated Snippet
struct vdec_vp9_slice_frame_ctx {
struct {
u8 probs[6][3];
u8 padding[2];
} coef_probs[4][2][2][6];
u8 y_mode_prob[4][16];
u8 switch_interp_prob[4][16];
u8 seg[32]; /* ignore */
u8 comp_inter_prob[16];
u8 comp_ref_prob[16];
u8 single_ref_prob[5][2];
u8 single_ref_prob_padding[6];
u8 joint[3];
u8 joint_padding[13];
struct {
u8 sign;
u8 classes[10];
u8 padding[5];
} sign_classes[2];
struct {
u8 class0[1];
u8 bits[10];
u8 padding[5];
} class0_bits[2];
struct {
u8 class0_fp[2][3];
u8 fp[3];
u8 class0_hp;
u8 hp;
u8 padding[5];
} class0_fp_hp[2];
u8 uv_mode_prob[10][16];
u8 uv_mode_prob_padding[2][16];
u8 partition_prob[16][4];
u8 inter_mode_probs[7][4];
u8 skip_probs[4];
u8 tx_p8x8[2][4];
u8 tx_p16x16[2][4];
u8 tx_p32x32[2][4];
u8 intra_inter_prob[8];
};
/*
* struct vdec_vp9_slice_frame_counts - vp9 counts tables footprint
*/
struct vdec_vp9_slice_frame_counts {
union {
struct {
u32 band_0[3];
u32 padding0[1];
u32 band_1_5[5][6];
u32 padding1[2];
} eob_branch[4][2][2];
u32 eob_branch_space[256 * 4];
};
struct {
u32 band_0[3][4];
u32 band_1_5[5][6][4];
} coef_probs[4][2][2];
u32 intra_inter[4][2];
u32 comp_inter[5][2];
u32 comp_inter_padding[2];
u32 comp_ref[5][2];
u32 comp_ref_padding[2];
u32 single_ref[5][2][2];
u32 inter_mode[7][4];
u32 y_mode[4][12];
u32 uv_mode[10][10];
u32 partition[16][4];
u32 switchable_interp[4][4];
u32 tx_p8x8[2][2];
u32 tx_p16x16[2][4];
u32 tx_p32x32[2][4];
u32 skip[3][4];
u32 joint[4];
struct {
u32 sign[2];
u32 class0[2];
Annotation
- Immediate include surface: `linux/module.h`, `linux/slab.h`, `media/videobuf2-dma-contig.h`, `media/v4l2-vp9.h`, `../mtk_vcodec_dec.h`, `../../common/mtk_vcodec_intr.h`, `../vdec_drv_base.h`, `../vdec_drv_if.h`.
- Detected declarations: `struct vdec_vp9_slice_frame_ctx`, `struct vdec_vp9_slice_frame_counts`, `struct vdec_vp9_slice_counts_map`, `struct vdec_vp9_slice_uncompressed_header`, `struct vdec_vp9_slice_compressed_header`, `struct vdec_vp9_slice_tiles`, `struct vdec_vp9_slice_reference`, `struct vdec_vp9_slice_frame`, `struct vdec_vp9_slice_init_vsi`, `struct vdec_vp9_slice_mem`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.