Skip to content

Commit f942d10

Browse files
Kwiboomchehab
authored andcommitted
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>
1 parent 77e74be commit f942d10

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/staging/media/rkvdec/rkvdec-h264.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ static void assemble_hw_rps(struct rkvdec_ctx *ctx,
782782
continue;
783783

784784
if (dpb[i].flags & V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM ||
785-
dpb[i].frame_num < dec_params->frame_num) {
785+
dpb[i].frame_num <= dec_params->frame_num) {
786786
p[i] = dpb[i].frame_num;
787787
continue;
788788
}

0 commit comments

Comments
 (0)