mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
added define for builtins use - inverse fix by Romain Dolbeau
Originally committed as revision 1410 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
52b41d7f70
commit
e1958604fd
@ -19,11 +19,16 @@
|
|||||||
#include "../dsputil.h"
|
#include "../dsputil.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_BUILTIN_VECTOR
|
||||||
|
|
||||||
#include <xmmintrin.h>
|
#include <xmmintrin.h>
|
||||||
|
|
||||||
static const float p1p1p1m1[4] __attribute__((aligned(16))) =
|
static const float p1p1p1m1[4] __attribute__((aligned(16))) =
|
||||||
{ 1.0, 1.0, 1.0, -1.0 };
|
{ 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))) =
|
static const float p1p1m1m1[4] __attribute__((aligned(16))) =
|
||||||
{ 1.0, 1.0, -1.0, -1.0 };
|
{ 1.0, 1.0, -1.0, -1.0 };
|
||||||
|
|
||||||
@ -54,6 +59,11 @@ void fft_calc_sse(FFTContext *s, FFTComplex *z)
|
|||||||
r = (__m128 *)&z[0];
|
r = (__m128 *)&z[0];
|
||||||
c1 = *(__m128 *)p1p1m1m1;
|
c1 = *(__m128 *)p1p1m1m1;
|
||||||
c2 = *(__m128 *)p1p1p1m1;
|
c2 = *(__m128 *)p1p1p1m1;
|
||||||
|
if (s->inverse)
|
||||||
|
c2 = *(__m128 *)p1p1m1p1;
|
||||||
|
else
|
||||||
|
c2 = *(__m128 *)p1p1p1m1;
|
||||||
|
|
||||||
j = (np >> 2);
|
j = (np >> 2);
|
||||||
do {
|
do {
|
||||||
a = r[0];
|
a = r[0];
|
||||||
@ -126,3 +136,5 @@ void fft_calc_sse(FFTContext *s, FFTComplex *z)
|
|||||||
nloops = nloops << 1;
|
nloops = nloops << 1;
|
||||||
} while (nblocks != 0);
|
} while (nblocks != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user