From e69952d654b72987c84ccc27e7fefdd6957db05b Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 21 Feb 2018 14:28:54 +0100 Subject: [PATCH 1/4] use double precision for large summations, #4408 --- rtengine/EdgePreservingDecomposition.cc | 7 ++++--- rtengine/PF_correct_RT.cc | 8 ++++---- rtengine/improcfun.cc | 4 +--- rtengine/ipwavelet.cc | 6 +++--- rtengine/tmo_fattal02.cc | 2 +- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index eac42ffaa..1ddd17107 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -42,7 +42,8 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl } //s is preconditionment of r. Without, direct to r. - float *s = r, rs = 0.0f; + float *s = r; + double rs = 0.0; // use double precision for large summations if(Preconditioner != nullptr) { s = new float[n]; @@ -77,7 +78,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl for(iterate = 0; iterate < MaximumIterates; iterate++) { //Get step size alpha, store ax while at it. - float ab = 0.0f; + double ab = 0.0; // use double precision for large summations Ax(ax, d, Pass); #ifdef _OPENMP #pragma omp parallel for reduction(+:ab) @@ -94,7 +95,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl ab = rs / ab; //Update x and r with this step size. - float rms = 0.0; + double rms = 0.0; // use double precision for large summations #ifdef _OPENMP #pragma omp parallel for reduction(+:rms) #endif diff --git a/rtengine/PF_correct_RT.cc b/rtengine/PF_correct_RT.cc index 1a937b409..70c334928 100644 --- a/rtengine/PF_correct_RT.cc +++ b/rtengine/PF_correct_RT.cc @@ -70,7 +70,7 @@ void ImProcFunctions::PF_correct_RT(LabImage * src, LabImage * dst, double radiu gaussianBlur (src->b, tmp1->b, src->W, src->H, radius); } - float chromave = 0.0f; + double chromave = 0.0; // use double precision for large summations #ifdef _OPENMP #pragma omp parallel @@ -382,7 +382,7 @@ void ImProcFunctions::PF_correct_RTcam(CieImage * src, CieImage * dst, double ra gaussianBlur (srbb, tmbb, src->W, src->H, radius); } - float chromave = 0.0f; + double chromave = 0.0; // use double precision for large summations #ifdef __SSE2__ @@ -1042,7 +1042,7 @@ void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, double radius // begin chroma badpixels - float chrommed = 0.f; + double chrommed = 0.0; // use double precision for large summations #ifdef _OPENMP #pragma omp parallel for reduction(+:chrommed) #endif @@ -1646,7 +1646,7 @@ void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, double radius if(mode == 3) { // begin chroma badpixels - float chrommed = 0.f; + double chrommed = 0.0; // use double precision for large summations #ifdef _OPENMP #pragma omp parallel for reduction(+:chrommed) #endif diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index ecbd4fa37..d274a056a 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -2002,8 +2002,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int pW, int pw hist16Q.clear(); } - float sum = 0.f; -// float sumQ = 0.f; + double sum = 0.0; // use double precision for large summations #ifdef _OPENMP const int numThreads = min (max (width * height / 65536, 1), omp_get_max_threads()); @@ -2023,7 +2022,6 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int pW, int pw hist16Qthr.clear(); } - // #pragma omp for reduction(+:sum,sumQ) #pragma omp for reduction(+:sum) diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 4767a7fba..cd1bbc5f5 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -1271,7 +1271,7 @@ void ImProcFunctions::Aver( float * RESTRICT DataList, int datalen, float &aver //find absolute mean int countP = 0, countN = 0; - float averaP = 0.f, averaN = 0.f; + double averaP = 0.0, averaN = 0.0; // use double precision for large summations float thres = 5.f;//different fom zero to take into account only data large enough max = 0.f; @@ -1332,7 +1332,7 @@ void ImProcFunctions::Aver( float * RESTRICT DataList, int datalen, float &aver void ImProcFunctions::Sigma( float * RESTRICT DataList, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg) { int countP = 0, countN = 0; - float variP = 0.f, variN = 0.f; + double variP = 0.0, variN = 0.0; // use double precision for large summations float thres = 5.f;//different fom zero to take into account only data large enough #ifdef _OPENMP @@ -1687,7 +1687,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float contrast = cp.contrast; float multL = (float)contrast * (maxl - 1.f) / 100.f + 1.f; float multH = (float) contrast * (maxh - 1.f) / 100.f + 1.f; - double avedbl = 0.f; // use double precision for big summations + double avedbl = 0.0; // use double precision for large summations float max0 = 0.f; float min0 = FLT_MAX; diff --git a/rtengine/tmo_fattal02.cc b/rtengine/tmo_fattal02.cc index dfdeb56b5..0a88958d1 100644 --- a/rtengine/tmo_fattal02.cc +++ b/rtengine/tmo_fattal02.cc @@ -276,7 +276,7 @@ float calculateGradients (Array2Df* H, Array2Df* G, int k, bool multithread) const int width = H->getCols(); const int height = H->getRows(); const float divider = pow ( 2.0f, k + 1 ); - float avgGrad = 0.0f; + double avgGrad = 0.0; // use double precision for large summations #pragma omp parallel for reduction(+:avgGrad) if(multithread) From 619ae528ca5baa347eb73b994f92d5c4576447eb Mon Sep 17 00:00:00 2001 From: Hombre Date: Sun, 25 Feb 2018 22:32:32 +0100 Subject: [PATCH 2/4] Updated French language file --- rtdata/languages/Francais | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 0fbce91f5..946d9908c 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -729,6 +729,7 @@ HISTORY_MSG_LOCALCONTRAST_ENABLED;Contraste Local HISTORY_MSG_LOCALCONTRAST_LIGHTNESS;Contraste Local - H.L. HISTORY_MSG_LOCALCONTRAST_RADIUS;Contraste Local - Rayon HISTORY_MSG_METADATA_MODE;Mode de copie des métadonnées +HISTORY_MSG_TM_FATTAL_ANCHOR;CT HDR - Ancre HISTORY_NEWSNAPSHOT;Ajouter HISTORY_NEWSNAPSHOT_TOOLTIP;Raccourci: Alt-s HISTORY_SNAPSHOT;Capture @@ -1230,6 +1231,8 @@ SAVEDLG_SUBSAMP_TOOLTIP;Meilleurs compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma div SAVEDLG_TIFFUNCOMPRESSED;TIFF non compressé SAVEDLG_WARNFILENAME;Le fichier sera nommé SHCSELECTOR_TOOLTIP;Cliquez le bouton droit de la souris\npour réinitialiser la position de ces 3 curseurs +SOFTPROOF_GAMUTCHECK_TOOLTIP;Met en lumière les pixels en dehors du gamut en fonction:\n- du profile de l'imprimante, si l'un est sélectionné et que l'épreuvage écran est activé,\n- du profile de sortie, si aucun profile d'imprimante n'est sélectionné et que l'épreuvage écran est activé,\n- du profile du moniteur, si l'épreuvage écran est désactivé. +SOFTPROOF_TOOLTIP;L'épreuvage écran simule l'apparence de l'image:\n- lorsque imprimé, si un profile d'imprimante a été sélectionné dans Préférences > Gestion des couleurs,\n- lorsque visionné sur un écran qui utilise le profile de sortie actuel, si un profile d'imprimante n'est pas sélectionné. THRESHOLDSELECTOR_B;Bas THRESHOLDSELECTOR_BL;Bas-gauche THRESHOLDSELECTOR_BR;Bas-droite @@ -1959,6 +1962,7 @@ TP_SHARPENMICRO_LABEL;Microcontraste TP_SHARPENMICRO_MATRIX;Matrice 3×3 au lieu de 5×5 TP_SHARPENMICRO_UNIFORMITY;Uniformité TP_TM_FATTAL_AMOUNT;Quantité +TP_TM_FATTAL_ANCHOR;Ancre TP_TM_FATTAL_LABEL;Compression Tonale HDR TP_TM_FATTAL_THRESHOLD;Seuil TP_VIBRANCE_AVOIDCOLORSHIFT;Éviter les dérives de teinte @@ -2204,11 +2208,3 @@ ZOOMPANEL_ZOOMFITSCREEN;Affiche l'image entière\nRaccourci: f ZOOMPANEL_ZOOMIN;Zoom Avant\nRaccourci: + ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - -!!!!!!!!!!!!!!!!!!!!!!!!! -! Untranslated keys follow; remove the ! prefix after an entry is translated. -!!!!!!!!!!!!!!!!!!!!!!!!! - -!HISTORY_MSG_TM_FATTAL_ANCHOR;HDR TM - Anchor -!SOFTPROOF_GAMUTCHECK_TOOLTIP;Highlight pixels with out-of-gamut colors with respect to:\n- the printer profile, if one is set and soft-proofing is enabled,\n- the output profile, if a printer profile is not set and soft-proofing is enabled,\n- the monitor profile, if soft-proofing is disabled. -!SOFTPROOF_TOOLTIP;Soft-proofing simulates the appearance of the image:\n- when printed, if a printer profile is set in Preferences > Color Management,\n- when viewed on a display that uses the current output profile, if a printer profile is not set. -!TP_TM_FATTAL_ANCHOR;Anchor From cfd666f23e06dfaa2071b2d9801fcae47d9bc77b Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 26 Feb 2018 00:14:33 +0100 Subject: [PATCH 3/4] Clear Film Simulation combo when changing images When switching to the "next" image whose HaldCLUT does not exist, RT would show the previous image HaldCLUT's name in the "Film Simulation" combo, even though it is not being used. This patch by Hombre fixes it, and fixes #4388 --- rtgui/filmsimulation.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rtgui/filmsimulation.cc b/rtgui/filmsimulation.cc index 89ab31748..ba8f6740b 100644 --- a/rtgui/filmsimulation.cc +++ b/rtgui/filmsimulation.cc @@ -425,6 +425,8 @@ void ClutComboBox::setSelectedClut( Glib::ustring filename ) if ( found ) { set_active( found ); + } else { + set_active(-1); } } } From af59dc5cc6a19e59afbcbb02026b84b2951fa669 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 26 Feb 2018 14:44:35 +0100 Subject: [PATCH 4/4] Added translation field to appdata so it passes validation --- rawtherapee.appdata.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/rawtherapee.appdata.xml b/rawtherapee.appdata.xml index 2ad159ede..6a15e723a 100644 --- a/rawtherapee.appdata.xml +++ b/rawtherapee.appdata.xml @@ -6,6 +6,7 @@ Program pro konverzi a zpracování digitálních raw fotografií Logiciel de conversion et de traitement de photos numériques de format raw (but de capteur) Zaawansowany program do wywoływania zdjęć typu raw + rawtherapee

RawTherapee is a powerful, cross-platform raw photo processing program. It is written mostly in C++ using a GTK+ front-end. It uses a patched version of dcraw for reading raw files, with an in-house solution which adds the highest quality support for certain camera models unsupported by dcraw and enhances the accuracy of certain raw files already supported by dcraw. It is notable for the advanced control it gives the user over the demosaicing and development process.