]> git.baikalelectronics.ru Git - kernel.git/commit
media: hantro: postproc: Fix buffer size calculation
authorJernej Skrabec <jernej.skrabec@gmail.com>
Wed, 6 Jul 2022 18:28:57 +0000 (19:28 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 17 Jul 2022 10:00:05 +0000 (11:00 +0100)
commit823497d0c6970ae37e8f7ce2254dc172b73f3df9
tree51335df51ee0bd78af27c067bf308bfeb8366b91
parent76c24454aeba679d0331c214e43fd3f14ddbca4d
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>
drivers/staging/media/hantro/hantro_postproc.c
drivers/staging/media/hantro/hantro_v4l2.c
drivers/staging/media/hantro/hantro_v4l2.h