From bca77e4ddfaa3010d2c6b5a82bedb9179f8bfb5e Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 2 Feb 2020 13:32:37 +0100 Subject: [PATCH] Added Daub20 disabled --- rtengine/cplx_wavelet_dec.h | 10 +++++++++- rtengine/cplx_wavelet_filter_coeffs.h | 9 ++++++++- rtengine/iplocallab.cc | 2 ++ rtgui/controlspotpanel.cc | 1 + rtgui/locallab.cc | 10 +++++++++- 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/rtengine/cplx_wavelet_dec.h b/rtengine/cplx_wavelet_dec.h index c127a7adf..1137a0937 100644 --- a/rtengine/cplx_wavelet_dec.h +++ b/rtengine/cplx_wavelet_dec.h @@ -135,6 +135,14 @@ wavelet_decomposition::wavelet_decomposition(E * src, int width, int height, int //n=0 lopass, n=1 hipass } } +/* } else if(wavfilt_len == 22) { + for (int n = 0; n < 2; n++) { + for (int i = 0; i < wavfilt_len; i++) { + wavfilt_anal[wavfilt_len * (n) + i] = Daub4_anal22[n][i]; + wavfilt_synth[wavfilt_len * (n) + i] = Daub4_anal22[n][wavfilt_len - 1 - i]; + //n=0 lopass, n=1 hipass + } + } */ } else if(wavfilt_len == 4) { for (int n = 0; n < 2; n++) { for (int i = 0; i < wavfilt_len; i++) { @@ -144,7 +152,7 @@ wavelet_decomposition::wavelet_decomposition(E * src, int width, int height, int } } } - +//printf("OK cplx\n"); // after coefficient rotation, data structure is: // wavelet_decomp[scale][channel={lo,hi1,hi2,hi3}][pixel_array] diff --git a/rtengine/cplx_wavelet_filter_coeffs.h b/rtengine/cplx_wavelet_filter_coeffs.h index 6287fc03b..3386be8d0 100644 --- a/rtengine/cplx_wavelet_filter_coeffs.h +++ b/rtengine/cplx_wavelet_filter_coeffs.h @@ -49,6 +49,13 @@ const float Daub4_anal16[2][16] ALIGNED16 = {//Daub 14 { -0.0002501134f, -0.0012739524f, -0.0003037575f, 0.008874895f, 0.01171997f , -0.026891225f, -0.057001725f, 0.05042335f, 0.158417505f, -0.10175691f, -0.33218624f, 0.515574245f, -0.28039564f, 0.055049715f, 0.f, 0.f} }; -// if necessary ?? we can add D20 !! +const float Daub4_anal22[2][22] ALIGNED16 = {//Daub 20 + {0.f, 0.f, 0.01885858f, 0.13306109f, 0.37278535f, 0.48681406f, 0.19881887f, -0.1766681f, -0.13855494f, 0.09006372f, 0.0658015f, -0.05048328f, -0.02082962f, + 0.0234849f, 0.002550218f, -0.0075895f, 0.0009866627f, 0.001408843f, -0.000484973f, -0.0000823545f, 0.0000661271f, -0.00000939f}, + {0.00000939f, -0.0000661271f, 0.0000823545f, 0.000484973f, -0.001408843f, -0.0009866627f, 0.0075895f, -0.002550218f, -0.0234849f, + 0.02082962f, 0.05048328f, -0.0658015f, -0.09006372f, 0.13855494f, 0.1766681f, -0.19881887f, -0.48681406f, -0.37278535f, -0.13306109f, -0.01885858f, 0.f, 0.f} +}; + +// if necessary ?? we can add D20 !! } diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index d5557efc9..cb63c409f 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -769,6 +769,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.daubLen = 12; } else if(locallab.spots.at(sp).wavMethod == "D14"){ lp.daubLen = 16; +// } else if(locallab.spots.at(sp).wavMethod == "D20"){ +// lp.daubLen = 22; } diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index cd15fb447..373943bba 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -314,6 +314,7 @@ ControlSpotPanel::ControlSpotPanel(): wavMethod_->append(M("TP_WAVELET_DAUB6")); wavMethod_->append(M("TP_WAVELET_DAUB10")); wavMethod_->append(M("TP_WAVELET_DAUB14")); +// wavMethod_->append(M("TP_WAVELET_DAUB20")); wavMethod_->set_active(1); wavMethodconn_ = wavMethod_->signal_changed().connect( sigc::mem_fun( diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index bca8bfff5..45929a40d 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -4494,9 +4494,11 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit r->wavMethod = 3; } else if (pp->locallab.spots.at(i).wavMethod == "D14") { r->wavMethod = 4; + // } else if (pp->locallab.spots.at(i).wavMethod == "D20") { + // r->wavMethod = 5; } - if (pp->locallab.spots.at(i).wavMethod == "norm") { + if (pp->locallab.spots.at(i).spotMethod == "norm") { r->spotMethod = 0; } else { r->spotMethod = 1; @@ -4667,6 +4669,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited r->wavMethod = 3; } else if (newSpot->wavMethod == "D14") { r->wavMethod = 4; +// } else if (newSpot->wavMethod == "D20") { +// r->wavMethod = 5; } // Calculate spot size and center position according to preview area @@ -4923,6 +4927,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited r->wavMethod = 3; } else if (newSpot->wavMethod == "D14") { r->wavMethod = 4; +// } else if (newSpot->wavMethod == "D20") { +// r->wavMethod = 5; } // Calculate spot size and center position according to preview area @@ -5097,6 +5103,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).wavMethod = "D10"; } else if (r->wavMethod == 4) { pp->locallab.spots.at(pp->locallab.selspot).wavMethod = "D14"; +// } else if (r->wavMethod == 5) { +// pp->locallab.spots.at(pp->locallab.selspot).wavMethod = "D20"; } pp->locallab.spots.at(pp->locallab.selspot).locX = r->locX;