LCP cleanup (#4062)

- Removed `using namespace`
- Use real `Cache`
- Use `std::shared_ptr<LCPProfile>`
- Moved `LCPPersModel` to .cc

More could be done...
This commit is contained in:
Flössie
2017-09-09 20:19:11 +02:00
parent 5656d16e64
commit d442f7a85b
8 changed files with 1013 additions and 796 deletions

View File

@@ -1855,7 +1855,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
// Correct vignetting of lens profile
if (!hasFlatField && lensProf.useVign) {
LCPProfile *pLCPProf = lcpStore->getProfile(lensProf.lcpFile);
const std::shared_ptr<LCPProfile> pLCPProf = LCPStore::getInstance()->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
LCPMapper map(pLCPProf, max(idata->getFocalLen(), 1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1);