Commit 862966be authored by vitor's avatar vitor

Simplify co(), use memcpy/memmove and colmult() when useful.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14355 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7f94e95d
...@@ -141,19 +141,15 @@ static void co(int n, int i, int j, const float *in, float *out, float *st1, ...@@ -141,19 +141,15 @@ static void co(int n, int i, int j, const float *in, float *out, float *st1,
float *st2, const float *table) float *st2, const float *table)
{ {
unsigned int x; unsigned int x;
const float *fp;
float buffer1[37]; float buffer1[37];
float buffer2[37]; float buffer2[37];
float work[111]; float work[111];
/* rotate and multiply */ /* rotate and multiply */
fp = st1 + i; memmove(st1 , st1 + i, (n + j)*sizeof(*st1));
for (x=0; x < n + i + j; x++) { memcpy (st1 + n + j, in , i *sizeof(*st1));
if (x == n + j)
fp=in; colmult(work, table, st1, n + i + j);
st1[x] = *(fp++);
work[x] = table[x] * st1[x];
}
prodsum(buffer1, work + n , i, n); prodsum(buffer1, work + n , i, n);
prodsum(buffer2, work + n + i, j, n); prodsum(buffer2, work + n + i, j, n);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment