Skip to content

Commit 94c9ab4

Browse files
committed
Iprove iplab2rgb
1 parent 538e5d8 commit 94c9ab4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

rtengine/iplab2rgb.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ void ImProcFunctions::workingtrc(int sp, const Imagefloat* src, Imagefloat* dst,
430430

431431
double wb2[3][3];
432432

433-
if (mul == 5) {
433+
if (mul == 5) {//only second pass workingtrc - avoid this code first pass
434434
for (int r = 0; r < 3; ++r) {
435435
for (int c = 0; c < 3; ++c) {
436436
wb2[r][c] = wprof[r][c];
@@ -702,7 +702,7 @@ void ImProcFunctions::workingtrc(int sp, const Imagefloat* src, Imagefloat* dst,
702702
double tempv4 = 5003.;
703703
double p[6]; //primaries
704704

705-
if (locprim == 0) {
705+
if (locprim == 0 && mul == 5) {
706706
switch (ColorManagementParams::Primaries(prim)) {
707707
case ColorManagementParams::Primaries::DEFAULT: {
708708
break;
@@ -975,7 +975,7 @@ void ImProcFunctions::workingtrc(int sp, const Imagefloat* src, Imagefloat* dst,
975975
constexpr double eps = 0.000000001; // not divide by zero
976976

977977
//primaries for 10 working profiles ==> output profiles
978-
if (locprim == 0) {
978+
if (locprim == 0 && mul ==5) {
979979
if (profile == "WideGamut") {
980980
p[0] = 0.7350; //Widegamut primaries
981981
p[1] = 0.2650;
@@ -1156,7 +1156,7 @@ void ImProcFunctions::workingtrc(int sp, const Imagefloat* src, Imagefloat* dst,
11561156

11571157
Glib::ustring ills = "D50";
11581158

1159-
if (locprim == 0) {
1159+
if (locprim == 0 && mul == 5) {
11601160

11611161
switch (ColorManagementParams::Illuminant(illum)) {
11621162
case ColorManagementParams::Illuminant::DEFAULT:
@@ -1343,7 +1343,7 @@ void ImProcFunctions::workingtrc(int sp, const Imagefloat* src, Imagefloat* dst,
13431343
cmsWriteTag(oprofdef, cmsSigBlueTRCTag, GammaTRC[2]);
13441344

13451345
//to read XYZ values and illuminant
1346-
if (rtengine::settings->verbose) {
1346+
if (rtengine::settings->verbose && mul == 5) {
13471347
cmsCIEXYZ *redT = static_cast<cmsCIEXYZ*>(cmsReadTag(oprofdef, cmsSigRedMatrixColumnTag));
13481348
cmsCIEXYZ *greenT = static_cast<cmsCIEXYZ*>(cmsReadTag(oprofdef, cmsSigGreenMatrixColumnTag));
13491349
cmsCIEXYZ *blueT = static_cast<cmsCIEXYZ*>(cmsReadTag(oprofdef, cmsSigBlueMatrixColumnTag));

rtengine/simpleprocess.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1737,7 +1737,7 @@ class ImageProcessor
17371737
}
17381738
}
17391739

1740-
int savestr = params.wavelet.strength;//work around for abstract profile = 0.1 second
1740+
int savestr = params.wavelet.strength;//work around for abstract profile: time about = 0.1 second
17411741
if ((params.wavelet.enabled) || (params.icm.workingTRC != ColorManagementParams::WorkingTrc::NONE && params.icm.trcExp)) {
17421742
LabImage *unshar = nullptr;
17431743
WaveletParams WaveParams = params.wavelet;

0 commit comments

Comments
 (0)