From b491c6919d7fd7cbc0fb0bc55693b82d9c584907 Mon Sep 17 00:00:00 2001 From: Stephen okra Houston Date: Thu, 23 Jun 2016 16:27:52 -0500 Subject: [PATCH] Ephoto Fix equalization algo. --- src/bin/ephoto_filters.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/ephoto_filters.c b/src/bin/ephoto_filters.c index ba7d529..1aa70a0 100644 --- a/src/bin/ephoto_filters.c +++ b/src/bin/ephoto_filters.c @@ -1006,7 +1006,7 @@ static void _histogram_eq(void *data, Ecore_Thread *th EINA_UNUSED) { Ephoto_Filter *ef = data; - Evas_Coord x, y, yy, w, h; + Evas_Coord x, y, w, h; unsigned int *p1, *p2; int i, a, r, g, b, bb, gg, rr, norm; int total; @@ -1041,10 +1041,10 @@ _histogram_eq(void *data, Ecore_Thread *th EINA_UNUSED) (double) total); ef->cdf[i] = (int) round(sum * 255); } - for (yy = 0; (yy - h) < h; yy++) + for (y = 0; y < h; y++) { - p1 = ef->im_data + ((yy - h) * w); - p2 = ef->im_data_new + ((yy - h) * w); + p1 = ef->im_data + (y * w); + p2 = ef->im_data_new + (y * w); for (x = 0; x < w; x++) { b = ((*p1) & 0xff);