diff fft.c @ 3555:5ea82888103e libavcodec

3dnow2 implementation of imdct. 6% faster vorbis and wma.
author lorenm
date Tue, 08 Aug 2006 04:01:04 +0000
parents 769d68b12d26
children 1f8730f62765
line wrap: on
line diff
--- a/fft.c	Sun Aug 06 23:15:32 2006 +0000
+++ b/fft.c	Tue Aug 08 04:01:04 2006 +0000
@@ -54,6 +54,7 @@
         s->exptab[i].im = s1;
     }
     s->fft_calc = ff_fft_calc_c;
+    s->imdct_calc = ff_imdct_calc;
     s->exptab1 = NULL;
 
     /* compute constant table for HAVE_SSE version */
@@ -62,11 +63,7 @@
         int has_vectors = 0;
 
 #if defined(HAVE_MMX)
-#ifdef HAVE_MM3DNOW
         has_vectors = mm_support() & (MM_3DNOW | MM_3DNOWEXT | MM_SSE | MM_SSE2);
-#else
-        has_vectors = mm_support() & (MM_SSE | MM_SSE2);
-#endif
 #endif
 #if defined(HAVE_ALTIVEC) && !defined(ALTIVEC_USE_REFERENCE_C_CODE)
         has_vectors = mm_support() & MM_ALTIVEC;
@@ -98,6 +95,8 @@
             } while (nblocks != 0);
             av_freep(&s->exptab);
 #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) */