diff --git a/third_party/skcms/skcms.cc b/third_party/skcms/skcms.cc index 3e8154654b..f41376eda5 100644 --- a/third_party/skcms/skcms.cc +++ b/third_party/skcms/skcms.cc @@ -1105,11 +1105,7 @@ const skcms_TransferFunction* skcms_sRGB_TransferFunction() { const skcms_TransferFunction* skcms_sRGB_Inverse_TransferFunction() { static const skcms_TransferFunction sRGB_inv = -#ifndef SKCMS_LEGACY_TF_INVERT {0.416666657f, 1.137283325f, -0.0f, 12.920000076f, 0.003130805f, -0.054969788f, -0.0f}; -#else - { (float)(1/2.4), 1.137119f, 0, 12.92f, 0.0031308f, -0.055f, 0 }; -#endif return &sRGB_inv; } @@ -1453,24 +1449,18 @@ bool skcms_TransferFunction_invert(const skcms_TransferFunction* src, skcms_Tran // (1/a)( y - e)^1/g - b/a = x // (ky - ke)^1/g - b/a = x -#ifndef SKCMS_LEGACY_TF_INVERT float k = powf_(src->a, -src->g); // (1/a)^g == a^-g -#else - float k = powf_(1.0f / src->a, src->g); -#endif inv.g = 1.0f / src->g; inv.a = k; inv.b = -k * src->e; inv.e = -src->b / src->a; -#ifndef SKCMS_LEGACY_TF_INVERT // Now in principle we're done. // But to preserve the valuable invariant inv(src(1.0f)) == 1.0f, // we'll tweak e. These two values should be close to each other, // just down to numerical precision issues, especially from powf_. float s = powf_(src->a + src->b, src->g) + src->e; inv.e = 1.0f - powf_(inv.a * s + inv.b, inv.g); -#endif *dst = inv; return tf_is_valid(dst); diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1 index 83db860ef1..2e80ce1f43 100755 --- a/third_party/skcms/version.sha1 +++ b/third_party/skcms/version.sha1 @@ -1 +1 @@ -ca80251f9aca2a4cb2cf98cca200025040f4c9bc \ No newline at end of file +cd2260c9f5289b05d6b23797a291e54508026823 \ No newline at end of file