]> git.baikalelectronics.ru Git - kernel.git/commit
media: hantro: HEVC: Fix output frame chroma offset
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>
Thu, 14 Apr 2022 15:50:59 +0000 (17:50 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:22 +0000 (11:02 +0200)
commit3b60fd6fd9f3525feb923afb526c716ab2b0e01c
treefb52345873aa2d6837ebf5a603a77350f75bbbc2
parentfc27735b96f9ea488fc5e905434ee102b7f9cbf8
media: hantro: HEVC: Fix output frame chroma offset

Hantro decoder doesn't take care of the requested and aligned size
of the capture buffer.
Stop using the bitstream width/height and use capture frame size
stored in the context to get the correct values.

hantro_hevc_chroma_offset() and hantro_hevc_motion_vectors_offset()
are only used in hantro_g2_hevc_dec.c so take the opportunity
to move them here.

fluster HEVC score goes up from 77 to 85 successful tests (over 147)
with this patch.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/hantro/hantro_g2_hevc_dec.c
drivers/staging/media/hantro/hantro_hevc.c
drivers/staging/media/hantro/hantro_hw.h