summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/hantro/hantro_v4l2.c
diff options
context:
space:
mode:
authorJernej Skrabec <jernej.skrabec@gmail.com>2022-07-06 19:28:57 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-07-17 11:00:05 +0100
commitb273deab2bac4edc5db6314e7b5f9a16a7e73440 (patch)
tree51335df51ee0bd78af27c067bf308bfeb8366b91 /drivers/staging/media/hantro/hantro_v4l2.c
parent8d03c2ab881b3d891380629f4be83cb2a9f66964 (diff)
downloadlinux-b273deab2bac4edc5db6314e7b5f9a16a7e73440.tar.bz2
media: hantro: postproc: Fix buffer size calculation
When allocating aux buffers for postprocessing, it's assumed that base buffer size is the same as that of output. Coincidentally, that's true most of the time, but not always. 10-bit source also needs aux buffer size which is appropriate for 10-bit native format, even if the output format is 8-bit. Similarly, mv sizes and other extra buffer size also depends on source width/height, not destination. Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Tested-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging/media/hantro/hantro_v4l2.c')
-rw-r--r--drivers/staging/media/hantro/hantro_v4l2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/hantro/hantro_v4l2.c b/drivers/staging/media/hantro/hantro_v4l2.c
index 334f18a4120d..2c7a805289e7 100644
--- a/drivers/staging/media/hantro/hantro_v4l2.c
+++ b/drivers/staging/media/hantro/hantro_v4l2.c
@@ -118,7 +118,7 @@ hantro_find_format(const struct hantro_ctx *ctx, u32 fourcc)
return NULL;
}
-static const struct hantro_fmt *
+const struct hantro_fmt *
hantro_get_default_fmt(const struct hantro_ctx *ctx, bool bitstream)
{
const struct hantro_fmt *formats;