summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/x86/dcadsp_init.c4
-rw-r--r--libavcodec/x86/dct_init.c2
-rw-r--r--libavcodec/x86/fft_init.c2
-rw-r--r--libavfilter/x86/af_volume_init.c2
-rw-r--r--libavresample/x86/audio_convert_init.c4
-rw-r--r--libavresample/x86/audio_mix_init.c4
-rw-r--r--libavresample/x86/dither_init.c4
-rw-r--r--libavutil/x86/float_dsp_init.c2
-rw-r--r--libavutil/x86/lls_init.c2
9 files changed, 15 insertions, 11 deletions
diff --git a/libavcodec/x86/dcadsp_init.c b/libavcodec/x86/dcadsp_init.c
index 9acb818..7c2bec1 100644
--- a/libavcodec/x86/dcadsp_init.c
+++ b/libavcodec/x86/dcadsp_init.c
@@ -98,10 +98,10 @@ av_cold void ff_synth_filter_init_x86(SynthFilterContext *s)
if (EXTERNAL_SSE2(cpu_flags)) {
s->synth_filter_float = synth_filter_sse2;
}
- if (EXTERNAL_AVX(cpu_flags)) {
+ if (EXTERNAL_AVX_FAST(cpu_flags)) {
s->synth_filter_float = synth_filter_avx;
}
- if (EXTERNAL_FMA3(cpu_flags)) {
+ if (EXTERNAL_FMA3(cpu_flags) && !(cpu_flags & AV_CPU_FLAG_AVXSLOW)) {
s->synth_filter_float = synth_filter_fma3;
}
#endif /* HAVE_YASM */
diff --git a/libavcodec/x86/dct_init.c b/libavcodec/x86/dct_init.c
index 7bda5e8..ca9fbc7 100644
--- a/libavcodec/x86/dct_init.c
+++ b/libavcodec/x86/dct_init.c
@@ -34,6 +34,6 @@ av_cold void ff_dct_init_x86(DCTContext *s)
s->dct32 = ff_dct32_float_sse;
if (EXTERNAL_SSE2(cpu_flags))
s->dct32 = ff_dct32_float_sse2;
- if (EXTERNAL_AVX(cpu_flags))
+ if (EXTERNAL_AVX_FAST(cpu_flags))
s->dct32 = ff_dct32_float_avx;
}
diff --git a/libavcodec/x86/fft_init.c b/libavcodec/x86/fft_init.c
index 7ca72c5..5c0273d 100644
--- a/libavcodec/x86/fft_init.c
+++ b/libavcodec/x86/fft_init.c
@@ -48,7 +48,7 @@ av_cold void ff_fft_init_x86(FFTContext *s)
s->fft_calc = ff_fft_calc_sse;
s->fft_permutation = FF_FFT_PERM_SWAP_LSBS;
}
- if (EXTERNAL_AVX(cpu_flags) && s->nbits >= 5) {
+ if (EXTERNAL_AVX_FAST(cpu_flags) && s->nbits >= 5) {
/* AVX for SB */
s->imdct_half = ff_imdct_half_avx;
s->fft_calc = ff_fft_calc_avx;
diff --git a/libavfilter/x86/af_volume_init.c b/libavfilter/x86/af_volume_init.c
index c59e0ed..26605fb 100644
--- a/libavfilter/x86/af_volume_init.c
+++ b/libavfilter/x86/af_volume_init.c
@@ -52,7 +52,7 @@ av_cold void ff_volume_init_x86(VolumeContext *vol)
vol->scale_samples = ff_scale_samples_s32_ssse3_atom;
vol->samples_align = 4;
}
- if (EXTERNAL_AVX(cpu_flags)) {
+ if (EXTERNAL_AVX_FAST(cpu_flags)) {
vol->scale_samples = ff_scale_samples_s32_avx;
vol->samples_align = 8;
}
diff --git a/libavresample/x86/audio_convert_init.c b/libavresample/x86/audio_convert_init.c
index d85ca84..ae6c319 100644
--- a/libavresample/x86/audio_convert_init.c
+++ b/libavresample/x86/audio_convert_init.c
@@ -226,11 +226,13 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP,
6, 16, 4, "SSE4", ff_conv_fltp_to_flt_6ch_sse4);
}
- if (EXTERNAL_AVX(cpu_flags)) {
+ if (EXTERNAL_AVX_FAST(cpu_flags)) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32,
0, 32, 16, "AVX", ff_conv_s32_to_flt_avx);
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT,
0, 32, 32, "AVX", ff_conv_flt_to_s32_avx);
+ }
+ if (EXTERNAL_AVX(cpu_flags)) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P,
2, 16, 16, "AVX", ff_conv_s16p_to_s16_2ch_avx);
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P,
diff --git a/libavresample/x86/audio_mix_init.c b/libavresample/x86/audio_mix_init.c
index 7fc530e..e14a540 100644
--- a/libavresample/x86/audio_mix_init.c
+++ b/libavresample/x86/audio_mix_init.c
@@ -195,11 +195,13 @@ av_cold void ff_audio_mix_init_x86(AudioMix *am)
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,
1, 2, 16, 8, "SSE4", ff_mix_1_to_2_s16p_flt_sse4);
}
- if (EXTERNAL_AVX(cpu_flags)) {
+ if (EXTERNAL_AVX_FAST(cpu_flags)) {
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,
2, 1, 32, 16, "AVX", ff_mix_2_to_1_fltp_flt_avx);
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,
1, 2, 32, 8, "AVX", ff_mix_1_to_2_fltp_flt_avx);
+ }
+ if (EXTERNAL_AVX(cpu_flags)) {
ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,
1, 2, 16, 8, "AVX", ff_mix_1_to_2_s16p_flt_avx);
}
diff --git a/libavresample/x86/dither_init.c b/libavresample/x86/dither_init.c
index 8349d5e..2a351c5 100644
--- a/libavresample/x86/dither_init.c
+++ b/libavresample/x86/dither_init.c
@@ -46,14 +46,14 @@ av_cold void ff_dither_init_x86(DitherDSPContext *ddsp,
if (EXTERNAL_SSE2(cpu_flags)) {
ddsp->dither_int_to_float = ff_dither_int_to_float_rectangular_sse2;
}
- if (EXTERNAL_AVX(cpu_flags)) {
+ if (EXTERNAL_AVX_FAST(cpu_flags)) {
ddsp->dither_int_to_float = ff_dither_int_to_float_rectangular_avx;
}
} else {
if (EXTERNAL_SSE2(cpu_flags)) {
ddsp->dither_int_to_float = ff_dither_int_to_float_triangular_sse2;
}
- if (EXTERNAL_AVX(cpu_flags)) {
+ if (EXTERNAL_AVX_FAST(cpu_flags)) {
ddsp->dither_int_to_float = ff_dither_int_to_float_triangular_avx;
}
}
diff --git a/libavutil/x86/float_dsp_init.c b/libavutil/x86/float_dsp_init.c
index a04d91c..b704330 100644
--- a/libavutil/x86/float_dsp_init.c
+++ b/libavutil/x86/float_dsp_init.c
@@ -146,7 +146,7 @@ av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
if (EXTERNAL_SSE2(cpu_flags)) {
fdsp->vector_dmul_scalar = ff_vector_dmul_scalar_sse2;
}
- if (EXTERNAL_AVX(cpu_flags)) {
+ if (EXTERNAL_AVX_FAST(cpu_flags)) {
fdsp->vector_fmul = ff_vector_fmul_avx;
fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx;
fdsp->vector_dmul_scalar = ff_vector_dmul_scalar_avx;
diff --git a/libavutil/x86/lls_init.c b/libavutil/x86/lls_init.c
index 888bc54..80cda29 100644
--- a/libavutil/x86/lls_init.c
+++ b/libavutil/x86/lls_init.c
@@ -35,7 +35,7 @@ av_cold void ff_init_lls_x86(LLSModel *m)
if (m->indep_count >= 4)
m->evaluate_lls = ff_evaluate_lls_sse2;
}
- if (EXTERNAL_AVX(cpu_flags)) {
+ if (EXTERNAL_AVX_FAST(cpu_flags)) {
m->update_lls = ff_update_lls_avx;
}
}
OpenPOWER on IntegriCloud