gegl r2850 - in trunk: . operations/common
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2850 - in trunk: . operations/common
- Date: Fri, 2 Jan 2009 13:02:01 +0000 (UTC)
Author: ok
Date: Fri Jan 2 13:02:00 2009
New Revision: 2850
URL: http://svn.gnome.org/viewvc/gegl?rev=2850&view=rev
Log:
* operations/common/levels.c: (process): treat input and output
buffers separately. (levels assumed that it could do in-place
processing).
Modified:
trunk/ChangeLog
trunk/operations/common/levels.c
Modified: trunk/operations/common/levels.c
==============================================================================
--- trunk/operations/common/levels.c (original)
+++ trunk/operations/common/levels.c Fri Jan 2 13:02:00 2009
@@ -50,7 +50,8 @@
const GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
- gfloat *pixel;
+ gfloat *in_pixel;
+ gfloat *out_pixel;
gfloat in_range;
gfloat out_range;
gfloat in_offset;
@@ -58,7 +59,8 @@
gfloat scale;
glong i;
- pixel = in_buf;
+ in_pixel = in_buf;
+ out_pixel = out_buf;
in_offset = o->in_low * 1.0;
out_offset = o->out_low * 1.0;
@@ -74,8 +76,10 @@
{
int c;
for (c=0;c<3;c++)
- pixel[c] = (pixel[c]- in_offset) * scale + out_offset;
- pixel += 4;
+ out_pixel[c] = (in_pixel[c]- in_offset) * scale + out_offset;
+ out_pixel[3] = in_pixel[3];
+ out_pixel += 4;
+ in_pixel += 4;
}
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]