diff --git a/rtengine/tmo_fattal02.cc b/rtengine/tmo_fattal02.cc index f17371100..281ea702b 100644 --- a/rtengine/tmo_fattal02.cc +++ b/rtengine/tmo_fattal02.cc @@ -69,8 +69,10 @@ #include "improcfun.h" #include "settings.h" #include "iccstore.h" - - +#define BENCHMARK +#include "StopWatch.h" +#include "sleef.c" +#include "opthelper.h" namespace rtengine { /****************************************************************************** @@ -426,6 +428,7 @@ void tmo_fattal02(size_t width, int detail_level, bool multithread) { + BENCHFUN // #ifdef TIMER_PROFILING // msec_timer stop_watch; // stop_watch.start(); @@ -471,10 +474,35 @@ void tmo_fattal02(size_t width, } Array2Df* H = new Array2Df(width, height); //#pragma omp parallel for private(i) shared(H, Y, maxLum) - for ( int i=0 ; i get_lambda(int n) void solve_pde_fft(Array2Df *F, Array2Df *U, bool multithread)/*, pfs::Progress &ph, bool adjust_bound)*/ { +BENCHFUN // ph.setValue(20); //DEBUG_STR << "solve_pde_fft: solving Laplace U = F ..." << std::endl; int width = F->getCols(); @@ -1059,6 +1088,7 @@ void rescale_bilinear(const Array2Df &src, Array2Df &dst, bool multithread) void ImProcFunctions::ToneMapFattal02(Imagefloat *rgb) { + BENCHFUN const int detail_level = 3; float alpha = 1.f; @@ -1094,6 +1124,7 @@ void ImProcFunctions::ToneMapFattal02(Imagefloat *rgb) // median filter on the deep shadows, to avoid boosting noise { + StopWatch Stop1("Median"); const float luminance_noise_floor = 65.535f; // 0.1% -- is this ok? #ifdef _OPENMP