Commit 199d9f99 authored by Vittorio Giovara's avatar Vittorio Giovara

mjpegdec: fix undefined shift

Add a comment to explain the code.

CC: libav-stable@libav.org
Bug-Id: CID 1194388
parent ac4a5e3a
......@@ -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];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment