Minor cleanups

This commit is contained in:
heckflosse 2018-02-19 15:16:00 +01:00
parent d8e189e497
commit e527ad44cd
3 changed files with 14 additions and 14 deletions

View File

@ -69,7 +69,7 @@ void ImProcFunctions::PF_correct_RT(LabImage * src, double radius, int thresh)
gaussianBlur(src->b, tmpb, src->W, src->H, radius); gaussianBlur(src->b, tmpb, src->W, src->H, radius);
} }
double chromave = 0.f; // use double precision for large summations double chromave = 0.0; // use double precision for large summations
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel #pragma omp parallel
@ -125,7 +125,7 @@ void ImProcFunctions::PF_correct_RT(LabImage * src, double radius, int thresh)
chromave /= (height * width); chromave /= (height * width);
if(chromave > 0.f) { if(chromave > 0.0) {
// now as chromave is calculated, we postprocess fringe to reduce the number of divisions in future // now as chromave is calculated, we postprocess fringe to reduce the number of divisions in future
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel for simd #pragma omp parallel for simd
@ -285,7 +285,7 @@ void ImProcFunctions::PF_correct_RTcam(CieImage * src, double radius, int thresh
gaussianBlur(srbb, tmbb, src->W, src->H, radius); gaussianBlur(srbb, tmbb, src->W, src->H, radius);
} }
double chromave = 0.0f; // use double precision for large summations double chromave = 0.0; // use double precision for large summations
#ifdef __SSE2__ #ifdef __SSE2__
@ -351,7 +351,7 @@ void ImProcFunctions::PF_correct_RTcam(CieImage * src, double radius, int thresh
chromave /= (height * width); chromave /= (height * width);
if(chromave > 0.f) { if(chromave > 0.0) {
// now as chromave is calculated, we postprocess fringe to reduce the number of divisions in future // now as chromave is calculated, we postprocess fringe to reduce the number of divisions in future
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel for simd #pragma omp parallel for simd
@ -811,7 +811,7 @@ void ImProcFunctions::Badpixelscam(CieImage * src, double radius, int thresh, in
} }
// begin chroma badpixels // begin chroma badpixels
double chrommed = 0.f; // use double precision for large summations double chrommed = 0.0; // use double precision for large summations
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel for reduction(+:chrommed) #pragma omp parallel for reduction(+:chrommed)
#endif #endif
@ -826,7 +826,7 @@ void ImProcFunctions::Badpixelscam(CieImage * src, double radius, int thresh, in
chrommed /= (height * width); chrommed /= (height * width);
if(chrommed > 0.f) { if(chrommed > 0.0) {
// now chrommed is calculated, so we postprocess badpix to reduce the number of divisions in future // now chrommed is calculated, so we postprocess badpix to reduce the number of divisions in future
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel #pragma omp parallel
@ -953,7 +953,7 @@ void ImProcFunctions::Badpixelscam(CieImage * src, double radius, int thresh, in
} }
void ImProcFunctions::BadpixelsLab(LabImage * src, double radius, int thresh, int mode, float chrom) void ImProcFunctions::BadpixelsLab(LabImage * src, double radius, int thresh, float chrom)
{ {
BENCHFUN BENCHFUN
const int halfwin = ceil(2 * radius) + 1; const int halfwin = ceil(2 * radius) + 1;
@ -1159,7 +1159,7 @@ void ImProcFunctions::BadpixelsLab(LabImage * src, double radius, int thresh, in
} }
// begin chroma badpixels // begin chroma badpixels
double chrommed = 0.f; // use double precision for large summations double chrommed = 0.0; // use double precision for large summations
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel for reduction(+:chrommed) #pragma omp parallel for reduction(+:chrommed)
@ -1174,7 +1174,7 @@ void ImProcFunctions::BadpixelsLab(LabImage * src, double radius, int thresh, in
} }
chrommed /= (height * width); chrommed /= (height * width);
if(chrommed > 0.f) { if(chrommed > 0.0) {
// now as chrommed is calculated, we postprocess badpix to reduce the number of divisions in future // now as chrommed is calculated, we postprocess badpix to reduce the number of divisions in future

View File

@ -6289,10 +6289,10 @@ void ImProcFunctions::badpixcam (CieImage* ncie, double rad, int thr, int mode,
} }
} }
void ImProcFunctions::badpixlab (LabImage* lab, double rad, int thr, int mode, float skinprot, float chrom) void ImProcFunctions::badpixlab (LabImage* lab, double rad, int thr, float skinprot, float chrom)
{ {
if (lab->W >= 8 && lab->H >= 8) { if (lab->W >= 8 && lab->H >= 8) {
BadpixelsLab (lab, rad, thr, mode, chrom); BadpixelsLab (lab, rad, thr, chrom);
} }
} }
@ -6308,7 +6308,7 @@ void ImProcFunctions::dirpyrequalizer (LabImage* lab, int scale)
if (params->dirpyrequalizer.gamutlab && params->dirpyrequalizer.skinprotect != 0) { if (params->dirpyrequalizer.gamutlab && params->dirpyrequalizer.skinprotect != 0) {
constexpr float chrom = 50.f; constexpr float chrom = 50.f;
ImProcFunctions::badpixlab (lab, artifact, 5, 3, params->dirpyrequalizer.skinprotect, chrom); //for artifacts ImProcFunctions::badpixlab (lab, artifact, 5, params->dirpyrequalizer.skinprotect, chrom); //for artifacts
} }
//dirpyrLab_equalizer(lab, lab, params->dirpyrequalizer.mult); //dirpyrLab_equalizer(lab, lab, params->dirpyrequalizer.mult);

View File

@ -337,12 +337,12 @@ public:
void defringe (LabImage* lab); void defringe (LabImage* lab);
void defringecam (CieImage* ncie); void defringecam (CieImage* ncie);
void badpixcam (CieImage* ncie, double rad, int thr, int mode, float skinprot, float chrom, int hotbad); void badpixcam (CieImage* ncie, double rad, int thr, int mode, float skinprot, float chrom, int hotbad);
void badpixlab (LabImage* lab, double rad, int thr, int mode, float skinprot, float chrom); void badpixlab (LabImage* lab, double rad, int thr, float skinprot, float chrom);
void PF_correct_RT (LabImage * src, double radius, int thresh); void PF_correct_RT (LabImage * src, double radius, int thresh);
void PF_correct_RTcam (CieImage * src, double radius, int thresh); void PF_correct_RTcam (CieImage * src, double radius, int thresh);
void Badpixelscam (CieImage * src, double radius, int thresh, int mode, float skinprot, float chrom, int hotbad); void Badpixelscam (CieImage * src, double radius, int thresh, int mode, float skinprot, float chrom, int hotbad);
void BadpixelsLab (LabImage * src, double radius, int thresh, int mode, float chrom); void BadpixelsLab (LabImage * src, double radius, int thresh, float chrom);
void ToneMapFattal02(Imagefloat *rgb); void ToneMapFattal02(Imagefloat *rgb);
void localContrast(LabImage *lab); void localContrast(LabImage *lab);