changeset 5504:23ba417cf64b

memcpy_pic() added (copy image plane with src/dst stride)
author arpi
date Sat, 06 Apr 2002 21:46:07 +0000
parents a531a579f005
children 72f080de9ce5
files libvo/fastmemcpy.h
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/fastmemcpy.h	Sat Apr 06 19:09:06 2002 +0000
+++ b/libvo/fastmemcpy.h	Sat Apr 06 21:46:07 2002 +0000
@@ -39,4 +39,23 @@
 	return retval;
 }
 
+static inline void * memcpy_pic(void * dst, void * src, int bytesPerLine, int height, int dstStride, int srcStride)
+{
+	int i;
+	void *retval=dst;
+
+	if(dstStride == srcStride) memcpy(dst, src, srcStride*height);
+	else
+	{
+		for(i=0; i<height; i++)
+		{
+			memcpy(dst, src, bytesPerLine);
+			src+= srcStride;
+			dst+= dstStride;
+		}
+	}
+
+	return retval;
+}
+
 #endif