Make some more files cppcheck clean (#6133)
* Make some more files cppcheck clean * revert change of dcrop.cc from last commit * Replace calculation: y = pow(x, 1/ (2.f * 2.f)) by y = sqrt(sqrt(x)) * Revert "Replace calculation: y = pow(x, 1/ (2.f * 2.f)) by y = sqrt(sqrt(x))" This reverts commit d639c67249f1723fa9f9e55e0442afcb862eba91.
This commit is contained in:
@@ -1182,30 +1182,28 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
float* noisevarhue = new float[GHL * GWL];
|
||||
int GW2L = (GWL + 1) / 2;
|
||||
|
||||
float nvlh[13] = {1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 0.7f, 0.5f}; //high value
|
||||
float nvll[13] = {0.1f, 0.15f, 0.2f, 0.25f, 0.3f, 0.35f, 0.4f, 0.45f, 0.7f, 0.8f, 1.f, 1.f, 1.f}; //low value
|
||||
constexpr float nvlh[13] = {1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 0.7f, 0.5f}; //high value
|
||||
constexpr float nvll[13] = {0.1f, 0.15f, 0.2f, 0.25f, 0.3f, 0.35f, 0.4f, 0.45f, 0.7f, 0.8f, 1.f, 1.f, 1.f}; //low value
|
||||
|
||||
float seuillow = 3000.f;//low
|
||||
float seuilhigh = 18000.f;//high
|
||||
int i = 10 - cp.ballum;
|
||||
float ac = (nvlh[i] - nvll[i]) / (seuillow - seuilhigh);
|
||||
float bc = nvlh[i] - seuillow * ac;
|
||||
constexpr float seuillow = 3000.f;//low
|
||||
constexpr float seuilhigh = 18000.f;//high
|
||||
const int index = 10 - cp.ballum;
|
||||
const float ac = (nvlh[index] - nvll[index]) / (seuillow - seuilhigh);
|
||||
const float bc = nvlh[index] - seuillow * ac;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for
|
||||
|
||||
#endif
|
||||
|
||||
for (int ir = 0; ir < GHL; ir++)
|
||||
for (int jr = 0; jr < GWL; jr++) {
|
||||
float lN = labco->L[ir][jr];
|
||||
|
||||
if (lN < seuillow) {
|
||||
noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvlh[i];
|
||||
noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvlh[index];
|
||||
} else if (lN < seuilhigh) {
|
||||
noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = ac * lN + bc;
|
||||
} else {
|
||||
noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvll[i];
|
||||
noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvll[index];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2265,11 +2263,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
absciss = asig * std::fabs(tempwav) + bsig;
|
||||
} else {
|
||||
absciss = amean * std::fabs(tempwav);
|
||||
float k = sig;
|
||||
if(sig > 1.f) {
|
||||
k = SQR(sig);
|
||||
}
|
||||
float abs = pow(2.f * absciss, (1.f / k));
|
||||
float abs = pow(2.f * absciss, (1.f / SQR(sig)));
|
||||
absciss = 0.5f * abs;
|
||||
}
|
||||
float kc = wavguid.getVal(absciss) -1.f;
|
||||
|
||||
Reference in New Issue
Block a user