From: Øyvind Kolås Date: Wed, 29 Aug 2018 13:27:08 +0000 (+0200) Subject: babl: skip initial profiling for planar conversions X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2~14^2~28 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4c9df8c1d34e78c95d2a97be2e07319fae8980aa;p=babl.git babl: skip initial profiling for planar conversions --- diff --git a/babl/babl-conversion.c b/babl/babl-conversion.c index 136d91f..1127c00 100644 --- a/babl/babl-conversion.c +++ b/babl/babl-conversion.c @@ -493,10 +493,19 @@ babl_conversion_error (BablConversion *conversion) babl_process (fish_rgba_to_source, test, source, test_pixels); - ticks_start = babl_ticks (); - babl_process (babl_fish_simple (conversion), - source, destination, test_pixels); - ticks_end = babl_ticks (); + if (BABL(conversion)->class_type == BABL_CONVERSION_LINEAR) + { + ticks_start = babl_ticks (); + babl_process (babl_fish_simple (conversion), + source, destination, test_pixels); + ticks_end = babl_ticks (); + } + else + { + /* we could still measure it, but for the paths we only really consider + * the linear ones anyways */ + ticks_end = 1000; + } babl_process (fish_reference, source, ref_destination, test_pixels);