shadows-highlight-correction: remove custom inlined fabsf

parent 0aecbad1
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment