equal
deleted
inserted
replaced
39 else |
39 else |
40 c[i] = (unsigned char)(fd[i] * 255.0); |
40 c[i] = (unsigned char)(fd[i] * 255.0); |
41 } |
41 } |
42 *bufp = SDL_MapRGB(screen->format, c[0], c[1], c[2]); |
42 *bufp = SDL_MapRGB(screen->format, c[0], c[1], c[2]); |
43 #else |
43 #else |
44 __m64 m = _mm_cvtps_pi8(_mm_mul_ps(_mm_set_ps1(255.0), |
44 __m64 m = _mm_cvtps_pi16(_mm_mul_ps(_mm_set_ps1(255.0), |
45 _mm_min_ps(mOne, _mm_set_ps(0, fd[2],fd[1],fd[0])))); |
45 _mm_min_ps(mOne, _mm_set_ps(0, fd[2],fd[1],fd[0])))); |
46 *bufp = SDL_MapRGB(screen->format, ((char*)&m)[0], ((char*)&m)[1], ((char*)&m)[2]); |
46 *bufp = SDL_MapRGB(screen->format, ((char*)&m)[0], ((char*)&m)[2], ((char*)&m)[4]); |
47 #endif |
47 #endif |
48 bufp++; |
48 bufp++; |
49 } |
49 } |
50 |
50 |
51 if (SDL_MUSTLOCK(screen)) |
51 if (SDL_MUSTLOCK(screen)) |