diff options
author | James Almer <jamrial@gmail.com> | 2015-05-31 14:20:29 -0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-01 00:15:35 +0200 |
commit | c16e99e3b3c02edcf33245468731d414eab97dac (patch) | |
tree | c5435ea3aadf24030fa9c064c76cc535956fb136 /libavcodec/x86 | |
parent | 16c430e8efc8d8528df7805429175dfdfd0d87ac (diff) | |
download | ffmpeg-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 'libavcodec/x86')
-rw-r--r-- | libavcodec/x86/dcadsp_init.c | 4 | ||||
-rw-r--r-- | libavcodec/x86/dct_init.c | 2 | ||||
-rw-r--r-- | libavcodec/x86/fft_init.c | 2 | ||||
-rw-r--r-- | libavcodec/x86/vp9dsp_init.c | 6 |
4 files changed, 8 insertions, 6 deletions
diff --git a/libavcodec/x86/dcadsp_init.c b/libavcodec/x86/dcadsp_init.c index bb86c26037..1a19f6b807 100644 --- a/libavcodec/x86/dcadsp_init.c +++ b/libavcodec/x86/dcadsp_init.c @@ -103,10 +103,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 30c8f12bf2..daf2bb4e5d 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 5682230c8e..5085f11380 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/libavcodec/x86/vp9dsp_init.c b/libavcodec/x86/vp9dsp_init.c index 979bd936ac..00e7125a0c 100644 --- a/libavcodec/x86/vp9dsp_init.c +++ b/libavcodec/x86/vp9dsp_init.c @@ -483,12 +483,14 @@ av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp, int bpp) dsp->itxfm_add[TX_32X32][ADST_DCT] = dsp->itxfm_add[TX_32X32][DCT_ADST] = dsp->itxfm_add[TX_32X32][DCT_DCT] = ff_vp9_idct_idct_32x32_add_avx; - init_fpel(1, 0, 32, put, avx); - init_fpel(0, 0, 64, put, avx); init_lpf(avx); init_dir_tm_h_ipred(8, avx); init_dir_tm_h_ipred(16, avx); init_dir_tm_h_ipred(32, avx); + } + if (EXTERNAL_AVX_FAST(cpu_flags)) { + init_fpel(1, 0, 32, put, avx); + init_fpel(0, 0, 64, put, avx); init_ipred(32, avx, v, VERT); } |