[FFmpeg-cvslog] r14303 - trunk/libavcodec/ra288.c

vitor subversion
Sat Jul 19 17:41:15 CEST 2008


Author: vitor
Date: Sat Jul 19 17:41:15 2008
New Revision: 14303

Log:
Simplify co(): do not abuse pointer aritmetics


Modified:
   trunk/libavcodec/ra288.c

Modified: trunk/libavcodec/ra288.c
==============================================================================
--- trunk/libavcodec/ra288.c	(original)
+++ trunk/libavcodec/ra288.c	Sat Jul 19 17:41:15 2008
@@ -151,15 +151,16 @@ static void co(int n, int i, int j, cons
     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 */
 }




More information about the ffmpeg-cvslog mailing list