babl: adjust default path parameters to a path_length of 3
authorØyvind Kolås <pippin@gimp.org>
Sun, 23 Jan 2022 03:18:01 +0000 (04:18 +0100)
committerØyvind Kolås <pippin@gimp.org>
Sun, 23 Jan 2022 03:18:04 +0000 (04:18 +0100)
Also adjust so that the max additional bits of depth is 2, this makes us
catch some fast paths that are missed by very promising slow two-step
converters.

babl/babl-fish-path.c

index 32da078e9b41f27daf76d65b18b1dc3999e87b97..f005a86241eb82b08032debff2b8d091e1bd990e 100644 (file)
@@ -145,9 +145,9 @@ max_path_length (void)
   if (env)
     max_length = atoi (env);
   else
-    max_length = 2; /* reducing this number makes finding short fishes much
+    max_length = 3; /* reducing this number makes finding short fishes much
                        faster - even if we lose out on some of the fast
-                       bigger fish, the fishes we can get with a max_length of 2
+                       bigger fish, the fishes we can get with a max_length of 3
                        is actually 5, since we deepen the search to that
                        depth if none are found within two steps in the
                        initial search.
@@ -604,7 +604,7 @@ babl_fish_path2 (const Babl *source,
   {
     PathContext pc;
     int start_depth = max_path_length ();
-    int end_depth = start_depth + 2 + ((destination->format.space != sRGB)?1:0);
+    int end_depth = start_depth + 1 + ((destination->format.space != sRGB)?1:0);
     end_depth = MIN(end_depth, BABL_HARD_MAX_PATH_LENGTH);
 
     pc.current_path = babl_list_init_with_size (BABL_HARD_MAX_PATH_LENGTH);