]> git.baikalelectronics.ru Git - kernel.git/commit
media: rkvdec: h264: Fix reference frame_num wrap for second field
authorJonas Karlman <jonas@kwiboo.se>
Fri, 13 May 2022 20:29:15 +0000 (22:29 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Tue, 17 May 2022 08:06:49 +0000 (10:06 +0200)
commit363d8edf02b9d0b6bca2193b2cde33b67e08f8ca
tree957e4bd20e078ff862f6e87a9d54e8557ca6730e
parent9eca3361a783742c83dd320cadb5ded2243084d6
media: rkvdec: h264: Fix reference frame_num wrap for second field

When decoding the second field in a complementary field pair the second
field is sharing the same frame_num with the first field.

Currently the frame_num for the first field is wrapped when it matches the
field being decoded, this caused issues decoding the second field in a
complementary field pair.

Fix this by using inclusive comparison: 'less than or equal'.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/rkvdec/rkvdec-h264.c