[babl] babl: adjust sanity criteria for babl_model_is_symmetric



commit 8406acd1376d5b7aed142c96b734b2a015fa132d
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri Oct 29 01:13:55 2021 +0200

    babl: adjust sanity criteria for babl_model_is_symmetric

 babl/babl-model.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/babl/babl-model.c b/babl/babl-model.c
index 44481acc8..7780c7378 100644
--- a/babl/babl-model.c
+++ b/babl/babl-model.c
@@ -382,8 +382,9 @@ babl_model_is_symmetric (const Babl *cbabl)
         for (j = 0; j < 4; j++)
         {
           float tolerance = TOLERANCE;
+          /* this to adapt to value ranges outside 0-1 */
           if (fabs(clipped[i*4+j]) > 1.0)
-            tolerance = fabs(clipped[i*4+j]) * 0.01;
+             tolerance = fabs(clipped[i*4+j]) * TOLERANCE;
           if (fabs (clipped[i *4 + j] - transformed[i * 4 + j]) > tolerance)
             {
               if (!log)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]