From f7af57d11ed0a486eb37eb1e7b76ed8cfee51a30 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 12 Apr 2016 13:38:45 +0200 Subject: [PATCH] Allow lcp vignetting correction for lenses without focal length information (e.g. lenses without chip) --- rtengine/rawimagesource.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 9b31b5edc..1a4e0dbb5 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1763,8 +1763,8 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le if (!hasFlatField && lensProf.useVign) { LCPProfile *pLCPProf = lcpStore->getProfile(lensProf.lcpFile); - if (pLCPProf && idata->getFocalLen() > 0.f) { - LCPMapper map(pLCPProf, idata->getFocalLen(), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1); + if (pLCPProf) { // don't check focal length to allow distortion correction for lenses without chip, also pass dummy focal length 1 in case of 0 + LCPMapper map(pLCPProf, max(idata->getFocalLen(),1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1); #ifdef _OPENMP #pragma omp parallel for