[Mplayer-cvslog] CVS: main/Gui/bitmap bitmap.c,1.4,1.5
Arpi of Ize
arpi at mplayerhq.hu
Sun May 12 03:09:12 CEST 2002
- Previous message: [Mplayer-cvslog] CVS: main Makefile,1.185,1.186 configure,1.464,1.465
- Next message: [Mplayer-cvslog] CVS: main/DOCS bugreports.html,1.21,1.22 faq.html,1.73,1.74 users_against_developers.html,1.17,1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/Gui/bitmap
In directory mail:/var/tmp.root/cvs-serv5620
Modified Files:
bitmap.c
Log Message:
bigendian fix by Colin Leroy <colin at colino.net>
Index: bitmap.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/bitmap/bitmap.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- bitmap.c 23 Feb 2002 15:12:51 -0000 1.4
+++ bitmap.c 12 May 2002 01:09:10 -0000 1.5
@@ -30,9 +30,16 @@
memset( bf->Image,0,bf->ImageSize );
for ( c=0,i=0;i < (int)(bf->Width * bf->Height * 3); )
{
- bf->Image[c++]=tmpImage[i++];
- bf->Image[c++]=tmpImage[i++];
- bf->Image[c++]=tmpImage[i++]; c++;
+#ifndef WORDS_BIGENDIAN
+ bf->Image[c++]=tmpImage[i++]; //red
+ bf->Image[c++]=tmpImage[i++]; //green
+ bf->Image[c++]=tmpImage[i++]; c++; //blue
+#else
+ unsigned char t=tmpImage[i++];
+ bf->Image[c++]=tmpImage[i++]; //green
+ bf->Image[c++]=t; c++; //red
+ bf->Image[c++]=tmpImage[i++]; //blue
+#endif
}
free( tmpImage );
}
@@ -55,7 +62,11 @@
void Normalize( txSample * bf )
{
int i;
+#ifndef WORDS_BIGENDIAN
for ( i=0;i < (int)bf->ImageSize;i+=4 ) bf->Image[i+3]=0;
+#else
+ for ( i=0;i < (int)bf->ImageSize;i+=4 ) bf->Image[i]=0;
+#endif
}
unsigned char tmp[512];
- Previous message: [Mplayer-cvslog] CVS: main Makefile,1.185,1.186 configure,1.464,1.465
- Next message: [Mplayer-cvslog] CVS: main/DOCS bugreports.html,1.21,1.22 faq.html,1.73,1.74 users_against_developers.html,1.17,1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list