From 7603191855995c1ec3f80e8c58ec6dae69505b9c Mon Sep 17 00:00:00 2001 From: Luca Versari Date: Wed, 1 Jan 2025 01:32:57 +0100 Subject: [PATCH] Increase tolerance for linear_to_srgb_fast_arb. --- jxl/src/color/tf.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jxl/src/color/tf.rs b/jxl/src/color/tf.rs index 0fabd48..ef9baef 100644 --- a/jxl/src/color/tf.rs +++ b/jxl/src/color/tf.rs @@ -12,7 +12,7 @@ const SRGB_POWTABLE_LOWER: [u8; 16] = [ ]; /// Converts the linear samples with the sRGB transfer curve. -// Fast linear to sRGB conversion, ported from libjxl. Max error ~1.2e-4 +// Fast linear to sRGB conversion, ported from libjxl. Max error ~1.7e-4 pub fn linear_to_srgb_fast(samples: &mut [f32]) { for s in samples { let v = s.to_bits() & 0x7fff_ffff; @@ -146,7 +146,7 @@ mod test { linear_to_srgb(&mut samples); linear_to_srgb_fast(&mut fast); - assert_all_almost_eq!(&samples, &fast, 1.2e-4); + assert_all_almost_eq!(&samples, &fast, 1.7e-4); Ok(()) }); }