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 /libswscale/x86/rgb2rgb.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 'libswscale/x86/rgb2rgb.c')
-rw-r--r-- | libswscale/x86/rgb2rgb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c index f201281fac..59626804cc 100644 --- a/libswscale/x86/rgb2rgb.c +++ b/libswscale/x86/rgb2rgb.c @@ -28,6 +28,7 @@ #include "config.h" #include "libavutil/attributes.h" #include "libavutil/x86/asm.h" +#include "libavutil/x86/cpu.h" #include "libavutil/cpu.h" #include "libavutil/bswap.h" #include "libswscale/rgb2rgb.h" @@ -133,13 +134,13 @@ av_cold void rgb2rgb_init_x86(void) #if HAVE_INLINE_ASM int cpu_flags = av_get_cpu_flags(); - if (cpu_flags & AV_CPU_FLAG_MMX) + if (INLINE_MMX(cpu_flags)) rgb2rgb_init_MMX(); - if (HAVE_AMD3DNOW && cpu_flags & AV_CPU_FLAG_3DNOW) + if (INLINE_AMD3DNOW(cpu_flags)) rgb2rgb_init_3DNOW(); - if (HAVE_MMXEXT && cpu_flags & AV_CPU_FLAG_MMXEXT) + if (INLINE_MMXEXT(cpu_flags)) rgb2rgb_init_MMX2(); - if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2) + if (INLINE_SSE2(cpu_flags)) rgb2rgb_init_SSE2(); #endif /* HAVE_INLINE_ASM */ } |