# HG changeset patch # User yaz # Date 1176110788 25200 # Node ID 053baea2cbefff4fcca72beeea69f4302fc461a2 # Parent 7e14701aef54f7306f019370464a057a93d0eac4 [svn] - replace SSE2 detection macro. diff -r 7e14701aef54 -r 053baea2cbef ChangeLog --- a/ChangeLog Sun Apr 08 21:30:22 2007 -0700 +++ b/ChangeLog Mon Apr 09 02:26:28 2007 -0700 @@ -1,3 +1,23 @@ +2007-04-09 04:30:22 +0000 Yoshiki Yazawa + revision [1972] + - replace random number generator in dithering code with SIMD-oriented Fast Mersenne Twister (SFMT). it reduces CPU load on SSE2 or AltiVec capable platform. + + trunk/configure.ac | 22 + + trunk/mk/rules.mk.in | 1 + trunk/src/madplug/Makefile | 2 + trunk/src/madplug/SFMT-alti.c | 126 +++++++ + trunk/src/madplug/SFMT-alti.h | 40 ++ + trunk/src/madplug/SFMT-params.h | 90 +++++ + trunk/src/madplug/SFMT-params19937.h | 22 + + trunk/src/madplug/SFMT-sse2.c | 113 ++++++ + trunk/src/madplug/SFMT-sse2.h | 36 ++ + trunk/src/madplug/SFMT.c | 589 +++++++++++++++++++++++++++++++++++ + trunk/src/madplug/SFMT.h | 121 +++++++ + trunk/src/madplug/dither.c | 104 ------ + trunk/src/madplug/plugin.c | 4 + 13 files changed, 1175 insertions(+), 95 deletions(-) + + 2007-04-07 18:06:36 +0000 Yoshiki Yazawa revision [1970] - now wav plugin can handle remaining buffered data at the end of playing. diff -r 7e14701aef54 -r 053baea2cbef configure.ac --- a/configure.ac Sun Apr 08 21:30:22 2007 -0700 +++ b/configure.ac Mon Apr 09 02:26:28 2007 -0700 @@ -259,21 +259,24 @@ dnl *** SSE2 -AC_LANG(C) -AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include -int main(){ -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) -return 0; -#else -#error no vector builtins -#endif -}]])]) -gcc -E -dD -msse2 -o - conftest.c -if test $? = 0 ; then - AC_DEFINE(HAVE_SSE2, 1, [Define to 1 if your system has SSE2]) - SIMD_CFLAGS=-msse2 - AC_SUBST(SIMD_CFLAGS) -fi +AC_MSG_CHECKING(SSE2) +ac_save_CFLAGS="$CFLAGS" +CFLAGS="-msse2" +AC_TRY_RUN([ +#include +int main() +{ + _mm_setzero_pd(); + return 0; +} +], +[AC_MSG_RESULT(SSE2 yes) +AC_DEFINE(HAVE_SSE2, 1, [Define to 1 if your system has SSE2]) +SIMD_CFLAGS=-msse2], +[AC_MSG_RESULT(SSE2 no)], +) +AC_SUBST(SIMD_CFLAGS) +CFLAGS="$ac_save_CFLAGS" dnl *** MP3