babl_get_name (babl->conversion.destination),
lut_unused_minutes_limit);
}
- else
+ else if (lut_info_level >=4)
{
LUT_DETAIL("active LUT %s to %s ,%8li pixels last used %.1f minutes ago\n",
babl_get_name (babl->conversion.source),
(context->time - babl->fish_path.last_lut_use)/1000.0/1000.0/60.0);
}
}
+ else if (lut_info_level >= 5 && babl->fish.pixels)
+ {
+ LUT_DETAIL("%i step path %s to %s ,%8li pixels\n",
+ -1,
+ babl_get_name (babl->conversion.source),
+ babl_get_name (babl->conversion.destination),
+ babl->fish.pixels);
+ }
}
return 0;
}
{
GcContext context;
context.time = babl_ticks ();
+ if (lut_info_level >= 5)
+ {
+ fprintf (stdout, "\e[H\e[2J");
+ }
babl_fish_class_for_each (gc_fishes, &context);
//malloc_trim (0);
// is responsibility of higher layers
#define BABL_LIKELY(x) __builtin_expect(!!(x), 1)
#define BABL_UNLIKELY(x) __builtin_expect(!!(x), 0)
-static long timings[256] = {0,};
+static float timings[256] = {0,};
static inline void _do_lut (uint32_t *lut,
int source_bpp,
_do_lut (lut, source_bpp, dest_bpp, source, dest, count);
}
-static inline long lut_timing_for (int source_bpp, int dest_bpp)
+static inline float lut_timing_for (int source_bpp, int dest_bpp)
{
return timings[source_bpp * 16 + dest_bpp];
}
_do_lut (lut, source_bpp, dest_bpp, src, dst, num_pixels);
end = babl_ticks ();
- timings[source_bpp * 16 + dest_bpp] = (end-start)/1000;
- LUT_LOG (" %ibpp to %ibpp: %i\n", source_bpp, dest_bpp,
+ timings[source_bpp * 16 + dest_bpp] = (end-start)/1000.0;
+ LUT_LOG (" %ibpp to %ibpp: %.2f\n", source_bpp, dest_bpp,
timings[source_bpp * 16 + dest_bpp]
);
}
int source_bpp = babl->fish_path.source_bpp;
int dest_bpp = babl->fish_path.dest_bpp;
uint32_t *lut = (uint32_t*)babl->fish_path.u8_lut;
- BABL(babl)->fish.pixels += n;
if (BABL_UNLIKELY(!lut && babl->fish.pixels >= 128 * 256))
float scaling = 10.0;
if (!measured_timings) measure_timings ();
measured_timings = 1;
- LUT_LOG ("%sLUT for %s to %s %.0f%s%.0f\n",
+ LUT_LOG ("%sLUT for %s to %s %.2f%s%.2f\n",
((lut_timing_for (source_bpp, dest_bpp) * scaling) <
babl->fish_path.cost)?"possible ":"no ",
long n,
void *data)
{
+ BABL(babl)->fish.pixels += n;
if (babl->fish_path.is_u8_color_conv)
{
if (babl_fish_lut_process_maybe (babl,