[SCM] libav/experimental: Cleanup decode_block_progressive()

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:17:59 UTC 2013


The following commit has been merged in the experimental branch:
commit 7f4a1e8f6ce203b8d7f0a9e65254e3ab931d44ff
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Thu Oct 21 22:44:34 2010 +0000

    Cleanup decode_block_progressive()
    
    Originally committed as revision 25543 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 8b9190c..5bf9f31 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -506,13 +506,13 @@ static int decode_block_progressive(MJpegDecodeContext *s, DCTELEM *block, uint8
             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;
             }
         }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list