localcontrast: removed timing code, don't multithread when multiThread is set to false
This commit is contained in:
parent
59da3c5acd
commit
c84aebb427
@ -27,18 +27,13 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "improcfun.h"
|
#include "improcfun.h"
|
||||||
#include "settings.h"
|
|
||||||
#include "gauss.h"
|
#include "gauss.h"
|
||||||
#include "boxblur.h"
|
|
||||||
#include "array2D.h"
|
#include "array2D.h"
|
||||||
#define BENCHMARK
|
|
||||||
#include "StopWatch.h"
|
|
||||||
|
|
||||||
namespace rtengine {
|
namespace rtengine {
|
||||||
|
|
||||||
void ImProcFunctions::localContrast(LabImage *lab)
|
void ImProcFunctions::localContrast(LabImage *lab)
|
||||||
{
|
{
|
||||||
BENCHFUN
|
|
||||||
if (!params->localContrast.enabled) {
|
if (!params->localContrast.enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -52,12 +47,12 @@ void ImProcFunctions::localContrast(LabImage *lab)
|
|||||||
const float sigma = params->localContrast.radius / scale;
|
const float sigma = params->localContrast.radius / scale;
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel
|
#pragma omp parallel if(multiThread)
|
||||||
#endif
|
#endif
|
||||||
gaussianBlur(lab->L, buf, width, height, sigma);
|
gaussianBlur(lab->L, buf, width, height, sigma);
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for if(multiThread)
|
||||||
#endif
|
#endif
|
||||||
for (int y = 0; y < height; ++y) {
|
for (int y = 0; y < height; ++y) {
|
||||||
for (int x = 0; x < width; ++x) {
|
for (int x = 0; x < width; ++x) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user