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

Michael Niedermayer CVS michael
Fri Mar 31 19:43:31 CEST 2006


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

Modified Files:
	mjpeg.c 
Log Message:
do UPDATE_CACHE only when needed (which should be VERY rare)


Index: mjpeg.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mjpeg.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- mjpeg.c	31 Mar 2006 17:01:58 -0000	1.129
+++ mjpeg.c	31 Mar 2006 17:43:28 -0000	1.130
@@ -1286,8 +1286,9 @@
         } else {
             i += ((unsigned)code) >> 4;
             code &= 0xf;
-
-            UPDATE_CACHE(re, &s->gb)
+            if(code > MIN_CACHE_BITS - 16){
+                UPDATE_CACHE(re, &s->gb)
+            }
             {
                 int cache=GET_CACHE(re,gb);
                 int sign=(~cache)>>31;





More information about the ffmpeg-cvslog mailing list