From 23bca5e143487d4bb6b8cefcfd39d3f76be738de Mon Sep 17 00:00:00 2001 From: Emil Martinec Date: Sat, 30 Oct 2010 08:32:03 -0500 Subject: [PATCH] Corrected default profiles to reflect new tone controls. Rolled back highlight desaturation to prevent color shifts. --- rtdata/profiles/crisp.pp3 | 8 ++++---- rtdata/profiles/default.pp3 | 8 ++++---- rtdata/profiles/neutral.pp3 | 8 ++++---- rtengine/curves.cc | 8 +++++--- rtengine/improcfun.cc | 6 +++--- rtengine/procparams.cc | 4 ++-- rtengine/rawimagesource.cc | 6 +++--- 7 files changed, 25 insertions(+), 23 deletions(-) diff --git a/rtdata/profiles/crisp.pp3 b/rtdata/profiles/crisp.pp3 index b49fe52b4..75b7910cc 100644 --- a/rtdata/profiles/crisp.pp3 +++ b/rtdata/profiles/crisp.pp3 @@ -1,16 +1,16 @@ [Version] -Version=231 +Version=466 [Exposure] Auto=true -Clip=0.02 +Clip=0.001 Compensation=0 Brightness=0 Contrast=12 Black=0 -HighlightCompr=100 -ShadowCompr=100 +HighlightCompr=70 +ShadowCompr=25 Curve=1;0;0;1;1; [Channel Mixer] diff --git a/rtdata/profiles/default.pp3 b/rtdata/profiles/default.pp3 index a76f8d10c..fd8f1c188 100644 --- a/rtdata/profiles/default.pp3 +++ b/rtdata/profiles/default.pp3 @@ -1,16 +1,16 @@ [Version] -Version=231 +Version=466 [Exposure] Auto=true -Clip=0.01 +Clip=0.001 Compensation=0 Brightness=0 Contrast=0 Black=0 -HighlightCompr=100 -ShadowCompr=100 +HighlightCompr=70 +ShadowCompr=25 Curve=1;0;0;1;1; [Channel Mixer] diff --git a/rtdata/profiles/neutral.pp3 b/rtdata/profiles/neutral.pp3 index 7d9000170..6c8070367 100644 --- a/rtdata/profiles/neutral.pp3 +++ b/rtdata/profiles/neutral.pp3 @@ -1,16 +1,16 @@ [Version] -Version=231 +Version=466 [Exposure] Auto=false -Clip=0.01 +Clip=0.001 Compensation=0 Brightness=0 Contrast=0 Black=0 -HighlightCompr=100 -ShadowCompr=100 +HighlightCompr=70 +ShadowCompr=25 Curve=1;0;0;1;1; [Channel Mixer] diff --git a/rtengine/curves.cc b/rtengine/curves.cc index 7bf6e19e7..fbd4ed4a2 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -728,9 +728,11 @@ void CurveFactory::complexCurve (double ecomp, double black, double hlcompr, dou std::vector basecurvePoints; basecurvePoints.push_back((double)((CurveType)NURBS)); - float toex = MIN(1,black/(a*def_mul)); - float toey = MAX(0,toex*a*def_mul*(shcompr/25.0-1)); - float shoulderx = 1/(a*def_mul);//point in x at which line of slope a starting at (0,0) reaches y=1 + //float toex = MIN(1,black/(a*def_mul)); + //float toey = MAX(0,toex*a*def_mul*(shcompr/25.0-1)); + float toex = black; + float toey = MAX(0,toex*(shcompr/25.0-1)); + float shoulderx = MIN(black,1/(a*def_mul));//point in x at which line of slope a starting at (0,0) reaches y=1 float shouldery=1; float toneslope=(shouldery-toey)/(shoulderx-toex); if (shoulderx<1) {//a>1; positive EC diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index c89a0aa91..07e771092 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -331,7 +331,7 @@ void ImProcFunctions::rgbProc (Image16* working, LabImage* lab, int* tonecurve1, r *= tonefactor; g *= tonefactor; b *= tonefactor; - float maxfactor = 1; + /*float maxfactor = 1; if (r>65535) maxfactor = MIN(maxfactor, (float)(65535.0f-Ynew)/(r-Ynew)); if (g>65535) @@ -351,7 +351,7 @@ void ImProcFunctions::rgbProc (Image16* working, LabImage* lab, int* tonecurve1, r = CLIP(Ynew + 1.13983*V); g = CLIP(Ynew - 0.39465*U - 0.58060*V); - b = CLIP(Ynew + 2.03211*U); + b = CLIP(Ynew + 2.03211*U);*/ r = tonecurve2[CLIP(r)]; g = tonecurve2[CLIP(g)]; @@ -559,7 +559,7 @@ void ImProcFunctions::getAutoExp (unsigned int* histogram, int histcompr, doubl double corr = pow(2.0, expcomp); // black point selection is based on the linear result (yielding better visual results) - bl = (int)(shc * corr); + bl = (int)(shc /* * corr*/); // compute the white point of the exp. compensated gamma corrected image double awg = (int)(CurveFactory::gamma2 (aw * corr / 65536.0) * 65536.0); diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index a13458019..674d66e2b 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -46,13 +46,13 @@ void ProcParams::destroy (ProcParams* pp) { void ProcParams::setDefaults () { toneCurve.autoexp = false; - toneCurve.clip = 0.002; + toneCurve.clip = 0.001; toneCurve.expcomp = 0; toneCurve.brightness = 0; toneCurve.contrast = 0; toneCurve.black = 0; toneCurve.hlcompr = 70; - toneCurve.shcompr = 50; + toneCurve.shcompr = 25; toneCurve.curve.clear (); labCurve.brightness = 0; diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 212db7fcf..cacb52b60 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1834,14 +1834,14 @@ int RawImageSource::getAEHistogram (unsigned int* histogram, int& histcompr) { } if (ri->filters) for (int j=start; jdata[i][j]>>histcompr]+=2; - else + else*/ histogram[ri->data[i][j]>>histcompr]+=4; else for (int j=start; j<3*end; j++) { histogram[ri->data[i][j+0]>>histcompr]++; - histogram[ri->data[i][j+1]>>histcompr]++; + histogram[ri->data[i][j+1]>>histcompr]+=2; histogram[ri->data[i][j+2]>>histcompr]++; } }