aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>2022-08-29 18:21:55 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-09-24 08:59:05 +0200
commitf64853ad7f964b3bf7c1d63b27ca7ef972797a1c (patch)
tree2ecfd6873a288433720c3a17f741c06dca0a9994 /drivers/media/platform
parent8a438580a09ecef78cd6c5825d628b4d5ae1c127 (diff)
downloadlinux-f64853ad7f964b3bf7c1d63b27ca7ef972797a1c.tar.gz
media: hantro: HEVC: Fix chroma offset computation
The chroma offset depends of the bitstream depth. Make sure that ctx->bit_depth is used to compute it. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c b/drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c
index 233ecd863d5f..a917079a6ed3 100644
--- a/drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c
+++ b/drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c
@@ -12,7 +12,7 @@
static size_t hantro_hevc_chroma_offset(struct hantro_ctx *ctx)
{
- return ctx->dst_fmt.width * ctx->dst_fmt.height;
+ return ctx->dst_fmt.width * ctx->dst_fmt.height * ctx->bit_depth / 8;
}
static size_t hantro_hevc_motion_vectors_offset(struct hantro_ctx *ctx)