merged dev into locallab_dev

This commit is contained in:
heckflosse
2017-03-20 15:22:01 +01:00
85 changed files with 5889 additions and 1899 deletions

View File

@@ -108,7 +108,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
ImProcFunctions ipf (&params, true);
PreviewProps pp (0, 0, fw, fh, 1);
imgsrc->preprocess ( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled);
imgsrc->setCurrentFrame(params.raw.bayersensor.imageNum);
imgsrc->preprocess( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled);
if (params.toneCurve.autoexp) {// this enabled HLRecovery
LUTu histRedRaw (256), histGreenRaw (256), histBlueRaw (256);
@@ -810,14 +811,14 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
bool opautili = false;
if (params.colorToning.enabled) {
TMatrix wprof = iccStore->workingSpaceMatrix (params.icm.working);
if(params.colorToning.enabled) {
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]},
@@ -1876,7 +1877,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
//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;
}
@@ -1931,16 +1932,16 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
if (customGamma) {
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);
ProfileContent pc(jprof);
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) {
@@ -1951,8 +1952,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
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