[gegl] workshop: optimize linear interpolation in bilateral-filter-fast



commit 736358093c2ef46a4bcfa8748892ab4cb9c74415
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri Dec 22 03:04:23 2017 +0100

    workshop: optimize linear interpolation in bilateral-filter-fast

 operations/workshop/bilateral-filter-fast.c |    2 +-
 tests/mipmap/invert-crop-reference.png      |  Bin 12734 -> 0 bytes
 tests/mipmap/invert-reference.png           |  Bin 59900 -> 0 bytes
 tests/mipmap/rotate-crop-reference.png      |  Bin 15381 -> 0 bytes
 tests/mipmap/rotate-reference.png           |  Bin 80769 -> 0 bytes
 tests/mipmap/unsharp-crop-reference.png     |  Bin 15192 -> 0 bytes
 tests/mipmap/unsharp-reference.png          |  Bin 71226 -> 0 bytes
 7 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/operations/workshop/bilateral-filter-fast.c b/operations/workshop/bilateral-filter-fast.c
index 7f0121f..a362139 100644
--- a/operations/workshop/bilateral-filter-fast.c
+++ b/operations/workshop/bilateral-filter-fast.c
@@ -55,7 +55,7 @@ property_int (s_sigma, _("Blur radius"), 8)
 
 inline static float lerp(float a, float b, float v)
 {
-  return (1.0f - v) * a + v * b;
+  return a + v * (b - a);
 }
 
 static void


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