gegl r2293 - in trunk: . operations/common
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2293 - in trunk: . operations/common
- Date: Fri, 16 May 2008 22:49:38 +0100 (BST)
Author: ok
Date: Fri May 16 21:49:38 2008
New Revision: 2293
URL: http://svn.gnome.org/viewvc/gegl?rev=2293&view=rev
Log:
* operations/common/brightness-contrast.c:
(process_simd): fixed buggy loop.
* operations/common/invert.c: (process_g4f): and another one.
Modified:
trunk/ChangeLog
trunk/operations/common/brightness-contrast.c
trunk/operations/common/invert.c
Modified: trunk/operations/common/brightness-contrast.c
==============================================================================
--- trunk/operations/common/brightness-contrast.c (original)
+++ trunk/operations/common/brightness-contrast.c Fri May 16 21:49:38 2008
@@ -95,13 +95,13 @@
for (i=0; i<n_pixels; i++)
{
gint component;
- for (component=0; component<3; component++)
+ for (component=0; component <3 ; component++)
{
out_pixel[component] =
(in_pixel[component] - 0.5) * contrast + brightness + 0.5;
}
out_pixel[3] = in_pixel[3]; /* copy the alpha */
- in_pixel += 4;
+ in_pixel += 4;
out_pixel += 4;
}
return TRUE;
@@ -130,7 +130,7 @@
g4float contrast = g4float_all(o->contrast);
g4float half = g4float_half;
- while (--samples)
+ while (samples--)
{
*out = (*in - half) * contrast + brightness;
g4floatA(*out)=g4floatA(*in);
Modified: trunk/operations/common/invert.c
==============================================================================
--- trunk/operations/common/invert.c (original)
+++ trunk/operations/common/invert.c Fri May 16 21:49:38 2008
@@ -56,7 +56,7 @@
#ifdef HAS_G4FLOAT
static gboolean
-process_g4f (GeglOperation *op,
+process_simd (GeglOperation *op,
void *in_buf,
void *out_buf,
glong samples)
@@ -65,7 +65,7 @@
g4float *out = out_buf;
g4float one = g4float_one;
- while (--samples)
+ while (samples--)
{
gfloat a= g4float_a(*in)[3];
*out = one - *in;
@@ -96,7 +96,7 @@
#ifdef HAS_G4FLOAT
gegl_operation_class_add_processor (operation_class,
- G_CALLBACK (process_g4f), "simd");
+ G_CALLBACK (process_simd), "simd");
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]