merged with dev

This commit is contained in:
Alberto Griggio
2017-03-19 21:23:07 +01:00
85 changed files with 5752 additions and 1750 deletions

View File

@@ -163,6 +163,7 @@ private:
ImProcFunctions ipf (&params, true);
pp = PreviewProps(0, 0, fw, fh, 1);
imgsrc->setCurrentFrame(params.raw.bayersensor.imageNum);
imgsrc->preprocess( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled);
if (params.toneCurve.autoexp) {// this enabled HLRecovery
@@ -868,13 +869,13 @@ private:
bool opautili = false;
if(params.colorToning.enabled) {
TMatrix wprof = iccStore->workingSpaceMatrix (params.icm.working);
TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working);
double wp[3][3] = {
{wprof[0][0], wprof[0][1], wprof[0][2]},
{wprof[1][0], wprof[1][1], wprof[1][2]},
{wprof[2][0], wprof[2][1], wprof[2][2]}
};
TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params.icm.working);
TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params.icm.working);
double wip[3][3] = {
{wiprof[0][0], wiprof[0][1], wiprof[0][2]},
{wiprof[1][0], wiprof[1][1], wiprof[1][2]},
@@ -1228,7 +1229,7 @@ private:
//or selected Free gamma
useLCMS = false;
if ((jprof = iccStore->createCustomGammaOutputProfile (params.icm, ga)) == nullptr) {
if ((jprof = ICCStore::getInstance()->createCustomGammaOutputProfile (params.icm, ga)) == nullptr) {
useLCMS = true;
}
@@ -1284,15 +1285,15 @@ private:
if (!useLCMS) {
// use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16 w/ gamma
ProfileContent pc(jprof);
readyImg->setOutputProfile (pc.data, pc.length);
readyImg->setOutputProfile(pc.getData().c_str(), pc.getData().size());
}
} else {
// use the selected output profile if present, otherwise use LCMS2 profile generate by lab2rgb16 w/ gamma
if (params.icm.output != "" && params.icm.output != ColorManagementParams::NoICMString) {
// if iccStore->getProfile send back an object, then iccStore->getContent will do too
cmsHPROFILE jprof = iccStore->getProfile(params.icm.output); //get outProfile
// if ICCStore::getInstance()->getProfile send back an object, then ICCStore::getInstance()->getContent will do too
cmsHPROFILE jprof = ICCStore::getInstance()->getProfile(params.icm.output); //get outProfile
if (jprof == nullptr) {
if (settings->verbose) {
@@ -1303,8 +1304,8 @@ private:
printf("Using \"%s\" output profile\n", params.icm.output.c_str());
}
ProfileContent pc = iccStore->getContent (params.icm.output);
readyImg->setOutputProfile (pc.data, pc.length);
ProfileContent pc = ICCStore::getInstance()->getContent (params.icm.output);
readyImg->setOutputProfile(pc.getData().c_str(), pc.getData().size());
}
} else {
// No ICM