diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-09 02:21:25 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-07-10 14:33:09 +0300 |
commit | f80ddd5bf760e685f4d912ce6e6763e6cab45910 (patch) | |
tree | 4585d8dd37d1505415b5037c6b36600c2872ffee /libavutil/internal.h | |
parent | 620b1e7e989e71825858c621fa96a7e0a742d239 (diff) | |
download | ffmpeg-f80ddd5bf760e685f4d912ce6e6763e6cab45910.tar.gz |
lavu: use intrinsics for emms on systems lacking inline asm support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r-- | libavutil/internal.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h index 41e8a9ab36..e8bcca571b 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -231,7 +231,7 @@ struct AVDictionary { # define ONLY_IF_THREADS_ENABLED(x) NULL #endif -#if HAVE_MMX +#if HAVE_MMX && HAVE_INLINE_ASM /** * Empty mmx state. * this must be called between any dsp function and float/double code. @@ -241,8 +241,11 @@ static av_always_inline void emms_c(void) { __asm__ volatile ("emms" ::: "memory"); } +#elif HAVE_MMX && HAVE_MM_EMPTY +# include <mmintrin.h> +# define emms_c _mm_empty #else /* HAVE_MMX */ -#define emms_c() +# define emms_c() #endif /* HAVE_MMX */ #endif /* AVUTIL_INTERNAL_H */ |