small comment improvements

This commit is contained in:
John Cupitt 2020-07-21 18:03:45 +01:00
parent c4d093b01f
commit d203a3fb89
2 changed files with 3 additions and 1 deletions

View File

@ -253,7 +253,7 @@ vips_col_scRGB2sRGB( int range, int *lut,
int Yi;
float v;
/* XYZ can be NaN. Throw those values out, they will break
/* RGB can be NaN. Throw those values out, they will break
* our clipping.
*
* Don't use isnormal(), it is false for 0.0 and for subnormal

View File

@ -133,6 +133,8 @@ vips_XYZ2Lab_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width )
nZ = QUANT_ELEMENTS * p[2] / XYZ2Lab->Z0;
p += 3;
/* CLIP is much faster than FCLIP, and we want an int result.
*/
i = VIPS_CLIP( 0, (int) nX, QUANT_ELEMENTS - 2 );
f = nX - i;
cbx = cbrt_table[i] + f * (cbrt_table[i + 1] - cbrt_table[i]);