[gegl/samplers] lohalo: further testing (with VIPS) identifies the best minmod macro
- From: Nicolas Robidoux <nrobidoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/samplers] lohalo: further testing (with VIPS) identifies the best minmod macro
- Date: Wed, 22 Jun 2011 19:53:33 +0000 (UTC)
commit 141dbea1a7e64b73d79f186ac3cd40469e7ae2f8
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]