Commit f39c3c88 authored by Michael Niedermayer's avatar Michael Niedermayer

factorize &

Originally committed as revision 8525 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0abfd533
...@@ -78,17 +78,17 @@ static int lzw_get_code(struct LZWState * s) ...@@ -78,17 +78,17 @@ static int lzw_get_code(struct LZWState * s)
s->bbits += 8; s->bbits += 8;
s->bs--; s->bs--;
} }
c = s->bbuf & s->curmask; c = s->bbuf;
s->bbuf >>= s->cursize; s->bbuf >>= s->cursize;
} else { // TIFF } else { // TIFF
while (s->bbits < s->cursize) { while (s->bbits < s->cursize) {
s->bbuf = (s->bbuf << 8) | (*s->pbuf++); s->bbuf = (s->bbuf << 8) | (*s->pbuf++);
s->bbits += 8; s->bbits += 8;
} }
c = (s->bbuf >> (s->bbits - s->cursize)) & s->curmask; c = s->bbuf >> (s->bbits - s->cursize);
} }
s->bbits -= s->cursize; s->bbits -= s->cursize;
return c; return c & s->curmask;
} }
uint8_t* ff_lzw_cur_ptr(LZWState *p) uint8_t* ff_lzw_cur_ptr(LZWState *p)
......
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