New option [Color Management]/LCMSSafeMode (no GUI) to allow disabled multithreading on LCMS

This commit is contained in:
Oliver Duis
2011-04-14 19:54:13 +02:00
parent af91e3bfb5
commit f258169b08
10 changed files with 92 additions and 72 deletions

View File

@@ -236,8 +236,12 @@ Imagefloat::to16() const
}
// Parallized transformation; create transform with cmsFLAGS_NOCACHE!
void Imagefloat::ExecCMSTransform(cmsHTRANSFORM hTransform) {
#pragma omp parallel for
for (int i=0; i<height; i++)
cmsDoTransform(hTransform, data + 3*i*rowstride, data + 3*i*rowstride, rowstride);
void Imagefloat::ExecCMSTransform(cmsHTRANSFORM hTransform, bool safe) {
if (safe) {
cmsDoTransform(hTransform, data, data, planestride);
} else {
#pragma omp parallel for
for (int i=0; i<height; i++)
cmsDoTransform(hTransform, data + 3*i*rowstride, data + 3*i*rowstride, rowstride);
}
}