[FFmpeg-devel] [PATCH 1/5] avutil: add pixelutils API
Lukasz Marek
lukasz.m.luki2 at gmail.com
Sat Aug 2 20:30:39 CEST 2014
> +static av_always_inline int sad_wxh(const uint8_t *src1, ptrdiff_t stride1,
> + const uint8_t *src2, ptrdiff_t stride2,
> + int w, int h)
> +{
> + int x, y, sum = 0;
> +
> + for (y = 0; y < h; y++) {
> + for (x = 0; x < w; x++)
> + sum += abs(src1[x] - src2[x]);
minor: I came out of nowhere to this patch, but maybe FFABS? :)
> + src1 += stride1;
> + src2 += stride2;
> + }
> + return sum;
> +}
More information about the ffmpeg-devel
mailing list