mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
avoid if(i>=63) check at the end of decode_block()
Originally committed as revision 5239 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
415365d225
commit
b88a718a11
@ -1297,14 +1297,17 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
|
|||||||
|
|
||||||
LAST_SKIP_BITS(re, &s->gb, code)
|
LAST_SKIP_BITS(re, &s->gb, code)
|
||||||
|
|
||||||
if (i >= 64) {
|
if (i >= 63) {
|
||||||
|
if(i == 63){
|
||||||
|
j = s->scantable.permutated[63];
|
||||||
|
block[j] = level * quant_matrix[j];
|
||||||
|
break;
|
||||||
|
}
|
||||||
dprintf("error count: %d\n", i);
|
dprintf("error count: %d\n", i);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
j = s->scantable.permutated[i];
|
j = s->scantable.permutated[i];
|
||||||
block[j] = level * quant_matrix[j];
|
block[j] = level * quant_matrix[j];
|
||||||
if (i >= 63)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CLOSE_READER(re, &s->gb)
|
CLOSE_READER(re, &s->gb)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user