From e66149e714006d099d1ebfcca3f22ca74fc7dcf4 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 24 May 2011 10:03:26 -0400 Subject: swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*. --- libswscale/yuv2rgb.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'libswscale/yuv2rgb.c') diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 74262c6b7f..a502f654ed 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -32,7 +32,7 @@ #include "rgb2rgb.h" #include "swscale.h" #include "swscale_internal.h" -#include "libavutil/x86_cpu.h" +#include "libavutil/cpu.h" #include "libavutil/bswap.h" extern const uint8_t dither_4x4_16[4][8]; @@ -579,24 +579,18 @@ CLOSEYUV2RGBFUNC(1) SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c) { SwsFunc t = NULL; -#if HAVE_MMX - t = ff_yuv2rgb_init_mmx(c); -#endif -#if HAVE_VIS - t = ff_yuv2rgb_init_vis(c); -#endif -#if CONFIG_MLIB - t = ff_yuv2rgb_init_mlib(c); -#endif -#if HAVE_ALTIVEC - if (c->flags & SWS_CPU_CAPS_ALTIVEC) - t = ff_yuv2rgb_init_altivec(c); -#endif -#if ARCH_BFIN - if (c->flags & SWS_CPU_CAPS_BFIN) + if (HAVE_MMX) { + t = ff_yuv2rgb_init_mmx(c); + } else if (HAVE_VIS) { + t = ff_yuv2rgb_init_vis(c); + } else if (CONFIG_MLIB) { + t = ff_yuv2rgb_init_mlib(c); + } else if (HAVE_ALTIVEC) { + t = ff_yuv2rgb_init_altivec(c); + } else if (ARCH_BFIN) { t = ff_yuv2rgb_get_func_ptr_bfin(c); -#endif + } if (t) return t; -- cgit v1.2.3