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 <[email protected]> Signed-off-by: Nicolas Dufresne <[email protected]> Reviewed-by: Ezequiel Garcia <[email protected]> Reviewed-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 77e74be commit f942d10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)