[gegl] operations/workshop/shadows-highlights-correction: Use	unbounded values
- From: Debarshi Ray <debarshir src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gegl] operations/workshop/shadows-highlights-correction: Use	unbounded values
 
- Date: Tue, 24 Oct 2017 15:22:46 +0000 (UTC)
 
commit b9615c869eb7a009629bbfdc7f7c722b6023ef6f
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Oct 24 10:35:11 2017 +0200
    operations/workshop/shadows-highlights-correction: Use unbounded values
    
    The rest of the code assumes that it is working with unbounded values.
    ie. the equivalent of UNBOUND_DEFAULT in Darktable. The corresponding
    code in Darktable is:
      lb = unbound_mask ? lb : CLAMP_RANGE(lb, lmin, lmax);
    
    Therefore, the lb value shouldn't be clamped.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789388
 .../workshop/shadows-highlights-correction.c       |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/operations/workshop/shadows-highlights-correction.c 
b/operations/workshop/shadows-highlights-correction.c
index b5295e6..4a83b57 100644
--- a/operations/workshop/shadows-highlights-correction.c
+++ b/operations/workshop/shadows-highlights-correction.c
@@ -137,7 +137,7 @@ process (GeglOperation       *operation,
 
           gfloat la = ta[0];
           gfloat lb = (tb[0] - halfmax) * SIGN(-highlights) * SIGN(lmax - la) + halfmax;
-          lb = CLAMP(lb, lmin, lmax);
+
           lref = copysignf(fabs(la) > low_approximation ? 1.0f / fabs(la) : 1.0f / low_approximation, la);
           href = copysignf(
               fabs(1.0f - la) > low_approximation ? 1.0f / fabs(1.0f - la) : 1.0f / low_approximation, 1.0f 
- la);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]