diff options
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r-- | libavutil/internal.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h index e890ae7083..51e449d3fe 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -223,4 +223,18 @@ # define ONLY_IF_THREADS_ENABLED(x) NULL #endif +#if HAVE_MMX +/** + * 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) +{ + __asm__ volatile ("emms" ::: "memory"); +} +#else /* HAVE_MMX */ +#define emms_c() +#endif /* HAVE_MMX */ + #endif /* AVUTIL_INTERNAL_H */ |