diff options
author | Benjamin Gaignard <[email protected]> | 2022-08-29 18:21:55 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <[email protected]> | 2022-09-24 08:59:05 +0200 |
commit | f64853ad7f964b3bf7c1d63b27ca7ef972797a1c (patch) | |
tree | 2ecfd6873a288433720c3a17f741c06dca0a9994 | |
parent | 8a438580a09ecef78cd6c5825d628b4d5ae1c127 (diff) |
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 <[email protected]>
Reviewed-by: Ezequiel Garcia <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
-rw-r--r-- | drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c | 2 |
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) |