From e6289aee685cbced9a6c3c24d803ab28482fc596 Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Tue, 13 May 2025 13:08:37 -0300 Subject: [PATCH] color-lcms: rewrite misleading comment Update a comment explaining what we may do in the future when cmsSmoothToneCurve() fails. Signed-off-by: Leandro Ribeiro --- libweston/color-lcms/color-transform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libweston/color-lcms/color-transform.c b/libweston/color-lcms/color-transform.c index cfd00cf04..695443595 100644 --- a/libweston/color-lcms/color-transform.c +++ b/libweston/color-lcms/color-transform.c @@ -1464,7 +1464,7 @@ build_shaper(cmsContext lcms_ctx, cmsHTRANSFORM cmap_3dlut, /** * We use cmsSmoothToneCurve() for: * - * a) checking monotonicity and degenerated curves; + * a) trying to ensure monotonicity; * b) getting rid of abrupt changes; * * A lambda between 0.0 and 1.0 is usually enough. 1.0 means moderate to @@ -1493,8 +1493,8 @@ build_shaper(cmsContext lcms_ctx, cmsHTRANSFORM cmap_3dlut, } /** - * TODO: that should fail if the curves are not monotonic. Try - * to make curve monotonic if possible before calling this. + * TODO: that should fail if the produced curves are not + * monotonic. Try to smooth harder if that happens. */ ret = cmsSmoothToneCurve(tc[ch], smoothing_param); if (!ret)