diff options
author | Rudolf Polzer <divverent@xonotic.org> | 2012-08-23 12:32:13 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-23 13:13:53 +0200 |
commit | 2adc81f0a2459a565437009ff6f4ace1dca3d46c (patch) | |
tree | 4fb92807ad61980fac5230d670af374aaaa9d082 /TOOLS/vf_dlopen/filterutils.c | |
parent | 2e6450c7cc88f1e39034ac111e9b54a421bca661 (diff) | |
download | mpv-2adc81f0a2459a565437009ff6f4ace1dca3d46c.tar.bz2 mpv-2adc81f0a2459a565437009ff6f4ace1dca3d46c.tar.xz |
vf_dlopen: add a generic filter to load external filters
Usage: -vf dlopen=filename.so:args...
Examples of such filters are provided in TOOLS/vf_dlopen/
Diffstat (limited to 'TOOLS/vf_dlopen/filterutils.c')
-rw-r--r-- | TOOLS/vf_dlopen/filterutils.c | 19 |
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); +} + |