changeset 968:64f1a11b5f86 libavcodec

added define for builtins use - inverse fix by Romain Dolbeau
author bellard
date Tue, 07 Jan 2003 17:41:43 +0000
parents 274b518c4ecb
children d12d0c93d1e2
files i386/fft_sse.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/i386/fft_sse.c	Tue Jan 07 13:00:38 2003 +0000
+++ b/i386/fft_sse.c	Tue Jan 07 17:41:43 2003 +0000
@@ -19,11 +19,16 @@
 #include "../dsputil.h"
 #include <math.h>
 
+#ifdef HAVE_BUILTIN_VECTOR
+
 #include <xmmintrin.h>
 
 static const float p1p1p1m1[4] __attribute__((aligned(16))) = 
     { 1.0, 1.0, 1.0, -1.0 };
 
+static const float p1p1m1p1[4] __attribute__((aligned(16))) = 
+    { 1.0, 1.0, -1.0, 1.0 };
+
 static const float p1p1m1m1[4] __attribute__((aligned(16))) = 
     { 1.0, 1.0, -1.0, -1.0 };
 
@@ -54,6 +59,11 @@
         r = (__m128 *)&z[0];
         c1 = *(__m128 *)p1p1m1m1;
         c2 = *(__m128 *)p1p1p1m1;
+        if (s->inverse)
+            c2 = *(__m128 *)p1p1m1p1;
+        else
+            c2 = *(__m128 *)p1p1p1m1;
+
         j = (np >> 2);
         do {
             a = r[0];
@@ -126,3 +136,5 @@
         nloops = nloops << 1;
     } while (nblocks != 0);
 }
+
+#endif