aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample/x86
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2015-05-31 14:20:29 -0300
committerMichael Niedermayer <michaelni@gmx.at>2015-06-01 00:15:35 +0200
commitc16e99e3b3c02edcf33245468731d414eab97dac (patch)
treec5435ea3aadf24030fa9c064c76cc535956fb136 /libswresample/x86
parent16c430e8efc8d8528df7805429175dfdfd0d87ac (diff)
downloadffmpeg-c16e99e3b3c02edcf33245468731d414eab97dac.tar.gz
x86: check for AV_CPU_FLAG_AVXSLOW where useful
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/x86')
-rw-r--r--libswresample/x86/audio_convert_init.c4
-rw-r--r--libswresample/x86/rematrix_init.c2
-rw-r--r--libswresample/x86/resample_init.c4
3 files changed, 6 insertions, 4 deletions
diff --git a/libswresample/x86/audio_convert_init.c b/libswresample/x86/audio_convert_init.c
index 7f25d981a9..5e5e91d142 100644
--- a/libswresample/x86/audio_convert_init.c
+++ b/libswresample/x86/audio_convert_init.c
@@ -145,9 +145,11 @@ MULTI_CAPS_FUNC(SSE2, sse2)
ac->simd_f = ff_unpack_2ch_int16_to_float_a_ssse3;
}
}
- if(EXTERNAL_AVX(mm_flags)) {
+ if(EXTERNAL_AVX_FAST(mm_flags)) {
if( out_fmt == AV_SAMPLE_FMT_FLT && in_fmt == AV_SAMPLE_FMT_S32 || out_fmt == AV_SAMPLE_FMT_FLTP && in_fmt == AV_SAMPLE_FMT_S32P)
ac->simd_f = ff_int32_to_float_a_avx;
+ }
+ if(EXTERNAL_AVX(mm_flags)) {
if(channels == 6) {
if( out_fmt == AV_SAMPLE_FMT_FLT && in_fmt == AV_SAMPLE_FMT_FLTP || out_fmt == AV_SAMPLE_FMT_S32 && in_fmt == AV_SAMPLE_FMT_S32P)
ac->simd_f = ff_pack_6ch_float_to_float_a_avx;
diff --git a/libswresample/x86/rematrix_init.c b/libswresample/x86/rematrix_init.c
index 918479a4a8..5f2c5fe170 100644
--- a/libswresample/x86/rematrix_init.c
+++ b/libswresample/x86/rematrix_init.c
@@ -73,7 +73,7 @@ av_cold int swri_rematrix_init_x86(struct SwrContext *s){
s->mix_1_1_simd = ff_mix_1_1_a_float_sse;
s->mix_2_1_simd = ff_mix_2_1_a_float_sse;
}
- if(EXTERNAL_AVX(mm_flags)) {
+ if(EXTERNAL_AVX_FAST(mm_flags)) {
s->mix_1_1_simd = ff_mix_1_1_a_float_avx;
s->mix_2_1_simd = ff_mix_2_1_a_float_avx;
}
diff --git a/libswresample/x86/resample_init.c b/libswresample/x86/resample_init.c
index 93001d65cb..bc444cfb8b 100644
--- a/libswresample/x86/resample_init.c
+++ b/libswresample/x86/resample_init.c
@@ -67,11 +67,11 @@ av_cold void swri_resample_dsp_x86_init(ResampleContext *c)
c->dsp.resample = c->linear ? ff_resample_linear_float_sse
: ff_resample_common_float_sse;
}
- if (EXTERNAL_AVX(mm_flags)) {
+ if (EXTERNAL_AVX_FAST(mm_flags)) {
c->dsp.resample = c->linear ? ff_resample_linear_float_avx
: ff_resample_common_float_avx;
}
- if (EXTERNAL_FMA3(mm_flags)) {
+ if (EXTERNAL_FMA3(mm_flags) && !(mm_flags & AV_CPU_FLAG_AVXSLOW)) {
c->dsp.resample = c->linear ? ff_resample_linear_float_fma3
: ff_resample_common_float_fma3;
}