comparison src/video/SDL_blit_A.c @ 1546:4b835e36633d

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Thu, 16 Mar 2006 00:35:21 +0000
parents a8bf1aa21020
children b255b4058d37
comparison
equal deleted inserted replaced
1545:8d9bb0cf2c2a 1546:4b835e36633d
2173 */ 2173 */
2174 s = (s | s << 16) & 0x07e0f81f; 2174 s = (s | s << 16) & 0x07e0f81f;
2175 d = (d | d << 16) & 0x07e0f81f; 2175 d = (d | d << 16) & 0x07e0f81f;
2176 d += (s - d) * alpha >> 5; 2176 d += (s - d) * alpha >> 5;
2177 d &= 0x07e0f81f; 2177 d &= 0x07e0f81f;
2178 *dstp++ = d | d >> 16; 2178 *dstp++ = (Uint16)(d | d >> 16);
2179 },{ 2179 },{
2180 s = *srcp++; 2180 s = *srcp++;
2181 d = *dstp; 2181 d = *dstp;
2182 /* 2182 /*
2183 * shift out the middle component (green) to 2183 * shift out the middle component (green) to
2186 */ 2186 */
2187 s = (s | s << 16) & 0x07e0f81f; 2187 s = (s | s << 16) & 0x07e0f81f;
2188 d = (d | d << 16) & 0x07e0f81f; 2188 d = (d | d << 16) & 0x07e0f81f;
2189 d += (s - d) * alpha >> 5; 2189 d += (s - d) * alpha >> 5;
2190 d &= 0x07e0f81f; 2190 d &= 0x07e0f81f;
2191 *dstp++ = d | d >> 16; 2191 *dstp++ = (Uint16)(d | d >> 16);
2192 s = *srcp++; 2192 s = *srcp++;
2193 d = *dstp; 2193 d = *dstp;
2194 /* 2194 /*
2195 * shift out the middle component (green) to 2195 * shift out the middle component (green) to
2196 * the high 16 bits, and process all three RGB 2196 * the high 16 bits, and process all three RGB
2198 */ 2198 */
2199 s = (s | s << 16) & 0x07e0f81f; 2199 s = (s | s << 16) & 0x07e0f81f;
2200 d = (d | d << 16) & 0x07e0f81f; 2200 d = (d | d << 16) & 0x07e0f81f;
2201 d += (s - d) * alpha >> 5; 2201 d += (s - d) * alpha >> 5;
2202 d &= 0x07e0f81f; 2202 d &= 0x07e0f81f;
2203 *dstp++ = d | d >> 16; 2203 *dstp++ = (Uint16)(d | d >> 16);
2204 },{ 2204 },{
2205 src1 = *(__m64*)srcp; /* 4 src pixels -> src1 */ 2205 src1 = *(__m64*)srcp; /* 4 src pixels -> src1 */
2206 dst1 = *(__m64*)dstp; /* 4 dst pixels -> dst1 */ 2206 dst1 = *(__m64*)dstp; /* 4 dst pixels -> dst1 */
2207 2207
2208 /* red */ 2208 /* red */
2308 */ 2308 */
2309 s = (s | s << 16) & 0x03e07c1f; 2309 s = (s | s << 16) & 0x03e07c1f;
2310 d = (d | d << 16) & 0x03e07c1f; 2310 d = (d | d << 16) & 0x03e07c1f;
2311 d += (s - d) * alpha >> 5; 2311 d += (s - d) * alpha >> 5;
2312 d &= 0x03e07c1f; 2312 d &= 0x03e07c1f;
2313 *dstp++ = d | d >> 16; 2313 *dstp++ = (Uint16)(d | d >> 16);
2314 },{ 2314 },{
2315 s = *srcp++; 2315 s = *srcp++;
2316 d = *dstp; 2316 d = *dstp;
2317 /* 2317 /*
2318 * shift out the middle component (green) to 2318 * shift out the middle component (green) to
2321 */ 2321 */
2322 s = (s | s << 16) & 0x03e07c1f; 2322 s = (s | s << 16) & 0x03e07c1f;
2323 d = (d | d << 16) & 0x03e07c1f; 2323 d = (d | d << 16) & 0x03e07c1f;
2324 d += (s - d) * alpha >> 5; 2324 d += (s - d) * alpha >> 5;
2325 d &= 0x03e07c1f; 2325 d &= 0x03e07c1f;
2326 *dstp++ = d | d >> 16; 2326 *dstp++ = (Uint16)(d | d >> 16);
2327 s = *srcp++; 2327 s = *srcp++;
2328 d = *dstp; 2328 d = *dstp;
2329 /* 2329 /*
2330 * shift out the middle component (green) to 2330 * shift out the middle component (green) to
2331 * the high 16 bits, and process all three RGB 2331 * the high 16 bits, and process all three RGB
2333 */ 2333 */
2334 s = (s | s << 16) & 0x03e07c1f; 2334 s = (s | s << 16) & 0x03e07c1f;
2335 d = (d | d << 16) & 0x03e07c1f; 2335 d = (d | d << 16) & 0x03e07c1f;
2336 d += (s - d) * alpha >> 5; 2336 d += (s - d) * alpha >> 5;
2337 d &= 0x03e07c1f; 2337 d &= 0x03e07c1f;
2338 *dstp++ = d | d >> 16; 2338 *dstp++ = (Uint16)(d | d >> 16);
2339 },{ 2339 },{
2340 src1 = *(__m64*)srcp; /* 4 src pixels -> src1 */ 2340 src1 = *(__m64*)srcp; /* 4 src pixels -> src1 */
2341 dst1 = *(__m64*)dstp; /* 4 dst pixels -> dst1 */ 2341 dst1 = *(__m64*)dstp; /* 4 dst pixels -> dst1 */
2342 2342
2343 /* red -- process the bits in place */ 2343 /* red -- process the bits in place */