[Mplayer-cvslog] CVS: main/libmpcodecs vf.c,1.107,1.108
Nicolas Plourde CVS
syncmail at mplayerhq.hu
Mon May 31 17:08:00 CEST 2004
CVS change done by Nicolas Plourde CVS
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv12193/libmpcodecs
Modified Files:
vf.c
Log Message:
Big Endian fix
Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- vf.c 28 Apr 2004 04:29:17 -0000 1.107
+++ vf.c 31 May 2004 15:07:58 -0000 1.108
@@ -217,12 +217,19 @@
unsigned int* p=(unsigned int*) dst;
int size=(mpi->bpp>>3)*w/4;
int i;
+#ifdef WORDS_BIGENDIAN
+#define CLEAR_PACKEDYUV_PATTERN 0x00800080
+#define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x80008000
+#else
+#define CLEAR_PACKEDYUV_PATTERN 0x80008000
+#define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x00800080
+#endif
if(mpi->flags&MP_IMGFLAG_SWAPPED){
- for(i=0;i<size;i+=4) p[i]=p[i+1]=p[i+2]=p[i+3]=0x00800080;
- for(;i<size;i++) p[i]=0x00800080;
+ for(i=0;i<size-3;i+=4) p[i]=p[i+1]=p[i+2]=p[i+3]=CLEAR_PACKEDYUV_PATTERN_SWAPPED;
+ for(;i<size;i++) p[i]=CLEAR_PACKEDYUV_PATTERN_SWAPPED;
} else {
- for(i=0;i<size;i+=4) p[i]=p[i+1]=p[i+2]=p[i+3]=0x80008000;
- for(;i<size;i++) p[i]=0x80008000;
+ for(i=0;i<size-3;i+=4) p[i]=p[i+1]=p[i+2]=p[i+3]=CLEAR_PACKEDYUV_PATTERN;
+ for(;i<size;i++) p[i]=CLEAR_PACKEDYUV_PATTERN;
}
} else
memset(dst,0,(mpi->bpp>>3)*w);
More information about the MPlayer-cvslog
mailing list