A fix for bad behavior of the GUI under the NR tools. The problem seems to be the separation of luminance and chrominance operations in all other tools besides the pyramid NR, while the latter operates simultaneously on luma and chroma data. I put all luma/chroma curves, NR, sharpening, equalizer etc. into a single grouping, which means that if any one is changed, all must be redone. This will slow down the GUI for now but I expect that the pipeline will be retooled at some point anyway.

This commit is contained in:
Emil Martinec
2010-09-16 14:37:13 -05:00
parent fb906af949
commit b6cf8f71a9
2 changed files with 23 additions and 21 deletions

View File

@@ -159,7 +159,7 @@ void Crop::update (int todo, bool internal) {
// shadows & highlights & tone curve & convert to cielab // shadows & highlights & tone curve & convert to cielab
if (todo & M_RGBCURVE) if (todo & M_RGBCURVE)
parent->ipf.rgbProc (baseCrop, laboCrop, parent->tonecurve, cshmap); parent->ipf.rgbProc (baseCrop, laboCrop, parent->tonecurve, cshmap);
/*
// apply luminance operations // apply luminance operations
if (todo & M_LUMINANCE) { if (todo & M_LUMINANCE) {
parent->ipf.luminanceCurve (laboCrop, labnCrop, parent->lumacurve, 0, croph); parent->ipf.luminanceCurve (laboCrop, labnCrop, parent->lumacurve, 0, croph);
@@ -181,24 +181,25 @@ void Crop::update (int todo, bool internal) {
parent->ipf.waveletEqualizer(labnCrop, false, true); parent->ipf.waveletEqualizer(labnCrop, false, true);
} }
} }
*/
// apply luminance operations // apply luminance operations
/*if (todo & M_LUMINANCE) { if (todo & (M_LUMINANCE+M_COLOR)) {
parent->ipf.luminanceCurve (laboCrop, labnCrop, parent->lumacurve, 0, croph); parent->ipf.luminanceCurve (laboCrop, labnCrop, parent->lumacurve, 0, croph);
parent->ipf.colorCurve (laboCrop, labnCrop);
if (skip==1) { if (skip==1) {
parent->ipf.impulsedenoise (labnCrop); parent->ipf.impulsedenoise (labnCrop);
parent->ipf.lumadenoise (labnCrop, cbuffer); parent->ipf.lumadenoise (labnCrop, cbuffer);
parent->ipf.colordenoise (labnCrop, cbuffer); parent->ipf.colordenoise (labnCrop, cbuffer);
parent->ipf.dirpyrdenoise (labnCrop); parent->ipf.dirpyrdenoise (labnCrop);
parent->ipf.sharpening (labnCrop, (unsigned short**)cbuffer); parent->ipf.sharpening (labnCrop, (unsigned short**)cbuffer);
parent->ipf.impulsedenoise (labnCrop); //parent->ipf.impulsedenoise (labnCrop);
parent->ipf.waveletEqualizer(labnCrop, true, false); parent->ipf.waveletEqualizer(labnCrop, true, true);
parent->ipf.waveletEqualizer(labnCrop, false, true); //parent->ipf.waveletEqualizer(labnCrop, false, true);
} }
parent->ipf.colorCurve (labnCrop, labnCrop);
}*/ }
// switch back to rgb // switch back to rgb

View File

@@ -157,7 +157,7 @@ void ImProcCoordinator::updatePreviewImage (int todo) {
if (todo & M_LUMACURVE) if (todo & M_LUMACURVE)
CurveFactory::complexCurve (0.0, 0.0, 0.0, 0.0, params.lumaCurve.brightness, params.lumaCurve.contrast, 0.0, 0.0, false, params.lumaCurve.curve, lhist16, lumacurve, bcLhist, scale==1 ? 1 : 16); CurveFactory::complexCurve (0.0, 0.0, 0.0, 0.0, params.lumaCurve.brightness, params.lumaCurve.contrast, 0.0, 0.0, false, params.lumaCurve.curve, lhist16, lumacurve, bcLhist, scale==1 ? 1 : 16);
/*
if (todo & M_LUMINANCE) { if (todo & M_LUMINANCE) {
progress ("Applying Luminance Curve...",100*readyphase/numofphases); progress ("Applying Luminance Curve...",100*readyphase/numofphases);
ipf.luminanceCurve (oprevl, nprevl, lumacurve, 0, pH); ipf.luminanceCurve (oprevl, nprevl, lumacurve, 0, pH);
@@ -201,13 +201,16 @@ void ImProcCoordinator::updatePreviewImage (int todo) {
} }
readyphase++; readyphase++;
} }
*/
if (todo & (M_LUMINANCE+M_COLOR) ) {
/*if (todo & M_LUMINANCE ) {
progress ("Applying Luminance Curve...",100*readyphase/numofphases); progress ("Applying Luminance Curve...",100*readyphase/numofphases);
ipf.luminanceCurve (oprevl, nprevl, lumacurve, 0, pH); ipf.luminanceCurve (oprevl, nprevl, lumacurve, 0, pH);
readyphase++;
progress ("Applying Color Boost...",100*readyphase/numofphases);
ipf.colorCurve (oprevl, nprevl);
readyphase++; readyphase++;
if (scale==1) { if (scale==1) {
progress ("Denoising luminance impulse...",100*readyphase/numofphases); progress ("Denoising luminance impulse...",100*readyphase/numofphases);
@@ -230,24 +233,22 @@ void ImProcCoordinator::updatePreviewImage (int todo) {
progress ("Sharpening...",100*readyphase/numofphases); progress ("Sharpening...",100*readyphase/numofphases);
ipf.sharpening (nprevl, (unsigned short**)buffer); ipf.sharpening (nprevl, (unsigned short**)buffer);
} }
readyphase++;
//if (scale==1) { //if (scale==1) {
// progress ("Denoising luminance impulse...",100*readyphase/numofphases); // progress ("Denoising luminance impulse...",100*readyphase/numofphases);
// ipf.impulsedenoise (nprevl); // ipf.impulsedenoise (nprevl);
//} //}
if (scale==1) { if (scale==1) {
progress ("Wavelet...",100*readyphase/numofphases); progress ("Wavelet...",100*readyphase/numofphases);
ipf.waveletEqualizer (nprevl, true, false); ipf.waveletEqualizer (nprevl, true, true);
} }
if (scale==1) { //if (scale==1) {
progress ("Wavelet...",100*readyphase/numofphases); // progress ("Wavelet...",100*readyphase/numofphases);
ipf.waveletEqualizer (nprevl, false, true); // ipf.waveletEqualizer (nprevl, false, true);
} //}
readyphase++;
progress ("Applying Color Boost...",100*readyphase/numofphases);
ipf.colorCurve (nprevl, nprevl); }
readyphase++;
}*/
// process crop, if needed // process crop, if needed
for (int i=0; i<crops.size(); i++) for (int i=0; i<crops.size(); i++)