Commit 78d2d4e1 authored by Michael Niedermayer's avatar Michael Niedermayer

do UPDATE_CACHE only when needed (which should be VERY rare)

Originally committed as revision 5254 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent e7e2025a
...@@ -1286,8 +1286,9 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block, ...@@ -1286,8 +1286,9 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
} else { } else {
i += ((unsigned)code) >> 4; i += ((unsigned)code) >> 4;
code &= 0xf; code &= 0xf;
if(code > MIN_CACHE_BITS - 16){
UPDATE_CACHE(re, &s->gb) UPDATE_CACHE(re, &s->gb)
}
{ {
int cache=GET_CACHE(re,gb); int cache=GET_CACHE(re,gb);
int sign=(~cache)>>31; int sign=(~cache)>>31;
......
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