mjpegdec: fix undefined shift

Add a comment to explain the code.

CC: libav-stable@libav.org
Bug-Id: CID 1194388
This commit is contained in:
Vittorio Giovara 2014-11-05 10:29:55 -05:00
parent ac4a5e3abd
commit 199d9f995d

View File

@ -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];
}