[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec mjpeg.c,1.130,1.131

Michael Niedermayer CVS michael
Fri Mar 31 20:04:39 CEST 2006


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv3224/libavcodec

Modified Files:
	mjpeg.c 
Log Message:
simplify loop a little


Index: mjpeg.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mjpeg.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- mjpeg.c	31 Mar 2006 17:43:28 -0000	1.130
+++ mjpeg.c	31 Mar 2006 18:04:36 -0000	1.131
@@ -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;
             }





More information about the ffmpeg-cvslog mailing list