[gegl] lohalo: further testing (with VIPS) identifies the best minmod macro
- From: Ãyvind KolÃs <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] lohalo: further testing (with VIPS) identifies the best minmod macro
- Date: Fri, 1 Jul 2011 03:36:51 +0000 (UTC)
commit cf3c13bc2f016fb56c64e44674b5103f9303a025
Author: Nicolas Robidoux <nicolas robidoux gmail com>
Date: Wed Jun 22 15:53:26 2011 -0400
lohalo: further testing (with VIPS) identifies the best minmod macro
gegl/buffer/gegl-sampler-lohalo.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-lohalo.c b/gegl/buffer/gegl-sampler-lohalo.c
index 0e9156a..253afea 100644
--- a/gegl/buffer/gegl-sampler-lohalo.c
+++ b/gegl/buffer/gegl-sampler-lohalo.c
@@ -110,7 +110,7 @@
* For uncompressed natural images in high bit depth (images for which
* the slopes a and b are unlikely to be equal to zero or be equal to
* each other), or chips with good branch prediction, the following
- * version of the minmod function may work well.
+ * version of the minmod function may work well:
*
* ( (a_times_b)>=0. ? ( (a_times_b)<(a_times_a) ? (b) : (a) ) : 0. )
*
@@ -130,16 +130,9 @@
* ( (a_times_b)>=0. ? ( (a_times_a)<=(a_times_b) ? (a) : (b) ) : 0. )
*
* This last version appears to be slightly better than the former in
- * speed tests performed on a recent multicore Intel chip.
+ * speed tests performed on a recent multicore Intel chip, especially
+ * when enlarging a sharp image by a large factor, hence the choice.
*/
-#define LOHALO_MINMOD(a,b,a_times_a,a_times_b) \
- ( \
- ( (a_times_b)>=(gfloat) 0. ) \
- ? \
- ( (a_times_a)<=(a_times_b) ? (a) : (b) ) \
- : \
- (gfloat) 0. \
- )
/* #define LOHALO_MINMOD(a,b,a_times_a,a_times_b) \ */
/* ( \ */
@@ -150,6 +143,15 @@
/* (gfloat) 0. \ */
/* ) */
+#define LOHALO_MINMOD(a,b,a_times_a,a_times_b) \
+ ( \
+ ( (a_times_b)>=(gfloat) 0. ) \
+ ? \
+ ( (a_times_a)<=(a_times_b) ? (a) : (b) ) \
+ : \
+ (gfloat) 0. \
+ )
+
/*
* Macros set up so the likely winner in in the first argument
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]