Mercurial > mplayer.hg
changeset 29114:06540eb5ef6a
Rename RUNTIME_CPUDETECT to CONFIG_RUNTIME_CPUDETECT and always define it.
author | ramiro |
---|---|
date | Wed, 08 Apr 2009 20:21:21 +0000 |
parents | 239a06704f60 |
children | 1e78a310487e |
files | configure cpudetect.c liba52/imdct.c liba52/liba52_changes.diff libswscale/swscale.c libvo/aclib.c libvo/osd.c mpcommon.c mplayer.c |
diffstat | 9 files changed, 51 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Wed Apr 08 18:25:23 2009 +0000 +++ b/configure Wed Apr 08 20:21:21 2009 +0000 @@ -2808,9 +2808,9 @@ echocheck "runtime cpudetection" if test "$_runtime_cpudetection" = yes ; then _optimizing="Runtime CPU-Detection enabled" - def_runtime_cpudetection='#define RUNTIME_CPUDETECT 1' -else - def_runtime_cpudetection='#undef RUNTIME_CPUDETECT' + def_runtime_cpudetection='#define CONFIG_RUNTIME_CPUDETECT 1' +else + def_runtime_cpudetection='#define CONFIG_RUNTIME_CPUDETECT 0' fi echores "$_runtime_cpudetection"
--- a/cpudetect.c Wed Apr 08 18:25:23 2009 +0000 +++ b/cpudetect.c Wed Apr 08 20:21:21 2009 +0000 @@ -193,7 +193,7 @@ // caps->hasMMX2 = 0; // caps->hasMMX = 0; -#ifndef RUNTIME_CPUDETECT +#if !CONFIG_RUNTIME_CPUDETECT #if !HAVE_MMX if(caps->hasMMX) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"MMX supported but disabled\n"); caps->hasMMX=0; @@ -218,7 +218,7 @@ if(caps->has3DNowExt) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNowExt supported but disabled\n"); caps->has3DNowExt=0; #endif -#endif // RUNTIME_CPUDETECT +#endif // CONFIG_RUNTIME_CPUDETECT } char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]){
--- a/liba52/imdct.c Wed Apr 08 18:25:23 2009 +0000 +++ b/liba52/imdct.c Wed Apr 08 20:21:21 2009 +0000 @@ -52,7 +52,7 @@ void (*a52_imdct_512) (sample_t * data, sample_t * delay, sample_t bias); -#ifdef RUNTIME_CPUDETECT +#if CONFIG_RUNTIME_CPUDETECT #undef HAVE_AMD3DNOWEXT #define HAVE_AMD3DNOWEXT 0 #endif
--- a/liba52/liba52_changes.diff Wed Apr 08 18:25:23 2009 +0000 +++ b/liba52/liba52_changes.diff Wed Apr 08 20:21:21 2009 +0000 @@ -1411,7 +1411,7 @@ + +void (*a52_imdct_512) (sample_t * data, sample_t * delay, sample_t bias); + -+#ifdef RUNTIME_CPUDETECT ++#if CONFIG_RUNTIME_CPUDETECT +#undef HAVE_AMD3DNOWEXT +#define HAVE_AMD3DNOWEXT 0 +#endif
--- a/libswscale/swscale.c Wed Apr 08 18:25:23 2009 +0000 +++ b/libswscale/swscale.c Wed Apr 08 20:21:21 2009 +0000 @@ -1096,12 +1096,12 @@ //Note: we have C, MMX, MMX2, 3DNOW versions, there is no 3DNOW+MMX2 one //Plain C versions -#if !HAVE_MMX || defined (RUNTIME_CPUDETECT) || !CONFIG_GPL +#if !HAVE_MMX || CONFIG_RUNTIME_CPUDETECT || !CONFIG_GPL #define COMPILE_C #endif #if ARCH_PPC -#if (HAVE_ALTIVEC || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL +#if (HAVE_ALTIVEC || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL #undef COMPILE_C #define COMPILE_ALTIVEC #endif @@ -1109,15 +1109,15 @@ #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 #endif -#if (HAVE_MMX2 || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL +#if (HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL #define COMPILE_MMX2 #endif -#if ((HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL +#if ((HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL #define COMPILE_3DNOW #endif #endif //ARCH_X86 @@ -1770,7 +1770,7 @@ { int flags = c->flags; -#if defined(RUNTIME_CPUDETECT) && CONFIG_GPL +#if CONFIG_RUNTIME_CPUDETECT && CONFIG_GPL #if ARCH_X86 // ordered per speed fastest first if (flags & SWS_CPU_CAPS_MMX2) { @@ -1800,7 +1800,7 @@ sws_init_swScale_C(c); return swScale_C; #endif /* ARCH_X86 */ -#else //RUNTIME_CPUDETECT +#else //CONFIG_RUNTIME_CPUDETECT #if HAVE_MMX2 sws_init_swScale_MMX2(c); return swScale_MMX2; @@ -1817,7 +1817,7 @@ sws_init_swScale_C(c); return swScale_C; #endif -#endif //!RUNTIME_CPUDETECT +#endif //!CONFIG_RUNTIME_CPUDETECT } static int PlanarToNV12Wrapper(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, @@ -2397,7 +2397,7 @@ __asm__ volatile("emms\n\t"::: "memory"); #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); #if HAVE_MMX2 flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2; @@ -2410,7 +2410,7 @@ #elif ARCH_BFIN flags |= SWS_CPU_CAPS_BFIN; #endif -#endif /* RUNTIME_CPUDETECT */ +#endif /* CONFIG_RUNTIME_CPUDETECT */ if (clip_table[512] != 255) globalInit(); if (!rgb15to16) sws_rgb2rgb_init(flags);
--- a/libvo/aclib.c Wed Apr 08 18:25:23 2009 +0000 +++ b/libvo/aclib.c Wed Apr 08 20:21:21 2009 +0000 @@ -36,25 +36,25 @@ //Note: we have MMX, MMX2, 3DNOW version there is no 3DNOW+MMX2 one //Plain C versions -//#if !HAVE_MMX || defined (RUNTIME_CPUDETECT) +//#if !HAVE_MMX || CONFIG_RUNTIME_CPUDETECT //#define COMPILE_C //#endif #if ARCH_X86 -#if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT) +#if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT #define COMPILE_MMX #endif -#if (HAVE_MMX2 && !HAVE_SSE2) || defined (RUNTIME_CPUDETECT) +#if (HAVE_MMX2 && !HAVE_SSE2) || CONFIG_RUNTIME_CPUDETECT #define COMPILE_MMX2 #endif -#if (HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT) +#if (HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT #define COMPILE_3DNOW #endif -#if HAVE_SSE2 || defined (RUNTIME_CPUDETECT) +#if HAVE_SSE2 || CONFIG_RUNTIME_CPUDETECT #define COMPILE_SSE #endif @@ -158,7 +158,7 @@ #undef fast_memcpy void * fast_memcpy(void * to, const void * from, size_t len) { -#ifdef RUNTIME_CPUDETECT +#if CONFIG_RUNTIME_CPUDETECT #if ARCH_X86 // ordered per speed fasterst first if(gCpuCaps.hasSSE2) @@ -185,14 +185,14 @@ memcpy(to, from, len); // prior to mmx we use the standart memcpy #endif -#endif //!RUNTIME_CPUDETECT +#endif //!CONFIG_RUNTIME_CPUDETECT return to; } #undef mem2agpcpy void * mem2agpcpy(void * to, const void * from, size_t len) { -#ifdef RUNTIME_CPUDETECT +#if CONFIG_RUNTIME_CPUDETECT #if ARCH_X86 // ordered per speed fasterst first if(gCpuCaps.hasSSE2) @@ -219,6 +219,6 @@ memcpy(to, from, len); // prior to mmx we use the standart memcpy #endif -#endif //!RUNTIME_CPUDETECT +#endif //!CONFIG_RUNTIME_CPUDETECT return to; }
--- a/libvo/osd.c Wed Apr 08 18:25:23 2009 +0000 +++ b/libvo/osd.c Wed Apr 08 20:21:21 2009 +0000 @@ -37,21 +37,21 @@ //Note: we have C, X86-nommx, MMX, MMX2, 3DNOW version therse no 3DNOW+MMX2 one //Plain C versions -#if !HAVE_MMX || defined (RUNTIME_CPUDETECT) +#if !HAVE_MMX || CONFIG_RUNTIME_CPUDETECT #define COMPILE_C #endif #if ARCH_X86 -#if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT) +#if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT #define COMPILE_MMX #endif -#if HAVE_MMX2 || defined (RUNTIME_CPUDETECT) +#if HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT #define COMPILE_MMX2 #endif -#if (HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT) +#if (HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT #define COMPILE_3DNOW #endif @@ -134,7 +134,7 @@ #endif /* ARCH_X86 */ void vo_draw_alpha_yv12(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){ -#ifdef RUNTIME_CPUDETECT +#if CONFIG_RUNTIME_CPUDETECT #if ARCH_X86 // ordered by speed / fastest first if(gCpuCaps.hasMMX2) @@ -148,7 +148,7 @@ #else vo_draw_alpha_yv12_C(w, h, src, srca, srcstride, dstbase, dststride); #endif -#else //RUNTIME_CPUDETECT +#else //CONFIG_RUNTIME_CPUDETECT #if HAVE_MMX2 vo_draw_alpha_yv12_MMX2(w, h, src, srca, srcstride, dstbase, dststride); #elif HAVE_AMD3DNOW @@ -160,11 +160,11 @@ #else vo_draw_alpha_yv12_C(w, h, src, srca, srcstride, dstbase, dststride); #endif -#endif //!RUNTIME_CPUDETECT +#endif //!CONFIG_RUNTIME_CPUDETECT } void vo_draw_alpha_yuy2(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){ -#ifdef RUNTIME_CPUDETECT +#if CONFIG_RUNTIME_CPUDETECT #if ARCH_X86 // ordered by speed / fastest first if(gCpuCaps.hasMMX2) @@ -178,7 +178,7 @@ #else vo_draw_alpha_yuy2_C(w, h, src, srca, srcstride, dstbase, dststride); #endif -#else //RUNTIME_CPUDETECT +#else //CONFIG_RUNTIME_CPUDETECT #if HAVE_MMX2 vo_draw_alpha_yuy2_MMX2(w, h, src, srca, srcstride, dstbase, dststride); #elif HAVE_AMD3DNOW @@ -190,11 +190,11 @@ #else vo_draw_alpha_yuy2_C(w, h, src, srca, srcstride, dstbase, dststride); #endif -#endif //!RUNTIME_CPUDETECT +#endif //!CONFIG_RUNTIME_CPUDETECT } void vo_draw_alpha_uyvy(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){ -#ifdef RUNTIME_CPUDETECT +#if CONFIG_RUNTIME_CPUDETECT #if ARCH_X86 // ordered by speed / fastest first if(gCpuCaps.hasMMX2) @@ -208,7 +208,7 @@ #else vo_draw_alpha_uyvy_C(w, h, src, srca, srcstride, dstbase, dststride); #endif -#else //RUNTIME_CPUDETECT +#else //CONFIG_RUNTIME_CPUDETECT #if HAVE_MMX2 vo_draw_alpha_uyvy_MMX2(w, h, src, srca, srcstride, dstbase, dststride); #elif HAVE_AMD3DNOW @@ -220,11 +220,11 @@ #else vo_draw_alpha_uyvy_C(w, h, src, srca, srcstride, dstbase, dststride); #endif -#endif //!RUNTIME_CPUDETECT +#endif //!CONFIG_RUNTIME_CPUDETECT } void vo_draw_alpha_rgb24(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){ -#ifdef RUNTIME_CPUDETECT +#if CONFIG_RUNTIME_CPUDETECT #if ARCH_X86 // ordered by speed / fastest first if(gCpuCaps.hasMMX2) @@ -238,7 +238,7 @@ #else vo_draw_alpha_rgb24_C(w, h, src, srca, srcstride, dstbase, dststride); #endif -#else //RUNTIME_CPUDETECT +#else //CONFIG_RUNTIME_CPUDETECT #if HAVE_MMX2 vo_draw_alpha_rgb24_MMX2(w, h, src, srca, srcstride, dstbase, dststride); #elif HAVE_AMD3DNOW @@ -250,11 +250,11 @@ #else vo_draw_alpha_rgb24_C(w, h, src, srca, srcstride, dstbase, dststride); #endif -#endif //!RUNTIME_CPUDETECT +#endif //!CONFIG_RUNTIME_CPUDETECT } void vo_draw_alpha_rgb32(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){ -#ifdef RUNTIME_CPUDETECT +#if CONFIG_RUNTIME_CPUDETECT #if ARCH_X86 // ordered by speed / fastest first if(gCpuCaps.hasMMX2) @@ -268,7 +268,7 @@ #else vo_draw_alpha_rgb32_C(w, h, src, srca, srcstride, dstbase, dststride); #endif -#else //RUNTIME_CPUDETECT +#else //CONFIG_RUNTIME_CPUDETECT #if HAVE_MMX2 vo_draw_alpha_rgb32_MMX2(w, h, src, srca, srcstride, dstbase, dststride); #elif HAVE_AMD3DNOW @@ -280,7 +280,7 @@ #else vo_draw_alpha_rgb32_C(w, h, src, srca, srcstride, dstbase, dststride); #endif -#endif //!RUNTIME_CPUDETECT +#endif //!CONFIG_RUNTIME_CPUDETECT } #ifdef FAST_OSD_TABLE @@ -299,7 +299,7 @@ //FIXME the optimized stuff is a lie for 15/16bpp as they aren't optimized yet if( mp_msg_test(MSGT_OSD,MSGL_V) ) { -#ifdef RUNTIME_CPUDETECT +#if CONFIG_RUNTIME_CPUDETECT #if ARCH_X86 // ordered per speed fasterst first if(gCpuCaps.hasMMX2) @@ -313,7 +313,7 @@ #else mp_msg(MSGT_OSD,MSGL_INFO,"Using Unoptimized OnScreenDisplay\n"); #endif -#else //RUNTIME_CPUDETECT +#else //CONFIG_RUNTIME_CPUDETECT #if HAVE_MMX2 mp_msg(MSGT_OSD,MSGL_INFO,"Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay\n"); #elif HAVE_AMD3DNOW @@ -325,7 +325,7 @@ #else mp_msg(MSGT_OSD,MSGL_INFO,"Using Unoptimized OnScreenDisplay\n"); #endif -#endif //!RUNTIME_CPUDETECT +#endif //!CONFIG_RUNTIME_CPUDETECT } }
--- a/mpcommon.c Wed Apr 08 18:25:23 2009 +0000 +++ b/mpcommon.c Wed Apr 08 20:21:21 2009 +0000 @@ -41,7 +41,7 @@ gCpuCaps.hasMMX, gCpuCaps.hasMMX2, gCpuCaps.has3DNow, gCpuCaps.has3DNowExt, gCpuCaps.hasSSE, gCpuCaps.hasSSE2, gCpuCaps.hasSSSE3); -#ifdef RUNTIME_CPUDETECT +#if CONFIG_RUNTIME_CPUDETECT mp_msg(MSGT_CPLAYER,MSGL_V, MSGTR_CompiledWithRuntimeDetection); #else mp_msg(MSGT_CPLAYER,MSGL_V, MSGTR_CompiledWithCPUExtensions); @@ -62,7 +62,7 @@ if (HAVE_CMOV) mp_msg(MSGT_CPLAYER,MSGL_V," CMOV"); mp_msg(MSGT_CPLAYER,MSGL_V,"\n"); -#endif /* RUNTIME_CPUDETECT */ +#endif /* CONFIG_RUNTIME_CPUDETECT */ #endif /* ARCH_X86 */ }
--- a/mplayer.c Wed Apr 08 18:25:23 2009 +0000 +++ b/mplayer.c Wed Apr 08 20:21:21 2009 +0000 @@ -791,7 +791,7 @@ async_quit_request = 1; return; // killed from keyboard (^C) or killed [-9] case SIGILL: -#ifdef RUNTIME_CPUDETECT +#if CONFIG_RUNTIME_CPUDETECT mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL_RTCpuSel); #else mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL);