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/mpegaudiodec.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/mpegaudiodec.c')
-rw-r--r-- | libavcodec/x86/mpegaudiodec.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libavcodec/x86/mpegaudiodec.c b/libavcodec/x86/mpegaudiodec.c index e7c7fbbf48..f8dc8eb1d9 100644 --- a/libavcodec/x86/mpegaudiodec.c +++ b/libavcodec/x86/mpegaudiodec.c @@ -21,6 +21,7 @@ #include "libavutil/cpu.h" #include "libavutil/x86/asm.h" +#include "libavutil/x86/cpu.h" #include "libavcodec/dsputil.h" #include "libavcodec/mpegaudiodsp.h" @@ -247,18 +248,16 @@ void ff_mpadsp_init_mmx(MPADSPContext *s) #endif /* HAVE_SSE2_INLINE */ #if HAVE_YASM - if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) { + if (EXTERNAL_AVX(mm_flags)) { s->imdct36_blocks_float = imdct36_blocks_avx; -#if HAVE_SSE - } else if (mm_flags & AV_CPU_FLAG_SSSE3) { + } else if (EXTERNAL_SSSE3(mm_flags)) { s->imdct36_blocks_float = imdct36_blocks_ssse3; - } else if (mm_flags & AV_CPU_FLAG_SSE3) { + } else if (EXTERNAL_SSE3(mm_flags)) { s->imdct36_blocks_float = imdct36_blocks_sse3; - } else if (mm_flags & AV_CPU_FLAG_SSE2) { + } else if (EXTERNAL_SSE2(mm_flags)) { s->imdct36_blocks_float = imdct36_blocks_sse2; - } else if (mm_flags & AV_CPU_FLAG_SSE) { + } else if (EXTERNAL_SSE(mm_flags)) { s->imdct36_blocks_float = imdct36_blocks_sse; -#endif /* HAVE_SSE */ } #endif /* HAVE_YASM */ } |