aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-12-05 04:58:03 +0100
committerClément Bœsch <ubitux@gmail.com>2012-12-19 03:13:25 +0100
commitdd8a76ab080d6862ec8e182e805794ebb27be8b0 (patch)
tree9a1b122ed35cb5b435c86865f6ce10c53e4f7fa1
parentdea9da5f1650f3deb9b3e8f2d96727da2f32547a (diff)
downloadffmpeg-dd8a76ab080d6862ec8e182e805794ebb27be8b0.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.
-rw-r--r--libavfilter/vf_gradfun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c
index a9eeca54f2..9255f614a2 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, const uint8_t *src, const 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;