diff -r 9d66d323c354 -r 9af5c039b678 src/pixmap.cc --- a/src/pixmap.cc Fri May 02 13:27:47 2008 +0200 +++ b/src/pixmap.cc Mon May 05 15:31:14 2008 +0200 @@ -26,18 +26,19 @@ #include +#include "config.h" +#include "pixmap.h" + #ifdef HAVE_PNG # include #endif -#include "pixmap.h" - unsigned char *Pixmap::getCharData() const { unsigned char *cdata = new unsigned char[w*h*3]; Float *fd = fdata; -#ifdef NO_SSE +#if 1 //def NO_SIMD for (unsigned char *cd = cdata; cd != cdata + w*h*3; cd++, fd++) if (*fd > 1.0) *cd = 255; @@ -49,7 +50,7 @@ for (unsigned char *cd = cdata; cd < cdata + w*h*3; cd += 4, fd += 4) { m = _mm_cvtps_pi16(_mm_mul_ps(cmax, - _mm_min_ps(mOne, _mm_set_ps(fd[3],fd[2],fd[1],fd[0])))); + _mm_min_ps(mOne, _mm_load_ps(fd)))); for (int i = 0; i < 4; i++) cd[i] = ((unsigned char *)&m)[i<<1]; }