From 950ad3faac1d12f47ed4cd0f70a07ed99ac11e25 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Sun, 23 Jan 2022 04:18:01 +0100 Subject: [PATCH] babl: adjust default path parameters to a path_length of 3 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index 32da078..f005a86 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -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); -- 2.30.2