From b2668c85e9d3745847f716f909ba4d3f6de0e12e Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sat, 14 Jul 2012 21:25:55 -0700 Subject: x86: swscale: Place inline assembly code under appropriate #ifdefs Fixes compilation for compilers that do not support gcc inline assembly. Signed-off-by: Diego Biurrun --- libswscale/x86/rgb2rgb.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libswscale/x86/rgb2rgb.c') diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c index 282618c301..353b0aab22 100644 --- a/libswscale/x86/rgb2rgb.c +++ b/libswscale/x86/rgb2rgb.c @@ -33,6 +33,8 @@ #include "libswscale/swscale.h" #include "libswscale/swscale_internal.h" +#if HAVE_INLINE_ASM + DECLARE_ASM_CONST(8, uint64_t, mmx_ff) = 0x00000000000000FFULL; DECLARE_ASM_CONST(8, uint64_t, mmx_null) = 0x0000000000000000ULL; DECLARE_ASM_CONST(8, uint64_t, mmx_one) = 0xFFFFFFFFFFFFFFFFULL; @@ -123,8 +125,11 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL; 32-bit C version, and and&add trick by Michael Niedermayer */ +#endif /* HAVE_INLINE_ASM */ + void rgb2rgb_init_x86(void) { +#if HAVE_INLINE_ASM int cpu_flags = av_get_cpu_flags(); if (cpu_flags & AV_CPU_FLAG_MMX) @@ -135,4 +140,5 @@ void rgb2rgb_init_x86(void) rgb2rgb_init_MMX2(); if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2) rgb2rgb_init_SSE2(); +#endif /* HAVE_INLINE_ASM */ } -- cgit v1.2.3