aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/mpegvideoenc.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-08-28 17:37:54 +0200
committerDiego Biurrun <diego@biurrun.de>2012-08-29 00:14:52 +0200
commitd39791bf398bedd842ed75260e9de6fcc64c6fe0 (patch)
treefeaa07d9f34081492e6bef0148ef38c131a4b7d3 /libavcodec/x86/mpegvideoenc.c
parentd488c3bcbaf7ddda42597e014deb661a7e9e2112 (diff)
downloadffmpeg-d39791bf398bedd842ed75260e9de6fcc64c6fe0.tar.gz
x86: mpegvideoenc: Do not abuse HAVE_ variables for template instantiation
This avoids trouble if HAVE_ variables are used elsewhere in the file.
Diffstat (limited to 'libavcodec/x86/mpegvideoenc.c')
-rw-r--r--libavcodec/x86/mpegvideoenc.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/libavcodec/x86/mpegvideoenc.c b/libavcodec/x86/mpegvideoenc.c
index 5949a63c45..184912da94 100644
--- a/libavcodec/x86/mpegvideoenc.c
+++ b/libavcodec/x86/mpegvideoenc.c
@@ -30,39 +30,44 @@
extern uint16_t ff_inv_zigzag_direct16[64];
-#if HAVE_SSSE3
-#define HAVE_SSSE3_BAK
-#endif
-#undef HAVE_SSSE3
-#define HAVE_SSSE3 0
-
-#undef HAVE_SSE2
-#undef HAVE_MMXEXT
-#define HAVE_SSE2 0
-#define HAVE_MMXEXT 0
+#define COMPILE_TEMPLATE_MMXEXT 0
+#define COMPILE_TEMPLATE_SSE2 0
+#define COMPILE_TEMPLATE_SSSE3 0
#define RENAME(a) a ## _MMX
#define RENAMEl(a) a ## _mmx
#include "mpegvideoenc_template.c"
-#undef HAVE_MMXEXT
-#define HAVE_MMXEXT 1
+#undef COMPILE_TEMPLATE_SSSE3
+#undef COMPILE_TEMPLATE_SSE2
+#undef COMPILE_TEMPLATE_MMXEXT
+#define COMPILE_TEMPLATE_MMXEXT 1
+#define COMPILE_TEMPLATE_SSE2 0
+#define COMPILE_TEMPLATE_SSSE3 0
#undef RENAME
#undef RENAMEl
#define RENAME(a) a ## _MMX2
#define RENAMEl(a) a ## _mmx2
#include "mpegvideoenc_template.c"
-#undef HAVE_SSE2
-#define HAVE_SSE2 1
+#undef COMPILE_TEMPLATE_MMXEXT
+#undef COMPILE_TEMPLATE_SSE2
+#undef COMPILE_TEMPLATE_SSSE3
+#define COMPILE_TEMPLATE_MMXEXT 0
+#define COMPILE_TEMPLATE_SSE2 1
+#define COMPILE_TEMPLATE_SSSE3 0
#undef RENAME
#undef RENAMEl
#define RENAME(a) a ## _SSE2
#define RENAMEl(a) a ## _sse2
#include "mpegvideoenc_template.c"
-#ifdef HAVE_SSSE3_BAK
-#undef HAVE_SSSE3
-#define HAVE_SSSE3 1
+#if HAVE_SSSE3
+#undef COMPILE_TEMPLATE_MMXEXT
+#undef COMPILE_TEMPLATE_SSE2
+#undef COMPILE_TEMPLATE_SSSE3
+#define COMPILE_TEMPLATE_MMXEXT 0
+#define COMPILE_TEMPLATE_SSE2 1
+#define COMPILE_TEMPLATE_SSSE3 1
#undef RENAME
#undef RENAMEl
#define RENAME(a) a ## _SSSE3