changeset 7296:6221f1f81f9b libavcodec

Simplify
author vitor
date Thu, 17 Jul 2008 22:59:53 +0000
parents f3923fea3a8c
children 04a3625bf2a6
files ra288.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ra288.c	Thu Jul 17 22:42:21 2008 +0000
+++ b/ra288.c	Thu Jul 17 22:59:53 2008 +0000
@@ -108,14 +108,16 @@
     if ((f0 = *in) <= 0)
         return 0;
 
+    in--; // To avoid a -1 subtraction in the inner loop
+
     for (x=1; x <= n; x++) {
         float *p1 = in + x;
         float *p2 = tgt;
 
-        f1 = *(p1--);
+        f1 = in[x+1];
 
         for (y=0; y < x - 1; y++)
-            f1 += (*(p1--))*(*(p2++));
+            f1 += in[x-y]*tgt[y];
 
         p1 = tgt + x - 1;
         p2 = tgt;