changeset 7891:4d6369c408b5

fixing RGB32->RGB16 on big endian patch by (Colin Leroy <colin at colino dot net>)
author michael
date Wed, 23 Oct 2002 23:52:57 +0000
parents d35f7bafc007
children 4154b3126927
files postproc/rgb2rgb_template.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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
 	}
 }