[babl] babl-fish-path: permit searching for one step longer fish paths



commit a64fd3693de71b700e9054004de84fbac15299c7
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu Dec 15 17:39:50 2016 +0100

    babl-fish-path: permit searching for one step longer fish paths
    
    but only if no BABL_PATH_LENGTH long or shorter valid paths were found,
    this enables some desirable 16bit integer and floating point conversions.

 babl/babl-fish-path.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c
index 7e1504c..4f169d0 100644
--- a/babl/babl-fish-path.c
+++ b/babl/babl-fish-path.c
@@ -333,6 +333,11 @@ babl_fish_path (const Babl *source,
 
     get_conversion_path (&pc, (Babl *) source, 0, max_path_length ());
 
+    /* second attempt,. at path length + 1*/
+    if (babl->fish_path.conversion_list->count == 0 &&
+        max_path_length () + 1 <= BABL_HARD_MAX_PATH_LENGTH)
+      get_conversion_path (&pc, (Babl *) source, 0, max_path_length () + 1);
+
     babl_in_fish_path--;
     babl_free (pc.current_path);
   }


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