diff options
author | Diego Biurrun <diego@biurrun.de> | 2012-08-29 19:01:05 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-09-08 18:18:34 +0200 |
commit | e0c6cce44729d94e2a5507a4b6d031f23e8bd7b6 (patch) | |
tree | 5118ee396e1879c3f90dfc1898e9bbd868e4b583 /libavutil/x86 | |
parent | 6a0200f24de51eeb94a3a1f75ee105786a6e088d (diff) | |
download | ffmpeg-e0c6cce44729d94e2a5507a4b6d031f23e8bd7b6.tar.gz |
x86: Replace checks for CPU extensions and flags by convenience macros
This separates code relying on inline from that relying on external
assembly and fixes instances where the coalesced check was incorrect.
Diffstat (limited to 'libavutil/x86')
-rw-r--r-- | libavutil/x86/float_dsp_init.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavutil/x86/float_dsp_init.c b/libavutil/x86/float_dsp_init.c index d259a367e0..d1b0b8c622 100644 --- a/libavutil/x86/float_dsp_init.c +++ b/libavutil/x86/float_dsp_init.c @@ -20,6 +20,7 @@ #include "libavutil/cpu.h" #include "libavutil/float_dsp.h" +#include "cpu.h" extern void ff_vector_fmul_sse(float *dst, const float *src0, const float *src1, int len); @@ -33,16 +34,14 @@ extern void ff_vector_fmac_scalar_avx(float *dst, const float *src, float mul, void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) { -#if HAVE_YASM int mm_flags = av_get_cpu_flags(); - if (mm_flags & AV_CPU_FLAG_SSE && HAVE_SSE) { + if (EXTERNAL_SSE(mm_flags)) { fdsp->vector_fmul = ff_vector_fmul_sse; fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse; } - if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) { + if (EXTERNAL_AVX(mm_flags)) { fdsp->vector_fmul = ff_vector_fmul_avx; fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx; } -#endif } |