diff options
author | Clément Bœsch <ubitux@gmail.com> | 2012-12-05 04:58:03 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-03-28 07:58:55 +0100 |
commit | 8b9a153ef3673d5847291987fa0dcddeac4a640b (patch) | |
tree | d9acbbdc9b06e756f77399066202412270dacea1 | |
parent | f2a59722d161981c2161ba25f3aea42d65b818f8 (diff) | |
download | ffmpeg-8b9a153ef3673d5847291987fa0dcddeac4a640b.tar.gz |
lavfi/gradfun: do not increment DC pointer for odd values.
First DC is only used once otherwise. This also makes the code
consistent with ASM versions.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavfilter/vf_gradfun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index ca7ef69144..80b7e412e3 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -56,7 +56,7 @@ DECLARE_ALIGNED(16, static const uint16_t, dither)[8][8] = { void ff_gradfun_filter_line_c(uint8_t *dst, uint8_t *src, uint16_t *dc, int width, int thresh, const uint16_t *dithers) { int x; - for (x = 0; x < width; x++, dc += x & 1) { + for (x = 0; x < width; dc += x & 1, x++) { int pix = src[x] << 7; int delta = dc[0] - pix; int m = abs(delta) * thresh >> 16; |