diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-05-24 21:04:38 +0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-05-24 22:48:49 +0400 |
commit | e9735572113ab903b92cc0a7931eb894e7177f6e (patch) | |
tree | ddea2c042c1a42e06990a5abf41faf237b3562dd /libavutil | |
parent | 7ca5338b49aa9967c9b18503490ca656e3bd6c5d (diff) |
Move emms_c() from libavcodec to libavutil.
Diffstat (limited to 'libavutil')
-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 */ |