From: Steven Walters Date: Thu, 14 Apr 2011 18:09:45 +0000 (-0700) Subject: Fix build with disabled asm X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=aa21558b139c1bbd9067444a9d802d2407dc95bc;p=x264.git Fix build with disabled asm --- diff --git a/common/common.h b/common/common.h index a9be0788..03211eb0 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 1e91c3b5..ab346cb2 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 + +#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