提交 ed17f89e 编写于 作者: P Pin-yen Lin 提交者: Mauro Carvalho Chehab

media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats

When VCODEC_CAPABILITY_4K_DISABLED is not set in dec_capability, skip
formats that are not MTK_FMT_DEC so only decoder formats is updated in
mtk_init_vdec_params.

Fixes: e25528e1 ("media: mediatek: vcodec: Use 4K frame size when supported by stateful decoder")
Signed-off-by: NPin-yen Lin <treapking@chromium.org>
Reviewed-by: NChen-Yu Tsai <wenst@chromium.org>
Reviewed-by: NYunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
上级 76743b29
......@@ -584,6 +584,9 @@ static void mtk_init_vdec_params(struct mtk_vcodec_ctx *ctx)
if (!(ctx->dev->dec_capability & VCODEC_CAPABILITY_4K_DISABLED)) {
for (i = 0; i < num_supported_formats; i++) {
if (mtk_video_formats[i].type != MTK_FMT_DEC)
continue;
mtk_video_formats[i].frmsize.max_width =
VCODEC_DEC_4K_CODED_WIDTH;
mtk_video_formats[i].frmsize.max_height =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册