comparison src/video/SDL_blit_A.c @ 3035:ff602fdfdedc

Removed Rafal Bursig's MMX RLE code, at his request.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 13 Jan 2009 07:20:55 +0000
parents 8cc00819c8d6
children 90aec03bf9fd
comparison
equal deleted inserted replaced
3034:0e821769fc51 3035:ff602fdfdedc
1264 Uint32 s1; 1264 Uint32 s1;
1265 Uint32 d1; 1265 Uint32 d1;
1266 1266
1267 while (height--) { 1267 while (height--) {
1268 /* *INDENT-OFF* */ 1268 /* *INDENT-OFF* */
1269 DUFFS_LOOP_DOUBLE2({ 1269 DUFFS_LOOP4({
1270 /* One Pixel Blend */
1271 s = *srcp; 1270 s = *srcp;
1272 d = *dstp; 1271 d = *dstp;
1273 s1 = s & 0xff00ff; 1272 s1 = s & 0xff00ff;
1274 d1 = d & 0xff00ff; 1273 d1 = d & 0xff00ff;
1275 d1 = (d1 + ((s1 - d1) * alpha >> 8)) 1274 d1 = (d1 + ((s1 - d1) * alpha >> 8))
1276 & 0xff00ff; 1275 & 0xff00ff;
1277 s &= 0xff00; 1276 s &= 0xff00;
1278 d &= 0xff00; 1277 d &= 0xff00;
1279 d = (d + ((s - d) * alpha >> 8)) & 0xff00; 1278 d = (d + ((s - d) * alpha >> 8)) & 0xff00;
1280 *dstp = d1 | d | 0xff000000; 1279 *dstp = d1 | d | 0xff000000;
1281 ++srcp;
1282 ++dstp;
1283 },{
1284 /* Two Pixels Blend */
1285 s = *srcp;
1286 d = *dstp;
1287 s1 = s & 0xff00ff;
1288 d1 = d & 0xff00ff;
1289 d1 += (s1 - d1) * alpha >> 8;
1290 d1 &= 0xff00ff;
1291
1292 s = ((s & 0xff00) >> 8) |
1293 ((srcp[1] & 0xff00) << 8);
1294 d = ((d & 0xff00) >> 8) |
1295 ((dstp[1] & 0xff00) << 8);
1296 d += (s - d) * alpha >> 8;
1297 d &= 0x00ff00ff;
1298
1299 *dstp++ = d1 | ((d << 8) & 0xff00) | 0xff000000;
1300 ++srcp;
1301
1302 s1 = *srcp;
1303 d1 = *dstp;
1304 s1 &= 0xff00ff;
1305 d1 &= 0xff00ff;
1306 d1 += (s1 - d1) * alpha >> 8;
1307 d1 &= 0xff00ff;
1308
1309 *dstp = d1 | ((d >> 8) & 0xff00) | 0xff000000;
1310 ++srcp; 1280 ++srcp;
1311 ++dstp; 1281 ++dstp;
1312 }, width); 1282 }, width);
1313 /* *INDENT-ON* */ 1283 /* *INDENT-ON* */
1314 srcp += srcskip; 1284 srcp += srcskip;
1586 gmask = _mm_set_pi32(0x07E007E0, 0x07E007E0); /* MASKGREEN -> gmask */ 1556 gmask = _mm_set_pi32(0x07E007E0, 0x07E007E0); /* MASKGREEN -> gmask */
1587 bmask = _mm_set_pi32(0x001F001F, 0x001F001F); /* MASKBLUE -> bmask */ 1557 bmask = _mm_set_pi32(0x001F001F, 0x001F001F); /* MASKBLUE -> bmask */
1588 1558
1589 while (height--) { 1559 while (height--) {
1590 /* *INDENT-OFF* */ 1560 /* *INDENT-OFF* */
1591 DUFFS_LOOP_QUATRO2( 1561 DUFFS_LOOP_124(
1592 { 1562 {
1593 s = *srcp++; 1563 s = *srcp++;
1594 d = *dstp; 1564 d = *dstp;
1595 /* 1565 /*
1596 * shift out the middle component (green) to 1566 * shift out the middle component (green) to
1724 gmask = _mm_set_pi32(0x03E003E0, 0x03E003E0); /* MASKGREEN -> gmask */ 1694 gmask = _mm_set_pi32(0x03E003E0, 0x03E003E0); /* MASKGREEN -> gmask */
1725 bmask = _mm_set_pi32(0x001F001F, 0x001F001F); /* MASKBLUE -> bmask */ 1695 bmask = _mm_set_pi32(0x001F001F, 0x001F001F); /* MASKBLUE -> bmask */
1726 1696
1727 while (height--) { 1697 while (height--) {
1728 /* *INDENT-OFF* */ 1698 /* *INDENT-OFF* */
1729 DUFFS_LOOP_QUATRO2( 1699 DUFFS_LOOP_124(
1730 { 1700 {
1731 s = *srcp++; 1701 s = *srcp++;
1732 d = *dstp; 1702 d = *dstp;
1733 /* 1703 /*
1734 * shift out the middle component (green) to 1704 * shift out the middle component (green) to