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 /libavcodec/x86/sbrdsp_init.c | |
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 'libavcodec/x86/sbrdsp_init.c')
-rw-r--r-- | libavcodec/x86/sbrdsp_init.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/x86/sbrdsp_init.c b/libavcodec/x86/sbrdsp_init.c index 0ffe5b9e11..d272896704 100644 --- a/libavcodec/x86/sbrdsp_init.c +++ b/libavcodec/x86/sbrdsp_init.c @@ -21,6 +21,7 @@ #include "config.h" #include "libavutil/cpu.h" +#include "libavutil/x86/cpu.h" #include "libavcodec/sbrdsp.h" float ff_sbr_sum_square_sse(float (*x)[2], int n); @@ -29,12 +30,10 @@ void ff_sbr_hf_g_filt_sse(float (*Y)[2], const float (*X_high)[40][2], void ff_sbrdsp_init_x86(SBRDSPContext *s) { - if (HAVE_YASM) { - int mm_flags = av_get_cpu_flags(); + int mm_flags = av_get_cpu_flags(); - if (mm_flags & AV_CPU_FLAG_SSE) { - s->sum_square = ff_sbr_sum_square_sse; - s->hf_g_filt = ff_sbr_hf_g_filt_sse; - } + if (EXTERNAL_SSE(mm_flags)) { + s->sum_square = ff_sbr_sum_square_sse; + s->hf_g_filt = ff_sbr_hf_g_filt_sse; } } |