Fix non-OpenMP build

This commit is contained in:
Flössie
2019-02-06 06:54:31 +01:00
parent 9210a56ca4
commit 37027e46bd
27 changed files with 364 additions and 14 deletions

View File

@@ -108,8 +108,6 @@ void Imagefloat::setScanline (int row, unsigned char* buffer, int bps, unsigned
}
namespace rtengine { extern void filmlike_clip(float *r, float *g, float *b); }
void Imagefloat::getScanline (int row, unsigned char* buffer, int bps, bool isFloat) const
{
@@ -441,11 +439,15 @@ void Imagefloat::calcCroppedHistogram(const ProcParams &params, float scale, LUT
int x1, x2, y1, y2;
params.crop.mapToResized(width, height, scale, x1, x2, y1, y2);
#ifdef _OPENMP
#pragma omp parallel
#endif
{
LUTu histThr(65536);
histThr.clear();
#ifdef _OPENMP
#pragma omp for nowait
#endif
for (int y = y1; y < y2; y++) {
for (int x = x1; x < x2; x++) {
@@ -461,7 +463,9 @@ void Imagefloat::calcCroppedHistogram(const ProcParams &params, float scale, LUT
}
}
#ifdef _OPENMP
#pragma omp critical
#endif
{
for(int i = 0; i <= 0xffff; i++) {
hist[i] += histThr[i];