diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-14 21:25:55 -0700 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-07-21 22:22:58 +0200 |
commit | b2668c85e9d3745847f716f909ba4d3f6de0e12e (patch) | |
tree | d22ec263f6207f189b59b1ce02255b05a91fcc67 /libswscale/x86/rgb2rgb.c | |
parent | 5354a904fe9f1a0c4160d614b764d9826c723b9f (diff) | |
download | ffmpeg-b2668c85e9d3745847f716f909ba4d3f6de0e12e.tar.gz |
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 <diego@biurrun.de>
Diffstat (limited to 'libswscale/x86/rgb2rgb.c')
-rw-r--r-- | libswscale/x86/rgb2rgb.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ } |