CVS: rdesktop xwin.c,1.152,1.153

Jay Sorg <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22048

Modified Files:
	xwin.c 
Log Message:
optimize split_colour15 and 16

Index: xwin.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/xwin.c,v
retrieving revision 1.152
retrieving revision 1.153
diff -C2 -d -r1.152 -r1.153
*** xwin.c	16 Feb 2004 20:28:09 -0000	1.152
--- xwin.c	25 Feb 2004 18:28:52 -0000	1.153
***************
*** 170,179 ****
  {
  	PixelColour rv;
! 	rv.red = (colour & 0x7c00) >> 10;
! 	rv.red = (rv.red * 0xff) / 0x1f;
! 	rv.green = (colour & 0x03e0) >> 5;
! 	rv.green = (rv.green * 0xff) / 0x1f;
! 	rv.blue = (colour & 0x1f);
! 	rv.blue = (rv.blue * 0xff) / 0x1f;
  	return rv;
  }
--- 170,176 ----
  {
  	PixelColour rv;
! 	rv.red =   (colour & 0x7c00) >> 7;
! 	rv.green = (colour & 0x03e0) >> 2;
! 	rv.blue =  (colour & 0x001f) << 3;
  	return rv;
  }
***************
*** 183,192 ****
  {
  	PixelColour rv;
! 	rv.red = (colour & 0xf800) >> 11;
! 	rv.red = (rv.red * 0xff) / 0x1f;
! 	rv.green = (colour & 0x07e0) >> 5;
! 	rv.green = (rv.green * 0xff) / 0x3f;
! 	rv.blue = (colour & 0x001f);
! 	rv.blue = (rv.blue * 0xff) / 0x1f;
  	return rv;
  }
--- 180,186 ----
  {
  	PixelColour rv;
! 	rv.red =   (colour & 0xf800) >> 8;
! 	rv.green = (colour & 0x07e0) >> 3;
! 	rv.blue =  (colour & 0x001f) << 3;
  	return rv;
  }
***************
*** 196,202 ****
  {
  	PixelColour rv;
! 	rv.blue = (colour & 0xff0000) >> 16;
! 	rv.green = (colour & 0xff00) >> 8;
! 	rv.red = (colour & 0xff);
  	return rv;
  }
--- 190,196 ----
  {
  	PixelColour rv;
! 	rv.blue =  (colour & 0xff0000) >> 16;
! 	rv.green = (colour & 0x00ff00) >> 8;
! 	rv.red =   (colour & 0x0000ff);
  	return rv;
  }



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.