[gegl] operations: edge-laplace is slightly more deterministic



commit d65ff99883f8ffff4abab082fdee13fb7c9e0d24
Author: Téo Mazars <teo mazars ensimag fr>
Date:   Sat Oct 12 09:45:34 2013 +0200

    operations: edge-laplace is slightly more deterministic

 operations/common/edge-laplace.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/operations/common/edge-laplace.c b/operations/common/edge-laplace.c
index 8a84435..62b0e8a 100644
--- a/operations/common/edge-laplace.c
+++ b/operations/common/edge-laplace.c
@@ -36,6 +36,7 @@
 
 #define LAPLACE_RADIUS 2
 #define CHUNK_SIZE     1024
+#define EPSILON        1e-5f
 #define SQR(x)         ((x)*(x))
 
 static void
@@ -215,7 +216,7 @@ edge_laplace (GeglBuffer          *src,
                           src_pix[c + 4 + src_width * 4]);
 
 
-            if (temp_value < 0.0)
+            if (temp_value < EPSILON)
               gradient[c] *= -1.0f;
           }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]