drivers/media/platform/st/sti/hva/hva-h264.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/st/sti/hva/hva-h264.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/st/sti/hva/hva-h264.c- Extension
.c- Size
- 31239 bytes
- Lines
- 1064
- 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.
- 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
hva.hhva-hw.h
Detected Declarations
struct h264_profilestruct hva_h264_stereo_video_seistruct hva_h264_tdstruct hva_h264_slice_postruct hva_h264_postruct hva_h264_taskstruct hva_h264_ctxenum hva_brc_typeenum hva_entropy_coding_modeenum hva_picture_coding_typeenum hva_h264_sampling_modeenum hva_h264_nalu_typeenum hva_h264_sei_payload_typefunction hva_h264_fill_slice_headerfunction hva_h264_fill_data_nalfunction hva_h264_fill_sei_nalfunction hva_h264_prepare_taskfunction hva_h264_get_stream_sizefunction hva_h264_get_stuffing_bytesfunction hva_h264_openfunction hva_h264_closefunction hva_h264_encode
Annotated Snippet
struct h264_profile {
enum v4l2_mpeg_video_h264_level level;
u32 max_mb_per_seconds;
u32 max_frame_size;
u32 max_bitrate;
u32 max_cpb_size;
u32 min_comp_ratio;
};
static const struct h264_profile h264_infos_list[] = {
{V4L2_MPEG_VIDEO_H264_LEVEL_1_0, 1485, 99, 64, 175, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_1B, 1485, 99, 128, 350, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_1_1, 3000, 396, 192, 500, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_1_2, 6000, 396, 384, 1000, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_1_3, 11880, 396, 768, 2000, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_2_0, 11880, 396, 2000, 2000, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_2_1, 19800, 792, 4000, 4000, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_2_2, 20250, 1620, 4000, 4000, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_3_0, 40500, 1620, 10000, 10000, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_3_1, 108000, 3600, 14000, 14000, 4},
{V4L2_MPEG_VIDEO_H264_LEVEL_3_2, 216000, 5120, 20000, 20000, 4},
{V4L2_MPEG_VIDEO_H264_LEVEL_4_0, 245760, 8192, 20000, 25000, 4},
{V4L2_MPEG_VIDEO_H264_LEVEL_4_1, 245760, 8192, 50000, 62500, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_4_2, 522240, 8704, 50000, 62500, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_5_0, 589824, 22080, 135000, 135000, 2},
{V4L2_MPEG_VIDEO_H264_LEVEL_5_1, 983040, 36864, 240000, 240000, 2}
};
enum hva_brc_type {
BRC_TYPE_NONE = 0,
BRC_TYPE_CBR = 1,
BRC_TYPE_VBR = 2,
BRC_TYPE_VBR_LOW_DELAY = 3
};
enum hva_entropy_coding_mode {
CAVLC = 0,
CABAC = 1
};
enum hva_picture_coding_type {
PICTURE_CODING_TYPE_I = 0,
PICTURE_CODING_TYPE_P = 1,
PICTURE_CODING_TYPE_B = 2
};
enum hva_h264_sampling_mode {
SAMPLING_MODE_NV12 = 0,
SAMPLING_MODE_UYVY = 1,
SAMPLING_MODE_RGB3 = 3,
SAMPLING_MODE_XRGB4 = 4,
SAMPLING_MODE_NV21 = 8,
SAMPLING_MODE_VYUY = 9,
SAMPLING_MODE_BGR3 = 11,
SAMPLING_MODE_XBGR4 = 12,
SAMPLING_MODE_RGBX4 = 20,
SAMPLING_MODE_BGRX4 = 28
};
enum hva_h264_nalu_type {
NALU_TYPE_UNKNOWN = 0,
NALU_TYPE_SLICE = 1,
NALU_TYPE_SLICE_DPA = 2,
NALU_TYPE_SLICE_DPB = 3,
NALU_TYPE_SLICE_DPC = 4,
NALU_TYPE_SLICE_IDR = 5,
NALU_TYPE_SEI = 6,
NALU_TYPE_SPS = 7,
NALU_TYPE_PPS = 8,
NALU_TYPE_AU_DELIMITER = 9,
NALU_TYPE_SEQ_END = 10,
NALU_TYPE_STREAM_END = 11,
NALU_TYPE_FILLER_DATA = 12,
NALU_TYPE_SPS_EXT = 13,
NALU_TYPE_PREFIX_UNIT = 14,
NALU_TYPE_SUBSET_SPS = 15,
NALU_TYPE_SLICE_AUX = 19,
NALU_TYPE_SLICE_EXT = 20
};
enum hva_h264_sei_payload_type {
SEI_BUFFERING_PERIOD = 0,
SEI_PICTURE_TIMING = 1,
SEI_STEREO_VIDEO_INFO = 21,
SEI_FRAME_PACKING_ARRANGEMENT = 45
};
/*
* stereo Video Info struct
*/
Annotation
- Immediate include surface: `hva.h`, `hva-hw.h`.
- Detected declarations: `struct h264_profile`, `struct hva_h264_stereo_video_sei`, `struct hva_h264_td`, `struct hva_h264_slice_po`, `struct hva_h264_po`, `struct hva_h264_task`, `struct hva_h264_ctx`, `enum hva_brc_type`, `enum hva_entropy_coding_mode`, `enum hva_picture_coding_type`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
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.