summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rwxr-xr-xconfigure7
-rw-r--r--cpudetect.c4
-rw-r--r--liba52/imdct.c2
-rw-r--r--liba52/liba52_changes.diff2
-rw-r--r--libswscale/swscale.c20
-rw-r--r--libvo/aclib.c18
-rw-r--r--libvo/osd.c44
-rw-r--r--mpcommon.c4
-rw-r--r--mplayer.c2
10 files changed, 55 insertions, 52 deletions
diff --git a/Makefile b/Makefile
index 90022d6b3c..d884632178 100644
--- a/Makefile
+++ b/Makefile
@@ -867,7 +867,9 @@ version.h: version.sh
###### dependency declarations / specific CFLAGS ######
# Make sure all generated header files are created.
-$(DEPS) $(MENCODER_DEPS) $(MPLAYER_DEPS): codecs.conf.h help_mp.h version.h
+codec-cfg.d codec-cfg.o: codecs.conf.h
+$(DEPS) $(MENCODER_DEPS) $(MPLAYER_DEPS): help_mp.h
+mpcommon.d mpcommon.o vobsub.d vobsub.o stream/stream_cddb.d stream/stream_cddb.o stream/network.d stream/network.o libmpdemux/muxer_avi.d libmpdemux/muxer_avi.o gui/win32/gui.d gui/win32/gui.o: version.h
libdvdcss/%: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.10\" $(CFLAGS_LIBDVDCSS)
libdvdnav/%: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\"
diff --git a/configure b/configure
index 3cfbe09e4b..020fb4ab95 100755
--- a/configure
+++ b/configure
@@ -22,13 +22,14 @@
# If you want to add a new check for $feature, here is a simple skeleton:
#
# echocheck "$feature"
-# if "$_feature" = auto; then
+# if test "$_feature" = auto; then
# cat > $TMPC << EOF
# #include <feature.h>
# int main(void) { return 0; }
# EOF
# _feature=no
# cc_check && _feature=yes
+# fi
# if test "$_feature" = yes ; then
# def_feature='#define CONFIG_FEATURE 1'
# else
@@ -2813,9 +2814,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"
diff --git a/cpudetect.c b/cpudetect.c
index b5eb47e970..e6e8a86f25 100644
--- a/cpudetect.c
+++ b/cpudetect.c
@@ -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[]){
diff --git a/liba52/imdct.c b/liba52/imdct.c
index e16038855e..b813345537 100644
--- a/liba52/imdct.c
+++ b/liba52/imdct.c
@@ -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
diff --git a/liba52/liba52_changes.diff b/liba52/liba52_changes.diff
index 206e84c213..f00bb444d2 100644
--- a/liba52/liba52_changes.diff
+++ b/liba52/liba52_changes.diff
@@ -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
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 4799542421..ca5e2d986f 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -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
//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 @@ static void fillPlane(uint8_t* plane, int stride, int width, int height, int y,
#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 @@ static SwsFunc getSwsFunc(SwsContext *c)
{
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 @@ static SwsFunc getSwsFunc(SwsContext *c)
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 @@ static SwsFunc getSwsFunc(SwsContext *c)
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 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
__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 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
#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);
diff --git a/libvo/aclib.c b/libvo/aclib.c
index 47c9dead6b..4fbd36d10e 100644
--- a/libvo/aclib.c
+++ b/libvo/aclib.c
@@ -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 * from, size_t len)
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 * from, size_t len)
memcpy(to, from, len); // prior to mmx we use the standart memcpy
#endif
-#endif //!RUNTIME_CPUDETECT
+#endif //!CONFIG_RUNTIME_CPUDETECT
return to;
}
diff --git a/libvo/osd.c b/libvo/osd.c
index 42dd4fcc69..9f17bdb31e 100644
--- a/libvo/osd.c
+++ b/libvo/osd.c
@@ -37,21 +37,21 @@ static const unsigned long long mask24hl __attribute__((aligned(8))) = 0x0000FF
//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 __attribute__((aligned(8))) = 0x0000FF
#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, unsigned char* src, unsigned char *srca, in
#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, unsigned char* src, unsigned char *srca, in
#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, unsigned char* src, unsigned char *srca, in
#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, unsigned char* src, unsigned char *srca, in
#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, unsigned char* src, unsigned char *srca, in
#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, unsigned char* src, unsigned char *srca, in
#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, unsigned char* src, unsigned char *srca, i
#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, unsigned char* src, unsigned char *srca, i
#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, unsigned char* src, unsigned char *srca, i
#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, unsigned char* src, unsigned char *srca, i
#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
}
}
diff --git a/mpcommon.c b/mpcommon.c
index e649f3e49d..11be57664a 100644
--- a/mpcommon.c
+++ b/mpcommon.c
@@ -43,7 +43,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);
@@ -64,7 +64,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 */
}
diff --git a/mplayer.c b/mplayer.c
index 94a30b668f..1bd4cfaf2b 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -769,7 +769,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);