[SCM] libav/experimental: Move evaluation of variable a to where it is trivial

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:21:43 UTC 2013


The following commit has been merged in the experimental branch:
commit 58e23a5f2170b8754514f01fe19275961eec92d6
Author: Vitor Sessak <vitor1001 at gmail.com>
Date:   Sun May 25 16:29:07 2008 +0000

    Move evaluation of variable a to where it is trivial
    
    Originally committed as revision 13387 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index 4277bfc..38aeecd 100644
--- a/libavcodec/ra144.c
+++ b/libavcodec/ra144.c
@@ -288,20 +288,15 @@ static int eq(const short *in, int *target)
 }
 
 static int dec2(signed short *decsp, const int *data, const int *inp,
-                 int f, const int *inp2, int l)
+                 int f, const int *inp2, int a)
 {
     unsigned const int *ptr1,*ptr2;
     int work[10];
-    int a,b;
+    int b;
     int x;
     int result;
     unsigned short *sptr  = decsp;
 
-    if(l + 1 < NBLOCKS / 2)
-        a = NBLOCKS - (l + 1);
-    else
-        a = l + 1;
-
     b = NBLOCKS - a;
 
     ptr1 = inp;
@@ -351,13 +346,13 @@ static int ra144_decode_frame(AVCodecContext * avctx,
     val = decodeval[get_bits(&gb, 5) << 1]; // Useless table entries?
     a = t_sqrt(val*glob->oldval) >> 12;
 
-    gbuf1[0] = dec2(gbuf2[0], glob->swapbuf1alt, glob->swapbuf2alt, glob->oldval, glob->swapbuf2, 0);
+    gbuf1[0] = dec2(gbuf2[0], glob->swapbuf1alt, glob->swapbuf2alt, glob->oldval, glob->swapbuf2, 3);
     if (glob->oldval < val) {
-        gbuf1[1] = dec2(gbuf2[1], glob->swapbuf1, glob->swapbuf2, a, glob->swapbuf2alt, 1);
+        gbuf1[1] = dec2(gbuf2[1], glob->swapbuf1, glob->swapbuf2, a, glob->swapbuf2alt, 2);
     } else {
-        gbuf1[1] = dec2(gbuf2[1], glob->swapbuf1alt, glob->swapbuf2alt, a, glob->swapbuf2, 1);
+        gbuf1[1] = dec2(gbuf2[1], glob->swapbuf1alt, glob->swapbuf2alt, a, glob->swapbuf2, 2);
     }
-    gbuf1[2] = dec2(gbuf2[2], glob->swapbuf1, glob->swapbuf2, val, glob->swapbuf2alt, 2);
+    gbuf1[2] = dec2(gbuf2[2], glob->swapbuf1, glob->swapbuf2, val, glob->swapbuf2alt, 3);
     gbuf1[3] = dec1(gbuf2[3], glob->swapbuf1, glob->swapbuf2, val);
 
     /* do output */

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list