profile-based CA correction applied during 1:1 preview

This commit is contained in:
Alberto Griggio
2017-10-29 21:41:19 +01:00
parent 830fd6fdbb
commit 5a05b04e09
6 changed files with 29 additions and 17 deletions

View File

@@ -1077,12 +1077,15 @@ void rtengine::LCPMapper::correctDistortion(double &x, double &y, int cx, int cy
y -= cy * scale;
}
void rtengine::LCPMapper::correctCA(double& x, double& y, int channel) const
void rtengine::LCPMapper::correctCA(double& x, double& y, int cx, int cy, int channel) const
{
if (!enableCA) {
return;
}
x += cx;
y += cy;
double xgreen, ygreen;
// First calc the green channel like normal distortion
@@ -1123,6 +1126,9 @@ void rtengine::LCPMapper::correctCA(double& x, double& y, int channel) const
x = (chrom[channel].scale_factor * ( xd * commonSum + xfac * rsqr )) * chrom[channel].fx + chrom[channel].x0;
y = (chrom[channel].scale_factor * ( yd * commonSum + yfac * rsqr )) * chrom[channel].fy + chrom[channel].y0;
}
x -= cx;
x -= cy;
}
SSEFUNCTION void rtengine::LCPMapper::processVignetteLine(int width, int y, float* line) const