--- sourceforge.net/trunk/rdesktop/xwin.c 2004/04/26 13:48:39 677 +++ sourceforge.net/trunk/rdesktop/xwin.c 2004/04/26 23:00:25 679 @@ -229,6 +229,15 @@ return make_colour(pc); } +#define UNROLL8(stm) { stm stm stm stm stm stm stm stm } +#define REPEAT(stm) \ +{ \ + while (out <= end - 8 * 4) \ + UNROLL8(stm) \ + while (out < end) \ + { stm } \ +} + static void translate8to8(uint8 * data, uint8 * out, uint8 * end) { @@ -241,7 +250,9 @@ { uint16 value; - if (g_xserver_be) + if (g_arch_match) + REPEAT(*(((uint16*)out)++) = g_colmap[*(data++)];) + else if (g_xserver_be) { while (out < end) { @@ -294,7 +305,9 @@ { uint32 value; - if (g_xserver_be) + if (g_arch_match) + REPEAT(*(((uint32*)out)++) = g_colmap[*(data++)];) + else if (g_xserver_be) { while (out < end) {