From 5be30c59da1e1d9d0d0bf75745b6680b66269b78 Mon Sep 17 00:00:00 2001 From: Vitor Sessak Date: Sun, 6 Jul 2008 14:23:30 +0000 Subject: [PATCH] Simplify: glob->phase is always == 3 Originally committed as revision 14094 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/ra288.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c index cfe2c9b736..72ed8102ee 100644 --- a/libavcodec/ra288.c +++ b/libavcodec/ra288.c @@ -181,22 +181,19 @@ static void co(int n, int i, int j, float *in, float *out, float *st1, 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);