[FFmpeg-cvslog] r25543 - trunk/libavcodec/mjpegdec.c

michael subversion
Fri Oct 22 00:44:34 CEST 2010


Author: michael
Date: Fri Oct 22 00:44:34 2010
New Revision: 25543

Log:
Cleanup decode_block_progressive()

Modified:
   trunk/libavcodec/mjpegdec.c

Modified: trunk/libavcodec/mjpegdec.c
==============================================================================
--- trunk/libavcodec/mjpegdec.c	Fri Oct 22 00:44:31 2010	(r25542)
+++ trunk/libavcodec/mjpegdec.c	Fri Oct 22 00:44:34 2010	(r25543)
@@ -506,13 +506,13 @@ static int decode_block_progressive(MJpe
             if(run == 0xF){// ZRL - skip 15 coefficients
                 i += 15;
             }else{
-                val = run;
-                run = (1 << run);
-                UPDATE_CACHE(re, &s->gb);
-                run += (GET_CACHE(re, &s->gb) >> (32 - val)) & (run - 1);
-                if(val)
-                    LAST_SKIP_BITS(re, &s->gb, val);
-                *EOBRUN = run - 1;
+                val = (1 << run);
+                if(run){
+                    UPDATE_CACHE(re, &s->gb);
+                    val += NEG_USR32(GET_CACHE(re, &s->gb), run);
+                    LAST_SKIP_BITS(re, &s->gb, run);
+                }
+                *EOBRUN = val - 1;
                 break;
             }
         }



More information about the ffmpeg-cvslog mailing list