# HG changeset patch # User michael # Date 1035417177 0 # Node ID 4d6369c408b552b1d3c59e19399bdb543bfb1d9e # Parent d35f7bafc007f85cf8fbd9a8964c42065ca14ea4 fixing RGB32->RGB16 on big endian patch by (Colin Leroy ) diff -r d35f7bafc007 -r 4d6369c408b5 postproc/rgb2rgb_template.c --- a/postproc/rgb2rgb_template.c Wed Oct 23 23:48:42 2002 +0000 +++ b/postproc/rgb2rgb_template.c Wed Oct 23 23:52:57 2002 +0000 @@ -364,11 +364,20 @@ #endif while(s < end) { +#ifndef WORDS_BIGENDIAN const int b= *s++; const int g= *s++; const int r= *s++; +#else + const int a= *s++; /*skip*/ + const int r= *s++; + const int g= *s++; + const int b= *s++; +#endif *d++ = (b>>3) | ((g&0xFC)<<3) | ((r&0xF8)<<8); +#ifndef WORDS_BIGENDIAN s++; +#endif } }