Commit 002a7414 authored by Michael Niedermayer's avatar Michael Niedermayer

simplify loop a little

Originally committed as revision 5255 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 78d2d4e1
...@@ -1281,16 +1281,14 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block, ...@@ -1281,16 +1281,14 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
/* EOB */ /* EOB */
if (code == 0x10) if (code == 0x10)
break; break;
if (code == 0x100) { i += ((unsigned)code) >> 4;
i += 16; if(code != 0x100){
} else {
i += ((unsigned)code) >> 4;
code &= 0xf; code &= 0xf;
if(code > MIN_CACHE_BITS - 16){ 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,&s->gb);
int sign=(~cache)>>31; int sign=(~cache)>>31;
level = (NEG_USR32(sign ^ cache,code) ^ sign) - sign; level = (NEG_USR32(sign ^ cache,code) ^ sign) - sign;
} }
......
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