diff options
author | James Almer <jamrial@gmail.com> | 2015-04-22 04:28:21 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2015-04-22 04:41:20 +0300 |
commit | ba625dd8a12b8f440af7f50c833e5c1005d67c85 (patch) | |
tree | 866b471ad22b28d6b5e74e94e9c8f78fb8b1d040 /libavcodec/h264_refs.c | |
parent | 4f287a3c5007db853e4f1098ab194f9337e2f7da (diff) |
avcodec: use av_mod_uintp2() where useful
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/h264_refs.c')
-rw-r--r-- | libavcodec/h264_refs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index c424b9e3a2..0b2008ac3d 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -772,7 +772,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count) for (i = 0; i<h->short_ref_count; i++) { pic = h->short_ref[i]; if (pic->invalid_gap) { - int d = (h->cur_pic_ptr->frame_num - pic->frame_num) & ((1 << h->sps.log2_max_frame_num)-1); + int d = av_mod_uintp2(h->cur_pic_ptr->frame_num - pic->frame_num, h->sps.log2_max_frame_num); if (d > h->sps.ref_frame_count) remove_short(h, pic->frame_num, 0); } |