aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-07-19 15:41:15 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-07-19 15:41:15 +0000
commit3c617380e763b6ee82b9d98196d589948770d00a (patch)
tree73f5a0b2f3ce8cd9daaf8dac63772054c91084a9
parent2a811db23869348624a7404f60de8461447d6d51 (diff)
downloadffmpeg-3c617380e763b6ee82b9d98196d589948770d00a.tar.gz
Simplify co(): do not abuse pointer aritmetics
Originally committed as revision 14303 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ra288.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index 10fdfa89a4..890fc8db1b 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -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++) {
if (x == n + j)
fp=in;
- work[x] = *(table++) * (*(st1++) = *(fp++));
+ st1[x] = *(fp++);
+ work[x] = table[x] * st1[x];
}
prodsum(buffer1, work + n, i, n);
prodsum(buffer2, work + n + i, j, n);
for (x=0;x<=n;x++) {
- *st2 = *st2 * (0.5625) + buffer1[x];
- out[x] = *(st2++) + buffer2[x];
+ st2[x] = st2[x] * 0.5625 + buffer1[x];
+ out[x] = st2[x] + buffer2[x];
}
*out *= 1.00390625; /* to prevent clipping */
}