Another change CBDL - blur only luminance levels

This commit is contained in:
Desmis 2019-05-07 07:54:39 +02:00
parent 1de9e079e5
commit 8f2ec7e224
2 changed files with 9 additions and 6 deletions

View File

@ -852,8 +852,6 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data
AlignedBuffer<float> blurbufcbdl(width * height);
float rad = 0.05f * blurcb * fabs((level + 1) * (multbis[level] - 1.f));
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
@ -865,16 +863,21 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data
}
}
if(blurcb > 0.f) {
if(blurcb > 0.f && choice == 0) {
AlignedBuffer<float> blurbufcbdl(width * height);
float rad = 0.05f * blurcb * fabs((level + 1) * (multbis[level] - 1.f));
#ifdef _OPENMP
#pragma omp parallel if (multiThread)
#endif
boxblur<float, float>(buffer, buffer, blurbufcbdl.data, rad, rad, width, height);
}
irangefn.clear();
blurbufcbdl.resize(0);
}
irangefn.clear();
}
void ImProcFunctions::idirpyr_eq_channel(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[maxlevel], const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, float b_l, float t_l, float t_r)
{
const float skinprotneg = -skinprot;

View File

@ -4973,7 +4973,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
constexpr float t_r = 120.f;
constexpr float b_r = 170.f;
constexpr double skinprot = 0.;
constexpr int choice = 0;
int choice = 0;
if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 4 || lp.enacbMask) {
#ifdef _OPENMP
@ -5050,7 +5050,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
for (int lv = 0; lv < 6; lv++) {
multc[lv] = rtengine::max((lp.chromacb * ((float) lp.mulloc[lv] - 1.f) / 100.f) + 1.f, 0.f);
}
choice = 1;
ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, multc, rtengine::max(lp.chromacb, 1.f), lp.threshol, clarich, 0.f, lp.blurcbdl, skinprot, false, b_l, t_l, t_r, b_r, choice, sk, multiThread);