Originally committed as revision 18380 to svn://svn.ffmpeg.org/ffmpeg/trunk
Ramiro Polla authored on 2009/04/09 05:26:18... | ... |
@@ -100,6 +100,7 @@ show_help(){ |
100 | 100 |
echo " --disable-golomb disable Golomb code" |
101 | 101 |
echo " --disable-mdct disable MDCT code" |
102 | 102 |
echo " --disable-rdft disable RDFT code" |
103 |
+ echo " --enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary)" |
|
103 | 104 |
echo " --enable-hardcoded-tables use hardcoded tables instead of runtime generation" |
104 | 105 |
echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers" |
105 | 106 |
echo " --enable-beos-netserver enable BeOS netserver" |
... | ... |
@@ -806,6 +807,7 @@ CONFIG_LIST=" |
806 | 806 |
postproc |
807 | 807 |
powerpc_perf |
808 | 808 |
rdft |
809 |
+ runtime_cpudetect |
|
809 | 810 |
shared |
810 | 811 |
small |
811 | 812 |
static |
... | ... |
@@ -2282,6 +2284,7 @@ if test "$extra_version" != ""; then |
2282 | 2282 |
echo "version string suffix $extra_version" |
2283 | 2283 |
fi |
2284 | 2284 |
echo "big-endian ${bigendian-no}" |
2285 |
+echo "runtime cpu detection ${runtime_cpudetect-no}" |
|
2285 | 2286 |
if enabled x86; then |
2286 | 2287 |
echo "yasm ${yasm-no}" |
2287 | 2288 |
echo "MMX enabled ${mmx-no}" |
... | ... |
@@ -63,7 +63,7 @@ int has_altivec(void) |
63 | 63 |
|
64 | 64 |
if (err == 0) return has_vu != 0; |
65 | 65 |
return 0; |
66 |
-#elif defined(RUNTIME_CPUDETECT) |
|
66 |
+#elif CONFIG_RUNTIME_CPUDETECT |
|
67 | 67 |
int proc_ver; |
68 | 68 |
// Support of mfspr PVR emulation added in Linux 2.6.17. |
69 | 69 |
__asm__ volatile("mfspr %0, 287" : "=r" (proc_ver)); |
... | ... |
@@ -554,7 +554,7 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, |
554 | 554 |
|
555 | 555 |
//Note: we have C, MMX, MMX2, 3DNOW version there is no 3DNOW+MMX2 one |
556 | 556 |
//Plain C versions |
557 |
-#if !(HAVE_MMX || HAVE_ALTIVEC) || defined (RUNTIME_CPUDETECT) |
|
557 |
+#if !(HAVE_MMX || HAVE_ALTIVEC) || CONFIG_RUNTIME_CPUDETECT |
|
558 | 558 |
#define COMPILE_C |
559 | 559 |
#endif |
560 | 560 |
|
... | ... |
@@ -564,15 +564,15 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, |
564 | 564 |
|
565 | 565 |
#if ARCH_X86 |
566 | 566 |
|
567 |
-#if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT) |
|
567 |
+#if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT |
|
568 | 568 |
#define COMPILE_MMX |
569 | 569 |
#endif |
570 | 570 |
|
571 |
-#if HAVE_MMX2 || defined (RUNTIME_CPUDETECT) |
|
571 |
+#if HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT |
|
572 | 572 |
#define COMPILE_MMX2 |
573 | 573 |
#endif |
574 | 574 |
|
575 |
-#if (HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT) |
|
575 |
+#if (HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT |
|
576 | 576 |
#define COMPILE_3DNOW |
577 | 577 |
#endif |
578 | 578 |
#endif /* ARCH_X86 */ |
... | ... |
@@ -645,7 +645,7 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[] |
645 | 645 |
// Using ifs here as they are faster than function pointers although the |
646 | 646 |
// difference would not be measurable here but it is much better because |
647 | 647 |
// someone might exchange the CPU whithout restarting MPlayer ;) |
648 |
-#ifdef RUNTIME_CPUDETECT |
|
648 |
+#if CONFIG_RUNTIME_CPUDETECT |
|
649 | 649 |
#if ARCH_X86 |
650 | 650 |
// ordered per speed fastest first |
651 | 651 |
if(c->cpuCaps & PP_CPU_CAPS_MMX2) |
... | ... |
@@ -664,7 +664,7 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[] |
664 | 664 |
#endif |
665 | 665 |
postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
666 | 666 |
#endif |
667 |
-#else //RUNTIME_CPUDETECT |
|
667 |
+#else //CONFIG_RUNTIME_CPUDETECT |
|
668 | 668 |
#if HAVE_MMX2 |
669 | 669 |
postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
670 | 670 |
#elif HAVE_AMD3DNOW |
... | ... |
@@ -676,7 +676,7 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[] |
676 | 676 |
#else |
677 | 677 |
postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
678 | 678 |
#endif |
679 |
-#endif //!RUNTIME_CPUDETECT |
|
679 |
+#endif //!CONFIG_RUNTIME_CPUDETECT |
|
680 | 680 |
} |
681 | 681 |
|
682 | 682 |
//static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, |