summaryrefslogtreecommitdiff
path: root/libswscale/x86/yuv2rgb_mmx.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-07-14 21:25:55 -0700
committerDiego Biurrun <diego@biurrun.de>2012-07-21 22:22:58 +0200
commitb2668c85e9d3745847f716f909ba4d3f6de0e12e (patch)
treed22ec263f6207f189b59b1ce02255b05a91fcc67 /libswscale/x86/yuv2rgb_mmx.c
parent5354a904fe9f1a0c4160d614b764d9826c723b9f (diff)
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/yuv2rgb_mmx.c')
-rw-r--r--libswscale/x86/yuv2rgb_mmx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libswscale/x86/yuv2rgb_mmx.c b/libswscale/x86/yuv2rgb_mmx.c
index 0eaea77485..f534e0e6bd 100644
--- a/libswscale/x86/yuv2rgb_mmx.c
+++ b/libswscale/x86/yuv2rgb_mmx.c
@@ -36,6 +36,8 @@
#include "libavutil/x86_cpu.h"
#include "libavutil/cpu.h"
+#if HAVE_INLINE_ASM
+
#define DITHER1XBPP // only for MMX
/* hope these constant values are cache line aligned */
@@ -64,8 +66,11 @@ DECLARE_ASM_CONST(8, uint64_t, pb_07) = 0x0707070707070707ULL;
#include "yuv2rgb_template.c"
#endif /* HAVE_MMX2 */
+#endif /* HAVE_INLINE_ASM */
+
SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
{
+#if HAVE_INLINE_ASM
int cpu_flags = av_get_cpu_flags();
if (c->srcFormat != PIX_FMT_YUV420P &&
@@ -103,6 +108,7 @@ SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
case PIX_FMT_RGB555: return yuv420_rgb15_MMX;
}
}
+#endif /* HAVE_INLINE_ASM */
return NULL;
}