Commit ac1d1adf authored by ramiro's avatar ramiro

Rename RUNTIME_CPUDETECT to CONFIG_RUNTIME_CPUDETECT and always define it.


git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@29154 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 430f76dc
...@@ -1096,12 +1096,12 @@ static void fillPlane(uint8_t* plane, int stride, int width, int height, int y, ...@@ -1096,12 +1096,12 @@ static void fillPlane(uint8_t* plane, int stride, int width, int height, int y,
//Note: we have C, MMX, MMX2, 3DNOW versions, there is no 3DNOW+MMX2 one //Note: we have C, MMX, MMX2, 3DNOW versions, there is no 3DNOW+MMX2 one
//Plain C versions //Plain C versions
#if !HAVE_MMX || defined (RUNTIME_CPUDETECT) || !CONFIG_GPL #if !HAVE_MMX || CONFIG_RUNTIME_CPUDETECT || !CONFIG_GPL
#define COMPILE_C #define COMPILE_C
#endif #endif
#if ARCH_PPC #if ARCH_PPC
#if (HAVE_ALTIVEC || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL #if (HAVE_ALTIVEC || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL
#undef COMPILE_C #undef COMPILE_C
#define COMPILE_ALTIVEC #define COMPILE_ALTIVEC
#endif #endif
...@@ -1109,15 +1109,15 @@ static void fillPlane(uint8_t* plane, int stride, int width, int height, int y, ...@@ -1109,15 +1109,15 @@ static void fillPlane(uint8_t* plane, int stride, int width, int height, int y,
#if ARCH_X86 #if ARCH_X86
#if ((HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL #if ((HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL
#define COMPILE_MMX #define COMPILE_MMX
#endif #endif
#if (HAVE_MMX2 || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL #if (HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL
#define COMPILE_MMX2 #define COMPILE_MMX2
#endif #endif
#if ((HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL #if ((HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL
#define COMPILE_3DNOW #define COMPILE_3DNOW
#endif #endif
#endif //ARCH_X86 #endif //ARCH_X86
...@@ -1770,7 +1770,7 @@ static SwsFunc getSwsFunc(SwsContext *c) ...@@ -1770,7 +1770,7 @@ static SwsFunc getSwsFunc(SwsContext *c)
{ {
int flags = c->flags; int flags = c->flags;
#if defined(RUNTIME_CPUDETECT) && CONFIG_GPL #if CONFIG_RUNTIME_CPUDETECT && CONFIG_GPL
#if ARCH_X86 #if ARCH_X86
// ordered per speed fastest first // ordered per speed fastest first
if (flags & SWS_CPU_CAPS_MMX2) { if (flags & SWS_CPU_CAPS_MMX2) {
...@@ -1800,7 +1800,7 @@ static SwsFunc getSwsFunc(SwsContext *c) ...@@ -1800,7 +1800,7 @@ static SwsFunc getSwsFunc(SwsContext *c)
sws_init_swScale_C(c); sws_init_swScale_C(c);
return swScale_C; return swScale_C;
#endif /* ARCH_X86 */ #endif /* ARCH_X86 */
#else //RUNTIME_CPUDETECT #else //CONFIG_RUNTIME_CPUDETECT
#if HAVE_MMX2 #if HAVE_MMX2
sws_init_swScale_MMX2(c); sws_init_swScale_MMX2(c);
return swScale_MMX2; return swScale_MMX2;
...@@ -1817,7 +1817,7 @@ static SwsFunc getSwsFunc(SwsContext *c) ...@@ -1817,7 +1817,7 @@ static SwsFunc getSwsFunc(SwsContext *c)
sws_init_swScale_C(c); sws_init_swScale_C(c);
return swScale_C; return swScale_C;
#endif #endif
#endif //!RUNTIME_CPUDETECT #endif //!CONFIG_RUNTIME_CPUDETECT
} }
static int PlanarToNV12Wrapper(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, static int PlanarToNV12Wrapper(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
...@@ -2397,7 +2397,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d ...@@ -2397,7 +2397,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
__asm__ volatile("emms\n\t"::: "memory"); __asm__ volatile("emms\n\t"::: "memory");
#endif #endif
#if !defined(RUNTIME_CPUDETECT) || !CONFIG_GPL //ensure that the flags match the compiled variant if cpudetect is off #if !CONFIG_RUNTIME_CPUDETECT || !CONFIG_GPL //ensure that the flags match the compiled variant if cpudetect is off
flags &= ~(SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2|SWS_CPU_CAPS_3DNOW|SWS_CPU_CAPS_ALTIVEC|SWS_CPU_CAPS_BFIN); flags &= ~(SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2|SWS_CPU_CAPS_3DNOW|SWS_CPU_CAPS_ALTIVEC|SWS_CPU_CAPS_BFIN);
#if HAVE_MMX2 #if HAVE_MMX2
flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2; flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2;
...@@ -2410,7 +2410,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d ...@@ -2410,7 +2410,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
#elif ARCH_BFIN #elif ARCH_BFIN
flags |= SWS_CPU_CAPS_BFIN; flags |= SWS_CPU_CAPS_BFIN;
#endif #endif
#endif /* RUNTIME_CPUDETECT */ #endif /* CONFIG_RUNTIME_CPUDETECT */
if (clip_table[512] != 255) globalInit(); if (clip_table[512] != 255) globalInit();
if (!rgb15to16) sws_rgb2rgb_init(flags); if (!rgb15to16) sws_rgb2rgb_init(flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment