made lensfun-based correction compatible with auto fill mode
This commit is contained in:
@@ -969,10 +969,6 @@ double ImProcFunctions::getTransformAutoFill (int oW, int oH, const LensCorrecti
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (pLCPMap && !pLCPMap->supportsAutoFill()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
double scaleU = 2, scaleL = 0.001; // upper and lower border, iterate inbetween
|
||||
|
||||
do {
|
||||
|
@@ -140,7 +140,6 @@ class LensCorrection {
|
||||
public:
|
||||
virtual ~LensCorrection() {}
|
||||
virtual void correctDistortion(double &x, double &y, int cx, int cy, double scale) const = 0;
|
||||
virtual bool supportsAutoFill() const = 0;
|
||||
virtual bool supportsCA() const = 0;
|
||||
virtual void correctCA(double &x, double &y, int channel) const = 0;
|
||||
virtual void processVignetteLine(int width, int y, float *line) const = 0;
|
||||
@@ -167,7 +166,6 @@ public:
|
||||
|
||||
void correctDistortion(double &x, double &y, int cx, int cy, double scale) const; // MUST be the first stage
|
||||
bool supportsCA() const { return enableCA; }
|
||||
bool supportsAutoFill() const { return true; }
|
||||
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;
|
||||
|
@@ -72,6 +72,8 @@ void LFModifier::correctDistortion(double &x, double &y, int cx, int cy, double
|
||||
x -= cx;
|
||||
y -= cy;
|
||||
}
|
||||
x *= scale;
|
||||
y *= scale;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -34,7 +34,6 @@ public:
|
||||
bool ok() const;
|
||||
|
||||
void correctDistortion(double &x, double &y, int cx, int cy, double scale) const;
|
||||
bool supportsAutoFill() const { return false; }
|
||||
bool supportsCA() const { return false; }
|
||||
void correctCA(double &x, double &y, int channel) const {}
|
||||
void processVignetteLine(int width, int y, float *line) const;
|
||||
|
Reference in New Issue
Block a user