First commit for #5246, still wip

This commit is contained in:
heckflosse 2019-04-01 19:40:10 +02:00
parent 2f5fc48664
commit 6f30354078
10 changed files with 1243 additions and 2486 deletions

View File

@ -33,6 +33,8 @@
//#define SKIPS(a,b) ((a) / (b) + ((a) % (b) > 0))
#include "../rtgui/editcallbacks.h"
#pragma GCC diagnostic warning "-Wall"
#pragma GCC diagnostic warning "-Wextra"
namespace
{
@ -885,8 +887,6 @@ void Crop::update(int todo)
LUTf lllocalcurve2(65536, 0);
bool localcutili = parent->locallutili;
LUTf cclocalcurve2(65536, 0);
bool localskutili = parent->localskutili;
LUTf sklocalcurve2(65536, 0);
bool localexutili = parent->localexutili;
LUTf exlocalcurve2(65536, 0);
LUTf hltonecurveloc2(65536, 0); //65536
@ -946,8 +946,6 @@ void Crop::update(int todo)
CurveFactory::curveLocal(locallutili, params.locallab.spots.at(sp).llcurve, lllocalcurve2, sca);
localcutili = false;
CurveFactory::curveCCLocal(localcutili, params.locallab.spots.at(sp).cccurve, cclocalcurve2, sca);
//localskutili = false;
CurveFactory::curveskLocal(localskutili, params.locallab.spots.at(sp).skintonescurve, sklocalcurve2, sca);
CurveFactory::curveexLocal(localexutili, params.locallab.spots.at(sp).excurve, exlocalcurve2, sca);
@ -975,16 +973,15 @@ void Crop::update(int todo)
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,locallutili,
loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
LHutili, HHutili, cclocalcurve2, localcutili, localskutili, sklocalcurve2, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, parent->locallColorMask, parent->locallExpMask, parent->locallSHMask);
LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, parent->locallColorMask, parent->locallExpMask, parent->locallSHMask);
} else {
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,locallutili,
loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
LHutili, HHutili, cclocalcurve2, localcutili, localskutili, sklocalcurve2, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0);
LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0);
}
lllocalcurve2.clear();
cclocalcurve2.clear();
sklocalcurve2.clear();
exlocalcurve2.clear();
hltonecurveloc2.clear();
shtonecurveloc2.clear();
@ -1007,7 +1004,7 @@ void Crop::update(int todo)
// int moderetinex;
parent->ipf.chromiLuminanceCurve(this, 1, labnCrop, labnCrop, parent->chroma_acurve, parent->chroma_bcurve, parent->satcurve, parent->lhskcurve, parent->clcurve, parent->lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy);
parent->ipf.vibrance(labnCrop);
parent->ipf.vibrance(labnCrop, params.vibrance, params.toneCurve.hrenabled, params.icm.workingProfile);
parent->ipf.labColorCorrectionRegions(labnCrop);
if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) {

View File

@ -251,7 +251,7 @@ void ImProcFunctions :: dirpyr_equalizer(float ** src, float ** dst, int srcwidt
}
void ImProcFunctions::cbdl_local_temp(float ** src, float ** dst, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scaleprev)
void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scaleprev)
{
int lastlevel = maxlevelloc;
@ -352,26 +352,22 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** dst, float ** locte
level ++;
}
float **tmpHue = nullptr;
float **tmpChr = nullptr;
// with the current implementation of idirpyr_eq_channel we can safely use the buffer from last level as buffer, saves some memory
float ** buffer = dirpyrlo[lastlevel - 1];
for (int level = lastlevel - 1; level > 0; level--) {
idirpyr_eq_channel_loc(dirpyrlo[level], dirpyrlo[level - 1], loctemp, buffer, srcwidth, srcheight, level, multi, dirpyrThreshold, tmpHue, tmpChr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice);
idirpyr_eq_channel_loc(dirpyrlo[level], dirpyrlo[level - 1], buffer, srcwidth, srcheight, level, multi, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice);
}
scale = scalesloc[0];
idirpyr_eq_channel_loc(dirpyrlo[0], dst, loctemp, buffer, srcwidth, srcheight, 0, multi, dirpyrThreshold, tmpHue, tmpChr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice);
idirpyr_eq_channel_loc(dirpyrlo[0], src, buffer, srcwidth, srcheight, 0, multi, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#pragma omp parallel for
for (int i = 0; i < srcheight; i++)
for (int j = 0; j < srcwidth; j++) {
dst[i][j] = src[i][j];
loctemp[i][j] = CLIP(buffer[i][j]); // TODO: Really a clip necessary?
// dst[i][j] = CLIP (buffer[i][j]); // TODO: Really a clip necessary?
}
}
@ -735,7 +731,7 @@ void ImProcFunctions::dirpyr_channel(float ** data_fine, float ** data_coarse, i
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** loctemp, float ** buffer, int width, int height, int level, float mult[5], const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice)
void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[5], const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice)
{
// const float skinprotneg = -skinprot;
// const float factorHard = (1.f - skinprotneg / 100.f);

View File

@ -163,7 +163,6 @@ ImProcCoordinator::ImProcCoordinator() :
coordX(0), coordY(0), localX(0), localY(0),
lllocalcurve(65536, 0),
cclocalcurve(65536, 0),
sklocalcurve(65536, 0),
exlocalcurve(65536, 0),
hltonecurveloc(65536, 0), //32768
shtonecurveloc(65536, 0),
@ -171,7 +170,6 @@ ImProcCoordinator::ImProcCoordinator() :
lightCurveloc(32770, 0),
locallutili(false),
localcutili(false),
localskutili(false),
localexutili(false),
llmasutili(false),
lhmasutili(false),
@ -870,7 +868,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
locallutili = false;
localexutili = false;
localcutili = false;
localskutili = false;
llmasutili = false;
lcmasexputili = false;
lhmasexputili = false;
@ -894,7 +891,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
lochhmasSHCurve.Set(params->locallab.spots.at(sp).HHmaskSHcurve, lhmasSHutili);
CurveFactory::curveLocal(locallutili, params->locallab.spots.at(sp).llcurve, lllocalcurve, sca);
CurveFactory::curveCCLocal(localcutili, params->locallab.spots.at(sp).cccurve, cclocalcurve, sca);
CurveFactory::curveskLocal(localskutili, params->locallab.spots.at(sp).skintonescurve, sklocalcurve, sca);
CurveFactory::curveexLocal(localexutili, params->locallab.spots.at(sp).excurve, exlocalcurve, sca);
double ecomp = params->locallab.spots.at(sp).expcomp;
double black = params->locallab.spots.at(sp).black;
@ -938,11 +934,11 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if (sp == params->locallab.selspot) {
ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
LHutili, HHutili, cclocalcurve, localcutili, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, locallColorMask, locallExpMask, locallSHMask);
LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, locallColorMask, locallExpMask, locallSHMask);
} else {
ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
LHutili, HHutili, cclocalcurve, localcutili, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, 0, 0, 0);
LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, 0, 0, 0);
}
//recalculate references after
if (params->locallab.spots.at(sp).spotMethod == "exc") {
@ -953,7 +949,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
lllocalcurve.clear();
cclocalcurve.clear();
sklocalcurve.clear();
exlocalcurve.clear();
hltonecurveloc.clear();
shtonecurveloc.clear();
@ -978,7 +973,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
histCCurve.clear();
histLCurve.clear();
ipf.chromiLuminanceCurve(nullptr, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve);
ipf.vibrance(nprevl);
ipf.vibrance(nprevl, params->vibrance, params->toneCurve.hrenabled, params->icm.workingProfile);
ipf.labColorCorrectionRegions(nprevl);
if ((params->colorappearance.enabled && !params->colorappearance.tonecie) || (!params->colorappearance.enabled)) {

View File

@ -226,7 +226,6 @@ protected:
int coordX, coordY, localX, localY;
LUTf lllocalcurve;
LUTf cclocalcurve;
LUTf sklocalcurve;
LUTf exlocalcurve;
LUTf hltonecurveloc;
LUTf shtonecurveloc;
@ -246,10 +245,9 @@ protected:
LocCCmaskSHCurve locccmasSHCurve;
LocLLmaskSHCurve locllmasSHCurve;
LocHHmaskSHCurve lochhmasSHCurve;
// ProcParams nextParams2;
bool locallutili;
bool localcutili;
bool localskutili;
bool localexutili;
bool llmasutili;
bool lhmasutili;

View File

@ -46,6 +46,7 @@ class ProcParams;
struct DirPyrDenoiseParams;
struct SharpeningParams;
struct VibranceParams;
struct VignettingParams;
struct WaveletParams;
struct LocallabParams;
@ -249,7 +250,7 @@ public:
LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt,
bool showSharpMask = false);
void chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf &acurve, LUTf &bcurve, LUTf & satcurve, LUTf & satclcurve, LUTf &clcurve, LUTf &curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLurve);
void vibrance(LabImage* lab); //Jacques' vibrance
void vibrance(LabImage* lab, const procparams::VibranceParams &vibranceParams, bool highlight, const Glib::ustring &workingProfile); //Jacques' vibrance
void softprocess(const LabImage* bufcolorig, array2D<float> &buflight, /* float ** bufchro, float ** buf_a, float ** buf_b, */ float rad, int bfh, int bfw, int sk, bool multiThread);
// void colorCurve (LabImage* lold, LabImage* lnew);
void sharpening(LabImage* lab, const procparams::SharpeningParams &sharpenParam, bool showMask = false);
@ -299,7 +300,7 @@ public:
void paste_ref(LabImage* spotbuffer, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp);
void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, bool & locallutili, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, const LocHHmaskCurve & lochhmasCurve, bool & lhmasutili, const LocCCmaskexpCurve & locccmasexpCurve, bool &lcmasexputili, const LocLLmaskexpCurve & locllmasexpCurve, bool &llmasexputili, const LocHHmaskexpCurve & lochhmasexpCurve, bool & lhmasexputili,
const LocCCmaskSHCurve & locccmasSHCurve, bool &lcmasSHutili, const LocLLmaskSHCurve & locllmasSHCurve, bool &llmasSHutili, const LocHHmaskSHCurve & lochhmasSHCurve, bool & lhmasSHutili,
bool &LHutili, bool &HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localskutili, LUTf & sklocalcurve, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int llColorMask, int llExpMask, int llSHMask);
bool &LHutili, bool &HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int llColorMask, int llExpMask, int llSHMask);
void addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk);
void BlurNoise_Localold(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);
void InverseBlurNoise_Local(const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);
@ -308,7 +309,6 @@ public:
static void strcurv_data(std::string retistr, int *s_datc, int &siz);
void blendstruc(int bfw, int bfh, LabImage* bufcolorig, float radius, float stru, array2D<float> & blend2, int sk, bool multiThread);
void vibrancelocal(int sp, int bfw, int bfh, LabImage* lab, LabImage* dest, bool & localskutili, LUTf & sklocalcurve);
void transit_shapedetect(int senstype, LabImage * bufexporig, LabImage * originalmask, float **buflight, float **bufchro, float **buf_a_cat, float ** buf_b_cat, float ** bufhh, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
void exlabLocal(const local_params& lp, int bfh, int bfw, LabImage* bufexporig, LabImage* lab, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve);
void Exclude_Local(float **deltaso, float hueref, float chromaref, float lumaref, float sobelref, float meansobel, const struct local_params & lp, const LabImage * original, LabImage * transformed, const LabImage * rsv, const LabImage * reserv, int cx, int cy, int sk);
@ -382,8 +382,8 @@ public:
float MadRgb(float * DataList, const int datalen);
// pyramid wavelet
void cbdl_local_temp(float ** src, float ** dst, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale);
void idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** loctemp, float ** buffer, int width, int height, int level, float multi[5], const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice);
void cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale);
void idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float multi[5], const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice);
void dirpyr_equalizer(float ** src, float ** dst, int srcwidth, int srcheight, float ** l_a, float ** l_b, const double * mult, const double dirpyrThreshold, const double skinprot, float b_l, float t_l, float t_r, int scale); //Emil's directional pyramid wavelet
void dirpyr_equalizercam(CieImage* ncie, float ** src, float ** dst, int srcwidth, int srcheight, float ** h_p, float ** C_p, const double * mult, const double dirpyrThreshold, const double skinprot, bool execdir, float b_l, float t_l, float t_r, int scale); //Emil's directional pyramid wavelet
void dirpyr_channel(float ** data_fine, float ** data_coarse, int width, int height, int level, int scale);

File diff suppressed because it is too large Load Diff

View File

@ -66,16 +66,16 @@ void fillCurveArrayVib (DiagonalCurve* diagCurve, LUTf &outCurve)
* copyright (c)2011 Jacques Desmis <jdesmis@gmail.com> and Jean-Christophe Frisch <natureh@free.fr>
*
*/
void ImProcFunctions::vibrance (LabImage* lab)
void ImProcFunctions::vibrance (LabImage* lab, const procparams::VibranceParams &vibranceParams, bool highlight, const Glib::ustring &workingProfile)
{
if (!params->vibrance.enabled) {
if (!vibranceParams.enabled) {
return;
}
BENCHFUN
// int skip=1; //scale==1 ? 1 : 16;
bool skinCurveIsSet = false;
DiagonalCurve* dcurve = new DiagonalCurve (params->vibrance.skintonescurve, CURVES_MIN_POLY_POINTS);
DiagonalCurve* dcurve = new DiagonalCurve (vibranceParams.skintonescurve, CURVES_MIN_POLY_POINTS);
if (dcurve) {
if (!dcurve->isIdentity()) {
@ -86,7 +86,7 @@ void ImProcFunctions::vibrance (LabImage* lab)
}
}
if (!skinCurveIsSet && !params->vibrance.pastels && !params->vibrance.saturated) {
if (!skinCurveIsSet && !vibranceParams.pastels && !vibranceParams.saturated) {
if (dcurve) {
delete dcurve;
dcurve = nullptr;
@ -101,10 +101,10 @@ void ImProcFunctions::vibrance (LabImage* lab)
// skin hue curve
// I use diagonal because I think it's better
const float chromaPastel = params->vibrance.pastels / 100.f;
const float chromaSatur = params->vibrance.saturated / 100.f;
const float chromaPastel = vibranceParams.pastels / 100.f;
const float chromaSatur = vibranceParams.saturated / 100.f;
constexpr float p00 = 0.07f;
const float limitpastelsatur = (static_cast<float>(params->vibrance.psthreshold.getTopLeft()) / 100.f) * (1.f - p00) + p00;
const float limitpastelsatur = (static_cast<float>(vibranceParams.psthreshold.getTopLeft()) / 100.f) * (1.f - p00) + p00;
const float maxdp = (limitpastelsatur - p00) / 4.f;
const float maxds = (1.f - limitpastelsatur) / 4.f;
const float p0 = p00 + maxdp;
@ -113,7 +113,7 @@ void ImProcFunctions::vibrance (LabImage* lab)
const float s0 = limitpastelsatur + maxds;
const float s1 = limitpastelsatur + 2.f * maxds;
const float s2 = limitpastelsatur + 3.f * maxds;
const float transitionweighting = static_cast<float>(params->vibrance.psthreshold.getBottomLeft()) / 100.f;
const float transitionweighting = static_cast<float>(vibranceParams.psthreshold.getBottomLeft()) / 100.f;
float chromamean = 0.f;
if (chromaPastel != chromaSatur) {
@ -156,12 +156,10 @@ void ImProcFunctions::vibrance (LabImage* lab)
dcurve = nullptr;
}
const bool protectskins = vibranceParams.protectskins;
const bool avoidcolorshift = vibranceParams.avoidcolorshift;
const bool highlight = params->toneCurve.hrenabled;//Get the value if "highlight reconstruction" is activated
const bool protectskins = params->vibrance.protectskins;
const bool avoidcolorshift = params->vibrance.avoidcolorshift;
TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params->icm.workingProfile);
TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (workingProfile);
//inverse matrix user select
const float wip[3][3] = {
{static_cast<float>(wiprof[0][0]), static_cast<float>(wiprof[0][1]), static_cast<float>(wiprof[0][2])},

View File

@ -1398,7 +1398,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy);
ipf.vibrance (labView);
ipf.vibrance (labView, params.vibrance, params.toneCurve.hrenabled, params.icm.workingProfile);
ipf.labColorCorrectionRegions(labView);
if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || !params.colorappearance.enabled) {

View File

@ -1097,7 +1097,6 @@ private:
LocHHmaskSHCurve lochhmasSHCurve;
LUTf lllocalcurve(65536, 0);
LUTf cclocalcurve(65536, 0);
LUTf sklocalcurve(65536, 0);
LUTf hltonecurveloc(65536, 0);
LUTf shtonecurveloc(65536, 0);
LUTf tonecurveloc(65536, 0);
@ -1121,7 +1120,6 @@ private:
bool HHutili = false;
bool locallutili = false;
bool localcutili = false;
bool localskutili = false;
bool localexutili = false;
bool llmasutili = false;
bool lcmasexputili = false;
@ -1146,7 +1144,6 @@ private:
lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve, lhmasSHutili);
CurveFactory::curveLocal(locallutili, params.locallab.spots.at(sp).llcurve, lllocalcurve, 1);
CurveFactory::curveCCLocal(localcutili, params.locallab.spots.at(sp).cccurve, cclocalcurve, 1);
CurveFactory::curveskLocal(localskutili, params.locallab.spots.at(sp).skintonescurve, sklocalcurve, 1);
CurveFactory::curveexLocal(localexutili, params.locallab.spots.at(sp).excurve, exlocalcurve, 1);
//provisory
double ecomp = params.locallab.spots.at(sp).expcomp;
@ -1172,13 +1169,12 @@ private:
// No Locallab mask is shown in exported picture
ipf.Lab_Local(2, sp, (float**)shbuffer, labView, labView, reservView, 0, 0, fw, fh, 1, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
LHutili, HHutili, cclocalcurve, localcutili, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0);
LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0);
// Clear local curves
lllocalcurve.clear();
cclocalcurve.clear();
sklocalcurve.clear();
exlocalcurve.clear();
hltonecurveloc.clear();
shtonecurveloc.clear();
@ -1214,7 +1210,7 @@ private:
}
ipf.vibrance(labView);
ipf.vibrance(labView, params.vibrance, params.toneCurve.hrenabled, params.icm.workingProfile);
ipf.labColorCorrectionRegions(labView);
if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) {

View File

@ -756,7 +756,7 @@ Locallab::Locallab():
exptonemap->add(*tmBox);
exptonemap->setLevel(2);
// panel->pack_start(*exptonemap, false, false);
panel->pack_start(*exptonemap, false, false);
// Retinex
Gtk::HBox* const retiTitleHBox = Gtk::manage(new Gtk::HBox());