enable scale = 1

This commit is contained in:
Desmis 2019-10-27 17:27:49 +01:00
parent 94e3ce3e07
commit 5af042af67
3 changed files with 7 additions and 12 deletions

View File

@ -1145,14 +1145,6 @@ void ImProcFunctions::MSRLocal(int sp, bool fftw, int lum, float** reducDE, LabI
const int H_L = height; const int H_L = height;
const int W_L = width; const int W_L = width;
/*
float *src[H_L] ALIGNED16;
float *srcBuffer = new float[H_L * W_L];
for (int i = 0; i < H_L; i++) {
src[i] = &srcBuffer[i * W_L];
}
*/
std::unique_ptr<JaggedArray<float>> srcBuffer(new JaggedArray<float>(W_L, H_L)); std::unique_ptr<JaggedArray<float>> srcBuffer(new JaggedArray<float>(W_L, H_L));
float** src = *(srcBuffer.get()); float** src = *(srcBuffer.get());
@ -1245,7 +1237,6 @@ void ImProcFunctions::MSRLocal(int sp, bool fftw, int lum, float** reducDE, LabI
} }
if (scale == 1) { //equalize last scale with darkness and lightness of course acts on TM! if (scale == 1) { //equalize last scale with darkness and lightness of course acts on TM!
if (dar != 1.f || lig != 1.f) { if (dar != 1.f || lig != 1.f) {
#ifdef _OPENMP #ifdef _OPENMP
@ -1260,6 +1251,7 @@ void ImProcFunctions::MSRLocal(int sp, bool fftw, int lum, float** reducDE, LabI
} }
} }
} }
} }
#ifdef _OPENMP #ifdef _OPENMP
@ -1299,10 +1291,11 @@ void ImProcFunctions::MSRLocal(int sp, bool fftw, int lum, float** reducDE, LabI
} }
srcBuffer.reset(); // srcBuffer.reset();
if (scal == 1) {//only if user select scal = 1 if (scal == 1) {//only if user select scal = 1
float kval = 1.f; float kval = 1.f;
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel for #pragma omp parallel for
@ -1368,8 +1361,10 @@ void ImProcFunctions::MSRLocal(int sp, bool fftw, int lum, float** reducDE, LabI
buf *= 32768.f; buf *= 32768.f;
luminance[i][j] = buf; luminance[i][j] = buf;
} }
} }
srcBuffer.reset();
float str = strength * (chrome == 0 ? 1.f : 0.8f * (chrT - 0.4f)); float str = strength * (chrome == 0 ? 1.f : 0.8f * (chrT - 0.4f));
const float maxclip = (chrome == 0 ? 32768.f : 50000.f); const float maxclip = (chrome == 0 ? 32768.f : 50000.f);

View File

@ -2643,7 +2643,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
lightnessreti(1.0), lightnessreti(1.0),
limd(8.0), limd(8.0),
cliptm(1.0), cliptm(1.0),
fftwreti(true), fftwreti(false),
Lmaskreticurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0}, Lmaskreticurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0},
// Sharpening // Sharpening
expsharp(false), expsharp(false),

View File

@ -307,7 +307,7 @@ Locallab::Locallab():
gammaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.05, 5.0, 0.01, 1.))), gammaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.05, 5.0, 0.01, 1.))),
slomaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), slomaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))),
lapmaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), lapmaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))),
scalereti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALERETI"), 2.0, 10.0, 1., 2.))), scalereti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALERETI"), 1.0, 10.0, 1., 2.))),
darkness(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DARKRETI"), 0.01, 6.0, 0.01, 2.0))), darkness(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DARKRETI"), 0.01, 6.0, 0.01, 2.0))),
lightnessreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LIGHTRETI"), 0.01, 4.0, 0.01, 1.))), lightnessreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LIGHTRETI"), 0.01, 4.0, 0.01, 1.))),
limd(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESRETI"), 1.2, 100.0, 0.1, 8.))), limd(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESRETI"), 1.2, 100.0, 0.1, 8.))),