From: Philipp Zabel Date: Fri, 7 Jul 2017 09:58:29 +0000 (-0400) Subject: media: coda: align internal mpeg4 framebuffers to 16x16 macroblocks X-Git-Tag: v4.14-rc6~35^2~584 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=551c675782dd4c4441f2c6a8a42380eb7f961616;p=platform%2Fkernel%2Flinux-rpi.git media: coda: align internal mpeg4 framebuffers to 16x16 macroblocks This fixes visual artifacts in the first macroblock row of encoded MPEG-4 video output caused by 8 additional lines of luma data leaking into the chroma planes of the internal reference framebuffers: the buffer size is rounded up to a multiple of 16x16 macroblock size, same as for the h.264 encoder. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index a4abeab..2f31c672 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c @@ -394,7 +394,8 @@ static int coda_alloc_framebuffers(struct coda_ctx *ctx, int i; if (ctx->codec->src_fourcc == V4L2_PIX_FMT_H264 || - ctx->codec->dst_fourcc == V4L2_PIX_FMT_H264) { + ctx->codec->dst_fourcc == V4L2_PIX_FMT_H264 || + ctx->codec->dst_fourcc == V4L2_PIX_FMT_MPEG4) { width = round_up(q_data->width, 16); height = round_up(q_data->height, 16); } else {