Multithread lensfun vignetting correction

This commit is contained in:
Ingo Weyrich
2019-12-02 17:32:13 +01:00
parent dba0d72ecd
commit f95acfe74e
5 changed files with 62 additions and 49 deletions

View File

@@ -1135,6 +1135,17 @@ void rtengine::LCPMapper::correctCA(double& x, double& y, int cx, int cy, int ch
y -= cy;
}
void rtengine::LCPMapper::processVignette(int width, int height, float** rawData) const
{
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
for (int y = 0; y < height; ++y) {
processVignetteLine(width, y, rawData[y]);
}
}
void rtengine::LCPMapper::processVignetteLine(int width, int y, float* line) const
{
// No need for swapXY, since vignette is in RAW and always before rotation
@@ -1173,6 +1184,17 @@ void rtengine::LCPMapper::processVignetteLine(int width, int y, float* line) con
}
}
void rtengine::LCPMapper::processVignette3Channels(int width, int height, float** rawData) const
{
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
for (int y = 0; y < height; ++y) {
processVignetteLine3Channels(width, y, rawData[y]);
}
}
void rtengine::LCPMapper::processVignetteLine3Channels(int width, int y, float* line) const
{
// No need for swapXY, since vignette is in RAW and always before rotation