diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 378f01782..4843d2b16 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -190,7 +190,8 @@ void Crop::update (int todo) { double shradius = params.sh.radius; if (!params.sh.hq) shradius *= radius / 1800.0; cshmap->update (baseCrop, shradius, parent->ipf.lumimul, params.sh.hq, skip); - cshmap->forceStat (parent->shmap->max_f, parent->shmap->min_f, parent->shmap->avg); + if(parent->shmap->min_f < 65535.f) // don't call forceStat with wrong values + cshmap->forceStat (parent->shmap->max_f, parent->shmap->min_f, parent->shmap->avg); } // shadows & highlights & tone curve & convert to cielab diff --git a/rtengine/shmap.cc b/rtengine/shmap.cc index 1faec01f2..17c00eaae 100644 --- a/rtengine/shmap.cc +++ b/rtengine/shmap.cc @@ -140,8 +140,8 @@ void SHMap::update (Imagefloat* img, double radius, double lumi[3], bool hq, int #ifdef _OPENMP #pragma omp for reduction(+:_avg) nowait #endif - for (int i=32; i