changeset 4736:59649ebd5ed8 libavcodec

factorize &
author michael
date Mon, 26 Mar 2007 00:54:29 +0000
parents 8903c1d6db18
children 99d9dd34903b
files lzw.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lzw.c	Mon Mar 26 00:44:42 2007 +0000
+++ b/lzw.c	Mon Mar 26 00:54:29 2007 +0000
@@ -78,17 +78,17 @@
             s->bbits += 8;
             s->bs--;
         }
-        c = s->bbuf & s->curmask;
+        c = s->bbuf;
         s->bbuf >>= s->cursize;
     } else { // TIFF
         while (s->bbits < s->cursize) {
             s->bbuf = (s->bbuf << 8) | (*s->pbuf++);
             s->bbits += 8;
         }
-        c = (s->bbuf >> (s->bbits - s->cursize)) & s->curmask;
+        c = s->bbuf >> (s->bbits - s->cursize);
     }
     s->bbits -= s->cursize;
-    return c;
+    return c & s->curmask;
 }
 
 uint8_t* ff_lzw_cur_ptr(LZWState *p)