Commit 4147acc3 authored by vitor's avatar vitor

Simplify co(): do not abuse pointer aritmetics


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14303 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 47a96e9e
...@@ -151,15 +151,16 @@ static void co(int n, int i, int j, const float *in, float *out, float *st1, ...@@ -151,15 +151,16 @@ static void co(int n, int i, int j, const float *in, float *out, float *st1,
for (x=0; x < n + i + j; x++) { for (x=0; x < n + i + j; x++) {
if (x == n + j) if (x == n + j)
fp=in; fp=in;
work[x] = *(table++) * (*(st1++) = *(fp++)); 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);
for (x=0;x<=n;x++) { for (x=0;x<=n;x++) {
*st2 = *st2 * (0.5625) + buffer1[x]; st2[x] = st2[x] * 0.5625 + buffer1[x];
out[x] = *(st2++) + buffer2[x]; out[x] = st2[x] + buffer2[x];
} }
*out *= 1.00390625; /* to prevent clipping */ *out *= 1.00390625; /* to prevent clipping */
} }
......
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