Commit f77e8985 authored by Tiffany Lin's avatar Tiffany Lin Committed by Mauro Carvalho Chehab

[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: default avatarTiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 988fcf0c
...@@ -5,6 +5,7 @@ obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec-dec.o \ ...@@ -5,6 +5,7 @@ obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec-dec.o \
mtk-vcodec-dec-y := vdec/vdec_h264_if.o \ mtk-vcodec-dec-y := vdec/vdec_h264_if.o \
vdec/vdec_vp8_if.o \ vdec/vdec_vp8_if.o \
vdec/vdec_vp9_if.o \
mtk_vcodec_dec_drv.o \ mtk_vcodec_dec_drv.o \
vdec_drv_if.o \ vdec_drv_if.o \
vdec_vpu_if.o \ vdec_vpu_if.o \
......
...@@ -43,6 +43,11 @@ static struct mtk_video_fmt mtk_video_formats[] = { ...@@ -43,6 +43,11 @@ static struct mtk_video_fmt mtk_video_formats[] = {
.type = MTK_FMT_DEC, .type = MTK_FMT_DEC,
.num_planes = 1, .num_planes = 1,
}, },
{
.fourcc = V4L2_PIX_FMT_VP9,
.type = MTK_FMT_DEC,
.num_planes = 1,
},
}; };
static const struct mtk_codec_framesizes mtk_vdec_framesizes[] = { static const struct mtk_codec_framesizes mtk_vdec_framesizes[] = {
...@@ -56,6 +61,11 @@ 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, .stepwise = { MTK_VDEC_MIN_W, MTK_VDEC_MAX_W, 16,
MTK_VDEC_MIN_H, MTK_VDEC_MAX_H, 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) #define NUM_SUPPORTED_FRAMESIZE ARRAY_SIZE(mtk_vdec_framesizes)
......
This diff is collapsed.
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "mtk_vcodec_drv.h" #include "mtk_vcodec_drv.h"
#include "vdec_drv_if.h"
struct vdec_common_if { struct vdec_common_if {
/** /**
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
const struct vdec_common_if *get_h264_dec_comm_if(void); 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_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) 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) ...@@ -37,6 +38,9 @@ int vdec_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc)
case V4L2_PIX_FMT_VP8: case V4L2_PIX_FMT_VP8:
ctx->dec_if = get_vp8_dec_comm_if(); ctx->dec_if = get_vp8_dec_comm_if();
break; break;
case V4L2_PIX_FMT_VP9:
ctx->dec_if = get_vp9_dec_comm_if();
break;
default: default:
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment