changeset 7215:77d27130c9af libavcodec

Simplify: glob->phase is always == 3
author vitor
date Sun, 06 Jul 2008 14:23:30 +0000
parents 12d4a98a9255
children 48b7054a507e
files ra288.c
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ra288.c	Sun Jul 06 14:16:21 2008 +0000
+++ b/ra288.c	Sun Jul 06 14:23:30 2008 +0000
@@ -181,22 +181,19 @@
 
 static void update(Real288_internal *glob)
 {
-    int x,y;
     float buffer1[40], temp1[37];
     float buffer2[8], temp2[11];
 
-    y = glob->phase*5+5;
-    for (x=0;  x < 40; x++)
-        buffer1[x] = glob->output[(y++)%40];
+    memcpy(buffer1     , glob->output + 20, 20*sizeof(*buffer1));
+    memcpy(buffer1 + 20, glob->output     , 20*sizeof(*buffer1));
 
     co(36, 40, 35, buffer1, temp1, glob->st1a, glob->st1b, table1);
 
     if (pred(temp1, glob->st1, 36))
         colmult(glob->pr1, glob->st1, table1a, 36);
 
-    y = glob->phase + 1;
-    for (x=0; x < 8; x++)
-        buffer2[x] = glob->history[(y++) & 7];
+    memcpy(buffer2    , glob->history + 4, 4*sizeof(*buffer2));
+    memcpy(buffer2 + 4, glob->history    , 4*sizeof(*buffer2));
 
     co(10, 8, 20, buffer2, temp2, glob->st2a, glob->st2b, table2);