summaryrefslogtreecommitdiff
path: root/libavcodec/x86/fft.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/x86/fft.c')
-rw-r--r--libavcodec/x86/fft.c9
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;