From: Chen-Yu Tsai Date: Wed, 6 Jul 2022 08:21:35 +0000 (+0100) Subject: media: mediatek: vcodec: decoder: Skip alignment for default resolution X-Git-Tag: v6.6.17~6914^2~148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b6a81a31370539f1fd0e9bdd315503aa154285e;p=platform%2Fkernel%2Flinux-rpi.git media: mediatek: vcodec: decoder: Skip alignment for default resolution The default resolution of 64x64 is already aligned, according to the call to v4l_bound_align_image() in mtk_vcodec_dec_set_default_params(). Drop the redundant v4l_bound_align_image() call. This also removes one usage of ctx->max_{width,height}. Signed-off-by: Chen-Yu Tsai Tested-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c index fcb4b81..4a64877 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c @@ -180,13 +180,6 @@ void mtk_vcodec_dec_set_default_params(struct mtk_vcodec_ctx *ctx) ctx->max_width = MTK_VDEC_MAX_W; ctx->max_height = MTK_VDEC_MAX_H; - v4l_bound_align_image(&q_data->coded_width, - MTK_VDEC_MIN_W, - ctx->max_width, 4, - &q_data->coded_height, - MTK_VDEC_MIN_H, - ctx->max_height, 5, 6); - q_data->sizeimage[0] = q_data->coded_width * q_data->coded_height; q_data->bytesperline[0] = q_data->coded_width; q_data->sizeimage[1] = q_data->sizeimage[0] / 2;