diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index 8a61f7a6e..f85948cb2 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -214,9 +214,6 @@ namespace rtengine { //residual between input and denoised L channel array2D Ldetail(width,height); -#ifdef _OPENMP -#pragma omp parallel for -#endif //fill tile from image for (int i=tiletop, i1=0; ir[i][j] += mask*X/gain;//prophoto_xyz[0][0]*X + prophoto_xyz[0][1]*Y + prophoto_xyz[0][2]*Z; - dsttmp->g[i][j] += mask*Y/gain;//prophoto_xyz[1][0]*X + prophoto_xyz[1][1]*Y + prophoto_xyz[1][2]*Z; - dsttmp->b[i][j] += mask*Z/gain;//prophoto_xyz[2][0]*X + prophoto_xyz[2][1]*Y + prophoto_xyz[2][2]*Z; + dsttmp->r[i][j] += factor*X;//prophoto_xyz[0][0]*X + prophoto_xyz[0][1]*Y + prophoto_xyz[0][2]*Z; + dsttmp->g[i][j] += factor*Y;//prophoto_xyz[1][0]*X + prophoto_xyz[1][1]*Y + prophoto_xyz[1][2]*Z; + dsttmp->b[i][j] += factor*Z;//prophoto_xyz[2][0]*X + prophoto_xyz[2][1]*Y + prophoto_xyz[2][2]*Z; } } @@ -797,7 +787,7 @@ namespace rtengine { } - } + }//now chrominance coefficients are denoised } if (noisevar_L>0.01) { @@ -833,7 +823,7 @@ namespace rtengine { //use smoothed shrinkage unless local shrinkage is much less WavCoeffs_L[dir][i] *= (SQR(sfave[i])+SQR(sf))/(sfave[i]+sf+eps); - }//now luminance coeffs are denoised + }//now luminance coefficients are denoised } @@ -847,5 +837,5 @@ namespace rtengine { //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -}; +} diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 4038d2f8a..9c1aa83d0 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -159,6 +159,13 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) { params.wb.temperature = currWB.getTemp (); params.wb.green = currWB.getGreen (); imgsrc->demosaic( rp ); + + LUTu aehist; int aehistcompr; + double clip; + int brightness, contrast, black, hlcompr, hlcomprthresh; + + imgsrc->getAutoExpHistogram (aehist, aehistcompr); + ipf.getAutoExp (aehist, aehistcompr, clip, params.dirpyrDenoise.expcomp, brightness, contrast, black, hlcompr, hlcomprthresh); } lastHighDetail=highDetailNeeded; @@ -194,13 +201,6 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) { PreviewProps pp (0, 0, fw, fh, scale); setScale (scale); imgsrc->getImage (currWB, tr, orig_prev, pp, params.hlrecovery, params.icm, params.raw); - - LUTu aehist; int aehistcompr; - double clip; - int brightness, contrast, black, hlcompr, hlcomprthresh; - - imgsrc->getAutoExpHistogram (aehist, aehistcompr); - ipf.getAutoExp (aehist, aehistcompr, clip, params.dirpyrDenoise.expcomp, brightness, contrast, black, hlcompr, hlcomprthresh); if (todo & M_LINDENOISE) { //printf("denoising!\n");