Relax dependency from procparams.h
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include "clutstore.h"
|
||||
#include "ciecam02.h"
|
||||
#include "StopWatch.h"
|
||||
#include "procparams.h"
|
||||
#include "../rtgui/ppversion.h"
|
||||
#include "../rtgui/guiutils.h"
|
||||
|
||||
@@ -205,33 +206,33 @@ void proPhotoBlue(float *rtemp, float *gtemp, float *btemp, int istart, int tH,
|
||||
}
|
||||
}
|
||||
|
||||
void customToneCurve(const ToneCurve &customToneCurve, ToneCurveParams::TcMode curveMode, float *rtemp, float *gtemp, float *btemp, int istart, int tH, int jstart, int tW, int tileSize, PerceptualToneCurveState ptcApplyState) {
|
||||
void customToneCurve(const ToneCurve &customToneCurve, ToneCurveMode curveMode, float *rtemp, float *gtemp, float *btemp, int istart, int tH, int jstart, int tW, int tileSize, PerceptualToneCurveState ptcApplyState) {
|
||||
|
||||
if (curveMode == ToneCurveParams::TcMode::STD) { // Standard
|
||||
if (curveMode == ToneCurveMode::STD) { // Standard
|
||||
const StandardToneCurve& userToneCurve = static_cast<const StandardToneCurve&> (customToneCurve);
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
userToneCurve.BatchApply(0, tW - jstart, &rtemp[ti * tileSize], >emp[ti * tileSize], &btemp[ti * tileSize]);
|
||||
}
|
||||
} else if (curveMode == ToneCurveParams::TcMode::FILMLIKE) { // Adobe like
|
||||
} else if (curveMode == ToneCurveMode::FILMLIKE) { // Adobe like
|
||||
const AdobeToneCurve& userToneCurve = static_cast<const AdobeToneCurve&> (customToneCurve);
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
userToneCurve.Apply(rtemp[ti * tileSize + tj], gtemp[ti * tileSize + tj], btemp[ti * tileSize + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode == ToneCurveParams::TcMode::SATANDVALBLENDING) { // apply the curve on the saturation and value channels
|
||||
} else if (curveMode == ToneCurveMode::SATANDVALBLENDING) { // apply the curve on the saturation and value channels
|
||||
const SatAndValueBlendingToneCurve& userToneCurve = static_cast<const SatAndValueBlendingToneCurve&> (customToneCurve);
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
userToneCurve.Apply(rtemp[ti * tileSize + tj], gtemp[ti * tileSize + tj], btemp[ti * tileSize + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode == ToneCurveParams::TcMode::WEIGHTEDSTD) { // apply the curve to the rgb channels, weighted
|
||||
} else if (curveMode == ToneCurveMode::WEIGHTEDSTD) { // apply the curve to the rgb channels, weighted
|
||||
const WeightedStdToneCurve& userToneCurve = static_cast<const WeightedStdToneCurve&> (customToneCurve);
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
userToneCurve.BatchApply(0, tW - jstart, &rtemp[ti * tileSize], >emp[ti * tileSize], &btemp[ti * tileSize]);
|
||||
}
|
||||
} else if (curveMode == ToneCurveParams::TcMode::LUMINANCE) { // apply the curve to the luminance channel
|
||||
} else if (curveMode == ToneCurveMode::LUMINANCE) { // apply the curve to the luminance channel
|
||||
const LuminanceToneCurve& userToneCurve = static_cast<const LuminanceToneCurve&> (customToneCurve);
|
||||
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
@@ -239,7 +240,7 @@ void customToneCurve(const ToneCurve &customToneCurve, ToneCurveParams::TcMode c
|
||||
userToneCurve.Apply(rtemp[ti * tileSize + tj], gtemp[ti * tileSize + tj], btemp[ti * tileSize + tj]);
|
||||
}
|
||||
}
|
||||
} else if (curveMode == ToneCurveParams::TcMode::PERCEPTUAL) { // apply curve while keeping color appearance constant
|
||||
} else if (curveMode == ToneCurveMode::PERCEPTUAL) { // apply curve while keeping color appearance constant
|
||||
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve);
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
userToneCurve.BatchApply(0, tW - jstart, &rtemp[ti * tileSize], >emp[ti * tileSize], &btemp[ti * tileSize], ptcApplyState);
|
||||
@@ -322,7 +323,7 @@ void ImProcFunctions::updateColorProfiles (const Glib::ustring& monitorProfile,
|
||||
if (settings->printerBPC) {
|
||||
flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
|
||||
}
|
||||
outIntent = settings->printerIntent;
|
||||
outIntent = RenderingIntent(settings->printerIntent);
|
||||
} else {
|
||||
oprof = ICCStore::getInstance()->getProfile(params->icm.outputProfile);
|
||||
if (params->icm.outputBPC) {
|
||||
@@ -2225,8 +2226,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
const float hlrange = 65536.0 - shoulder;
|
||||
const bool isProPhoto = (params->icm.workingProfile == "ProPhoto");
|
||||
// extracting datas from 'params' to avoid cache flush (to be confirmed)
|
||||
ToneCurveParams::TcMode curveMode = params->toneCurve.curveMode;
|
||||
ToneCurveParams::TcMode curveMode2 = params->toneCurve.curveMode2;
|
||||
ToneCurveMode curveMode = params->toneCurve.curveMode;
|
||||
ToneCurveMode 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);
|
||||
@@ -2238,12 +2239,12 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
|
||||
PerceptualToneCurveState ptc1ApplyState, ptc2ApplyState;
|
||||
|
||||
if (hasToneCurve1 && curveMode == ToneCurveParams::TcMode::PERCEPTUAL) {
|
||||
if (hasToneCurve1 && curveMode == ToneCurveMode::PERCEPTUAL) {
|
||||
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve1);
|
||||
userToneCurve.initApplyState (ptc1ApplyState, params->icm.workingProfile);
|
||||
}
|
||||
|
||||
if (hasToneCurve2 && curveMode2 == ToneCurveParams::TcMode::PERCEPTUAL) {
|
||||
if (hasToneCurve2 && curveMode2 == ToneCurveMode::PERCEPTUAL) {
|
||||
const PerceptualToneCurve& userToneCurve = static_cast<const PerceptualToneCurve&> (customToneCurve2);
|
||||
userToneCurve.initApplyState (ptc2ApplyState, params->icm.workingProfile);
|
||||
}
|
||||
|
Reference in New Issue
Block a user