changeset 3242:e22fc2d702b7 libavcodec

simplify loop a little
author michael
date Fri, 31 Mar 2006 18:04:36 +0000
parents 61d9f1418c02
children 498543867d57
files mjpeg.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mjpeg.c	Fri Mar 31 17:43:28 2006 +0000
+++ b/mjpeg.c	Fri Mar 31 18:04:36 2006 +0000
@@ -1281,16 +1281,14 @@
         /* EOB */
         if (code == 0x10)
             break;
-        if (code == 0x100) {
-            i += 16;
-        } else {
-            i += ((unsigned)code) >> 4;
+        i += ((unsigned)code) >> 4;
+        if(code != 0x100){
             code &= 0xf;
             if(code > MIN_CACHE_BITS - 16){
                 UPDATE_CACHE(re, &s->gb)
             }
             {
-                int cache=GET_CACHE(re,gb);
+                int cache=GET_CACHE(re,&s->gb);
                 int sign=(~cache)>>31;
                 level = (NEG_USR32(sign ^ cache,code) ^ sign) - sign;
             }