[MPlayer-cvslog] CVS: main/libvo fastmemcpy.h,1.21,1.22

Jindrich Makovicka CVS syncmail at mplayerhq.hu
Fri Apr 8 12:31:21 CEST 2005


CVS change done by Jindrich Makovicka CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv3320

Modified Files:
	fastmemcpy.h 
Log Message:
support for negative strides (fixes -vf spp,flip crash)

Index: fastmemcpy.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/fastmemcpy.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- fastmemcpy.h	28 Oct 2004 01:15:51 -0000	1.21
+++ fastmemcpy.h	8 Apr 2005 10:31:18 -0000	1.22
@@ -25,7 +25,16 @@
 	int i;
 	void *retval=dst;
 
-	if(dstStride == srcStride) mem2agpcpy(dst, src, srcStride*height);
+	if(dstStride == srcStride)
+	{
+		if (srcStride < 0) {
+	    		src += (height-1)*srcStride;
+	    		dst += (height-1)*dstStride;
+	    		srcStride = -srcStride;
+		}
+
+		mem2agpcpy(dst, src, srcStride*height);
+	}
 	else
 	{
 		for(i=0; i<height; i++)
@@ -44,7 +53,16 @@
 	int i;
 	void *retval=dst;
 
-	if(dstStride == srcStride) memcpy(dst, src, srcStride*height);
+	if(dstStride == srcStride)
+	{
+		if (srcStride < 0) {
+	    		src += (height-1)*srcStride;
+	    		dst += (height-1)*dstStride;
+	    		srcStride = -srcStride;
+		}
+
+		memcpy(dst, src, srcStride*height);
+	}
 	else
 	{
 		for(i=0; i<height; i++)




More information about the MPlayer-cvslog mailing list