Module: libav Branch: master Commit: 199d9f995da53fe2507821f6d96bbc692574e1a9
Author: Vittorio Giovara <[email protected]> Committer: Vittorio Giovara <[email protected]> Date: Wed Nov 5 10:29:55 2014 -0500 mjpegdec: fix undefined shift Add a comment to explain the code. CC: [email protected] Bug-Id: CID 1194388 --- libavcodec/mjpegdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index d9a73d8..01e11be 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -964,7 +964,9 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, init_get_bits(&mb_bitmask_gb, mb_bitmask, s->mb_width * s->mb_height); if (!Al) { - s->coefs_finished[c] |= (1LL << (se + 1)) - (1LL << ss); + // s->coefs_finished is a bitmask for coefficients coded + // ss and se are parameters telling start and end coefficients + s->coefs_finished[c] |= (~0ULL >> (63 - (se - ss))) << ss; last_scan = !~s->coefs_finished[c]; } _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
