From e527ad44cde368099b35e09c9b38b09ccc15e38a Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 19 Feb 2018 15:16:00 +0100 Subject: [PATCH] Minor cleanups --- rtengine/PF_correct_RT.cc | 18 +++++++++--------- rtengine/improcfun.cc | 6 +++--- rtengine/improcfun.h | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/rtengine/PF_correct_RT.cc b/rtengine/PF_correct_RT.cc index 259749e7b..c35c9ae8d 100644 --- a/rtengine/PF_correct_RT.cc +++ b/rtengine/PF_correct_RT.cc @@ -69,7 +69,7 @@ void ImProcFunctions::PF_correct_RT(LabImage * src, double radius, int thresh) 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 #pragma omp parallel @@ -125,7 +125,7 @@ void ImProcFunctions::PF_correct_RT(LabImage * src, double radius, int thresh) 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 #ifdef _OPENMP #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); } - double chromave = 0.0f; // use double precision for large summations + double chromave = 0.0; // use double precision for large summations #ifdef __SSE2__ @@ -351,7 +351,7 @@ void ImProcFunctions::PF_correct_RTcam(CieImage * src, double radius, int thresh 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 #ifdef _OPENMP #pragma omp parallel for simd @@ -811,7 +811,7 @@ void ImProcFunctions::Badpixelscam(CieImage * src, double radius, int thresh, in } // 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 #pragma omp parallel for reduction(+:chrommed) #endif @@ -826,7 +826,7 @@ void ImProcFunctions::Badpixelscam(CieImage * src, double radius, int thresh, in 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 #ifdef _OPENMP #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 const int halfwin = ceil(2 * radius) + 1; @@ -1159,7 +1159,7 @@ void ImProcFunctions::BadpixelsLab(LabImage * src, double radius, int thresh, in } // 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 #pragma omp parallel for reduction(+:chrommed) @@ -1174,7 +1174,7 @@ void ImProcFunctions::BadpixelsLab(LabImage * src, double radius, int thresh, in } 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 diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index adab7f322..36c742c51 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -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) { - 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) { 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); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index ffad14213..ac9370c98 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -337,12 +337,12 @@ public: void defringe (LabImage* lab); void defringecam (CieImage* ncie); 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_RTcam (CieImage * src, double radius, int thresh); 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 localContrast(LabImage *lab);