media: hantro: h264: Fix the frame_num wraparound case
commit9db5f87f6723678a7e7e5e3165439c5c4378edbb
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 9 Sep 2019 07:28:15 +0000 (9 04:28 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 1 Oct 2019 20:11:22 +0000 (1 17:11 -0300)
tree3e34b876d0625955d3097cac3618013d9cba7034
parente00cc83ecc3dc4ac9bd9db4f2d6f927d6f43bfd0
media: hantro: h264: Fix the frame_num wraparound case

Step '8.2.4.1 Decoding process for picture numbers' was missing in the
reflist creation logic, leading to invalid P reflists when a
->frame_num wraparound happens.

Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding")
Reported-by: Francois Buergisser <fbuergisser@google.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Francois Buergisser <fbuergisser@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/hantro/hantro_h264.c