[FFmpeg-devel] [PATCH 6/6] pp: split compile configuration.
Clément Bœsch
ubitux at gmail.com
Wed Nov 14 23:30:00 CET 2012
It will be simpler to add more instruction sets that way.
---
libpostproc/postprocess.c | 33 ++++++++++++++++++++-------------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 39a807a..6335754 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -549,19 +549,26 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride,
#if ARCH_X86 && HAVE_INLINE_ASM
-#if (HAVE_MMX_INLINE && !HAVE_AMD3DNOW_INLINE && !HAVE_MMXEXT_INLINE) || CONFIG_RUNTIME_CPUDETECT
-#define COMPILE_MMX 1
-#include "postprocess_template.c"
-#endif
-
-#if HAVE_MMXEXT_INLINE || CONFIG_RUNTIME_CPUDETECT
-#define COMPILE_MMXEXT 1
-#include "postprocess_template.c"
-#endif
-
-#if (HAVE_AMD3DNOW_INLINE && !HAVE_MMXEXT_INLINE) || CONFIG_RUNTIME_CPUDETECT
-#define COMPILE_3DNOW 1
-#include "postprocess_template.c"
+#if CONFIG_RUNTIME_CPUDETECT
+ /* enable all */
+# define COMPILE_MMX 1
+# include "postprocess_template.c"
+# define COMPILE_MMXEXT 1
+# include "postprocess_template.c"
+# define COMPILE_3DNOW 1
+# include "postprocess_template.c"
+#else
+ /* ordered per speed fastest first */
+# if HAVE_MMXEXT_INLINE
+# define COMPILE_MMXEXT 1
+# include "postprocess_template.c"
+# elif HAVE_AMD3DNOW_INLINE
+# define COMPILE_3DNOW 1
+# include "postprocess_template.c"
+# elif HAVE_MMX_INLINE
+# define COMPILE_MMX 1
+# include "postprocess_template.c"
+# endif
#endif
#endif /* ARCH_X86 && HAVE_INLINE_ASM */
--
1.8.0
More information about the ffmpeg-devel
mailing list