media: rkvdec: h264: Fix dpb_valid implementation
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 13 May 2022 20:29:11 +0000 (22:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:59 +0000 (10:22 +0200)
commit9031ef3866210ca4a6e0f47cb8c522159766d321
treec4f41c3848328d366d64ae75ffda7e0201324f42
parent3c90fdbac6b2769d3592c91aa6c7ae5c68e5f621
media: rkvdec: h264: Fix dpb_valid implementation

[ Upstream commit 7ab889f09dfa70e8097ec1b9186fd228124112cb ]

The ref builder only provided references that are marked as valid in the
dpb. Thus the current implementation of dpb_valid would always set the
flag to 1. This is not representing missing frames (this is called
'non-existing' pictures in the spec). In some context, these non-existing
pictures still need to occupy a slot in the reference list according to
the spec.

Fixes: cd33c830448ba ("media: rkvdec: Add the rkvdec driver")
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Sebastian Fricke <sebastian.fricke@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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/media/rkvdec/rkvdec-h264.c