aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/fft.c
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2006-08-08 04:01:04 +0000
committerLoren Merritt <lorenm@u.washington.edu>2006-08-08 04:01:04 +0000
commitbcfa3e58ee0ec7f8a739867ea66f9acb834e498a (patch)
treea7aec9632c7157f03266a46861d4a898ee2340f5 /libavcodec/fft.c
parent2c5ad5fd74a44145459e74acdf486c084f8de4b4 (diff)
downloadffmpeg-bcfa3e58ee0ec7f8a739867ea66f9acb834e498a.tar.gz
3dnow2 implementation of imdct.
6% faster vorbis and wma. Originally committed as revision 5954 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/fft.c')
-rw-r--r--libavcodec/fft.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/fft.c b/libavcodec/fft.c
index 1c63f6889f..3d5c221ebf 100644
--- a/libavcodec/fft.c
+++ b/libavcodec/fft.c
@@ -54,6 +54,7 @@ int ff_fft_init(FFTContext *s, int nbits, int inverse)
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 ff_fft_init(FFTContext *s, int nbits, int inverse)
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 @@ int ff_fft_init(FFTContext *s, int nbits, int inverse)
} 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) */