Mercurial > mplayer.hg
diff postproc/rgb2rgb_template.c @ 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 | 0684cad9b204 |
children | 93e8d1655797 |
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 } }