linux/drivers/staging/media
Jonas Karlman 329f268821 media: hantro: Fix H264 motion vector buffer offset
A decoded 8-bit 4:2:0 frame need memory for up to 448 bytes per
macroblock and is laid out in memory as follow:

+---------------------------+
| Y-plane   256 bytes x MBs |
+---------------------------+
| UV-plane  128 bytes x MBs |
+---------------------------+
| MV buffer  64 bytes x MBs |
+---------------------------+

The motion vector buffer offset is currently correct for 4:2:0 because
the extra space for motion vectors is overallocated with an extra
64 bytes x MBs.

Wrong offset for both destination and motion vector buffer are used
for the bottom field of field encoded content, wrong offset is
also used for 4:0:0 (monochrome) content.

Fix this by setting the motion vector address to the expected 384 bytes
x MBs offset for 4:2:0 and 256 bytes x MBs offset for 4:0:0 content.

Also use correct destination and motion vector buffer offset
for the bottom field of field encoded content.

While at it also extend the check for 4:0:0 (monochrome) to include an
additional check for High Profile (100).

Fixes: dea0a82f3d ("media: hantro: Add support for H264 decoding on G1")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-10 17:57:00 +01:00
..
allegro-dvt media: staging: media: allegro-dvt: remove bool comparison 2019-11-05 09:08:36 -03:00
hantro media: hantro: Fix H264 motion vector buffer offset 2019-11-10 17:57:00 +01:00
imx media: staging/imx: Use a shorter name for driver 2019-11-05 09:09:18 -03:00
ipu3 media: staging/intel-ipu3: remove the unnecessary compiler flags 2019-11-05 08:19:16 -03:00
meson/vdec staging: Remove dev_err() usage after platform_get_irq() 2019-07-30 20:50:04 +02:00
omap4iss media: staging: media: Make use of devm_platform_ioremap_resource 2019-10-16 16:35:15 -03:00
soc_camera media: drivers/staging/media: don't set description for ENUM_FMT 2019-07-22 14:41:32 -04:00
sunxi media: cedrus: Increase maximum supported size 2019-11-10 07:44:10 +01:00
tegra-vde media: staging: tegra-vde: Fix build error 2019-08-07 17:04:12 -03:00
Kconfig media: staging: davinci: remove vpfe driver 2019-07-25 06:33:14 -04:00
Makefile media: staging: davinci: remove vpfe driver 2019-07-25 06:33:14 -04:00