[MPlayer-cvslog] r22018 - trunk/libvo/fastmemcpy.h

gpoirier subversion at mplayerhq.hu
Fri Jan 26 10:07:55 CET 2007


Author: gpoirier
Date: Fri Jan 26 10:07:55 2007
New Revision: 22018

Modified:
   trunk/libvo/fastmemcpy.h

Log:
get rid of void pointer arithmetic, as spotted by ICC


Modified: trunk/libvo/fastmemcpy.h
==============================================================================
--- trunk/libvo/fastmemcpy.h	(original)
+++ trunk/libvo/fastmemcpy.h	Fri Jan 26 10:07:55 2007
@@ -7,6 +7,7 @@
 #if defined(HAVE_MMX) || defined(HAVE_MMX2) || defined(HAVE_3DNOW) \
 /*    || defined(HAVE_SSE) || defined(HAVE_SSE2) */
 #include <stddef.h>
+#include <inttypes.h>
 
 extern void * fast_memcpy(void * to, const void * from, size_t len);
 extern void * mem2agpcpy(void * to, const void * from, size_t len);
@@ -28,8 +29,8 @@
 	if(dstStride == srcStride)
 	{
 		if (srcStride < 0) {
-	    		src += (height-1)*srcStride;
-	    		dst += (height-1)*dstStride;
+	    		src = (uint8_t*)src + (height-1)*srcStride;
+	    		dst = (uint8_t*)dst + (height-1)*dstStride;
 	    		srcStride = -srcStride;
 		}
 
@@ -40,8 +41,8 @@
 		for(i=0; i<height; i++)
 		{
 			mem2agpcpy(dst, src, bytesPerLine);
-			src+= srcStride;
-			dst+= dstStride;
+			src = (uint8_t*)src + srcStride;
+			dst = (uint8_t*)dst + dstStride;
 		}
 	}
 
@@ -56,8 +57,8 @@
 	if(dstStride == srcStride)
 	{
 		if (srcStride < 0) {
-	    		src += (height-1)*srcStride;
-	    		dst += (height-1)*dstStride;
+	    		src = (uint8_t*)src + (height-1)*srcStride;
+	    		dst = (uint8_t*)dst + (height-1)*dstStride;
 	    		srcStride = -srcStride;
 		}
 
@@ -68,8 +69,8 @@
 		for(i=0; i<height; i++)
 		{
 			memcpy(dst, src, bytesPerLine);
-			src+= srcStride;
-			dst+= dstStride;
+			src = (uint8_t*)src + srcStride;
+			dst = (uint8_t*)dst + dstStride;
 		}
 	}
 



More information about the MPlayer-cvslog mailing list