babl: adjust sanity criteria for babl_model_is_symmetric
authorØyvind Kolås <pippin@gimp.org>
Thu, 28 Oct 2021 23:13:55 +0000 (01:13 +0200)
committerØyvind Kolås <pippin@gimp.org>
Thu, 28 Oct 2021 23:13:55 +0000 (01:13 +0200)
babl/babl-model.c

index 44481acc85994a61f02835e0bf5d23fa29315c96..7780c73781bdb2d0e4e29077561eaa7f948614b4 100644 (file)
@@ -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)