unroll the bits in translate8to16/32
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@678 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
da391278ec
commit
7e650f8a49
17
xwin.c
17
xwin.c
@ -229,6 +229,15 @@ translate_colour(uint32 colour)
|
|||||||
return make_colour(pc);
|
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
|
static void
|
||||||
translate8to8(uint8 * data, uint8 * out, uint8 * end)
|
translate8to8(uint8 * data, uint8 * out, uint8 * end)
|
||||||
{
|
{
|
||||||
@ -241,7 +250,9 @@ translate8to16(uint8 * data, uint8 * out, uint8 * end)
|
|||||||
{
|
{
|
||||||
uint16 value;
|
uint16 value;
|
||||||
|
|
||||||
if (g_xserver_be)
|
if (g_arch_match)
|
||||||
|
REPEAT(*(((uint16*)out)++) = g_colmap[*(data++)];)
|
||||||
|
else if (g_xserver_be)
|
||||||
{
|
{
|
||||||
while (out < end)
|
while (out < end)
|
||||||
{
|
{
|
||||||
@ -294,7 +305,9 @@ translate8to32(uint8 * data, uint8 * out, uint8 * end)
|
|||||||
{
|
{
|
||||||
uint32 value;
|
uint32 value;
|
||||||
|
|
||||||
if (g_xserver_be)
|
if (g_arch_match)
|
||||||
|
REPEAT(*(((uint32*)out)++) = g_colmap[*(data++)];)
|
||||||
|
else if (g_xserver_be)
|
||||||
{
|
{
|
||||||
while (out < end)
|
while (out < end)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user