Message ID | 20220223034008.15781-10-yunfei.dong@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: mtk-vcodec: support for M8192 decoder | expand |
Le mercredi 23 février 2022 à 11:40 +0800, Yunfei Dong a écrit : > For vp8 not support 4K, need to disable it. This patch will need to be changed after you have moved this code into the proper ioctl. > > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > --- > drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > index bae43938ee37..ba188d16f0fb 100644 > --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > @@ -532,7 +532,8 @@ static int vidioc_enum_framesizes(struct file *file, void *priv, > fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE; > fsize->stepwise = dec_pdata->vdec_framesizes[i].stepwise; > if (!(ctx->dev->dec_capability & > - VCODEC_CAPABILITY_4K_DISABLED)) { > + VCODEC_CAPABILITY_4K_DISABLED) && > + fsize->pixel_format != V4L2_PIX_FMT_VP8_FRAME) { > mtk_v4l2_debug(3, "4K is enabled"); > fsize->stepwise.max_width = > VCODEC_DEC_4K_CODED_WIDTH;
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c index bae43938ee37..ba188d16f0fb 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c @@ -532,7 +532,8 @@ static int vidioc_enum_framesizes(struct file *file, void *priv, fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE; fsize->stepwise = dec_pdata->vdec_framesizes[i].stepwise; if (!(ctx->dev->dec_capability & - VCODEC_CAPABILITY_4K_DISABLED)) { + VCODEC_CAPABILITY_4K_DISABLED) && + fsize->pixel_format != V4L2_PIX_FMT_VP8_FRAME) { mtk_v4l2_debug(3, "4K is enabled"); fsize->stepwise.max_width = VCODEC_DEC_4K_CODED_WIDTH;
For vp8 not support 4K, need to disable it. Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)