[gegl] shadows-highlight-correction: remove custom inlined fabsf



commit a45dae0fb80c64c6164a678b5d20689c88f143dd
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed May 27 20:06:43 2020 +0200

    shadows-highlight-correction: remove custom inlined fabsf

 operations/common-gpl3+/shadows-highlights-correction.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/operations/common-gpl3+/shadows-highlights-correction.c 
b/operations/common-gpl3+/shadows-highlights-correction.c
index 5531476ea..78531ed89 100644
--- a/operations/common-gpl3+/shadows-highlights-correction.c
+++ b/operations/common-gpl3+/shadows-highlights-correction.c
@@ -74,13 +74,6 @@ prepare (GeglOperation *operation)
   gegl_operation_set_format (operation, "output", cie_laba);
 }
 
-static inline gfloat int_fabsf (const gfloat x)
-{
-  union {gfloat f; guint32 i;} u = {x};
-  u.i &= 0x7fffffff;
-  return u.f;
-}
-
 static gboolean
 process (GeglOperation       *operation,
          void                *in_buf,
@@ -170,10 +163,10 @@ process (GeglOperation       *operation,
               gfloat la_inverted_abs;
               gfloat lb = (tb0 - 0.5f) * highlights_sign_negated * SIGN(la_inverted) + 0.5f;
 
-              la_abs = int_fabsf (la);
+              la_abs = fabsf (la);
               lref = copysignf(la_abs > low_approximation ? 1.0f / la_abs : 1.0f / low_approximation, la);
 
-              la_inverted_abs = int_fabsf (la_inverted);
+              la_inverted_abs = fabsf (la_inverted);
               href = copysignf(la_inverted_abs > low_approximation ? 1.0f / la_inverted_abs : 1.0f / 
low_approximation,
                                la_inverted);
 


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