media: mtk-vcodec: vdec: support stateless H.264 decoding

Add support for H.264 decoding using the stateless API, as supported by
MT8183. This support takes advantage of the V4L2 H.264 reference list
builders.

[acourbot: refactor, cleanup and split]
[tzungbi: fix missing kerneldoc issue]
[hverkuil: fix trivial kerneldoc typo]

Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Co-developed-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Yunfei Dong
2021-08-06 06:15:27 +02:00
committed by Mauro Carvalho Chehab
parent 8cdc3794b2
commit 06fa5f757d
5 changed files with 780 additions and 0 deletions

View File

@@ -314,6 +314,7 @@ config VIDEO_MEDIATEK_VCODEC
select V4L2_MEM2MEM_DEV
select VIDEO_MEDIATEK_VCODEC_VPU if VIDEO_MEDIATEK_VPU
select VIDEO_MEDIATEK_VCODEC_SCP if MTK_SCP
select V4L2_H264
help
Mediatek video codec driver provides HW capability to
encode and decode in a range of video formats on MT8173

View File

@@ -7,6 +7,7 @@ obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec-dec.o \
mtk-vcodec-dec-y := vdec/vdec_h264_if.o \
vdec/vdec_vp8_if.o \
vdec/vdec_vp9_if.o \
vdec/vdec_h264_req_if.o \
mtk_vcodec_dec_drv.o \
vdec_drv_if.o \
vdec_vpu_if.o \

File diff suppressed because it is too large Load Diff

View File

@@ -19,6 +19,9 @@ int vdec_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc)
int ret = 0;
switch (fourcc) {
case V4L2_PIX_FMT_H264_SLICE:
ctx->dec_if = &vdec_h264_slice_if;
break;
case V4L2_PIX_FMT_H264:
ctx->dec_if = &vdec_h264_if;
break;

View File

@@ -55,6 +55,7 @@ struct vdec_fb_node {
};
extern const struct vdec_common_if vdec_h264_if;
extern const struct vdec_common_if vdec_h264_slice_if;
extern const struct vdec_common_if vdec_vp8_if;
extern const struct vdec_common_if vdec_vp9_if;