@@ -430,7 +430,7 @@ void ImProcFunctions::workingtrc(int sp, const Imagefloat* src, Imagefloat* dst,
430
430
431
431
double wb2[3 ][3 ];
432
432
433
- if (mul == 5 ) {
433
+ if (mul == 5 ) {// only second pass workingtrc - avoid this code first pass
434
434
for (int r = 0 ; r < 3 ; ++r) {
435
435
for (int c = 0 ; c < 3 ; ++c) {
436
436
wb2[r][c] = wprof[r][c];
@@ -702,7 +702,7 @@ void ImProcFunctions::workingtrc(int sp, const Imagefloat* src, Imagefloat* dst,
702
702
double tempv4 = 5003 .;
703
703
double p[6 ]; // primaries
704
704
705
- if (locprim == 0 ) {
705
+ if (locprim == 0 && mul == 5 ) {
706
706
switch (ColorManagementParams::Primaries (prim)) {
707
707
case ColorManagementParams::Primaries::DEFAULT: {
708
708
break ;
@@ -975,7 +975,7 @@ void ImProcFunctions::workingtrc(int sp, const Imagefloat* src, Imagefloat* dst,
975
975
constexpr double eps = 0.000000001 ; // not divide by zero
976
976
977
977
// primaries for 10 working profiles ==> output profiles
978
- if (locprim == 0 ) {
978
+ if (locprim == 0 && mul == 5 ) {
979
979
if (profile == " WideGamut" ) {
980
980
p[0 ] = 0.7350 ; // Widegamut primaries
981
981
p[1 ] = 0.2650 ;
@@ -1156,7 +1156,7 @@ void ImProcFunctions::workingtrc(int sp, const Imagefloat* src, Imagefloat* dst,
1156
1156
1157
1157
Glib::ustring ills = " D50" ;
1158
1158
1159
- if (locprim == 0 ) {
1159
+ if (locprim == 0 && mul == 5 ) {
1160
1160
1161
1161
switch (ColorManagementParams::Illuminant (illum)) {
1162
1162
case ColorManagementParams::Illuminant::DEFAULT:
@@ -1343,7 +1343,7 @@ void ImProcFunctions::workingtrc(int sp, const Imagefloat* src, Imagefloat* dst,
1343
1343
cmsWriteTag (oprofdef, cmsSigBlueTRCTag, GammaTRC[2 ]);
1344
1344
1345
1345
// to read XYZ values and illuminant
1346
- if (rtengine::settings->verbose ) {
1346
+ if (rtengine::settings->verbose && mul == 5 ) {
1347
1347
cmsCIEXYZ *redT = static_cast <cmsCIEXYZ*>(cmsReadTag (oprofdef, cmsSigRedMatrixColumnTag));
1348
1348
cmsCIEXYZ *greenT = static_cast <cmsCIEXYZ*>(cmsReadTag (oprofdef, cmsSigGreenMatrixColumnTag));
1349
1349
cmsCIEXYZ *blueT = static_cast <cmsCIEXYZ*>(cmsReadTag (oprofdef, cmsSigBlueMatrixColumnTag));
0 commit comments