diff options
author | Jonas Karlman <[email protected]> | 2022-05-13 22:29:15 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <[email protected]> | 2022-05-17 10:06:49 +0200 |
commit | f942d10dab5afba301fc215954f62e1761a7225a (patch) | |
tree | 957e4bd20e078ff862f6e87a9d54e8557ca6730e | |
parent | 77e74be83083194f949f4979a35dec9012348d3b (diff) |
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]>
-rw-r--r-- | drivers/staging/media/rkvdec/rkvdec-h264.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c index fb41e2fd8359..57821ee3b213 100644 --- a/drivers/staging/media/rkvdec/rkvdec-h264.c +++ b/drivers/staging/media/rkvdec/rkvdec-h264.c @@ -782,7 +782,7 @@ static void assemble_hw_rps(struct rkvdec_ctx *ctx, continue; if (dpb[i].flags & V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM || - dpb[i].frame_num < dec_params->frame_num) { + dpb[i].frame_num <= dec_params->frame_num) { p[i] = dpb[i].frame_num; continue; } |