From e82b1689c7bcbad999d920fe0812fc7c1af23127 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 21 Jul 2020 11:00:35 +0100 Subject: [PATCH] Revert "Performance: improve XYZ to LAB conversion by ~15%" --- libvips/colour/XYZ2Lab.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libvips/colour/XYZ2Lab.c b/libvips/colour/XYZ2Lab.c index 2f5b8288..d9acebd3 100644 --- a/libvips/colour/XYZ2Lab.c +++ b/libvips/colour/XYZ2Lab.c @@ -133,15 +133,15 @@ vips_XYZ2Lab_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) nZ = QUANT_ELEMENTS * p[2] / XYZ2Lab->Z0; p += 3; - i = VIPS_CLIP( 0, nX, QUANT_ELEMENTS - 2 ); + i = VIPS_FCLIP( 0, nX, QUANT_ELEMENTS - 2 ); f = nX - i; cbx = cbrt_table[i] + f * (cbrt_table[i + 1] - cbrt_table[i]); - i = VIPS_CLIP( 0, nY, QUANT_ELEMENTS - 2 ); + i = VIPS_FCLIP( 0, nY, QUANT_ELEMENTS - 2 ); f = nY - i; cby = cbrt_table[i] + f * (cbrt_table[i + 1] - cbrt_table[i]); - i = VIPS_CLIP( 0, nZ, QUANT_ELEMENTS - 2 ); + i = VIPS_FCLIP( 0, nZ, QUANT_ELEMENTS - 2 ); f = nZ - i; cbz = cbrt_table[i] + f * (cbrt_table[i + 1] - cbrt_table[i]);