[x264-devel] Fix build with disabled asm

Steven Walters git at videolan.org
Thu Apr 14 20:50:54 CEST 2011


x264 | branch: master | Steven Walters <kemuri9 at gmail.com> | Thu Apr 14 11:09:45 2011 -0700| [aa21558b139c1bbd9067444a9d802d2407dc95bc] | committer: Jason Garrett-Glaser

Fix build with disabled asm

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=aa21558b139c1bbd9067444a9d802d2407dc95bc
---

 common/common.h   |    2 +-
 common/x86/util.h |   22 ++++++++++------------
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/common/common.h b/common/common.h
index a9be078..03211eb 100644
--- a/common/common.h
+++ b/common/common.h
@@ -857,7 +857,7 @@ struct x264_t
 // included at the end because it needs x264_t
 #include "macroblock.h"
 
-#if HAVE_MMX
+#if ARCH_X86 || ARCH_X86_64
 #include "x86/util.h"
 #endif
 
diff --git a/common/x86/util.h b/common/x86/util.h
index 1e91c3b..ab346cb 100644
--- a/common/x86/util.h
+++ b/common/x86/util.h
@@ -27,11 +27,19 @@
 #ifndef X264_X86_UTIL_H
 #define X264_X86_UTIL_H
 
-#if HAVE_X86_INLINE_ASM
-
 #ifdef __SSE__
 #include <xmmintrin.h>
+
+#undef M128_ZERO
+#define M128_ZERO ((__m128){0,0,0,0})
+#define x264_union128_t x264_union128_sse_t
+typedef union { __m128 i; uint64_t a[2]; uint32_t b[4]; uint16_t c[8]; uint8_t d[16]; } MAY_ALIAS x264_union128_sse_t;
+#if HAVE_VECTOREXT
+typedef uint32_t v4si __attribute__((vector_size (16)));
 #endif
+#endif // __SSE__
+
+#if HAVE_X86_INLINE_ASM && HAVE_MMX
 
 #define x264_median_mv x264_median_mv_mmxext
 static ALWAYS_INLINE void x264_median_mv_mmxext( int16_t *dst, int16_t *a, int16_t *b, int16_t *c )
@@ -149,16 +157,6 @@ static void ALWAYS_INLINE x264_predictor_roundclip_mmxext( int16_t (*dst)[2], in
     );
 }
 
-#ifdef __SSE__
-#undef M128_ZERO
-#define M128_ZERO ((__m128){0,0,0,0})
-#define x264_union128_t x264_union128_sse_t
-typedef union { __m128 i; uint64_t a[2]; uint32_t b[4]; uint16_t c[8]; uint8_t d[16]; } MAY_ALIAS x264_union128_sse_t;
-#if HAVE_VECTOREXT
-typedef uint32_t v4si __attribute__((vector_size (16)));
-#endif
-#endif
-
 #endif
 
 #endif



More information about the x264-devel mailing list