Fixed bug from ff2000
This commit is contained in:
parent
5a59c90b62
commit
9a46885cfe
@ -1125,7 +1125,7 @@ void CurveFactory::complexCurvelocal(double ecomp, double black, double hlcompr,
|
||||
|
||||
int k = avg * 32768;
|
||||
avg = lightCurveloc[k];
|
||||
// printf("avg=%f lumaref=%f\n", avg, lumare/100.f);
|
||||
printf("avg=%f lumaref=%f\n", avg, lumare/100.f);
|
||||
std::vector<double> contrastcurvePoints;
|
||||
bool lumm = true;
|
||||
|
||||
|
@ -911,7 +911,7 @@ void Crop::update(int todo)
|
||||
bool lcmasretiutili = parent->lcmasretiutili;
|
||||
bool llmasretiutili = parent->llmasretiutili;
|
||||
|
||||
float avg = parent->avg;
|
||||
// float avg = parent->avg;
|
||||
LUTu dummy;
|
||||
bool needslocal = params.locallab.enabled;
|
||||
LocretigainCurve locRETgainCurve;
|
||||
@ -976,6 +976,7 @@ void Crop::update(int todo)
|
||||
|
||||
double cont = params.locallab.spots.at(sp).contrast;
|
||||
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
|
||||
float avge;
|
||||
huerefblu = parent->huerefblurs[sp];
|
||||
chromarefblu = parent->chromarefblurs[sp];
|
||||
lumarefblu = parent->lumarefblurs[sp];
|
||||
@ -983,8 +984,9 @@ void Crop::update(int todo)
|
||||
chromare = parent->chromarefs[sp];
|
||||
lumare = parent->lumarefs[sp];
|
||||
sobelre = parent->sobelrefs[sp];
|
||||
avge = parent->avgs[sp];
|
||||
CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumare,
|
||||
hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, avg,
|
||||
hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, avge,
|
||||
sca);
|
||||
// Locallab mask are only shown for selected spot
|
||||
if (sp == params.locallab.selspot) {
|
||||
@ -1003,6 +1005,7 @@ void Crop::update(int todo)
|
||||
LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0, 0, 0);
|
||||
}
|
||||
lllocalcurve2.clear();
|
||||
lightCurveloc2.clear();
|
||||
cclocalcurve2.clear();
|
||||
exlocalcurve2.clear();
|
||||
hltonecurveloc2.clear();
|
||||
|
@ -192,6 +192,7 @@ ImProcCoordinator::ImProcCoordinator() :
|
||||
chromarefs(500, -100000.f),
|
||||
lumarefs(500, -100000.f),
|
||||
sobelrefs(500, -100000.f),
|
||||
avgs(500, -100000.f),
|
||||
huer(0),
|
||||
huerblu(0),
|
||||
chromarblu(0),
|
||||
@ -199,13 +200,13 @@ ImProcCoordinator::ImProcCoordinator() :
|
||||
chromar(0),
|
||||
lumar(0),
|
||||
sobeler(0),
|
||||
avg(0),
|
||||
lastspotdup(false),
|
||||
locallColorMask(0),
|
||||
locallExpMask(0),
|
||||
locallSHMask(0),
|
||||
locallcbMask(0),
|
||||
locallretiMask(0),
|
||||
avg(0),
|
||||
retistrsav(nullptr)
|
||||
|
||||
{
|
||||
@ -865,6 +866,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
float **shbuffer = nullptr;
|
||||
int sca = 1;
|
||||
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
|
||||
float avge;
|
||||
|
||||
for (int sp = 0; sp < params->locallab.nbspot && sp < (int)params->locallab.spots.size(); sp++) {
|
||||
// Set local curves of current spot to LUT
|
||||
@ -919,9 +921,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
|
||||
// Reference parameters computation
|
||||
if (params->locallab.spots.at(sp).spotMethod == "exc") {
|
||||
ipf.calc_ref(sp, reserv, reserv, 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avg);
|
||||
ipf.calc_ref(sp, reserv, reserv, 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge);
|
||||
} else {
|
||||
ipf.calc_ref(sp, nprevl, nprevl, 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avg);
|
||||
ipf.calc_ref(sp, nprevl, nprevl, 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge);
|
||||
}
|
||||
|
||||
// printf("improc avg=%f\n", avg);
|
||||
@ -932,6 +934,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
chromar = chromarefs[sp] = chromare;
|
||||
lumar = lumarefs[sp] = lumare ;
|
||||
sobeler = sobelrefs[sp] = sobelre;
|
||||
avg = avgs[sp] = avge;
|
||||
CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumar,
|
||||
hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avg,
|
||||
sca);
|
||||
@ -969,6 +972,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
}
|
||||
|
||||
lllocalcurve.clear();
|
||||
lightCurveloc.clear();
|
||||
cclocalcurve.clear();
|
||||
exlocalcurve.clear();
|
||||
hltonecurveloc.clear();
|
||||
|
@ -279,14 +279,15 @@ protected:
|
||||
LUTf chromarefs;
|
||||
LUTf lumarefs;
|
||||
LUTf sobelrefs;
|
||||
LUTf avgs;
|
||||
double huer, huerblu, chromarblu, lumarblu, chromar, lumar, sobeler;
|
||||
float avg;
|
||||
bool lastspotdup;
|
||||
int locallColorMask;
|
||||
int locallExpMask;
|
||||
int locallSHMask;
|
||||
int locallcbMask;
|
||||
int locallretiMask;
|
||||
float avg;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -3215,23 +3215,23 @@ ProcParams::ProcParams()
|
||||
|
||||
void ProcParams::setDefaults()
|
||||
{
|
||||
toneCurve = {};
|
||||
toneCurve = ToneCurveParams();
|
||||
|
||||
labCurve = {};
|
||||
labCurve = LCurveParams();
|
||||
|
||||
rgbCurves = {};
|
||||
rgbCurves = RGBCurvesParams();
|
||||
|
||||
localContrast = {};
|
||||
localContrast = LocalContrastParams();
|
||||
|
||||
colorToning = {};
|
||||
colorToning = ColorToningParams();
|
||||
|
||||
sharpenEdge = {};
|
||||
sharpenEdge = SharpenEdgeParams();
|
||||
|
||||
sharpenMicro = {};
|
||||
sharpenMicro = SharpenMicroParams();
|
||||
|
||||
sharpening = {};
|
||||
sharpening = SharpeningParams();
|
||||
|
||||
prsharpening = {};
|
||||
prsharpening = SharpeningParams();
|
||||
prsharpening.contrast = 15.0;
|
||||
prsharpening.method = "rld";
|
||||
prsharpening.deconvamount = 100;
|
||||
@ -3239,72 +3239,71 @@ void ProcParams::setDefaults()
|
||||
prsharpening.deconviter = 100;
|
||||
prsharpening.deconvdamping = 0;
|
||||
|
||||
vibrance = {};
|
||||
vibrance = VibranceParams();
|
||||
|
||||
wb = {};
|
||||
wb = WBParams();
|
||||
|
||||
colorappearance = {};
|
||||
colorappearance = ColorAppearanceParams();
|
||||
|
||||
defringe = {};
|
||||
defringe = DefringeParams();
|
||||
|
||||
impulseDenoise = {};
|
||||
impulseDenoise = ImpulseDenoiseParams();
|
||||
|
||||
dirpyrDenoise = {};
|
||||
dirpyrDenoise = DirPyrDenoiseParams();
|
||||
|
||||
epd = {};
|
||||
epd = EPDParams();
|
||||
|
||||
fattal = {};
|
||||
fattal = FattalToneMappingParams();
|
||||
|
||||
sh = {};
|
||||
sh = SHParams();
|
||||
|
||||
crop = {};
|
||||
crop = CropParams();
|
||||
|
||||
coarse = {};
|
||||
coarse = CoarseTransformParams();
|
||||
|
||||
commonTrans = {};
|
||||
commonTrans = CommonTransformParams();
|
||||
|
||||
rotate = {};
|
||||
rotate = RotateParams();
|
||||
|
||||
distortion = {};
|
||||
distortion = DistortionParams();
|
||||
|
||||
lensProf = {};
|
||||
lensProf = LensProfParams();
|
||||
|
||||
perspective = {};
|
||||
perspective = PerspectiveParams();
|
||||
|
||||
gradient = {};
|
||||
gradient = GradientParams();
|
||||
|
||||
pcvignette = {};
|
||||
|
||||
locallab = {};
|
||||
locallab = LocallabParams();
|
||||
|
||||
pcvignette = PCVignetteParams();
|
||||
|
||||
vignetting = {};
|
||||
vignetting = VignettingParams();
|
||||
|
||||
chmixer = {};
|
||||
chmixer = ChannelMixerParams();
|
||||
|
||||
blackwhite = {};
|
||||
blackwhite = BlackWhiteParams();
|
||||
|
||||
cacorrection = {};
|
||||
cacorrection = CACorrParams();
|
||||
|
||||
resize = {};
|
||||
resize = ResizeParams();
|
||||
|
||||
icm = {};
|
||||
icm = ColorManagementParams();
|
||||
|
||||
wavelet = {};
|
||||
wavelet = WaveletParams();
|
||||
|
||||
dirpyrequalizer = {};
|
||||
dirpyrequalizer = DirPyrEqualizerParams();
|
||||
|
||||
hsvequalizer = {};
|
||||
hsvequalizer = HSVEqualizerParams();
|
||||
|
||||
filmSimulation = {};
|
||||
filmSimulation = FilmSimulationParams();
|
||||
|
||||
softlight = {};
|
||||
softlight = SoftLightParams();
|
||||
|
||||
dehaze = {};
|
||||
dehaze = DehazeParams();
|
||||
|
||||
raw = {};
|
||||
raw = RAWParams();
|
||||
|
||||
metadata = {};
|
||||
metadata = MetaDataParams();
|
||||
exif.clear();
|
||||
iptc.clear();
|
||||
|
||||
|
@ -1174,14 +1174,14 @@ private:
|
||||
|
||||
// Reference parameters computation
|
||||
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
|
||||
float avg = 0.f;
|
||||
float avge;
|
||||
if (params.locallab.spots.at(sp).spotMethod == "exc") {
|
||||
ipf.calc_ref(sp, reservView, reservView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avg);
|
||||
ipf.calc_ref(sp, reservView, reservView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge);
|
||||
} else {
|
||||
ipf.calc_ref(sp, labView, labView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avg);
|
||||
ipf.calc_ref(sp, labView, labView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge);
|
||||
}
|
||||
CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumare,
|
||||
hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avg,
|
||||
hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avge,
|
||||
1);
|
||||
|
||||
// No Locallab mask is shown in exported picture
|
||||
@ -1199,7 +1199,7 @@ private:
|
||||
hltonecurveloc.clear();
|
||||
shtonecurveloc.clear();
|
||||
tonecurveloc.clear();
|
||||
|
||||
lightCurveloc.clear();
|
||||
if (params.locallab.spots.at(sp).inverssha) {
|
||||
|
||||
for (int i = 0; i < fh; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user