comparison i386/fft_sse.c @ 2967:ef2149182f1c libavcodec

COSMETICS: Remove all trailing whitespace.
author diego
date Sat, 17 Dec 2005 18:14:38 +0000
parents dd63cb7e5080
children bfabfdf9ce55
comparison
equal deleted inserted replaced
2966:564788471dd4 2967:ef2149182f1c
21 21
22 #ifdef HAVE_BUILTIN_VECTOR 22 #ifdef HAVE_BUILTIN_VECTOR
23 23
24 #include <xmmintrin.h> 24 #include <xmmintrin.h>
25 25
26 static const float p1p1p1m1[4] __attribute__((aligned(16))) = 26 static const float p1p1p1m1[4] __attribute__((aligned(16))) =
27 { 1.0, 1.0, 1.0, -1.0 }; 27 { 1.0, 1.0, 1.0, -1.0 };
28 28
29 static const float p1p1m1p1[4] __attribute__((aligned(16))) = 29 static const float p1p1m1p1[4] __attribute__((aligned(16))) =
30 { 1.0, 1.0, -1.0, 1.0 }; 30 { 1.0, 1.0, -1.0, 1.0 };
31 31
32 static const float p1p1m1m1[4] __attribute__((aligned(16))) = 32 static const float p1p1m1m1[4] __attribute__((aligned(16))) =
33 { 1.0, 1.0, -1.0, -1.0 }; 33 { 1.0, 1.0, -1.0, -1.0 };
34 34
35 #if 0 35 #if 0
36 static void print_v4sf(const char *str, __m128 a) 36 static void print_v4sf(const char *str, __m128 a)
37 { 37 {
105 do { 105 do {
106 __m128 a, b, c, t1, t2; 106 __m128 a, b, c, t1, t2;
107 107
108 a = *(__m128 *)p; 108 a = *(__m128 *)p;
109 b = *(__m128 *)q; 109 b = *(__m128 *)q;
110 110
111 /* complex mul */ 111 /* complex mul */
112 c = *(__m128 *)cptr; 112 c = *(__m128 *)cptr;
113 /* cre*re cim*re */ 113 /* cre*re cim*re */
114 t1 = _mm_mul_ps(c, 114 t1 = _mm_mul_ps(c,
115 _mm_shuffle_ps(b, b, _MM_SHUFFLE(2, 2, 0, 0))); 115 _mm_shuffle_ps(b, b, _MM_SHUFFLE(2, 2, 0, 0)));
116 c = *(__m128 *)(cptr + 2); 116 c = *(__m128 *)(cptr + 2);
117 /* -cim*im cre*im */ 117 /* -cim*im cre*im */
118 t2 = _mm_mul_ps(c, 118 t2 = _mm_mul_ps(c,
119 _mm_shuffle_ps(b, b, _MM_SHUFFLE(3, 3, 1, 1))); 119 _mm_shuffle_ps(b, b, _MM_SHUFFLE(3, 3, 1, 1)));
120 b = _mm_add_ps(t1, t2); 120 b = _mm_add_ps(t1, t2);
121 121
122 /* butterfly */ 122 /* butterfly */
123 *(__m128 *)p = _mm_add_ps(a, b); 123 *(__m128 *)p = _mm_add_ps(a, b);
124 *(__m128 *)q = _mm_sub_ps(a, b); 124 *(__m128 *)q = _mm_sub_ps(a, b);
125 125
126 p += 2; 126 p += 2;
127 q += 2; 127 q += 2;
128 cptr += 4; 128 cptr += 4;
129 } while (--k); 129 } while (--k);
130 130
131 p += nloops; 131 p += nloops;
132 q += nloops; 132 q += nloops;
133 } while (--j); 133 } while (--j);
134 cptr1 += nloops * 2; 134 cptr1 += nloops * 2;
135 nblocks = nblocks >> 1; 135 nblocks = nblocks >> 1;