branch | pyrit |
changeset 90 | f6a72eb99631 |
parent 89 | fcf1487b398b |
child 92 | 9af5c039b678 |
--- a/src/pixmap.cc Tue Apr 29 13:56:29 2008 +0200 +++ b/src/pixmap.cc Tue Apr 29 23:31:08 2008 +0200 @@ -48,9 +48,10 @@ __m64 m; for (unsigned char *cd = cdata; cd < cdata + w*h*3; cd += 4, fd += 4) { - m = _mm_cvtps_pi8(_mm_mul_ps(cmax, + m = _mm_cvtps_pi16(_mm_mul_ps(cmax, _mm_min_ps(mOne, _mm_set_ps(fd[3],fd[2],fd[1],fd[0])))); - memcpy(cd, &m, 4); + for (int i = 0; i < 4; i++) + cd[i] = ((unsigned char *)&m)[i<<1]; } #endif