mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
do UPDATE_CACHE only when needed (which should be VERY rare)
Originally committed as revision 5254 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e7e2025a53
commit
78d2d4e111
@ -1286,8 +1286,9 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
|
||||
} else {
|
||||
i += ((unsigned)code) >> 4;
|
||||
code &= 0xf;
|
||||
|
||||
UPDATE_CACHE(re, &s->gb)
|
||||
if(code > MIN_CACHE_BITS - 16){
|
||||
UPDATE_CACHE(re, &s->gb)
|
||||
}
|
||||
{
|
||||
int cache=GET_CACHE(re,gb);
|
||||
int sign=(~cache)>>31;
|
||||
|
Loading…
x
Reference in New Issue
Block a user