[FFmpeg-cvslog] avcodec/proresdec_lgpl: use av_mod_uintp2

James Almer git at videolan.org
Sat Jan 30 00:00:21 CET 2016


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Jan 18 18:37:55 2016 -0300| [5893e8753702765ec4c2f775d7beef6afe7265e7] | committer: James Almer

avcodec/proresdec_lgpl: use av_mod_uintp2

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5893e8753702765ec4c2f775d7beef6afe7265e7
---

 libavcodec/proresdec_lgpl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c
index 9e5674e..467a423 100644
--- a/libavcodec/proresdec_lgpl.c
+++ b/libavcodec/proresdec_lgpl.c
@@ -251,7 +251,7 @@ static int decode_picture_header(ProresContext *ctx, const uint8_t *buf,
                       (1 << (4 + ctx->frame->interlaced_frame)) - 1) >>
                      (4 + ctx->frame->interlaced_frame);
 
-    remainder    = ctx->num_x_mbs & ((1 << slice_width_factor) - 1);
+    remainder    = av_mod_uintp2(ctx->num_x_mbs, slice_width_factor);
     num_x_slices = (ctx->num_x_mbs >> slice_width_factor) + (remainder & 1) +
                    ((remainder >> 1) & 1) + ((remainder >> 2) & 1);
 



More information about the ffmpeg-cvslog mailing list