diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index ff53ad30e..310361a72 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -265,17 +265,6 @@ void LCPMapper::correctCA(double& x, double& y, int channel) const } } -float LCPMapper::calcVignetteFac(int x, int y) const -{ - // No need for swapXY, since vignette is in RAW and always before rotation - float xd = ((float)x - mc.x0) * mc.rfx, yd = ((float)y - mc.y0) * mc.rfy; - - const LCPModelCommon::VignParam vignParam = mc.vign_param; - float rsqr = xd * xd + yd * yd; - - return rsqr * (vignParam[0] + rsqr * ((vignParam[1]) - (vignParam[2]) * rsqr + (vignParam[3]) * rsqr * rsqr)); -} - SSEFUNCTION void LCPMapper::processVignetteLine(int width, int y, float *line) const { // No need for swapXY, since vignette is in RAW and always before rotation diff --git a/rtengine/lcp.h b/rtengine/lcp.h index 92c984921..fa8cf226d 100644 --- a/rtengine/lcp.h +++ b/rtengine/lcp.h @@ -146,9 +146,8 @@ public: LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm, float focusDist, float aperture, bool vignette, bool useCADistP, int fullWidth, int fullHeight, const CoarseTransformParams& coarse, int rawRotationDeg); - void correctDistortion(double& x, double& y) const; // MUST be the first stage - void correctCA(double& x, double& y, int channel) const; - float calcVignetteFac (int x, int y) const; // MUST be in RAW + void correctDistortion(double& x, double& y) const; // MUST be the first stage + void correctCA(double& x, double& y, int channel) const; void processVignetteLine(int width, int y, float *line) const; void processVignetteLine3Channels(int width, int y, float *line) const; }; diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 995e3d9bd..9678fcaf5 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1767,7 +1767,6 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le LCPProfile *pLCPProf = lcpStore->getProfile(lensProf.lcpFile); 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 - StopWatch Stop1("lcp vignette correction"); LCPMapper map(pLCPProf, max(idata->getFocalLen(), 1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1); if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1) {