aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/x86/rgb2rgb.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-05-24 10:03:26 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2011-05-24 10:03:26 -0400
commite66149e714006d099d1ebfcca3f22ca74fc7dcf4 (patch)
tree4be376903a92797c2c9f3c7e560a7c21247ace19 /libswscale/x86/rgb2rgb.c
parent75abcdb3915e3abb2dc6b5f7d101c177dcfdb626 (diff)
downloadffmpeg-e66149e714006d099d1ebfcca3f22ca74fc7dcf4.tar.gz
swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*.
Diffstat (limited to 'libswscale/x86/rgb2rgb.c')
-rw-r--r--libswscale/x86/rgb2rgb.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c
index e84bc1bcc9..cf901affe6 100644
--- a/libswscale/x86/rgb2rgb.c
+++ b/libswscale/x86/rgb2rgb.c
@@ -27,6 +27,7 @@
#include "config.h"
#include "libavutil/x86_cpu.h"
+#include "libavutil/cpu.h"
#include "libavutil/bswap.h"
#include "libswscale/rgb2rgb.h"
#include "libswscale/swscale.h"
@@ -122,16 +123,16 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL;
32-bit C version, and and&add trick by Michael Niedermayer
*/
-void rgb2rgb_init_x86(int flags)
+void rgb2rgb_init_x86(void)
{
-#if HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX
- if (flags & SWS_CPU_CAPS_SSE2)
- rgb2rgb_init_SSE2();
- else if (flags & SWS_CPU_CAPS_MMX2)
- rgb2rgb_init_MMX2();
- else if (flags & SWS_CPU_CAPS_3DNOW)
- rgb2rgb_init_3DNOW();
- else if (flags & SWS_CPU_CAPS_MMX)
+ int cpu_flags = av_get_cpu_flags();
+
+ if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX)
rgb2rgb_init_MMX();
-#endif /* HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX */
+ if (HAVE_AMD3DNOW && cpu_flags & AV_CPU_FLAG_3DNOW)
+ rgb2rgb_init_3DNOW();
+ if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2)
+ rgb2rgb_init_MMX2();
+ if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2)
+ rgb2rgb_init_SSE2();
}