one more refinement to the lensfun automatching logic
hopefully this is the good one :-)
This commit is contained in:
parent
66979d290a
commit
13c4b0c284
@ -295,8 +295,6 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c
|
||||
if (found) {
|
||||
ret.data_ = found[0];
|
||||
lf_free(found);
|
||||
} else if (camera.ok() && !stdlens) {
|
||||
ret = findLens(LFCamera(), name);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
@ -333,7 +331,7 @@ LFModifier *LFDatabase::findModifier(const LensProfParams &lensProf, const Image
|
||||
lens = lensProf.lfLens;
|
||||
}
|
||||
LFCamera c = db->findCamera(make, model);
|
||||
LFLens l = db->findLens(c, lens);
|
||||
LFLens l = db->findLens(lensProf.lfAutoMatch ? c : LFCamera(), lens);
|
||||
bool swap_xy = false;
|
||||
if (rawRotationDeg >= 0) {
|
||||
int rot = (coarse.rotate + rawRotationDeg) % 360;
|
||||
|
@ -91,13 +91,13 @@ public:
|
||||
std::vector<LFLens> getLenses() const;
|
||||
LFCamera findCamera(const Glib::ustring &make, const Glib::ustring &model) const;
|
||||
LFLens findLens(const LFCamera &camera, const Glib::ustring &name) const;
|
||||
LFModifier *getModifier(const LFCamera &camera, const LFLens &lens,
|
||||
float focalLen, float aperture, float focusDist,
|
||||
int width, int height, bool swap_xy) const;
|
||||
|
||||
static LFModifier *findModifier(const LensProfParams &lensProf, const ImageMetaData *idata, int width, int height, const CoarseTransformParams &coarse, int rawRotationDeg);
|
||||
|
||||
private:
|
||||
LFModifier *getModifier(const LFCamera &camera, const LFLens &lens,
|
||||
float focalLen, float aperture, float focusDist,
|
||||
int width, int height, bool swap_xy) const;
|
||||
LFDatabase();
|
||||
LFDatabase(const LFDatabase &);
|
||||
LFDatabase &operator=(const LFDatabase &);
|
||||
|
Loading…
x
Reference in New Issue
Block a user