summaryrefslogtreecommitdiffstats
path: root/TOOLS/vf_dlopen/filterutils.c
blob: e2f14092de870a0e99ee94e62c5ad9755f529a1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
}