Skip to content

Commit 2d683b6

Browse files
Tiffany Linmchehab
authored andcommitted
[media] vcodec:mediatek: Refine H264 encoder driver
This patch : 1. remove field and function that unused anymore 2. add support V4L2_MPEG_VIDEO_H264_LEVEL_4_2 Signed-off-by: Tiffany Lin <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 158d607 commit 2d683b6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ enum venc_h264_bs_mode {
6161

6262
/*
6363
* struct venc_h264_vpu_config - Structure for h264 encoder configuration
64+
* AP-W/R : AP is writer/reader on this item
65+
* VPU-W/R: VPU is write/reader on this item
6466
* @input_fourcc: input fourcc
6567
* @bitrate: target bitrate (in bps)
6668
* @pic_w: picture width. Picture size is visible stream resolution, in pixels,
@@ -94,20 +96,22 @@ struct venc_h264_vpu_config {
9496

9597
/*
9698
* struct venc_h264_vpu_buf - Structure for buffer information
97-
* @align: buffer alignment (in bytes)
99+
* AP-W/R : AP is writer/reader on this item
100+
* VPU-W/R: VPU is write/reader on this item
98101
* @iova: IO virtual address
99102
* @vpua: VPU side memory addr which is used by RC_CODE
100103
* @size: buffer size (in bytes)
101104
*/
102105
struct venc_h264_vpu_buf {
103-
u32 align;
104106
u32 iova;
105107
u32 vpua;
106108
u32 size;
107109
};
108110

109111
/*
110112
* struct venc_h264_vsi - Structure for VPU driver control and info share
113+
* AP-W/R : AP is writer/reader on this item
114+
* VPU-W/R: VPU is write/reader on this item
111115
* This structure is allocated in VPU side and shared to AP side.
112116
* @config: h264 encoder configuration
113117
* @work_bufs: working buffer information in VPU side
@@ -150,12 +154,6 @@ struct venc_h264_inst {
150154
struct mtk_vcodec_ctx *ctx;
151155
};
152156

153-
static inline void h264_write_reg(struct venc_h264_inst *inst, u32 addr,
154-
u32 val)
155-
{
156-
writel(val, inst->hw_base + addr);
157-
}
158-
159157
static inline u32 h264_read_reg(struct venc_h264_inst *inst, u32 addr)
160158
{
161159
return readl(inst->hw_base + addr);
@@ -214,6 +212,8 @@ static unsigned int h264_get_level(struct venc_h264_inst *inst,
214212
return 40;
215213
case V4L2_MPEG_VIDEO_H264_LEVEL_4_1:
216214
return 41;
215+
case V4L2_MPEG_VIDEO_H264_LEVEL_4_2:
216+
return 42;
217217
default:
218218
mtk_vcodec_debug(inst, "unsupported level %d", level);
219219
return 31;

0 commit comments

Comments
 (0)