Commit 042584e9 authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab

media: hantro: fix extra MV/MC sync space calculation

Add space for MVs and MC sync data to the capture buffers depending on
whether the post processor will be enabled for the new capture format
passed to TRY_FMT, not the currently set capture format.
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 1b3bb574
...@@ -295,7 +295,7 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f, ...@@ -295,7 +295,7 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f,
* +---------------------------+ * +---------------------------+
*/ */
if (ctx->vpu_src_fmt->fourcc == V4L2_PIX_FMT_H264_SLICE && if (ctx->vpu_src_fmt->fourcc == V4L2_PIX_FMT_H264_SLICE &&
!hantro_needs_postproc(ctx, ctx->vpu_dst_fmt)) !hantro_needs_postproc(ctx, fmt))
pix_mp->plane_fmt[0].sizeimage += pix_mp->plane_fmt[0].sizeimage +=
64 * MB_WIDTH(pix_mp->width) * 64 * MB_WIDTH(pix_mp->width) *
MB_WIDTH(pix_mp->height) + 32; MB_WIDTH(pix_mp->height) + 32;
......
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