提交 78d2d4e1 编写于 作者: M 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
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册