Removed some problematic OpenMP calls.

This commit is contained in:
Emil Martinec
2012-03-12 10:55:01 -05:00
parent 9d0d552abe
commit 25417b2d36
2 changed files with 14 additions and 24 deletions

View File

@@ -214,9 +214,6 @@ namespace rtengine {
//residual between input and denoised L channel
array2D<float> Ldetail(width,height);
#ifdef _OPENMP
#pragma omp parallel for
#endif
//fill tile from image
for (int i=tiletop, i1=0; i<tilebottom; i++, i1++)
for (int j=tileleft, j1=0; j<tileright; j++, j1++) {
@@ -425,9 +422,6 @@ namespace rtengine {
}
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int i=tiletop, i1=0; i<tilebottom; i++, i1++) {
float X,Y,Z;
for (int j=tileleft, j1=0; j<tileright; j++, j1++) {
@@ -442,15 +436,11 @@ namespace rtengine {
//Y = 65535.0f*(0.05+0.1*((float)rand()/(float)RAND_MAX));//test with random data
float mask = Vmask[i1]*Hmask[j1];
float factor = Vmask[i1]*Hmask[j1]/gain;
if (Y<-500) {
float xxx=Y;
}
dsttmp->r[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 {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
};
}

View File

@@ -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");