changeset 6862:456d2979f5a1 libavcodec

Parameter n of dec functions is always 3. Hardcode it.
author vitor
date Sun, 25 May 2008 13:22:56 +0000
parents 64998f9abdb6
children fda46beb5284
files ra144.c
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ra144.c	Sat May 24 22:31:44 2008 +0000
+++ b/ra144.c	Sun May 25 13:22:56 2008 +0000
@@ -240,13 +240,13 @@
 }
 
 static void dec1(Real144_internal *glob, const int *data, const int *inp,
-                 int n, int f, int block_idx)
+                 int f, int block_idx)
 {
     short *ptr,*end;
     signed   short  *decsp = glob->gbuf2[block_idx];
 
     glob->gbuf1[block_idx] = rms(data, f);
-    end = (ptr = decsp) + (n * 10);
+    end = (ptr = decsp) + 30;
 
     while (ptr < end)
         *(ptr++) = *(inp++);
@@ -296,7 +296,7 @@
 }
 
 static void dec2(Real144_internal *glob, const int *data, const int *inp,
-                 int n, int f, const int *inp2, int l)
+                 int f, const int *inp2, int l)
 {
     unsigned const int *ptr1,*ptr2;
     int work[10];
@@ -316,13 +316,13 @@
     ptr1 = inp;
     ptr2 = inp2;
 
-    for (x=0; x<10*n; x++)
+    for (x=0; x<30; x++)
         *(sptr++) = (a * (*ptr1++) + b * (*ptr2++)) >> 2;
 
     result = eq(decsp, work);
 
     if (result == 1) {
-        dec1(glob, data, inp, n, f, l);
+        dec1(glob, data, inp, f, l);
     } else {
         glob->gbuf1[l] = rms(work, f);
     }
@@ -358,14 +358,14 @@
     val = decodeval[get_bits(&gb, 5) << 1]; // Useless table entries?
     a = t_sqrt(val*glob->oldval) >> 12;
 
-    dec2(glob, glob->swapbuf1alt, glob->swapbuf2alt, 3, glob->oldval, glob->swapbuf2, 0);
+    dec2(glob, glob->swapbuf1alt, glob->swapbuf2alt, glob->oldval, glob->swapbuf2, 0);
     if (glob->oldval < val) {
-        dec2(glob, glob->swapbuf1, glob->swapbuf2, 3, a, glob->swapbuf2alt, 1);
+        dec2(glob, glob->swapbuf1, glob->swapbuf2, a, glob->swapbuf2alt, 1);
     } else {
-        dec2(glob, glob->swapbuf1alt, glob->swapbuf2alt, 3, a, glob->swapbuf2, 1);
+        dec2(glob, glob->swapbuf1alt, glob->swapbuf2alt, a, glob->swapbuf2, 1);
     }
-    dec2(glob, glob->swapbuf1, glob->swapbuf2, 3, val, glob->swapbuf2alt, 2);
-    dec1(glob, glob->swapbuf1, glob->swapbuf2, 3, val, 3);
+    dec2(glob, glob->swapbuf1, glob->swapbuf2, val, glob->swapbuf2alt, 2);
+    dec1(glob, glob->swapbuf1, glob->swapbuf2, val, 3);
 
     /* do output */
     for (c=0; c<4; c++) {