diff options
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r-- | libavutil/internal.h | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h index 2dacb2c5af..a105fe6b44 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -40,6 +40,14 @@ #include "cpu.h" #include "dict.h" +#if ARCH_X86 +# include "x86/emms.h" +#endif + +#ifndef emms_c +# define emms_c() +#endif + #ifndef attribute_align_arg #if ARCH_X86_32 && AV_GCC_VERSION_AT_LEAST(4,2) # define attribute_align_arg __attribute__((force_align_arg_pointer)) @@ -154,25 +162,4 @@ # define ONLY_IF_THREADS_ENABLED(x) NULL #endif -#if HAVE_MMX_INLINE -/** - * Empty mmx state. - * this must be called between any dsp function and float/double code. - * for example sin(); dsp->idct_put(); emms_c(); cos() - */ -static av_always_inline void emms_c(void) -{ - if(av_get_cpu_flags() & AV_CPU_FLAG_MMX) - __asm__ volatile ("emms" ::: "memory"); -} -#elif HAVE_MMX && HAVE_MM_EMPTY -# include <mmintrin.h> -# define emms_c _mm_empty -#elif HAVE_MMX && HAVE_YASM -# include "libavutil/x86/emms.h" -# define emms_c avpriv_emms_yasm -#else -# define emms_c() -#endif /* HAVE_MMX_INLINE */ - #endif /* AVUTIL_INTERNAL_H */ |