Merge branch 'dev' into testoutputprofile

This commit is contained in:
Hombre
2018-07-09 22:12:08 +02:00
76 changed files with 1697 additions and 837 deletions

View File

@@ -159,6 +159,13 @@ private:
imgsrc = ii->getImageSource ();
tr = getCoarseBitMask (params.coarse);
if(imgsrc->getSensorType() == ST_BAYER) {
if(params.raw.bayersensor.method!= RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::PIXELSHIFT)) {
imgsrc->setBorder(params.raw.bayersensor.border);
} else {
imgsrc->setBorder(std::max(params.raw.bayersensor.border, 2));
}
}
imgsrc->getFullSize (fw, fh, tr);
// check the crop params
@@ -196,7 +203,6 @@ private:
ipf_p.reset (new ImProcFunctions (&params, true));
ImProcFunctions &ipf = * (ipf_p.get());
pp = PreviewProps (0, 0, fw, fh, 1);
imgsrc->setCurrentFrame (params.raw.bayersensor.imageNum);
imgsrc->preprocess ( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled);
@@ -206,9 +212,11 @@ private:
double contrastThresholdDummy;
imgsrc->demosaic (params.raw, false, contrastThresholdDummy);
if (pl) {
pl->setProgress (0.30);
}
pp = PreviewProps (0, 0, fw, fh, 1);
if (params.retinex.enabled) { //enabled Retinex
LUTf cdcurve (65536, 0);
@@ -1224,7 +1232,8 @@ private:
}
if (labResize) { // resize lab data
if(labView->W != imw || labView->H != imh) {
if ((labView->W != imw || labView->H != imh) &&
(params.resize.allowUpscaling || (labView->W >= imw && labView->H >= imh))) {
// resize image
tmplab = new LabImage (imw, imh);
ipf.Lanczos (labView, tmplab, tmpScale);
@@ -1284,7 +1293,8 @@ private:
pl->setProgress (0.70);
}
if (tmpScale != 1.0 && params.resize.method == "Nearest") { // resize rgb data (gamma applied)
if (tmpScale != 1.0 && params.resize.method == "Nearest" &&
(params.resize.allowUpscaling || (readyImg->getWidth() >= imw && readyImg->getHeight() >= imh))) { // resize rgb data (gamma applied)
Imagefloat* tempImage = new Imagefloat (imw, imh);
ipf.resize (readyImg, tempImage, tmpScale);
delete readyImg;
@@ -1402,7 +1412,7 @@ private:
assert (params.resize.enabled);
// resize image
{
if (params.resize.allowUpscaling || (imw <= fw && imh <= fh)) {
std::unique_ptr<LabImage> resized (new LabImage (imw, imh));
ipf.Lanczos (tmplab.get(), resized.get(), scale_factor);
tmplab = std::move (resized);