[gegl] plasma: Remove use of floats_per_pixel macro
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] plasma: Remove use of floats_per_pixel macro
- Date: Thu, 30 Jun 2011 09:43:56 +0000 (UTC)
commit b1cf2de7986f57fa3ca0792511488e618133d877
Author: Mukund Sivaraman <muks banu com>
Date: Thu Jun 30 15:07:50 2011 +0530
plasma: Remove use of floats_per_pixel macro
operations/workshop/plasma.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/operations/workshop/plasma.c b/operations/workshop/plasma.c
index e28a6af..0e86a3d 100644
--- a/operations/workshop/plasma.c
+++ b/operations/workshop/plasma.c
@@ -40,7 +40,6 @@ gegl_chant_double (turbulence, _("Turbulence"), 0.1, 7.0, 2,
#define GEGL_CHANT_TYPE_FILTER
#define GEGL_CHANT_C_FILE "plasma.c"
-#define floats_per_pixel 4
#define MANUAL_ROI_VAL 500
@@ -68,7 +67,7 @@ average_pixel (gfloat *dst_buf,
{
gint i;
- for (i = 0; i < floats_per_pixel; i++)
+ for (i = 0; i < 4; i++)
*dst_buf++ = (*src_buf1++ + *src_buf2++) / 2;
}
@@ -78,7 +77,7 @@ random_rgba (GRand *gr,
{
gint i;
- for (i = 0; i < floats_per_pixel; i++)
+ for (i = 0; i < 4; i++)
dest[i] = (gfloat) g_rand_double_range (gr, 0, 1);
}
@@ -93,7 +92,7 @@ add_random (GRand *gr,
amount /= 2;
if (amount > 0)
- for (i = 0; i < floats_per_pixel; i++)
+ for (i = 0; i < 4; i++)
{
tmp = dest[i] + (gfloat) g_rand_double_range(gr, -amount, amount);
dest[i] = CLAMP (tmp, 0, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]