Ephoto Fix equalization algo.

This commit is contained in:
Stephen okra Houston 2016-06-23 16:27:52 -05:00
parent ce73f5056f
commit b491c6919d
1 changed files with 4 additions and 4 deletions

View File

@ -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);