Commit 7811cda5 authored by michael's avatar michael

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5254 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b9ae45d5
...@@ -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