merge with dev

This commit is contained in:
Desmis
2019-11-22 07:28:09 +01:00
13 changed files with 16 additions and 115 deletions

View File

@@ -318,9 +318,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
MyMutex::MyLock processingLock(mProcessing);
constexpr int numofphases = 14;
int readyphase = 0;
bool highDetailNeeded = options.prevdemo == PD_Sidecar ? true : (todo & M_HIGHQUAL);
// Check if any detail crops need high detail. If not, take a fast path short cut
@@ -361,8 +358,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
//rp.deadPixelFilter = rp.hotPixelFilter = false;
}
progress("Applying white balance, color correction & sRGB conversion...", 100 * readyphase / numofphases);
if (frameCountListener) {
frameCountListener->FrameCountChanged(imgsrc->getFrameCount(), params->raw.bayersensor.imageNum);
}
@@ -621,8 +616,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
ipf.firstAnalysis(orig_prev, *params, vhist16);
}
readyphase++;
if ((todo & M_HDR) && (params->fattal.enabled || params->dehaze.enabled)) {
if (fattal_11_dcrop_cache) {
delete fattal_11_dcrop_cache;
@@ -639,7 +632,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
oprevi = orig_prev;
progress("Rotate / Distortion...", 100 * readyphase / numofphases);
// Remove transformation if unneeded
bool needstransform = ipf.needsTransform();
@@ -665,11 +657,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
ipf.lab2rgb(labcbdl, *oprevi, params->icm.workingProfile);
}
readyphase++;
progress("Preparing shadow/highlight map...", 100 * readyphase / numofphases);
readyphase++;
if (todo & M_AUTOEXP) {
if (params->toneCurve.autoexp) {
LUTu aehist;
@@ -706,8 +693,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
}
}
progress("Exposure curve & CIELAB conversion...", 100 * readyphase / numofphases);
if (todo & (M_AUTOEXP | M_RGBCURVE)) {
if (params->icm.workingTRC == "Custom") { //exec TRC IN free
if (oprevi == orig_prev) {
@@ -857,9 +842,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
params->crop.mapToResized(pW, pH, scale, x1, x2, y1, y2);
}
readyphase++;
// lhist16(32768);
if (todo & (M_LUMACURVE | M_CROP)) {
LUTu lhist16(32768);
lhist16.clear();
@@ -906,8 +889,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
lastorigimp->CopyFrom(oprevl);
// int maxspot = 1;
progress("Applying Color Boost...", 100 * readyphase / numofphases);
//*************************************************************
// locallab
//*************************************************************
@@ -1236,72 +1217,22 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
ipf.EPDToneMap(nprevl, 0, scale);
}
// for all treatments Defringe, Sharpening, Contrast detail , Microcontrast they are activated if "CIECAM" function are disabled
readyphase++;
/* Issue 2785, disabled some 1:1 tools
if (scale==1) {
if((params->colorappearance.enabled && !settings->autocielab) || (!params->colorappearance.enabled)){
progress ("Denoising luminance impulse...",100*readyphase/numofphases);
ipf.impulsedenoise (nprevl);
readyphase++;
}
if((params->colorappearance.enabled && !settings->autocielab) || (!params->colorappearance.enabled)){
progress ("Defringing...",100*readyphase/numofphases);
ipf.defringe (nprevl);
readyphase++;
}
if (params->sharpenEdge.enabled) {
progress ("Edge sharpening...",100*readyphase/numofphases);
ipf.MLsharpen (nprevl);
readyphase++;
}
if (params->sharpenMicro.enabled) {
if(( params->colorappearance.enabled && !settings->autocielab) || (!params->colorappearance.enabled)){
progress ("Microcontrast...",100*readyphase/numofphases);
ipf.MLmicrocontrast (nprevl);
readyphase++;
}
}
if(((params->colorappearance.enabled && !settings->autocielab) || (!params->colorappearance.enabled)) && params->sharpening.enabled) {
progress ("Sharpening...",100*readyphase/numofphases);
float **buffer = new float*[pH];
for (int i=0; i<pH; i++)
buffer[i] = new float[pW];
ipf.sharpening (nprevl, (float**)buffer);
for (int i=0; i<pH; i++)
delete [] buffer[i];
delete [] buffer;
readyphase++;
}
}
*/
if (params->dirpyrequalizer.cbdlMethod == "aft") {
if (((params->colorappearance.enabled && !settings->autocielab) || (!params->colorappearance.enabled))) {
progress("Pyramid wavelet...", 100 * readyphase / numofphases);
ipf.dirpyrequalizer(nprevl, scale);
//ipf.Lanczoslab (ip_wavelet(LabImage * lab, LabImage * dst, const procparams::EqualizerParams & eqparams), nprevl, 1.f/scale);
readyphase++;
}
}
wavcontlutili = false;
//CurveFactory::curveWavContL ( wavcontlutili,params->wavelet.lcurve, wavclCurve, LUTu & histogramwavcl, LUTu & outBeforeWavCLurveHistogram,int skip);
CurveFactory::curveWavContL(wavcontlutili, params->wavelet.wavclCurve, wavclCurve, scale == 1 ? 1 : 16);
if ((params->wavelet.enabled)) {
WaveletParams WaveParams = params->wavelet;
// WaveParams.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY);
WaveParams.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL);
int kall = 0;
progress("Wavelet...", 100 * readyphase / numofphases);
// ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, scale);
ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, scale);
}
@@ -1309,7 +1240,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
ipf.softLight(nprevl, params->softlight);
if (params->colorappearance.enabled) {
//L histo and Chroma histo for ciecam
// L histo and Chroma histo for ciecam
// histogram well be for Lab (Lch) values, because very difficult to do with J,Q, M, s, C
int x1, y1, x2, y2;
params->crop.mapToResized(pW, pH, scale, x1, x2, y1, y2);
@@ -1390,8 +1321,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if (params->colorappearance.autoybscen && acListener && params->colorappearance.enabled) {
acListener->ybCamChanged((int) yb); //real value Yb scene
}
readyphase++;
} else {
// CIECAM is disabled, we free up its image buffer to save some space
if (ncie) {
@@ -1425,8 +1354,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
crops[i]->update(todo); // may call ourselves
}
if (panningRelatedChange || (todo & M_MONITOR)) {
progress("Conversion to RGB...", 100 * readyphase / numofphases);
if ((todo != CROP && todo != MINUPDATE) || (todo & M_MONITOR)) {
MyMutex::MyLock prevImgLock(previmg->getMutex());
@@ -1438,7 +1365,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
delete workimg;
workimg = ipf.lab2rgb(nprevl, 0, 0, pW, pH, params->icm);
} catch (char * str) {
progress("Error converting file...", 0);
return;
}
}
@@ -1457,8 +1383,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
imageListener->imageReady(params->crop);
}
readyphase++;
if (hListener) {
updateLRGBHistograms();
hListener->histogramChanged(histRed, histGreen, histBlue, histLuma, histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRedRaw, histGreenRaw, histBlueRaw, histChroma, histLRETI);
@@ -1629,15 +1553,6 @@ void ImProcCoordinator::updateLRGBHistograms()
}
void ImProcCoordinator::progress(Glib::ustring str, int pr)
{
/* if (plistener) {
plistener->setProgressStr (str);
plistener->setProgress ((double)pr / 100.0);
}*/
}
bool ImProcCoordinator::getAutoWB(double& temp, double& green, double equal, double tempBias)
{