summaryrefslogtreecommitdiffstats
path: root/TOOLS/vf_dlopen/filterutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'TOOLS/vf_dlopen/filterutils.c')
-rw-r--r--TOOLS/vf_dlopen/filterutils.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/TOOLS/vf_dlopen/filterutils.c b/TOOLS/vf_dlopen/filterutils.c
new file mode 100644
index 0000000000..e2f14092de
--- /dev/null
+++ b/TOOLS/vf_dlopen/filterutils.c
@@ -0,0 +1,19 @@
+#include <assert.h>
+#include <string.h>
+
+#include "filterutils.h"
+
+void copy_plane(
+ unsigned char *dest, unsigned dest_stride,
+ const unsigned char *src, unsigned src_stride,
+ unsigned length,
+ unsigned rows
+ )
+{
+ unsigned i;
+ assert(dest_stride >= length);
+ assert(src_stride >= length);
+ for (i = 0; i < rows; ++i)
+ memcpy(&dest[dest_stride * i], &src[src_stride * i], length);
+}
+