diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index f243ebe66..8b9b70546 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -813,33 +813,12 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data // if(level == 5 && mult[level] > 1.f) { // multbis[level] = 1.f + 0.45f * (mult[level] - 1.f); // } -/* - LUTf irangefn(0x20000); - { - const float noisehi = 1.33f * noise * 0.1f * dirpyrThreshold / expf(level * log(3.0)), noiselo = 0.66f * noise * 0.1f * dirpyrThreshold / expf(level * log(3.0)); - // const float noisehi = 1.33f * noise * 0.1 / expf(level * log(3.0)), noiselo = 0.66f * noise * 0.1 / expf(level * log(3.0)); - //printf("level=%i multlev=%f noisehi=%f noiselo=%f skinprot=%f\n",level,mult[level], noisehi, noiselo, skinprot); - printf("moihi=%f noilo=%f\n", noisehi, noiselo); - for (int i = 0; i < 0x20000; i++) { - if (abs(i - 0x10000) > noisehi || multbis[level] < 1.0) { - irangefn[i] = multbis[level] + offs; - } else { - if (abs(i - 0x10000) < noiselo) { - irangefn[i] = 1.f + offs ; - } else { - irangefn[i] = 1.f + offs + (multbis[level] - 1.f) * (noisehi) / (noisehi - noiselo + 0.01f) ; - } - } - // printf("i=%f ", irangefn[i]); - - } - } -*/ + LUTf irangefn(0x20000); { const float noisehi = 1.33f * noise * 0.1f * dirpyrThreshold / expf(level * log(3.0)), noiselo = 0.66f * noise * 0.1f * dirpyrThreshold / expf(level * log(3.0)); //printf("level=%i multlev=%f noisehi=%f noiselo=%f skinprot=%f\n",level,mult[level], noisehi, noiselo, skinprot); - printf("noihi=%f noilo=%f\n", noisehi, noiselo); + // printf("noihi=%f noilo=%f\n", noisehi, noiselo); for (int i = 0; i < 0x20000; i++) { if (abs(i - 0x10000) > noisehi || multbis[level] < 1.0) { @@ -862,17 +841,11 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { float hipass = (data_fine[i][j] - data_coarse[i][j]); - // buffer[i][j] += irangefn[hipass + 0x10000] * hipass; - // if((hipass) <= 0.f) printf("N"); - // if((hipass + 0x10000 ) >= 0x15000f) printf("T"); buffer[i][j] += CLIPLL(irangefn[hipass + 0x10000] * hipass); - // buffer[i][j] += hipass; buffer[i][j] = CLIPLL(buffer[i][j]); - // printf("bu=%f ", buffer[i][j]); - } } -irangefn.clear(); + irangefn.clear(); /* else if(skinprot > 0.f) #ifdef _OPENMP diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index c0c1eba75..1a5952712 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -5521,8 +5521,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o const int yend = std::min(static_cast(lp.yc + lp.ly) - cy, original->H); const int xstart = std::max(static_cast(lp.xc - lp.lxL) - cx, 0); const int xend = std::min(static_cast(lp.xc + lp.lx) - cx, original->W); - int bfh = yend - ystart + del; - int bfw = xend - xstart + del; + int bfh = yend - ystart; + int bfw = xend - xstart; // int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone // int bfw = int (lp.lx + lp.lxL) + del;