# HG changeset patch # User diego # Date 1111486302 0 # Node ID 49dd10a86b23c3f1237f69122c96745dd48c8b9f # Parent 293d3dee2eae273be47c8de7ebc3a13e1510e395 Fixes rgb32to16 conversion for I think all platforms since the int8 cast should never have worked. Tested on PowerPC and fixes the black GUI to show the content. patch by Rene Rebe diff -r 293d3dee2eae -r 49dd10a86b23 postproc/rgb2rgb_template.c --- a/postproc/rgb2rgb_template.c Tue Mar 22 07:45:00 2005 +0000 +++ b/postproc/rgb2rgb_template.c Tue Mar 22 10:11:42 2005 +0000 @@ -403,10 +403,8 @@ #endif while(s < end) { - // FIXME on bigendian - const int src= *s; s += 4; - *d++ = ((src&0xFF)>>3) + ((src&0xFC00)>>5) + ((src&0xF80000)>>8); -// *d++ = ((src>>3)&0x1F) + ((src>>5)&0x7E0) + ((src>>8)&0xF800); + register int rgb = *(uint32_t*)s; s += 4; + *d++ = ((rgb&0xFF)>>3) + ((rgb&0xFC00)>>5) + ((rgb&0xF80000)>>8); } }