[MPlayer-cvslog] CVS: main/postproc rgb2rgb_template.c,1.76,1.77

Oded Shimon ods15 at ods15.dyndns.org
Fri Feb 24 13:36:37 CET 2006


On Fri, Feb 24, 2006 at 10:53:02AM +0100, Alan Curry CVS wrote:
> CVS change done by Alan Curry CVS
> 
> Update of /cvsroot/mplayer/main/postproc
> In directory mail:/var2/tmp/cvs-serv26637
> 
> Modified Files:
> 	rgb2rgb_template.c 
> Log Message:
> Fix rgb32tobgr16, rgb32to15, and rgb32tobgr15. All had the same problem that
> was fixed in rgb32to16 about a year ago: using only the first 8 bits of the
> 32-bit pixel.

> -		const int src= *s; s += 4;
> -		*d++ = ((src&0xF8)<<8) + ((src&0xFC00)>>5) + ((src&0xF80000)>>19);
> +		register int rgb = *(uint32_t*)s; s += 4;
> +		*d++ = ((rgb&0xF8)<<8) + ((rgb&0xFC00)>>5) + ((rgb&0xF80000)>>19);

Is this endian safe?

- ods15




More information about the MPlayer-cvslog mailing list