changeset 4708:000ca7a19331

mem2agpcpy_pic()
author michael
date Thu, 14 Feb 2002 22:34:24 +0000
parents af6fe94d455b
children 860808c94265
files libvo/fastmemcpy.h
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/fastmemcpy.h	Thu Feb 14 22:33:29 2002 +0000
+++ b/libvo/fastmemcpy.h	Thu Feb 14 22:34:24 2002 +0000
@@ -19,4 +19,24 @@
 #else /* USE_FASTMEMCPY */
 #define mem2agpcpy(a,b,c) memcpy(a,b,c)
 #endif
+
+static inline void * mem2agpcpy_pic(void * dst, void * src, int bytesPerLine, int height, int dstStride, int srcStride)
+{
+	int i;
+	void *retval=dst;
+
+	if(dstStride == srcStride) mem2agpcpy(dst, src, srcStride*height);
+	else
+	{
+		for(i=0; i<height; i++)
+		{
+			mem2agpcpy(dst, src, bytesPerLine);
+			src+= srcStride;
+			dst+= dstStride;
+		}
+	}
+
+	return retval;
+}
+
 #endif