]> git.sesse.net Git - x264/commitdiff
Fix build with disabled asm
authorSteven Walters <kemuri9@gmail.com>
Thu, 14 Apr 2011 18:09:45 +0000 (11:09 -0700)
committerFiona Glaser <fiona@x264.com>
Thu, 14 Apr 2011 18:50:00 +0000 (11:50 -0700)
common/common.h
common/x86/util.h

index a9be0788f283d977b3639bcb47dc2892c4a12f6e..03211eb095c62b80d47c335f9d59801acba7019d 100644 (file)
@@ -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
 
index e89d8384a0d92736188806803d2c4e65a222f40b..ff5292293fdb9b57c2529cbd89b1593cdac3e240 100644 (file)
 #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