Remove Imagefloat::ExecCMSTransform2, #5025

This commit is contained in:
heckflosse
2018-11-25 14:45:28 +01:00
parent 20577ccab6
commit c9817e369c
3 changed files with 2 additions and 57 deletions

View File

@@ -474,59 +474,6 @@ void Imagefloat::calcCroppedHistogram(const ProcParams &params, float scale, LUT
}
// Parallelized transformation; create transform with cmsFLAGS_NOCACHE!
void Imagefloat::ExecCMSTransform2(cmsHTRANSFORM hTransform, bool normalizeIn)
{
// LittleCMS cannot parallelize planar setups -- Hombre: LCMS2.4 can! But it we use this new feature, memory allocation
// have to be modified too to build temporary buffers that allow multi processor execution
#ifdef _OPENMP
#pragma omp parallel
#endif
{
AlignedBuffer<float> pBuf(width * 3);
#ifdef _OPENMP
#pragma omp for schedule(dynamic, 16)
#endif
for (int y = 0; y < height; y++)
{
float *p = pBuf.data, *pR = r(y), *pG = g(y), *pB = b(y);
if (normalizeIn) {
for (int x = 0; x < width; x++) {
*(p++) = *(pR++)/ 65535.f;
*(p++) = *(pG++)/ 65535.f;
*(p++) = *(pB++)/ 65535.f;
}
} else {
for (int x = 0; x < width; x++) {
*(p++) = *(pR++);
*(p++) = *(pG++);
*(p++) = *(pB++);
}
}
cmsDoTransform (hTransform, pBuf.data, pBuf.data, width);
p = pBuf.data;
pR = r(y);
pG = g(y);
pB = b(y);
for (int x = 0; x < width; x++) {
*(pR++) = *(p++);
*(pG++) = *(p++);
*(pB++) = *(p++);
}
} // End of parallelization
}
}
// Parallelized transformation; create transform with cmsFLAGS_NOCACHE!
void Imagefloat::ExecCMSTransform(cmsHTRANSFORM hTransform)
{
@@ -540,7 +487,7 @@ void Imagefloat::ExecCMSTransform(cmsHTRANSFORM hTransform)
AlignedBuffer<float> pBuf(width * 3);
#ifdef _OPENMP
#pragma omp for schedule(static)
#pragma omp for schedule(dynamic, 16)
#endif
for (int y = 0; y < height; y++)