summaryrefslogtreecommitdiff
path: root/libavcodec/fft.c
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2006-08-18 23:53:49 +0000
committerLoren Merritt <lorenm@u.washington.edu>2006-08-18 23:53:49 +0000
commit1e4ecf26f599c894c24aaf9b5918630656c352c2 (patch)
treee5c94934edc5384c18ade4771ec87bb3b0c7dce0 /libavcodec/fft.c
parent57060f8936e1d28ef328ed7a3999ec478bddc2a6 (diff)
ff_fft_calc_3dn/3dn2/sse: convert intrinsics to inline asm.
2.5% faster fft, 0.5% faster vorbis. Originally committed as revision 6023 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/fft.c')
-rw-r--r--libavcodec/fft.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavcodec/fft.c b/libavcodec/fft.c
index 6fd87167bd..bc514724c0 100644
--- a/libavcodec/fft.c
+++ b/libavcodec/fft.c
@@ -58,7 +58,7 @@ int ff_fft_init(FFTContext *s, int nbits, int inverse)
s->exptab1 = NULL;
/* compute constant table for HAVE_SSE version */
-#if (defined(HAVE_MMX) && (defined(HAVE_BUILTIN_VECTOR) || defined(HAVE_MM3DNOW))) \
+#if defined(HAVE_MMX) \
|| (defined(HAVE_ALTIVEC) && !defined(ALTIVEC_USE_REFERENCE_C_CODE))
{
int has_vectors = mm_support();
@@ -67,15 +67,12 @@ int ff_fft_init(FFTContext *s, int nbits, int inverse)
#if defined(HAVE_MMX)
if (has_vectors & MM_3DNOWEXT)
s->imdct_calc = ff_imdct_calc_3dn2;
-#ifdef HAVE_MM3DNOW
if (has_vectors & MM_3DNOWEXT)
/* 3DNowEx for Athlon(XP) */
s->fft_calc = ff_fft_calc_3dn2;
else if (has_vectors & MM_3DNOW)
/* 3DNow! for K6-2/3 */
s->fft_calc = ff_fft_calc_3dn;
-#endif
-#ifdef HAVE_BUILTIN_VECTOR
if (has_vectors & MM_SSE2)
/* SSE for P4/K8 */
s->fft_calc = ff_fft_calc_sse;
@@ -83,7 +80,6 @@ int ff_fft_init(FFTContext *s, int nbits, int inverse)
s->fft_calc == ff_fft_calc_c)
/* SSE for P3 */
s->fft_calc = ff_fft_calc_sse;
-#endif
#else /* HAVE_MMX */
if (has_vectors & MM_ALTIVEC)
s->fft_calc = ff_fft_calc_altivec;