diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2011-04-25 11:39:01 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-04-26 18:25:24 +0200 |
commit | 9d35fa520e3b27f7dd9fe12c433eb596f1271515 (patch) | |
tree | 9810f7a2e7d8e19dc5bcc5f6b9ac4a6c70d84388 /libavcodec/x86/fft.c | |
parent | 13dfce3d44f99a2d7df71aba8ae003d58db726f7 (diff) | |
download | ffmpeg-9d35fa520e3b27f7dd9fe12c433eb596f1271515.tar.gz |
Add AVX FFT implementation.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec/x86/fft.c')
-rw-r--r-- | libavcodec/x86/fft.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/x86/fft.c b/libavcodec/x86/fft.c index 2426a3df0f..b29412c1dc 100644 --- a/libavcodec/x86/fft.c +++ b/libavcodec/x86/fft.c @@ -25,7 +25,14 @@ av_cold void ff_fft_init_mmx(FFTContext *s) { #if HAVE_YASM int has_vectors = av_get_cpu_flags(); - if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE) { + if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX && s->nbits >= 5) { + /* AVX for SB */ + s->imdct_calc = ff_imdct_calc_sse; + s->imdct_half = ff_imdct_half_avx; + s->fft_permute = ff_fft_permute_sse; + s->fft_calc = ff_fft_calc_avx; + s->fft_permutation = FF_FFT_PERM_AVX; + } else if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE) { /* SSE for P3/P4/K8 */ s->imdct_calc = ff_imdct_calc_sse; s->imdct_half = ff_imdct_half_sse; |