This commit is contained in:
@@ -592,7 +592,6 @@ void CurveFactory::curveToningLL ( bool & llctoningutili,const std::vector<doubl
|
||||
LUTu & outBeforeCCurveHistogram,
|
||||
ToneCurve & customToneCurve1,
|
||||
ToneCurve & customToneCurve2,
|
||||
|
||||
int skip) {
|
||||
|
||||
|
||||
@@ -675,37 +674,12 @@ void CurveFactory::curveToningLL ( bool & llctoningutili,const std::vector<doubl
|
||||
hlCurve[i]=exp_scale;
|
||||
float scalemshoulder = scale - shoulder;
|
||||
|
||||
// SSE makes more sense than omp here
|
||||
#ifdef __SSE2__
|
||||
int i;
|
||||
__m128 exp_scalev = _mm_set1_ps(exp_scale);
|
||||
__m128 scalemshoulderv = _mm_set1_ps(scalemshoulder);
|
||||
__m128 compv = _mm_set1_ps(comp);
|
||||
__m128 valv = _mm_set_ps(4.f,3.f,2.f,1.f);
|
||||
__m128 onev = _mm_set1_ps(1.f);
|
||||
__m128 fourv = _mm_set1_ps(4.f);
|
||||
for (i=shoulder+1; i<0xFFFD; i+=4) {
|
||||
// change to [0,1] range
|
||||
__m128 Rv = valv*compv/(scalemshoulderv);
|
||||
_mm_storeu_ps(&hlCurve[i],xlogf(onev+Rv*exp_scalev)/Rv);
|
||||
valv += fourv;
|
||||
}
|
||||
for (; i<0x10000; i++) {
|
||||
// change to [0,1] range
|
||||
float val = (float)i-shoulder;
|
||||
float R = val*comp/(scalemshoulder);
|
||||
hlCurve[i] = xlogf(1.f+R*exp_scale)/R;
|
||||
}
|
||||
|
||||
#else
|
||||
for (int i=shoulder+1; i<0x10000; i++) {
|
||||
// change to [0,1] range
|
||||
float val = (float)i-shoulder;
|
||||
float R = val*comp/(scalemshoulder);
|
||||
hlCurve[i] = xlogf(1.f+R*exp_scale)/R;
|
||||
hlCurve[i] = xlog(1.0+R*exp_scale)/R; // don't use xlogf or 1.f here. Leads to errors caused by too low precision
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -36,7 +36,7 @@ ImProcCoordinator::ImProcCoordinator ()
|
||||
bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(0.), chaut(0.f), redaut(0.f), blueaut(0.f), maxredaut(0.f), maxblueaut(0.f),nresi(0.f),
|
||||
chromina(0.f), sigma(0.f), lumema(0.f),minredaut(0.f), minblueaut(0.f),
|
||||
|
||||
hltonecurve(65536,0),
|
||||
hltonecurve(65536,LUT_CLIP_BELOW), // used LUT_CLIP_BELOW, because we want to have a baseline of 2^expcomp in this curve. If we don't clip the lut we get wrong values, see Issue 2621 #14 for details
|
||||
shtonecurve(65536,2),//clip above
|
||||
tonecurve(65536,0),//,1);
|
||||
|
||||
|
@@ -589,7 +589,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
}
|
||||
// RGB processing
|
||||
|
||||
LUTf curve1 (65536,0);
|
||||
LUTf curve1 (65536,LUT_CLIP_BELOW); // used LUT_CLIP_BELOW, because we want to have a baseline of 2^expcomp in this curve. If we don't clip the lut we get wrong values, see Issue 2621 #14 for details
|
||||
LUTf curve2 (65536,0);
|
||||
LUTf curve (65536,0);
|
||||
LUTf satcurve (65536,0);
|
||||
|
Reference in New Issue
Block a user