[MPlayer-cvslog] r29154 - in trunk: configure cpudetect.c liba52/imdct.c liba52/liba52_changes.diff libswscale/swscale.c libvo/aclib.c libvo/osd.c mpcommon.c mplayer.c

ramiro subversion at mplayerhq.hu
Wed Apr 8 22:21:22 CEST 2009


Author: ramiro
Date: Wed Apr  8 22:21:21 2009
New Revision: 29154

Log:
Rename RUNTIME_CPUDETECT to CONFIG_RUNTIME_CPUDETECT and always define it.

Modified:
   trunk/configure
   trunk/cpudetect.c
   trunk/liba52/imdct.c
   trunk/liba52/liba52_changes.diff
   trunk/libvo/aclib.c
   trunk/libvo/osd.c
   trunk/mpcommon.c
   trunk/mplayer.c

Changes in other areas also in this revision:
Modified:
   trunk/libswscale/swscale.c

Modified: trunk/configure
==============================================================================
--- trunk/configure	Wed Apr  8 20:25:23 2009	(r29153)
+++ trunk/configure	Wed Apr  8 22:21:21 2009	(r29154)
@@ -2808,9 +2808,9 @@ echores "$_sighandler"
 echocheck "runtime cpudetection"
 if test "$_runtime_cpudetection" = yes ; then
   _optimizing="Runtime CPU-Detection enabled"
-  def_runtime_cpudetection='#define RUNTIME_CPUDETECT 1'
+  def_runtime_cpudetection='#define CONFIG_RUNTIME_CPUDETECT 1'
 else
-  def_runtime_cpudetection='#undef RUNTIME_CPUDETECT'
+  def_runtime_cpudetection='#define CONFIG_RUNTIME_CPUDETECT 0'
 fi
 echores "$_runtime_cpudetection"
 

Modified: trunk/cpudetect.c
==============================================================================
--- trunk/cpudetect.c	Wed Apr  8 20:25:23 2009	(r29153)
+++ trunk/cpudetect.c	Wed Apr  8 22:21:21 2009	(r29154)
@@ -193,7 +193,7 @@ void GetCpuCaps( CpuCaps *caps)
 //		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 @@ void GetCpuCaps( CpuCaps *caps)
 	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[]){

Modified: trunk/liba52/imdct.c
==============================================================================
--- trunk/liba52/imdct.c	Wed Apr  8 20:25:23 2009	(r29153)
+++ trunk/liba52/imdct.c	Wed Apr  8 22:21:21 2009	(r29154)
@@ -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

Modified: trunk/liba52/liba52_changes.diff
==============================================================================
--- trunk/liba52/liba52_changes.diff	Wed Apr  8 20:25:23 2009	(r29153)
+++ trunk/liba52/liba52_changes.diff	Wed Apr  8 22:21:21 2009	(r29154)
@@ -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

Modified: trunk/libvo/aclib.c
==============================================================================
--- trunk/libvo/aclib.c	Wed Apr  8 20:25:23 2009	(r29153)
+++ trunk/libvo/aclib.c	Wed Apr  8 22:21:21 2009	(r29154)
@@ -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 @@ void * fast_memcpy(void * to, const void
 		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 @@ void * mem2agpcpy(void * to, const void 
 		memcpy(to, from, len); // prior to mmx we use the standart memcpy
 #endif
 
-#endif //!RUNTIME_CPUDETECT
+#endif //!CONFIG_RUNTIME_CPUDETECT
 	return to;
 }

Modified: trunk/libvo/osd.c
==============================================================================
--- trunk/libvo/osd.c	Wed Apr  8 20:25:23 2009	(r29153)
+++ trunk/libvo/osd.c	Wed Apr  8 22:21:21 2009	(r29154)
@@ -37,21 +37,21 @@ static const unsigned long long mask24hl
 
 //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 @@ static const unsigned long long mask24hl
 #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 @@ void vo_draw_alpha_yv12(int w,int h, uns
 #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 @@ void vo_draw_alpha_yv12(int w,int h, uns
 #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 @@ void vo_draw_alpha_yuy2(int w,int h, uns
 #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 @@ void vo_draw_alpha_yuy2(int w,int h, uns
 #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 @@ void vo_draw_alpha_uyvy(int w,int h, uns
 #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 @@ void vo_draw_alpha_uyvy(int w,int h, uns
 #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 @@ void vo_draw_alpha_rgb24(int w,int h, un
 #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 @@ void vo_draw_alpha_rgb24(int w,int h, un
 #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 @@ void vo_draw_alpha_rgb32(int w,int h, un
 #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 @@ void vo_draw_alpha_rgb32(int w,int h, un
 #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 @@ void vo_draw_alpha_init(void){
 //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 @@ void vo_draw_alpha_init(void){
 #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 @@ void vo_draw_alpha_init(void){
 #else
 			mp_msg(MSGT_OSD,MSGL_INFO,"Using Unoptimized OnScreenDisplay\n");
 #endif
-#endif //!RUNTIME_CPUDETECT
+#endif //!CONFIG_RUNTIME_CPUDETECT
 	}
 }
 

Modified: trunk/mpcommon.c
==============================================================================
--- trunk/mpcommon.c	Wed Apr  8 20:25:23 2009	(r29153)
+++ trunk/mpcommon.c	Wed Apr  8 22:21:21 2009	(r29154)
@@ -41,7 +41,7 @@ void print_version(const char* name)
 	   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_SSSE3)
 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 */
 }
 

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Wed Apr  8 20:25:23 2009	(r29153)
+++ trunk/mplayer.c	Wed Apr  8 22:21:21 2009	(r29154)
@@ -791,7 +791,7 @@ static void exit_sighandler(int x){
       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);


More information about the MPlayer-cvslog mailing list