[gegl] boxfilter: use floats instead of doubles for performance



commit 3adcafb300928ce05f82da8b04a1665c51fd5f42
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu Oct 15 04:41:08 2015 +0200

    boxfilter: use floats instead of doubles for performance

 gegl/gegl-algorithms-boxfilter.inc |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gegl/gegl-algorithms-boxfilter.inc b/gegl/gegl-algorithms-boxfilter.inc
index 0685b97..cfa1180 100644
--- a/gegl/gegl-algorithms-boxfilter.inc
+++ b/gegl/gegl-algorithms-boxfilter.inc
@@ -51,15 +51,15 @@ BOXFILTER_FUNCNAME (guchar              *dest_buf,
           src[6] -= components;
 
           {
-            const gdouble lt = left_weight * top_weight;
-            const gdouble lm = left_weight * middle_weight;
-            const gdouble lb = left_weight * bottom_weight;
-            const gdouble ct = center_weight * top_weight;
-            const gdouble cm = center_weight * middle_weight;
-            const gdouble cb = center_weight * bottom_weight;
-            const gdouble rt = right_weight * top_weight;
-            const gdouble rm = right_weight * middle_weight;
-            const gdouble rb = right_weight * bottom_weight;
+            const gfloat lt = left_weight * top_weight;
+            const gfloat lm = left_weight * middle_weight;
+            const gfloat lb = left_weight * bottom_weight;
+            const gfloat ct = center_weight * top_weight;
+            const gfloat cm = center_weight * middle_weight;
+            const gfloat cb = center_weight * bottom_weight;
+            const gfloat rt = right_weight * top_weight;
+            const gfloat rm = right_weight * middle_weight;
+            const gfloat rb = right_weight * bottom_weight;
 
             /* XXX: move switch outside scanline loop */
            switch (components)


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