procparams.h cleanup - Part 2
TODO: - Add c'tors and find all defaults - Remove `setDefaults()` in favour of c'tors - Add `operator ==()` to `struct`s
This commit is contained in:
@@ -440,11 +440,11 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
||||
}
|
||||
|
||||
// extracting datas from 'params' to avoid cache flush (to be confirmed)
|
||||
ColorAppearanceParams::TCMode curveMode = params->colorappearance.curveMode;
|
||||
ColorAppearanceParams::TCMode curveMode2 = params->colorappearance.curveMode2;
|
||||
ColorAppearanceParams::TcMode curveMode = params->colorappearance.curveMode;
|
||||
ColorAppearanceParams::TcMode curveMode2 = params->colorappearance.curveMode2;
|
||||
bool hasColCurve1 = bool (customColCurve1);
|
||||
bool hasColCurve2 = bool (customColCurve2);
|
||||
ColorAppearanceParams::CTCMode curveMode3 = params->colorappearance.curveMode3;
|
||||
ColorAppearanceParams::CtcMode curveMode3 = params->colorappearance.curveMode3;
|
||||
bool hasColCurve3 = bool (customColCurve3);
|
||||
|
||||
|
||||
@@ -805,7 +805,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
||||
}
|
||||
|
||||
if (hasColCurve1) {//curve 1 with Lightness and Brightness
|
||||
if (curveMode == ColorAppearanceParams::TCMode::LIGHT) {
|
||||
if (curveMode == ColorAppearanceParams::TcMode::LIGHT) {
|
||||
/* float Jj=(float) Jpro*327.68;
|
||||
float Jold=Jj;
|
||||
const Lightcurve& userColCurve = static_cast<const Lightcurve&>(customColCurve1);
|
||||
@@ -843,7 +843,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
||||
}
|
||||
|
||||
t1L = true;
|
||||
} else if (curveMode == ColorAppearanceParams::TCMode::BRIGHT) {
|
||||
} else if (curveMode == ColorAppearanceParams::TcMode::BRIGHT) {
|
||||
//attention! Brightness curves are open - unlike Lightness or Lab or RGB==> rendering and algoritms will be different
|
||||
float coef = ((aw + 4.f) * (4.f / c)) / 100.f;
|
||||
float Qanc = Qpro;
|
||||
@@ -891,7 +891,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
||||
}
|
||||
|
||||
if (hasColCurve2) {//curve 2 with Lightness and Brightness
|
||||
if (curveMode2 == ColorAppearanceParams::TCMode::LIGHT) {
|
||||
if (curveMode2 == ColorAppearanceParams::TcMode::LIGHT) {
|
||||
float Jj = (float) Jpro * 327.68;
|
||||
float Jold = Jj;
|
||||
/*
|
||||
@@ -934,7 +934,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
||||
Jpro = 1.;
|
||||
}
|
||||
|
||||
} else if (curveMode2 == ColorAppearanceParams::TCMode::BRIGHT) { //
|
||||
} else if (curveMode2 == ColorAppearanceParams::TcMode::BRIGHT) { //
|
||||
float Qanc = Qpro;
|
||||
float coef = ((aw + 4.f) * (4.f / c)) / 100.f;
|
||||
float Qq = (float) Qpro * 327.68f * (1.f / coef);
|
||||
@@ -992,7 +992,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
||||
}
|
||||
|
||||
if (hasColCurve3) {//curve 3 with chroma saturation colorfullness
|
||||
if (curveMode3 == ColorAppearanceParams::CTCMode::CHROMA) {
|
||||
if (curveMode3 == ColorAppearanceParams::CtcMode::CHROMA) {
|
||||
double parsat = 0.8; //0.68;
|
||||
double coef = 327.68 / parsat;
|
||||
float Cc = (float) Cpro * coef;
|
||||
@@ -1016,7 +1016,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
||||
}
|
||||
|
||||
// Cpro=Cc/coef;
|
||||
} else if (curveMode3 == ColorAppearanceParams::CTCMode::SATUR) { //
|
||||
} else if (curveMode3 == ColorAppearanceParams::CtcMode::SATUR) { //
|
||||
double parsat = 0.8; //0.6
|
||||
double coef = 327.68 / parsat;
|
||||
float Ss = (float) spro * coef;
|
||||
@@ -1036,7 +1036,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
||||
Cpro = (spro * spro * Qpro) / (10000.0);
|
||||
c1s = 1;
|
||||
|
||||
} else if (curveMode3 == ColorAppearanceParams::CTCMode::COLORF) { //
|
||||
} else if (curveMode3 == ColorAppearanceParams::CtcMode::COLORF) { //
|
||||
double parsat = 0.8; //0.68;
|
||||
double coef = 327.68 / parsat;
|
||||
float Mm = (float) Mpro * coef;
|
||||
@@ -1121,21 +1121,21 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
||||
int libr = 0;
|
||||
int colch = 0;
|
||||
|
||||
if (curveMode == ColorAppearanceParams::TCMode::BRIGHT) {
|
||||
if (curveMode == ColorAppearanceParams::TcMode::BRIGHT) {
|
||||
brli = 70.0;
|
||||
libr = 1;
|
||||
} else if (curveMode == ColorAppearanceParams::TCMode::LIGHT) {
|
||||
} else if (curveMode == ColorAppearanceParams::TcMode::LIGHT) {
|
||||
brli = 327.;
|
||||
libr = 0;
|
||||
}
|
||||
|
||||
if (curveMode3 == ColorAppearanceParams::CTCMode::CHROMA) {
|
||||
if (curveMode3 == ColorAppearanceParams::CtcMode::CHROMA) {
|
||||
chsacol = 400.;//327.;
|
||||
colch = 0;
|
||||
} else if (curveMode3 == ColorAppearanceParams::CTCMode::SATUR) {
|
||||
} else if (curveMode3 == ColorAppearanceParams::CtcMode::SATUR) {
|
||||
chsacol = 450.0;
|
||||
colch = 1;
|
||||
} else if (curveMode3 == ColorAppearanceParams::CTCMode::COLORF) {
|
||||
} else if (curveMode3 == ColorAppearanceParams::CtcMode::COLORF) {
|
||||
chsacol = 400.;//327.0;
|
||||
colch = 2;
|
||||
}
|
||||
@@ -1390,21 +1390,21 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh
|
||||
int libr = 0;
|
||||
int colch = 0;
|
||||
|
||||
if (curveMode == ColorAppearanceParams::TCMode::BRIGHT) {
|
||||
if (curveMode == ColorAppearanceParams::TcMode::BRIGHT) {
|
||||
brli = 70.0;
|
||||
libr = 1;
|
||||
} else if (curveMode == ColorAppearanceParams::TCMode::LIGHT) {
|
||||
} else if (curveMode == ColorAppearanceParams::TcMode::LIGHT) {
|
||||
brli = 327.;
|
||||
libr = 0;
|
||||
}
|
||||
|
||||
if (curveMode3 == ColorAppearanceParams::CTCMode::CHROMA) {
|
||||
if (curveMode3 == ColorAppearanceParams::CtcMode::CHROMA) {
|
||||
chsacol = 400.;//327.;
|
||||
colch = 0;
|
||||
} else if (curveMode3 == ColorAppearanceParams::CTCMode::SATUR) {
|
||||
} else if (curveMode3 == ColorAppearanceParams::CtcMode::SATUR) {
|
||||
chsacol = 450.0;
|
||||
colch = 1;
|
||||
} else if (curveMode3 == ColorAppearanceParams::CTCMode::COLORF) {
|
||||
} else if (curveMode3 == ColorAppearanceParams::CtcMode::COLORF) {
|
||||
chsacol = 400.;//327.0;
|
||||
colch = 2;
|
||||
}
|
||||
@@ -1765,14 +1765,14 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
const float rstprotection = 100. - params->colorappearance.rstprotection;
|
||||
|
||||
// extracting datas from 'params' to avoid cache flush (to be confirmed)
|
||||
const ColorAppearanceParams::TCMode curveMode = params->colorappearance.curveMode;
|
||||
const ColorAppearanceParams::TcMode curveMode = params->colorappearance.curveMode;
|
||||
const bool hasColCurve1 = bool (customColCurve1);
|
||||
const bool t1L = hasColCurve1 && curveMode == ColorAppearanceParams::TCMode::LIGHT;
|
||||
const bool t1L = hasColCurve1 && curveMode == ColorAppearanceParams::TcMode::LIGHT;
|
||||
|
||||
const ColorAppearanceParams::TCMode curveMode2 = params->colorappearance.curveMode2;
|
||||
const ColorAppearanceParams::TcMode curveMode2 = params->colorappearance.curveMode2;
|
||||
const bool hasColCurve2 = bool (customColCurve2);
|
||||
|
||||
const ColorAppearanceParams::CTCMode curveMode3 = params->colorappearance.curveMode3;
|
||||
const ColorAppearanceParams::CtcMode curveMode3 = params->colorappearance.curveMode3;
|
||||
const bool hasColCurve3 = bool (customColCurve3);
|
||||
|
||||
bool needJ = (alg == 0 || alg == 1 || alg == 3);
|
||||
@@ -2226,7 +2226,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
}
|
||||
|
||||
if (hasColCurve1) {//curve 1 with Lightness and Brightness
|
||||
if (curveMode == ColorAppearanceParams::TCMode::LIGHT) {
|
||||
if (curveMode == ColorAppearanceParams::TcMode::LIGHT) {
|
||||
float Jj = (float) Jpro * 327.68f;
|
||||
float Jold = Jj;
|
||||
float Jold100 = (float) Jpro;
|
||||
@@ -2255,7 +2255,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
if (Jpro < 1.f) {
|
||||
Jpro = 1.f;
|
||||
}
|
||||
} else if (curveMode == ColorAppearanceParams::TCMode::BRIGHT) {
|
||||
} else if (curveMode == ColorAppearanceParams::TcMode::BRIGHT) {
|
||||
//attention! Brightness curves are open - unlike Lightness or Lab or RGB==> rendering and algoritms will be different
|
||||
float coef = ((aw + 4.f) * (4.f / c)) / 100.f;
|
||||
float Qanc = Qpro;
|
||||
@@ -2299,7 +2299,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
}
|
||||
|
||||
if (hasColCurve2) {//curve 2 with Lightness and Brightness
|
||||
if (curveMode2 == ColorAppearanceParams::TCMode::LIGHT) {
|
||||
if (curveMode2 == ColorAppearanceParams::TcMode::LIGHT) {
|
||||
float Jj = (float) Jpro * 327.68f;
|
||||
float Jold = Jj;
|
||||
float Jold100 = (float) Jpro;
|
||||
@@ -2337,7 +2337,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
Jpro = 1.f;
|
||||
}
|
||||
|
||||
} else if (curveMode2 == ColorAppearanceParams::TCMode::BRIGHT) { //
|
||||
} else if (curveMode2 == ColorAppearanceParams::TcMode::BRIGHT) { //
|
||||
float Qanc = Qpro;
|
||||
|
||||
float coef = ((aw + 4.f) * (4.f / c)) / 100.f;
|
||||
@@ -2394,7 +2394,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
}
|
||||
|
||||
if (hasColCurve3) {//curve 3 with chroma saturation colorfullness
|
||||
if (curveMode3 == ColorAppearanceParams::CTCMode::CHROMA) {
|
||||
if (curveMode3 == ColorAppearanceParams::CtcMode::CHROMA) {
|
||||
float parsat = 0.8f; //0.68;
|
||||
float coef = 327.68f / parsat;
|
||||
float Cc = (float) Cpro * coef;
|
||||
@@ -2417,7 +2417,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
Cpro = 50.f;
|
||||
}
|
||||
*/
|
||||
} else if (curveMode3 == ColorAppearanceParams::CTCMode::SATUR) { //
|
||||
} else if (curveMode3 == ColorAppearanceParams::CtcMode::SATUR) { //
|
||||
float parsat = 0.8f; //0.6
|
||||
float coef = 327.68f / parsat;
|
||||
float Ss = (float) spro * coef;
|
||||
@@ -2434,7 +2434,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
Color::skinredfloat (Jpro, hpro, Ss, Sold, dred, protect_red, sk, rstprotection, ko, spro);
|
||||
Qpro = ( 4.0f / c ) * sqrtf ( Jpro / 100.0f ) * ( aw + 4.0f ) ;
|
||||
Cpro = (spro * spro * Qpro) / (10000.0f);
|
||||
} else if (curveMode3 == ColorAppearanceParams::CTCMode::COLORF) { //
|
||||
} else if (curveMode3 == ColorAppearanceParams::CtcMode::COLORF) { //
|
||||
float parsat = 0.8f; //0.68;
|
||||
float coef = 327.68f / parsat;
|
||||
float Mm = (float) Mpro * coef;
|
||||
@@ -2504,7 +2504,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
float colch;
|
||||
|
||||
//update histogram
|
||||
if (curveMode == ColorAppearanceParams::TCMode::BRIGHT) {
|
||||
if (curveMode == ColorAppearanceParams::TcMode::BRIGHT) {
|
||||
brli = 70.0f;
|
||||
libr = Q; //40.0 to 100.0 approximative factor for Q - 327 for J
|
||||
} else { /*if(curveMode == ColorAppearanceParams::TCMode::LIGHT)*/
|
||||
@@ -2515,10 +2515,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
posl = (int) (libr * brli);
|
||||
hist16JCAM[posl]++;
|
||||
|
||||
if (curveMode3 == ColorAppearanceParams::CTCMode::CHROMA) {
|
||||
if (curveMode3 == ColorAppearanceParams::CtcMode::CHROMA) {
|
||||
chsacol = 400.f;//327
|
||||
colch = C; //450.0 approximative factor for s 320 for M
|
||||
} else if (curveMode3 == ColorAppearanceParams::CTCMode::SATUR) {
|
||||
} else if (curveMode3 == ColorAppearanceParams::CtcMode::SATUR) {
|
||||
chsacol = 450.0f;
|
||||
colch = s;
|
||||
} else { /*if(curveMode3 == ColorAppearanceParams::CTCMode::COLORF)*/
|
||||
@@ -2857,7 +2857,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
float libr;
|
||||
float colch;
|
||||
|
||||
if (curveMode == ColorAppearanceParams::TCMode::BRIGHT) {
|
||||
if (curveMode == ColorAppearanceParams::TcMode::BRIGHT) {
|
||||
brli = 70.0f;
|
||||
libr = ncie->Q_p[i][j]; //40.0 to 100.0 approximative factor for Q - 327 for J
|
||||
} else { /*if(curveMode == ColorAppearanceParams::TCMode::LIGHT)*/
|
||||
@@ -2868,10 +2868,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
||||
posl = (int) (libr * brli);
|
||||
hist16JCAM[posl]++;
|
||||
|
||||
if (curveMode3 == ColorAppearanceParams::CTCMode::CHROMA) {
|
||||
if (curveMode3 == ColorAppearanceParams::CtcMode::CHROMA) {
|
||||
chsacol = 400.f;//327.f;
|
||||
colch = ncie_C_p;
|
||||
} else if (curveMode3 == ColorAppearanceParams::CTCMode::SATUR) {
|
||||
} else if (curveMode3 == ColorAppearanceParams::CtcMode::SATUR) {
|
||||
chsacol = 450.0f;
|
||||
colch = 100.f * sqrtf (ncie_C_p / ncie->Q_p[i][j]);
|
||||
} else { /*if(curveMode3 == ColorAppearanceParams::CTCMode::COLORF)*/
|
||||
@@ -3270,25 +3270,25 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
const float hlrange = 65536.0 - shoulder;
|
||||
const bool isProPhoto = (params->icm.working == "ProPhoto");
|
||||
// extracting datas from 'params' to avoid cache flush (to be confirmed)
|
||||
ToneCurveParams::Mode curveMode = params->toneCurve.curveMode;
|
||||
ToneCurveParams::Mode curveMode2 = params->toneCurve.curveMode2;
|
||||
ToneCurveParams::TcMode curveMode = params->toneCurve.curveMode;
|
||||
ToneCurveParams::TcMode curveMode2 = params->toneCurve.curveMode2;
|
||||
bool highlight = params->toneCurve.hrenabled;//Get the value if "highlight reconstruction" is activated
|
||||
bool hasToneCurve1 = bool (customToneCurve1);
|
||||
bool hasToneCurve2 = bool (customToneCurve2);
|
||||
BlackWhiteParams::eTCModeId beforeCurveMode = params->blackwhite.beforeCurveMode;
|
||||
BlackWhiteParams::eTCModeId afterCurveMode = params->blackwhite.afterCurveMode;
|
||||
BlackWhiteParams::TcMode beforeCurveMode = params->blackwhite.beforeCurveMode;
|
||||
BlackWhiteParams::TcMode afterCurveMode = params->blackwhite.afterCurveMode;
|
||||
|
||||
bool hasToneCurvebw1 = bool (customToneCurvebw1);
|
||||
bool hasToneCurvebw2 = bool (customToneCurvebw2);
|
||||
|
||||
PerceptualToneCurveState ptc1ApplyState, ptc2ApplyState;
|
||||
|
||||
if (hasToneCurve1 && curveMode == ToneCurveParams::Mode::PERCEPTUAL) {
|
||||
if (hasToneCurve1 && curveMode == ToneCurveParams::TcMode::PERCEPTUAL) {
|
||||
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve1);
|
||||
userToneCurve.initApplyState (ptc1ApplyState, params->icm.working);
|
||||
}
|
||||
|
||||
if (hasToneCurve2 && curveMode2 == ToneCurveParams::Mode::PERCEPTUAL) {
|
||||
if (hasToneCurve2 && curveMode2 == ToneCurveParams::TcMode::PERCEPTUAL) {
|
||||
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve2);
|
||||
userToneCurve.initApplyState (ptc2ApplyState, params->icm.working);
|
||||
}
|
||||
@@ -3641,21 +3641,21 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
}
|
||||
|
||||
if (hasToneCurve1) {
|
||||
if (curveMode == ToneCurveParams::Mode::STD) { // Standard
|
||||
if (curveMode == ToneCurveParams::TcMode::STD) { // Standard
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
const StandardToneCurve& userToneCurve = static_cast<const StandardToneCurve&> (customToneCurve1);
|
||||
userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode == ToneCurveParams::Mode::FILMLIKE) { // Adobe like
|
||||
} else if (curveMode == ToneCurveParams::TcMode::FILMLIKE) { // Adobe like
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
const AdobeToneCurve& userToneCurve = static_cast<const AdobeToneCurve&> (customToneCurve1);
|
||||
userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode == ToneCurveParams::Mode::SATANDVALBLENDING) { // apply the curve on the saturation and value channels
|
||||
} else if (curveMode == ToneCurveParams::TcMode::SATANDVALBLENDING) { // apply the curve on the saturation and value channels
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
const SatAndValueBlendingToneCurve& userToneCurve = static_cast<const SatAndValueBlendingToneCurve&> (customToneCurve1);
|
||||
@@ -3665,7 +3665,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode == ToneCurveParams::Mode::WEIGHTEDSTD) { // apply the curve to the rgb channels, weighted
|
||||
} else if (curveMode == ToneCurveParams::TcMode::WEIGHTEDSTD) { // apply the curve to the rgb channels, weighted
|
||||
const WeightedStdToneCurve& userToneCurve = static_cast<const WeightedStdToneCurve&> (customToneCurve1);
|
||||
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
@@ -3676,7 +3676,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode == ToneCurveParams::Mode::LUMINANCE) { // apply the curve to the luminance channel
|
||||
} else if (curveMode == ToneCurveParams::TcMode::LUMINANCE) { // apply the curve to the luminance channel
|
||||
const LuminanceToneCurve& userToneCurve = static_cast<const LuminanceToneCurve&> (customToneCurve1);
|
||||
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
@@ -3687,7 +3687,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode == ToneCurveParams::Mode::PERCEPTUAL) { // apply curve while keeping color appearance constant
|
||||
} else if (curveMode == ToneCurveParams::TcMode::PERCEPTUAL) { // apply curve while keeping color appearance constant
|
||||
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve1);
|
||||
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
@@ -3712,28 +3712,28 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
}
|
||||
|
||||
if (hasToneCurve2) {
|
||||
if (curveMode2 == ToneCurveParams::Mode::STD) { // Standard
|
||||
if (curveMode2 == ToneCurveParams::TcMode::STD) { // Standard
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
const StandardToneCurve& userToneCurve = static_cast<const StandardToneCurve&> (customToneCurve2);
|
||||
userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode2 == ToneCurveParams::Mode::FILMLIKE) { // Adobe like
|
||||
} else if (curveMode2 == ToneCurveParams::TcMode::FILMLIKE) { // Adobe like
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
const AdobeToneCurve& userToneCurve = static_cast<const AdobeToneCurve&> (customToneCurve2);
|
||||
userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode2 == ToneCurveParams::Mode::SATANDVALBLENDING) { // apply the curve on the saturation and value channels
|
||||
} else if (curveMode2 == ToneCurveParams::TcMode::SATANDVALBLENDING) { // apply the curve on the saturation and value channels
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
const SatAndValueBlendingToneCurve& userToneCurve = static_cast<const SatAndValueBlendingToneCurve&> (customToneCurve2);
|
||||
userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode2 == ToneCurveParams::Mode::WEIGHTEDSTD) { // apply the curve to the rgb channels, weighted
|
||||
} else if (curveMode2 == ToneCurveParams::TcMode::WEIGHTEDSTD) { // apply the curve to the rgb channels, weighted
|
||||
const WeightedStdToneCurve& userToneCurve = static_cast<const WeightedStdToneCurve&> (customToneCurve2);
|
||||
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
@@ -3741,7 +3741,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode2 == ToneCurveParams::Mode::LUMINANCE) { // apply the curve to the luminance channel
|
||||
} else if (curveMode2 == ToneCurveParams::TcMode::LUMINANCE) { // apply the curve to the luminance channel
|
||||
const LuminanceToneCurve& userToneCurve = static_cast<const LuminanceToneCurve&> (customToneCurve2);
|
||||
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
@@ -3749,7 +3749,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode2 == ToneCurveParams::Mode::PERCEPTUAL) { // apply curve while keeping color appearance constant
|
||||
} else if (curveMode2 == ToneCurveParams::TcMode::PERCEPTUAL) { // apply curve while keeping color appearance constant
|
||||
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve2);
|
||||
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
@@ -4212,21 +4212,21 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
//black and white
|
||||
if (blackwhite) {
|
||||
if (hasToneCurvebw1) {
|
||||
if (beforeCurveMode == BlackWhiteParams::TC_MODE_STD_BW) { // Standard
|
||||
if (beforeCurveMode == BlackWhiteParams::TcMode::STD_BW) { // Standard
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
const StandardToneCurvebw& userToneCurvebw = static_cast<const StandardToneCurvebw&> (customToneCurvebw1);
|
||||
userToneCurvebw.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (beforeCurveMode == BlackWhiteParams::TC_MODE_FILMLIKE_BW) { // Adobe like
|
||||
} else if (beforeCurveMode == BlackWhiteParams::TcMode::FILMLIKE_BW) { // Adobe like
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
const AdobeToneCurvebw& userToneCurvebw = static_cast<const AdobeToneCurvebw&> (customToneCurvebw1);
|
||||
userToneCurvebw.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (beforeCurveMode == BlackWhiteParams::TC_MODE_SATANDVALBLENDING_BW) { // apply the curve on the saturation and value channels
|
||||
} else if (beforeCurveMode == BlackWhiteParams::TcMode::SATANDVALBLENDING_BW) { // apply the curve on the saturation and value channels
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
const SatAndValueBlendingToneCurvebw& userToneCurvebw = static_cast<const SatAndValueBlendingToneCurvebw&> (customToneCurvebw1);
|
||||
@@ -4236,7 +4236,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
userToneCurvebw.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]);
|
||||
}
|
||||
}
|
||||
} else if (beforeCurveMode == BlackWhiteParams::TC_MODE_WEIGHTEDSTD_BW) { // apply the curve to the rgb channels, weighted
|
||||
} else if (beforeCurveMode == BlackWhiteParams::TcMode::WEIGHTEDSTD_BW) { // apply the curve to the rgb channels, weighted
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
const WeightedStdToneCurvebw& userToneCurvebw = static_cast<const WeightedStdToneCurvebw&> (customToneCurvebw1);
|
||||
@@ -4672,7 +4672,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
|
||||
if (hasToneCurvebw2) {
|
||||
|
||||
if (afterCurveMode == BlackWhiteParams::TC_MODE_STD_BW) { // Standard
|
||||
if (afterCurveMode == BlackWhiteParams::TcMode::STD_BW) { // Standard
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic, 5)
|
||||
#endif
|
||||
@@ -4683,7 +4683,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
userToneCurve.Apply (tmpImage->r (i, j), tmpImage->g (i, j), tmpImage->b (i, j));
|
||||
}
|
||||
}
|
||||
} else if (afterCurveMode == BlackWhiteParams::TC_MODE_WEIGHTEDSTD_BW) { // apply the curve to the rgb channels, weighted
|
||||
} else if (afterCurveMode == BlackWhiteParams::TcMode::WEIGHTEDSTD_BW) { // apply the curve to the rgb channels, weighted
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic, 5)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user