From: Øyvind Kolås Date: Sat, 25 Feb 2023 18:46:35 +0000 (+0100) Subject: LUT: do not use LUTs by default X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2^2~18 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=09bbea5760c1fec3f198db9ad42494d15a949f14;p=babl.git LUT: do not use LUTs by default The code marking LUTs as available for fishes is now protected behind an environment variable BABL_LUT if it is set, the LUT code is re-enabled. --- diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index 2cfb507..90135c3 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -32,6 +32,8 @@ #define MIN(a, b) (((a) > (b)) ? (b) : (a)) #endif +static int enable_lut = 0; + typedef struct GcContext { long time; } GcContext; @@ -605,6 +607,12 @@ _babl_legal_error (void) else debug_conversions = 0; + env = getenv ("BABL_LUT"); + if (env && env[0] != '\0') + enable_lut = 1; + else + enable_lut = 0; + return error; } @@ -952,6 +960,7 @@ _babl_fish_prepare_bpp (Babl *babl) babl_log ("-eeek{%i}\n", babl_dest->instance.class_type - BABL_MAGIC); } + if (enable_lut) { int source_bpp = babl->fish_path.source_bpp; int dest_bpp = babl->fish_path.dest_bpp; diff --git a/babl/babl.c b/babl/babl.c index 8a6f29a..23db1a3 100644 --- a/babl/babl.c +++ b/babl/babl.c @@ -113,6 +113,7 @@ babl_init (void) babl_type_db (); babl_trc_class_init (); babl_space_class_init (); + _babl_legal_error (); babl_component_db (); babl_model_db (); babl_format_db ();