changeset 7321:2db97a3e51ed libavcodec

Simplify co(): do not abuse pointer aritmetics
author vitor
date Sat, 19 Jul 2008 15:41:15 +0000
parents 927ac918cddb
children 6c8c561becce
files ra288.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ra288.c	Sat Jul 19 15:37:52 2008 +0000
+++ b/ra288.c	Sat Jul 19 15:41:15 2008 +0000
@@ -151,15 +151,16 @@
     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 */
 }