You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
[media] vcodec: mediatek: Add Mediatek VP9 Video Decoder Driver
Add vp9 decoder driver for MT8173 [mchehab@s-opensource.org: make checkpatch.pl happy] Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
988fcf0c0e
commit
f77e89854b
@@ -5,6 +5,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 \
|
||||
mtk_vcodec_dec_drv.o \
|
||||
vdec_drv_if.o \
|
||||
vdec_vpu_if.o \
|
||||
|
||||
@@ -43,6 +43,11 @@ static struct mtk_video_fmt mtk_video_formats[] = {
|
||||
.type = MTK_FMT_DEC,
|
||||
.num_planes = 1,
|
||||
},
|
||||
{
|
||||
.fourcc = V4L2_PIX_FMT_VP9,
|
||||
.type = MTK_FMT_DEC,
|
||||
.num_planes = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct mtk_codec_framesizes mtk_vdec_framesizes[] = {
|
||||
@@ -56,6 +61,11 @@ static const struct mtk_codec_framesizes mtk_vdec_framesizes[] = {
|
||||
.stepwise = { MTK_VDEC_MIN_W, MTK_VDEC_MAX_W, 16,
|
||||
MTK_VDEC_MIN_H, MTK_VDEC_MAX_H, 16 },
|
||||
},
|
||||
{
|
||||
.fourcc = V4L2_PIX_FMT_VP9,
|
||||
.stepwise = { MTK_VDEC_MIN_W, MTK_VDEC_MAX_W, 16,
|
||||
MTK_VDEC_MIN_H, MTK_VDEC_MAX_H, 16 },
|
||||
},
|
||||
};
|
||||
|
||||
#define NUM_SUPPORTED_FRAMESIZE ARRAY_SIZE(mtk_vdec_framesizes)
|
||||
|
||||
967
drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
Normal file
967
drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "mtk_vcodec_drv.h"
|
||||
|
||||
#include "vdec_drv_if.h"
|
||||
|
||||
struct vdec_common_if {
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
const struct vdec_common_if *get_h264_dec_comm_if(void);
|
||||
const struct vdec_common_if *get_vp8_dec_comm_if(void);
|
||||
const struct vdec_common_if *get_vp9_dec_comm_if(void);
|
||||
|
||||
int vdec_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc)
|
||||
{
|
||||
@@ -37,6 +38,9 @@ int vdec_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc)
|
||||
case V4L2_PIX_FMT_VP8:
|
||||
ctx->dec_if = get_vp8_dec_comm_if();
|
||||
break;
|
||||
case V4L2_PIX_FMT_VP9:
|
||||
ctx->dec_if = get_vp9_dec_comm_if();
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user