Browse Source

avutil: Ensure that emms_c is always defined, even on non-x86

tags/n1.2
Diego Biurrun 12 years ago
parent
commit
4db96649ca
2 changed files with 6 additions and 3 deletions
  1. +4
    -0
      libavutil/internal.h
  2. +2
    -3
      libavutil/x86/emms.h

+ 4
- 0
libavutil/internal.h View File

@@ -43,6 +43,10 @@
# 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))


+ 2
- 3
libavutil/x86/emms.h View File

@@ -25,6 +25,7 @@
void avpriv_emms_yasm(void);

#if HAVE_MMX_INLINE
# define emms_c emms_c
/**
* Empty mmx state.
* this must be called between any dsp function and float/double code.
@@ -37,10 +38,8 @@ static av_always_inline void emms_c(void)
#elif HAVE_MMX && HAVE_MM_EMPTY
# include <mmintrin.h>
# define emms_c _mm_empty
#elif HAVE_MMX && HAVE_YASM
#elif HAVE_MMX_EXTERNAL
# define emms_c avpriv_emms_yasm
#else
# define emms_c()
#endif /* HAVE_MMX_INLINE */

#endif /* AVUTIL_X86_EMMS_H */

Loading…
Cancel
Save