diff --git a/rtdata/images/Dark/actions/adj-black.png b/rtdata/images/Dark/actions/adj-black.png new file mode 100644 index 000000000..bf5459fa5 Binary files /dev/null and b/rtdata/images/Dark/actions/adj-black.png differ diff --git a/rtdata/images/Dark/actions/adj-white.png b/rtdata/images/Dark/actions/adj-white.png new file mode 100644 index 000000000..03028934e Binary files /dev/null and b/rtdata/images/Dark/actions/adj-white.png differ diff --git a/rtdata/images/Light/actions/adj-black.png b/rtdata/images/Light/actions/adj-black.png new file mode 100644 index 000000000..bf5459fa5 Binary files /dev/null and b/rtdata/images/Light/actions/adj-black.png differ diff --git a/rtdata/images/Light/actions/adj-white.png b/rtdata/images/Light/actions/adj-white.png new file mode 100644 index 000000000..03028934e Binary files /dev/null and b/rtdata/images/Light/actions/adj-white.png differ diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 700691c7f..9f1d9d2f8 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -9,6 +9,7 @@ ADJUSTER_RESET_TO_DEFAULT;Réglages par défaut BATCHQUEUE_AUTOSTART;Démarrage auto BATCHQUEUE_AUTOSTARTHINT;Démarrer automatiquement le traitement à l'arrivée d'une nouvelle tâche BATCHQUEUE_DESTFILENAME;Chemin et nom de fichier +BATCHQUEUE_STARTSTOPHINT;Démarre ou arrête le traitement des images dans la file.\n\nRaccourci: Ctrl+s BATCH_PROCESSING;Traitement par lot CURVEEDITOR_AXIS_IN;E: CURVEEDITOR_AXIS_LEFT_TAN;TG: @@ -228,6 +229,7 @@ GENERAL_OK;OK GENERAL_OPEN;Ouvrir GENERAL_PORTRAIT;Portrait GENERAL_SAVE;Enregistrer +GENERAL_SLIDER;Curseur GENERAL_UNCHANGED;(Inchangé) GENERAL_WARNING;Attention GIMP_PLUGIN_INFO;Bienvenue dans le plugin RawTherapee de GIMP!\nUne fois l'édition terminée, fermez simplement la fenêtre principale de RawTherapee et l'image sera importée automatiquement dans GIMP. @@ -415,6 +417,7 @@ HISTORY_MSG_169;Courbe 'CT' HISTORY_MSG_170;Vib. - Courbe HISTORY_MSG_171;Courbe 'LC' HISTORY_MSG_172;Lab - Restreindre 'LC' +HISTORY_MSG_173;Réd. de bruit - Récupération des détails HISTORY_MSG_174;Modèle d'Apparence de la Couleur 2002 HISTORY_MSG_175;CAM02 - Adaptation CAT02 HISTORY_MSG_176;CAM02 - Environ. de visionnage @@ -444,6 +447,7 @@ HISTORY_MSG_199;CAM02 - Histogrammes de sortie HISTORY_MSG_200;CAM02 - Compression tonale HISTORY_MSG_201;Réd. de bruit - Chrom. R,V HISTORY_MSG_202;Réd. de bruit - Chrom. B,J +HISTORY_MSG_203;Réd. de bruit - Espace couleur HISTORY_MSG_204;Niveau d'amélioration LMMSE HISTORY_MSG_205;CAM02 Pixels chauds/morts HISTORY_MSG_206;CAT02 - Luminosité de la scène auto @@ -495,6 +499,7 @@ HISTORY_MSG_252;CpND - Tons chair HISTORY_MSG_253;CpND - Réduction des artéfactes HISTORY_MSG_254;CpND - Teinte chair HISTORY_MSG_255;Réd. de bruit - Filtre médian +HISTORY_MSG_256;Réd. de bruit - Médian - Type HISTORY_MSG_257;Virage Partiel HISTORY_MSG_258;Virage Partiel - Couleur HISTORY_MSG_259;Virage Partiel - Opacité @@ -535,6 +540,7 @@ HISTORY_MSG_293;Simulation de Film HISTORY_MSG_294;Simulation de Film - Force HISTORY_MSG_295;Simulation de Film - Film HISTORY_MSG_296;Réd. de bruit - Courbe de luminance +HISTORY_MSG_297;Réd. de bruit - Mode HISTORY_MSG_298;Filtre de pixel mort HISTORY_MSG_299;Réd. de bruit - Courbe de chrominance HISTORY_MSG_300;- @@ -712,6 +718,17 @@ HISTORY_MSG_487;Corr. d'Obj. - Objectif HISTORY_MSG_488;Compression tonale HDR HISTORY_MSG_489;CT HDR - Seuil HISTORY_MSG_490;CT HDR - Quantité +HISTORY_MSG_491;Balances des Blancs +HISTORY_MSG_492;Courbes RVB +HISTORY_MSG_493;Ajustements L*a*b* +HISTORY_MSG_COLORTONING_LABGRID_VALUE;Virage Partiel - Correction couleur +HISTORY_MSG_HISTMATCHING;Calcul Courbe Tonale svt Aperçu +HISTORY_MSG_LOCALCONTRAST_AMOUNT;Contraste Local - Quantité +HISTORY_MSG_LOCALCONTRAST_DARKNESS;Contraste Local - Ombres +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_NEWSNAPSHOT;Ajouter HISTORY_NEWSNAPSHOT_TOOLTIP;Raccourci: Alt-s HISTORY_SNAPSHOT;Capture @@ -797,6 +814,8 @@ MAIN_MSG_QOVERWRITE;Voulez-vous l'écraser? MAIN_MSG_SETPATHFIRST;Vous devez d'abord choisir un dossier cible dans Préférences\npour pouvoir utiliser cette fonction! MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. MAIN_MSG_WRITEFAILED;Échec de l'enregistrement du fichier\n\n"%1"\n\nAssurez-vous que le dossier existe et qu'il est permis d'y écrire. +MAIN_TAB_ADVANCED;Avancé +MAIN_TAB_ADVANCED_TOOLTIP;Raccourci: Alt-w MAIN_TAB_COLOR;Couleur MAIN_TAB_COLOR_TOOLTIP;Raccourci:Alt-c MAIN_TAB_DETAIL;Détail @@ -851,6 +870,7 @@ NAVIGATOR_XY_FULL;Largeur = %1, Hauteur = %2 NAVIGATOR_XY_NA;x = n/d, y = n/d OPTIONS_DEFIMG_MISSING;Le profil par défaut pour les images standards n'a pas été trouvé ou n'a pas été réglé.\n\nVérifiez également le dossier de vos profils, il peut être manquant ou endommagé\n\nLes valeurs internes pas défaut seront utilisées. OPTIONS_DEFRAW_MISSING;Le profil par défaut pour les images Raw n'a pas été trouvé ou n'a pas été réglé.\n\nVérifiez également le dossier de vos profils, il peut être manquant ou endommagé\n\nLes valeurs internes pas défaut seront utilisées. +PARTIALPASTE_ADVANCEDGROUP;Réglages Avancés PARTIALPASTE_BASICGROUP;Réglages de base PARTIALPASTE_CACORRECTION;Aberration chromatique PARTIALPASTE_CHANNELMIXER;Mixage des canaux @@ -889,6 +909,8 @@ PARTIALPASTE_IPTCINFO;Infos IPTC PARTIALPASTE_LABCURVE;Courbes Lab PARTIALPASTE_LENSGROUP;Réglages de l'objectif PARTIALPASTE_LENSPROFILE;Profil de correction d'Objectif +PARTIALPASTE_LOCALCONTRAST;Contraste local +PARTIALPASTE_METADATA;Mode des Metadonnées PARTIALPASTE_METAGROUP;Réglages des Métadonnées PARTIALPASTE_PCVIGNETTE;Filtre Vignettage PARTIALPASTE_PERSPECTIVE;Perspective @@ -955,6 +977,12 @@ PREFERENCES_CLUTSCACHE;Cache HaldCLUT PREFERENCES_CLUTSCACHE_LABEL;Nombre maximum de chache CLUT PREFERENCES_CLUTSDIR;Dossier HaldCLUT PREFERENCES_CMMBPC;Compensation du point noir +PREFERENCES_CROP;Édition du recadrage +PREFERENCES_CROP_AUTO_FIT;Zommer automatiquement sur la zone recadrée +PREFERENCES_CROP_GUIDES;Guides affichés en dehors de l'édition du recadrage +PREFERENCES_CROP_GUIDES_FRAME;Cadre +PREFERENCES_CROP_GUIDES_FULL;Original +PREFERENCES_CROP_GUIDES_NONE;Aucun PREFERENCES_CURVEBBOXPOS;Position des boutons copier/coller des courbes PREFERENCES_CURVEBBOXPOS_ABOVE;Au-dessus PREFERENCES_CURVEBBOXPOS_BELOW;En-dessous @@ -986,6 +1014,7 @@ PREFERENCES_DIRLAST;Dernier dossier visité PREFERENCES_DIROTHER;Autre PREFERENCES_DIRSELECTDLG;Choix du dossier Image au lancement... PREFERENCES_DIRSOFTWARE;Dossier d'installation +PREFERENCES_EDITORCMDLINE;Ligne de commande personnelle PREFERENCES_EDITORLAYOUT;Disposition de l'éditeur PREFERENCES_EXPAUT;Expert PREFERENCES_EXTERNALEDITOR;Éditeur externe @@ -1381,6 +1410,7 @@ TP_COLORTONING_HIGHLIGHT;Hautes lumières TP_COLORTONING_HUE;Teinte TP_COLORTONING_LAB;Mixage Lab TP_COLORTONING_LABEL;Virage Partiel +TP_COLORTONING_LABGRID;Grille de correction L*a*b* TP_COLORTONING_LABGRID_VALUES;HL: a=%1 b=%2\nO: a=%3 b=%4 TP_COLORTONING_LUMA;Luminance TP_COLORTONING_LUMAMODE;Préserver la luminance @@ -1435,6 +1465,7 @@ TP_DIRPYRDENOISE_CHROMINANCE_AUTOGLOBAL;Global automatique TP_DIRPYRDENOISE_CHROMINANCE_AUTOGLOBAL_TOOLTIP;Essaie d'évaluer le bruit chroma\nFaites attention, cela calcul une moyenne, et est très subjectif ! TP_DIRPYRDENOISE_CHROMINANCE_BLUEYELLOW;Chrominance - Bleu-Jaune TP_DIRPYRDENOISE_CHROMINANCE_CURVE;Courbe de chrominance +TP_DIRPYRDENOISE_CHROMINANCE_CURVE_TOOLTIP;Augmente (multiplie) la valeur de tous les curseurs de chrominance.\nCette courbe vous permet d'ajuster la force de la réduction de bruit chromatique en fonction de la chromaticité, par exemple pour augmenter l'action dans les zones faiblement saturées et pour la diminuer dans celles très saturées. TP_DIRPYRDENOISE_CHROMINANCE_FRAME;Chrominance TP_DIRPYRDENOISE_CHROMINANCE_MANUAL;Manuel TP_DIRPYRDENOISE_CHROMINANCE_MASTER;Chrominance - Maître @@ -1451,6 +1482,7 @@ TP_DIRPYRDENOISE_CHROMINANCE_PREVIEW_TILEINFO;Taille des tuiles =%1, Centre: Tx= TP_DIRPYRDENOISE_CHROMINANCE_REDGREEN;Chrominance - Rouge-Vert TP_DIRPYRDENOISE_ENH;Mode amélioré TP_DIRPYRDENOISE_ENH_TOOLTIP;Augmente la qualité du débruitage, mais augmente le temps de traitement d'environ 20% +TP_DIRPYRDENOISE_LABEL;Réduction de Bruit TP_DIRPYRDENOISE_LUMINANCE_CONTROL;Contrôle de luminance TP_DIRPYRDENOISE_LUMINANCE_CURVE;Courbe de luminance TP_DIRPYRDENOISE_LUMINANCE_DETAIL;Niveau de détails de Luminance @@ -1526,6 +1558,8 @@ TP_EXPOSURE_CURVEEDITOR1;Courbe Tonale 1 TP_EXPOSURE_CURVEEDITOR2;Courbe Tonale 2 TP_EXPOSURE_CURVEEDITOR2_TOOLTIP;Référez-vous à la section suivante du manuel pour en savoir plus sur les manières d'obtenir les meilleurs résultats avec l'option de double courbe:\nThe Toolbox > Exposure Tab > Exposure Panel > Tone Curve TP_EXPOSURE_EXPCOMP;Compensation d'exposition +TP_EXPOSURE_HISTMATCHING;Calcul Courbe Tonale svt Aperçu +TP_EXPOSURE_HISTMATCHING_TOOLTIP;Ajuste automatiquement les curseurs et courbes (excepté la compensation d'exposition) pour obtenir l'aspect de l'aperçu JPEG inclus. TP_EXPOSURE_LABEL;Exposition TP_EXPOSURE_SATURATION;Saturation TP_EXPOSURE_TCMODE_FILMLIKE;Similaire Film @@ -1662,6 +1696,15 @@ TP_LENSPROFILE_LABEL;Profil de correction d'objectif TP_LENSPROFILE_USECA;Corr. de l'aber. chromatique TP_LENSPROFILE_USEDIST;Corr. de la distortion TP_LENSPROFILE_USEVIGN;Corr. du vignettage +TP_LOCALCONTRAST_AMOUNT;Quantité +TP_LOCALCONTRAST_DARKNESS;Niveau des ombres +TP_LOCALCONTRAST_LABEL;Contraste Local +TP_LOCALCONTRAST_LIGHTNESS;Niveau des hautes-lumières +TP_LOCALCONTRAST_RADIUS;Rayon +TP_METADATA_EDIT;Appliquer les modifications +TP_METADATA_MODE;Mode de copie des métadonnées +TP_METADATA_STRIP;Retirer toutes les métadonnées +TP_METADATA_TUNNEL;Copier à l'identique TP_NEUTRAL;Réinit. TP_NEUTRAL_TIP;Réinitialise les valeurs de l'exposition à des valeurs neutres TP_PCVIGNETTE_FEATHER;Étendue @@ -1761,6 +1804,8 @@ TP_RAW_PIXELSHIFTNONGREENCROSS2;Vérifier vert AMaZE TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Vérifier rouge/bleu horizontal TP_RAW_PIXELSHIFTNONGREENVERTICAL;Vérifier rouge/bleu vertical TP_RAW_PIXELSHIFTNREADISO;Lire +TP_RAW_PIXELSHIFTONEGREEN;Utiliser un seul canal vert +TP_RAW_PIXELSHIFTONEGREEN_TOOLTIP;Utilise un seul canal vert au lieu de faire la moyennes des deux canaux verts pour détecter les régions sans mouvement. TP_RAW_PIXELSHIFTPRNU;PRNU (%) TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Poid Rouge&Bleu TP_RAW_PIXELSHIFTSHOWMOTION;Voir le masque de mouvement @@ -1774,6 +1819,7 @@ TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Adouci les transitions entre les zones avec mouv TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;Facteur DevStd Bleu TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;Facteur DevStd Vert TP_RAW_PIXELSHIFTSTDDEVFACTORRED;Facteur DevStd Rouge +TP_RAW_RCD;RCD TP_RAW_SENSOR_BAYER_LABEL;Capteur à matrice de Bayer TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-passes donne les meilleurs résultats (recommendé pour les images de faible ISO).\n1-passe est presque indifférentiable de 3-passes pour les images à haut ISO et est plus rapide. TP_RAW_SENSOR_XTRANS_LABEL;Capteur à matrice X-Trans @@ -2160,44 +2206,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. -!!!!!!!!!!!!!!!!!!!!!!!!! - -!BATCHQUEUE_STARTSTOPHINT;Start or stop processing the images in the queue.\n\nShortcut: Ctrl+s -!GENERAL_SLIDER;Slider -!HISTORY_MSG_173;NR - Detail recovery -!HISTORY_MSG_203;NR - Color space -!HISTORY_MSG_256;NR - Median - Type -!HISTORY_MSG_297;NR - Mode -!HISTORY_MSG_491;White Balance -!HISTORY_MSG_492;RGB Curves -!HISTORY_MSG_493;L*a*b* Adjustments -!HISTORY_MSG_LOCALCONTRAST_AMOUNT;Local Contrast - Amount -!HISTORY_MSG_LOCALCONTRAST_DARKNESS;Local Contrast - Darkness -!HISTORY_MSG_LOCALCONTRAST_ENABLED;Local Contrast -!HISTORY_MSG_LOCALCONTRAST_LIGHTNESS;Local Contrast - Lightness -!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius -!HISTORY_MSG_METADATA_MODE;Metadata copy mode -!PARTIALPASTE_LOCALCONTRAST;Local contrast -!PREFERENCES_CROP;Crop editing -!PREFERENCES_CROP_AUTO_FIT;Automatically zoom to fit the crop area -!PREFERENCES_CROP_GUIDES;Guides shown when not editing the crop -!PREFERENCES_CROP_GUIDES_FRAME;Frame -!PREFERENCES_CROP_GUIDES_FULL;Original -!PREFERENCES_CROP_GUIDES_NONE;None -!PREFERENCES_EDITORCMDLINE;Custom command line -!TP_DIRPYRDENOISE_CHROMINANCE_CURVE_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. -!TP_DIRPYRDENOISE_LABEL;Noise Reduction -!TP_LOCALCONTRAST_AMOUNT;Amount -!TP_LOCALCONTRAST_DARKNESS;Darkness level -!TP_LOCALCONTRAST_LABEL;Local Contrast -!TP_LOCALCONTRAST_LIGHTNESS;Lightness level -!TP_LOCALCONTRAST_RADIUS;Radius -!TP_METADATA_EDIT;Apply modifications -!TP_METADATA_MODE;Metadata copy mode -!TP_METADATA_STRIP;Strip all metadata -!TP_METADATA_TUNNEL;Copy unchanged -!TP_RAW_PIXELSHIFTONEGREEN;Use one green instead of average -!TP_RAW_PIXELSHIFTONEGREEN_TOOLTIP;Use one green instead of averaging two greens for regions without motion. -!TP_RAW_RCD;RCD diff --git a/rtdata/languages/default b/rtdata/languages/default index c6b6c98a8..3925ce409 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -852,6 +852,7 @@ HISTORY_MSG_LOCALCONTRAST_ENABLED;Local Contrast HISTORY_MSG_LOCALCONTRAST_LIGHTNESS;Local Contrast - Lightness HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius HISTORY_MSG_METADATA_MODE;Metadata copy mode +HISTORY_MSG_TM_FATTAL_ANCHOR;HDR TM - Anchor HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot @@ -1035,7 +1036,8 @@ PARTIALPASTE_LOCALLAB;Local L*a*b* PARTIALPASTE_LOCGROUP;Local PARTIALPASTE_LENSPROFILE;Profiled lens correction PARTIALPASTE_LOCALCONTRAST;Local contrast -PARTIALPASTE_METAGROUP;Metadata +PARTIALPASTE_METADATA;Metadata mode +PARTIALPASTE_METAGROUP;Metadata settings PARTIALPASTE_PCVIGNETTE;Vignette filter PARTIALPASTE_PERSPECTIVE;Perspective PARTIALPASTE_PREPROCESS_DEADPIXFILT;Dead pixel filter @@ -2210,6 +2212,7 @@ TP_SHARPENMICRO_LABEL;Microcontrast TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 TP_SHARPENMICRO_UNIFORMITY;Uniformity TP_TM_FATTAL_AMOUNT;Amount +TP_TM_FATTAL_ANCHOR;Anchor TP_TM_FATTAL_LABEL;HDR Tone Mapping TP_TM_FATTAL_THRESHOLD;Threshold TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index 1c2d0219f..21514978b 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -291,7 +291,7 @@ bool MultiDiagonalSymmetricMatrix::LazySetEntry(float value, int row, int column return true; } -SSEFUNCTION void MultiDiagonalSymmetricMatrix::VectorProduct(float* RESTRICT Product, float* RESTRICT x) +void MultiDiagonalSymmetricMatrix::VectorProduct(float* RESTRICT Product, float* RESTRICT x) { int srm = StartRows[m - 1]; @@ -693,7 +693,7 @@ EdgePreservingDecomposition::~EdgePreservingDecomposition() delete A; } -SSEFUNCTION float *EdgePreservingDecomposition::CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur, bool UseBlurForEdgeStop) +float *EdgePreservingDecomposition::CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur, bool UseBlurForEdgeStop) { if(Blur == nullptr) @@ -884,7 +884,7 @@ float *EdgePreservingDecomposition::CreateIteratedBlur(float *Source, float Scal return Blur; } -SSEFUNCTION void EdgePreservingDecomposition::CompressDynamicRange(float *Source, float Scale, float EdgeStopping, float CompressionExponent, float DetailBoost, int Iterates, int Reweightings) +void EdgePreservingDecomposition::CompressDynamicRange(float *Source, float Scale, float EdgeStopping, float CompressionExponent, float DetailBoost, int Iterates, int Reweightings) { if(w < 300 && h < 300) { // set number of Reweightings to zero for small images (thumbnails). We could try to find a better solution here. Reweightings = 0; diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index 6420ce1ef..fdc00e0ce 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -474,7 +474,7 @@ void ImProcFunctions::Tile_calc(int tilesize, int overlap, int kall, int imwidth int denoiseNestedLevels = 1; enum nrquality {QUALITY_STANDARD, QUALITY_HIGH}; -SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve, const NoiseCurve & noiseCCurve, float &nresi, float &highresi) +void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve, const NoiseCurve & noiseCCurve, float &nresi, float &highresi) { BENCHFUN //#ifdef _DEBUG @@ -783,7 +783,7 @@ BENCHFUN numthreads = MIN(numthreads, options.rgbDenoiseThreadLimit); } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP denoiseNestedLevels = omp_get_max_threads() / numthreads; bool oldNested = omp_get_nested(); @@ -916,7 +916,7 @@ BENCHFUN if (!denoiseMethodRgb) { //lab mode //modification Jacques feb 2013 and july 2014 -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif @@ -964,7 +964,7 @@ BENCHFUN } } } else {//RGB mode -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif @@ -999,7 +999,7 @@ BENCHFUN } } } else {//image is not raw; use Lab parametrization -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif @@ -1159,7 +1159,7 @@ BENCHFUN if (!memoryAllocationFailed) { // precalculate madL, because it's used in adecomp and bdecomp int maxlvl = Ldecomp->maxlevel(); -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for schedule(dynamic) collapse(2) num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif @@ -1285,7 +1285,7 @@ BENCHFUN if (!memoryAllocationFailed) { // copy labdn->L to Lin before it gets modified by reconstruction Lin = new array2D(width, height); -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif @@ -1338,14 +1338,14 @@ BENCHFUN } } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP int masterThread = omp_get_thread_num(); #endif -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP int subThread = masterThread * denoiseNestedLevels + omp_get_thread_num(); #else int subThread = 0; @@ -1355,7 +1355,7 @@ BENCHFUN float *fLblox = fLbloxArray[subThread]; float pBuf[width + TS + 2 * blkrad * offset] ALIGNED16; float nbrwt[TS * TS] ALIGNED64; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for #endif @@ -1455,7 +1455,7 @@ BENCHFUN } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif @@ -1592,7 +1592,7 @@ BENCHFUN realred /= 100.f; realblue /= 100.f; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) num_threads(denoiseNestedLevels) #endif @@ -1642,7 +1642,7 @@ BENCHFUN } } } else {//RGB mode -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(denoiseNestedLevels) #endif @@ -1682,7 +1682,7 @@ BENCHFUN } } else { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(denoiseNestedLevels) #endif @@ -1749,7 +1749,7 @@ BENCHFUN } } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP omp_set_nested(oldNested); #endif @@ -2044,7 +2044,7 @@ BENCHFUN //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -SSEFUNCTION void ImProcFunctions::RGBtile_denoise(float * fLblox, int hblproc, float noisevar_Ldetail, float * nbrwt, float * blurbuffer) //for DCT +void ImProcFunctions::RGBtile_denoise(float * fLblox, int hblproc, float noisevar_Ldetail, float * nbrwt, float * blurbuffer) //for DCT { int blkstart = hblproc * TS * TS; boxabsblur(fLblox + blkstart, nbrwt, 3, 3, TS, TS, blurbuffer); //blur neighbor weights for more robust estimation //for DCT @@ -2254,7 +2254,7 @@ void ImProcFunctions::Noise_residualAB(wavelet_decomposition &WaveletCoeffs_ab, chmaxresid = maxresid; } -SSEFUNCTION bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge, int denoiseNestedLevels) +bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge, int denoiseNestedLevels) { int maxlvl = min(WaveletCoeffs_L.maxlevel(), 5); const float eps = 0.01f; @@ -2281,7 +2281,7 @@ SSEFUNCTION bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(wavelet_decomposit } bool memoryAllocationFailed = false; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif { @@ -2297,7 +2297,7 @@ SSEFUNCTION bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(wavelet_decomposit if (!memoryAllocationFailed) { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) #endif @@ -2439,7 +2439,7 @@ SSEFUNCTION bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(wavelet_decomposit } -SSEFUNCTION bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels) +bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels) { int maxlvl = WaveletCoeffs_L.maxlevel(); @@ -2471,7 +2471,7 @@ SSEFUNCTION bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(wavelet_decomposi } bool memoryAllocationFailed = false; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif { @@ -2487,7 +2487,7 @@ SSEFUNCTION bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(wavelet_decomposi if (!memoryAllocationFailed) { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) #endif @@ -2506,7 +2506,7 @@ SSEFUNCTION bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(wavelet_decomposi } } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) #endif @@ -2639,7 +2639,7 @@ bool ImProcFunctions::WaveletDenoiseAllL(wavelet_decomposition &WaveletCoeffs_L, } bool memoryAllocationFailed = false; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif { @@ -2654,7 +2654,7 @@ bool ImProcFunctions::WaveletDenoiseAllL(wavelet_decomposition &WaveletCoeffs_L, } if (!memoryAllocationFailed) { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) #endif @@ -2703,7 +2703,7 @@ bool ImProcFunctions::WaveletDenoiseAllAB(wavelet_decomposition &WaveletCoeffs_L } bool memoryAllocationFailed = false; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1) #endif { @@ -2717,7 +2717,7 @@ bool ImProcFunctions::WaveletDenoiseAllAB(wavelet_decomposition &WaveletCoeffs_L } if (!memoryAllocationFailed) { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) #endif @@ -2741,7 +2741,7 @@ bool ImProcFunctions::WaveletDenoiseAllAB(wavelet_decomposition &WaveletCoeffs_L //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -SSEFUNCTION void ImProcFunctions::ShrinkAllL(wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, +void ImProcFunctions::ShrinkAllL(wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge) { @@ -2881,7 +2881,7 @@ SSEFUNCTION void ImProcFunctions::ShrinkAllL(wavelet_decomposition &WaveletCoeff } -SSEFUNCTION void ImProcFunctions::ShrinkAllAB(wavelet_decomposition & WaveletCoeffs_L, wavelet_decomposition & WaveletCoeffs_ab, float **buffer, int level, int dir, +void ImProcFunctions::ShrinkAllAB(wavelet_decomposition & WaveletCoeffs_L, wavelet_decomposition & WaveletCoeffs_ab, float **buffer, int level, int dir, float * noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * variC, int local, float * madaab, bool madCalculated) @@ -3020,7 +3020,7 @@ SSEFUNCTION void ImProcFunctions::ShrinkAllAB(wavelet_decomposition & WaveletCoe delete [] nvc; } -SSEFUNCTION void ImProcFunctions::ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b, +void ImProcFunctions::ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b, int W_ab, int H_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, float & chaut, int &Nb, float & redaut, float & blueaut, float & maxredaut, float & maxblueaut, float & minredaut, float & minblueaut, int schoice, int lvl, float & chromina, float & sigma, float & lumema, float & sigma_L, float & redyel, float & skinc, float & nsknc, float & maxchred, float & maxchblue, float & minchred, float & minchblue, int &nb, float & chau, float & chred, float & chblue, bool denoiseMethodRgb) @@ -3160,7 +3160,7 @@ void ImProcFunctions::WaveletDenoiseAll_info(int levwav, wavelet_decomposition & } } -SSEFUNCTION void ImProcFunctions::RGB_denoise_infoGamCurve(const procparams::DirPyrDenoiseParams & dnparams, bool isRAW, LUTf & gamcurve, float & gam, float & gamthresh, float & gamslope) +void ImProcFunctions::RGB_denoise_infoGamCurve(const procparams::DirPyrDenoiseParams & dnparams, bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope) { gam = dnparams.gamma; gamthresh = 0.001f; @@ -3325,7 +3325,7 @@ void ImProcFunctions::calcautodn_info(float & chaut, float & delta, int Nb, int } -SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, const bool isRAW, LUTf & gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float & chaut, int &Nb, float & redaut, float & blueaut, float & maxredaut, float & maxblueaut, float & minredaut, float & minblueaut, float & chromina, float & sigma, float & lumema, float & sigma_L, float & redyel, float & skinc, float & nsknc, bool multiThread) +void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, const bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread) { if ((settings->leveldnautsimpl == 1 && dnparams.Cmethod == "MAN") || (settings->leveldnautsimpl == 0 && dnparams.C2method == "MANU")) { //nothing to do @@ -3364,7 +3364,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat bcalc[i] = new float[wid]; } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif @@ -3487,7 +3487,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat //fill tile from image; convert RGB to "luma/chroma" if (isRAW) {//image is raw; use channel differences for chroma channels -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif @@ -3540,7 +3540,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat #endif } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif @@ -3558,7 +3558,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat if (!denoiseMethodRgb) { //lab mode, modification Jacques feb 2013 and july 2014 -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif @@ -3695,17 +3695,17 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat } const int levwav = 5; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel sections if (multiThread) #endif { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp section #endif { adecomp = new wavelet_decomposition(labdn->data + datalen, labdn->W, labdn->H, levwav, 1); } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp section #endif { diff --git a/rtengine/LUT.h b/rtengine/LUT.h index 0fd906dc0..b2d11c234 100644 --- a/rtengine/LUT.h +++ b/rtengine/LUT.h @@ -104,7 +104,7 @@ protected: unsigned int upperBound; // always equals size-1, parameter created for performance reason private: unsigned int owner; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ vfloat maxsv ALIGNED16; vfloat sizev ALIGNED16; vint sizeiv ALIGNED16; @@ -136,7 +136,7 @@ public: maxs = size - 2; maxsf = (float)maxs; maxIndexFloat = ((float)upperBound) - 1e-5; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ maxsv = F2V( maxs ); sizeiv = _mm_set1_epi32( (int)(size - 1) ); sizev = F2V( size - 1 ); @@ -167,7 +167,7 @@ public: maxs = size - 2; maxsf = (float)maxs; maxIndexFloat = ((float)upperBound) - 1e-5; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ maxsv = F2V( maxs ); sizeiv = _mm_set1_epi32( (int)(size - 1) ); sizev = F2V( size - 1 ); @@ -178,7 +178,7 @@ public: { data = nullptr; reset(); -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ maxsv = ZEROV; sizev = ZEROV; sizeiv = _mm_setzero_si128(); @@ -243,7 +243,7 @@ public: this->maxs = this->size - 2; this->maxsf = (float)this->maxs; this->maxIndexFloat = ((float)this->upperBound) - 1e-5; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ this->maxsv = F2V( this->size - 2); this->sizeiv = _mm_set1_epi32( (int)(this->size - 1) ); this->sizev = F2V( this->size - 1 ); @@ -258,7 +258,7 @@ public: LUT & operator+=(LUT &rhs) { if (rhs.size == this->size) { -#ifdef _RT_NESTED_OPENMP // temporary solution to fix Issue #3324 +#ifdef _OPENMP #pragma omp simd #endif @@ -274,7 +274,7 @@ public: template::value>::type> LUT & operator*=(float factor) { -#ifdef _RT_NESTED_OPENMP // temporary solution to fix Issue #3324 +#ifdef _OPENMP #pragma omp simd #endif @@ -289,7 +289,7 @@ public: template::value>::type> LUT & operator/=(float divisor) { -#ifdef _RT_NESTED_OPENMP // temporary solution to fix Issue #3324 +#ifdef _OPENMP #pragma omp simd #endif @@ -307,7 +307,7 @@ public: return data[ rtengine::LIM(index, 0, upperBound) ]; } -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ // NOTE: This function requires LUTs which clips only at lower bound @@ -698,7 +698,7 @@ public: maxs = size - 2; maxsf = (float)maxs; maxIndexFloat = ((float)upperBound) - 1e-5; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ maxsv = F2V( size - 2); sizeiv = _mm_set1_epi32( (int)(size - 1) ); sizev = F2V( size - 1 ); diff --git a/rtengine/PF_correct_RT.cc b/rtengine/PF_correct_RT.cc index a31c78767..1a937b409 100644 --- a/rtengine/PF_correct_RT.cc +++ b/rtengine/PF_correct_RT.cc @@ -43,7 +43,7 @@ namespace rtengine { extern const Settings* settings; -SSEFUNCTION void ImProcFunctions::PF_correct_RT(LabImage * src, LabImage * dst, double radius, int thresh) +void ImProcFunctions::PF_correct_RT(LabImage * src, LabImage * dst, double radius, int thresh) { const int halfwin = ceil(2 * radius) + 1; @@ -285,7 +285,7 @@ SSEFUNCTION void ImProcFunctions::PF_correct_RT(LabImage * src, LabImage * dst, free(fringe); } -SSEFUNCTION void ImProcFunctions::PF_correct_RTcam(CieImage * src, CieImage * dst, double radius, int thresh) +void ImProcFunctions::PF_correct_RTcam(CieImage * src, CieImage * dst, double radius, int thresh) { const int halfwin = ceil(2 * radius) + 1; @@ -655,7 +655,7 @@ SSEFUNCTION void ImProcFunctions::PF_correct_RTcam(CieImage * src, CieImage * ds free(fringe); } -SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, double radius, int thresh, int mode, float skinprot, float chrom, int hotbad) +void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, double radius, int thresh, int mode, float skinprot, float chrom, int hotbad) { const int halfwin = ceil(2 * radius) + 1; MyTime t1, t2; @@ -1263,7 +1263,7 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d } -SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float skinprot, float chrom) +void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float skinprot, float chrom) { const int halfwin = ceil(2 * radius) + 1; MyTime t1, t2; diff --git a/rtengine/amaze_demosaic_RT.cc b/rtengine/amaze_demosaic_RT.cc index 30c673813..bdb798a06 100644 --- a/rtengine/amaze_demosaic_RT.cc +++ b/rtengine/amaze_demosaic_RT.cc @@ -38,7 +38,7 @@ namespace rtengine { -SSEFUNCTION void RawImageSource::amaze_demosaic_RT(int winx, int winy, int winw, int winh, array2D &rawData, array2D &red, array2D &green, array2D &blue) +void RawImageSource::amaze_demosaic_RT(int winx, int winy, int winw, int winh, array2D &rawData, array2D &red, array2D &green, array2D &blue) { BENCHFUN diff --git a/rtengine/boxblur.h b/rtengine/boxblur.h index 5475e8ffc..805575b77 100644 --- a/rtengine/boxblur.h +++ b/rtengine/boxblur.h @@ -121,7 +121,7 @@ template void boxblur (T** src, A** dst, int radx, int rady, i } -template SSEFUNCTION void boxblur (T** src, A** dst, T* buffer, int radx, int rady, int W, int H) +template void boxblur (T** src, A** dst, T* buffer, int radx, int rady, int W, int H) { //box blur image; box range = (radx,rady) @@ -309,7 +309,7 @@ template SSEFUNCTION void boxblur (T** src, A** dst, T* buffer } -template SSEFUNCTION void boxblur (T* src, A* dst, A* buffer, int radx, int rady, int W, int H) +template void boxblur (T* src, A* dst, A* buffer, int radx, int rady, int W, int H) { //box blur image; box range = (radx,rady) i.e. box size is (2*radx+1)x(2*rady+1) @@ -496,7 +496,7 @@ template SSEFUNCTION void boxblur (T* src, A* dst, A* buffer, } -template SSEFUNCTION void boxabsblur (T* src, A* dst, int radx, int rady, int W, int H, float * temp) +template void boxabsblur (T* src, A* dst, int radx, int rady, int W, int H, float * temp) { //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/rtengine/color.cc b/rtengine/color.cc index 2d6064d37..2299cef80 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -1742,7 +1742,7 @@ void Color::Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, vfloat & void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b, const float wp[3][3], int width) { -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ vfloat maxvalfv = F2V(MAXVALF); vfloat c116v = F2V(116.f); vfloat c5242d88v = F2V(5242.88f); @@ -1750,7 +1750,7 @@ void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b, vfloat c200v = F2V(200.f); #endif int i = 0; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ for (; i < width - 3; i += 4) { const vfloat rv = LVFU(R[i]); @@ -2627,7 +2627,7 @@ void Color::gamutLchonly(float2 sincosval, float &Lprov1, float &Chprov1, const * const double wip[3][3]: matrix for working profile * bool multiThread : parallelize the loop */ -SSEFUNCTION void Color::LabGamutMunsell(float *labL, float *laba, float *labb, const int N, bool corMunsell, bool lumaMuns, bool isHLEnabled, bool gamut, const double wip[3][3]) +void Color::LabGamutMunsell(float *labL, float *laba, float *labb, const int N, bool corMunsell, bool lumaMuns, bool isHLEnabled, bool gamut, const double wip[3][3]) { #ifdef _DEBUG MyTime t1e, t2e; diff --git a/rtengine/cplx_wavelet_level.h b/rtengine/cplx_wavelet_level.h index 59c206f27..9996ec2af 100644 --- a/rtengine/cplx_wavelet_level.h +++ b/rtengine/cplx_wavelet_level.h @@ -244,7 +244,7 @@ template void wavelet_level::SynthesisFilterHaarHorizontal (const * Applies a Haar filter * */ -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(numThreads) if(numThreads>1) #endif @@ -266,11 +266,11 @@ template void wavelet_level::SynthesisFilterHaarVertical (const T * Applies a Haar filter * */ -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(numThreads) if(numThreads>1) #endif { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for nowait #endif @@ -281,7 +281,7 @@ template void wavelet_level::SynthesisFilterHaarVertical (const T } } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for #endif @@ -328,7 +328,7 @@ void wavelet_level::AnalysisFilterSubsampHorizontal (T * RESTRICT srcbuffer, } #ifdef __SSE2__ -template SSEFUNCTION void wavelet_level::AnalysisFilterSubsampVertical (T * RESTRICT srcbuffer, T * RESTRICT dstLo, T * RESTRICT dstHi, float (* RESTRICT filterLo)[4], float (* RESTRICT filterHi)[4], +template void wavelet_level::AnalysisFilterSubsampVertical (T * RESTRICT srcbuffer, T * RESTRICT dstLo, T * RESTRICT dstHi, float (* RESTRICT filterLo)[4], float (* RESTRICT filterHi)[4], const int taps, const int offset, const int width, const int height, const int row) { @@ -455,7 +455,7 @@ template void wavelet_level::SynthesisFilterSubsampHorizontal (T // calculate coefficients int shift = skip * (taps - offset - 1); //align filter with data -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(numThreads) if(numThreads>1) #endif @@ -506,7 +506,7 @@ template void wavelet_level::SynthesisFilterSubsampHorizontal (T } #ifdef __SSE2__ -template SSEFUNCTION void wavelet_level::SynthesisFilterSubsampVertical (T * RESTRICT srcLo, T * RESTRICT srcHi, T * RESTRICT dst, float (* RESTRICT filterLo)[4], float (* RESTRICT filterHi)[4], const int taps, const int offset, const int width, const int srcheight, const int dstheight, const float blend) +template void wavelet_level::SynthesisFilterSubsampVertical (T * RESTRICT srcLo, T * RESTRICT srcHi, T * RESTRICT dst, float (* RESTRICT filterLo)[4], float (* RESTRICT filterHi)[4], const int taps, const int offset, const int width, const int srcheight, const int dstheight, const float blend) { /* Basic convolution code @@ -521,7 +521,7 @@ template SSEFUNCTION void wavelet_level::SynthesisFilterSubsampVe __m128 fourv = _mm_set1_ps(4.f); __m128 srcFactorv = _mm_set1_ps(srcFactor); __m128 dstFactorv = _mm_set1_ps(blend); -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(numThreads) if(numThreads>1) #endif @@ -594,7 +594,7 @@ template void wavelet_level::SynthesisFilterSubsampVertical (T * // calculate coefficients int shift = skip * (taps - offset - 1); //align filter with data -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(numThreads) if(numThreads>1) #endif @@ -630,7 +630,7 @@ template void wavelet_level::SynthesisFilterSubsampVertical (T * #endif #ifdef __SSE2__ -template template SSEFUNCTION void wavelet_level::decompose_level(E *src, E *dst, float *filterV, float *filterH, int taps, int offset) +template template void wavelet_level::decompose_level(E *src, E *dst, float *filterV, float *filterH, int taps, int offset) { /* filter along rows and columns */ @@ -644,7 +644,7 @@ template template SSEFUNCTION void wavelet_level::dec } } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(numThreads) if(numThreads>1) #endif { @@ -652,7 +652,7 @@ template template SSEFUNCTION void wavelet_level::dec T tmpHi[m_w] ALIGNED64; if(subsamp_out) { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for #endif @@ -662,7 +662,7 @@ template template SSEFUNCTION void wavelet_level::dec AnalysisFilterSubsampHorizontal (tmpHi, wavcoeffs[2], wavcoeffs[3], filterH, filterH + taps, taps, offset, m_w, m_w2, row / 2); } } else { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for #endif @@ -678,7 +678,7 @@ template template SSEFUNCTION void wavelet_level::dec template template void wavelet_level::decompose_level(E *src, E *dst, float *filterV, float *filterH, int taps, int offset) { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(numThreads) if(numThreads>1) #endif { @@ -687,7 +687,7 @@ template template void wavelet_level::decompose_level /* filter along rows and columns */ if(subsamp_out) { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for #endif @@ -697,7 +697,7 @@ template template void wavelet_level::decompose_level AnalysisFilterSubsampHorizontal (tmpHi, wavcoeffs[2], wavcoeffs[3], filterH, filterH + taps, taps, offset, m_w, m_w2, row / 2); } } else { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for #endif @@ -714,7 +714,7 @@ template template void wavelet_level::decompose_level #ifdef __SSE2__ -template template SSEFUNCTION void wavelet_level::reconstruct_level(E* tmpLo, E* tmpHi, E * src, E *dst, float *filterV, float *filterH, int taps, int offset, const float blend) +template template void wavelet_level::reconstruct_level(E* tmpLo, E* tmpHi, E * src, E *dst, float *filterV, float *filterH, int taps, int offset, const float blend) { if(memoryAllocationFailed) { return; diff --git a/rtengine/curves.cc b/rtengine/curves.cc index c15a85626..776fec167 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -734,7 +734,7 @@ void CurveFactory::complexsgnCurve(bool & autili, bool & butili, bool & ccutili } -SSEFUNCTION void CurveFactory::complexCurve(double ecomp, double black, double hlcompr, double hlcomprthresh, +void CurveFactory::complexCurve (double ecomp, double black, double hlcompr, double hlcomprthresh, double shcompr, double br, double contr, const std::vector& curvePoints, const std::vector& curvePoints2, @@ -1016,7 +1016,7 @@ SSEFUNCTION void CurveFactory::complexCurve(double ecomp, double black, double h -SSEFUNCTION void CurveFactory::complexCurvelocal(double ecomp, double black, double hlcompr, double hlcomprthresh, +void CurveFactory::complexCurvelocal(double ecomp, double black, double hlcompr, double hlcomprthresh, double shcompr, double br, double contr, LUTu & histogram, LUTf & hlCurve, LUTf & shCurve, LUTf & outCurve, diff --git a/rtengine/curves.h b/rtengine/curves.h index 9a5a95a79..a20b0e42d 100644 --- a/rtengine/curves.h +++ b/rtengine/curves.h @@ -981,7 +981,7 @@ class WeightedStdToneCurve : public ToneCurve { private: float Triangle(float refX, float refY, float X2) const; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ vfloat Triangle(vfloat refX, vfloat refY, vfloat X2) const; #endif public: @@ -1059,7 +1059,7 @@ inline void StandardToneCurve::BatchApply( // If we get to the end before getting to an aligned address, just return. // (Or, for non-SSE mode, if we get to the end.) return; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ } else if (reinterpret_cast(&r[i]) % 16 == 0) { // Otherwise, we get to the first aligned address; go to the SSE part. break; @@ -1072,7 +1072,7 @@ inline void StandardToneCurve::BatchApply( i++; } -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ for (; i + 3 < end; i += 4) { __m128 r_val = LVF(r[i]); @@ -1166,7 +1166,7 @@ inline float WeightedStdToneCurve::Triangle(float a, float a1, float b) const return a1; } -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ inline vfloat WeightedStdToneCurve::Triangle(vfloat a, vfloat a1, vfloat b) const { vfloat a2 = a1 - a; @@ -1220,7 +1220,7 @@ inline void WeightedStdToneCurve::BatchApply(const size_t start, const size_t en // If we get to the end before getting to an aligned address, just return. // (Or, for non-SSE mode, if we get to the end.) return; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ } else if (reinterpret_cast(&r[i]) % 16 == 0) { // Otherwise, we get to the first aligned address; go to the SSE part. break; @@ -1230,7 +1230,7 @@ inline void WeightedStdToneCurve::BatchApply(const size_t start, const size_t en i++; } -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ const vfloat c65535v = F2V(65535.f); const vfloat zd5v = F2V(0.5f); const vfloat zd25v = F2V(0.25f); diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc index 68b2ad8bb..90a202a1c 100644 --- a/rtengine/demosaic_algos.cc +++ b/rtengine/demosaic_algos.cc @@ -1314,7 +1314,7 @@ void RawImageSource::jdl_interpolate_omp() // from "Lassus" // Adapted to RawTherapee by Jacques Desmis 3/2013 // Improved speed and reduced memory consumption by Ingo Weyrich 2/2015 //TODO Tiles to reduce memory consumption -SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, array2D &rawData, array2D &red, array2D &green, array2D &blue, int iterations) +void RawImageSource::lmmse_interpolate_omp(int winw, int winh, array2D &rawData, array2D &red, array2D &green, array2D &blue, int iterations) { const int width = winw, height = winh; const int ba = 10; @@ -1946,7 +1946,7 @@ SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, array // SSE version by Ingo Weyrich 5/2013 #ifdef __SSE2__ #define CLIPV(a) LIMV(a,zerov,c65535v) -SSEFUNCTION void RawImageSource::igv_interpolate(int winw, int winh) +void RawImageSource::igv_interpolate(int winw, int winh) { static const float eps = 1e-5f, epssq = 1e-5f; //mod epssq -10f =>-5f Jacques 3/2013 to prevent artifact (divide by zero) @@ -2873,7 +2873,7 @@ void RawImageSource::nodemosaic(bool bw) #ifdef __SSE2__ #define CLIPV(a) LIMV(a,ZEROV,c65535v) #endif -SSEFUNCTION void RawImageSource::refinement(int PassCount) +void RawImageSource::refinement(int PassCount) { MyTime t1e, t2e; t1e.set(); @@ -3870,7 +3870,7 @@ void RawImageSource::cielab (const float (*rgb)[3], float* l, float* a, float *b return; } -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ vfloat zd5v = F2V(0.5f); vfloat c116v = F2V(116.f); vfloat c16v = F2V(16.f); @@ -3887,7 +3887,7 @@ void RawImageSource::cielab (const float (*rgb)[3], float* l, float* a, float *b for(int i = 0; i < height; i++) { int j = 0; -#if defined( __SSE2__ ) && defined( __x86_64__ ) // vectorized LUT access is restricted to __x86_64__ => we have to use the same restriction +#ifdef __SSE2__ for(; j < labWidth - 3; j += 4) { vfloat redv, greenv, bluev; diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index 370744f2c..0f67ba8e4 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -42,7 +42,7 @@ extern const Settings* settings; //sequence of scales -SSEFUNCTION void ImProcFunctions :: dirpyr_equalizer(float ** src, float ** dst, int srcwidth, int srcheight, float ** l_a, float ** l_b, const double * mult, const double dirpyrThreshold, const double skinprot, float b_l, float t_l, float t_r, int scaleprev) +void ImProcFunctions :: dirpyr_equalizer(float ** src, float ** dst, int srcwidth, int srcheight, float ** l_a, float ** l_b, const double * mult, const double dirpyrThreshold, const double skinprot, float b_l, float t_l, float t_r, int scaleprev) { int lastlevel = maxlevel; @@ -247,7 +247,7 @@ SSEFUNCTION void ImProcFunctions :: dirpyr_equalizer(float ** src, float ** dst, } -SSEFUNCTION void ImProcFunctions :: cbdl_local_temp(float ** src, float ** dst, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scaleprev) +void ImProcFunctions::cbdl_local_temp(float ** src, float ** dst, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scaleprev) { int lastlevel = maxlevelloc; @@ -506,7 +506,7 @@ void ImProcFunctions :: dirpyr_equalizercam(CieImage *ncie, float ** src, float } } -SSEFUNCTION void ImProcFunctions::dirpyr_channel(float ** data_fine, float ** data_coarse, int width, int height, int level, int scale) +void ImProcFunctions::dirpyr_channel(float ** data_fine, float ** data_coarse, int width, int height, int level, int scale) { // scale is spacing of directional averaging weights // calculate weights, compute directionally weighted average diff --git a/rtengine/fast_demo.cc b/rtengine/fast_demo.cc index 8d02bafb2..900ff2119 100644 --- a/rtengine/fast_demo.cc +++ b/rtengine/fast_demo.cc @@ -52,7 +52,7 @@ LUTf RawImageSource::initInvGrad() #endif //LUTf RawImageSource::invGrad = RawImageSource::initInvGrad(); -SSEFUNCTION void RawImageSource::fast_demosaic() +void RawImageSource::fast_demosaic() { double progress = 0.0; diff --git a/rtengine/gauss.cc b/rtengine/gauss.cc index 741b2e3da..8e23d5609 100644 --- a/rtengine/gauss.cc +++ b/rtengine/gauss.cc @@ -229,7 +229,7 @@ template void gaussHorizontal3 (T** src, T** dst, int W, int H, const f } #ifdef __SSE2__ -template SSEFUNCTION void gaussVertical3 (T** src, T** dst, int W, int H, const float c0, const float c1) +template void gaussVertical3 (T** src, T** dst, int W, int H, const float c0, const float c1) { vfloat Tv = F2V(0.f), Tm1v, Tp1v; vfloat Tv1 = F2V(0.f), Tm1v1, Tp1v1; @@ -314,7 +314,7 @@ template void gaussVertical3 (T** src, T** dst, int W, int H, const flo #ifdef __SSE2__ // fast gaussian approximation if the support window is large -template SSEFUNCTION void gaussHorizontalSse (T** src, T** dst, const int W, const int H, const float sigma) +template void gaussHorizontalSse (T** src, T** dst, const int W, const int H, const float sigma) { double b1, b2, b3, B, M[3][3]; calculateYvVFactors(sigma, b1, b2, b3, B, M); @@ -474,7 +474,7 @@ template void gaussHorizontal (T** src, T** dst, const int W, const int } #ifdef __SSE2__ -template SSEFUNCTION void gaussVerticalSse (T** src, T** dst, const int W, const int H, const float sigma) +template void gaussVerticalSse (T** src, T** dst, const int W, const int H, const float sigma) { double b1, b2, b3, B, M[3][3]; calculateYvVFactors(sigma, b1, b2, b3, B, M); @@ -617,7 +617,7 @@ template SSEFUNCTION void gaussVerticalSse (T** src, T** dst, const int #endif #ifdef __SSE2__ -template SSEFUNCTION void gaussVerticalSsemult (T** RESTRICT src, T** RESTRICT dst, const int W, const int H, const float sigma) +template void gaussVerticalSsemult (T** RESTRICT src, T** RESTRICT dst, const int W, const int H, const float sigma) { double b1, b2, b3, B, M[3][3]; calculateYvVFactors(sigma, b1, b2, b3, B, M); @@ -758,7 +758,7 @@ template SSEFUNCTION void gaussVerticalSsemult (T** RESTRICT src, T** R } } -template SSEFUNCTION void gaussVerticalSsediv (T** RESTRICT src, T** RESTRICT dst, T** divBuffer, const int W, const int H, const float sigma) +template void gaussVerticalSsediv (T** RESTRICT src, T** RESTRICT dst, T** divBuffer, const int W, const int H, const float sigma) { double b1, b2, b3, B, M[3][3]; calculateYvVFactors(sigma, b1, b2, b3, B, M); diff --git a/rtengine/helpersse2.h b/rtengine/helpersse2.h index 7e2185a7f..46af3aa89 100644 --- a/rtengine/helpersse2.h +++ b/rtengine/helpersse2.h @@ -29,29 +29,13 @@ typedef __m128 vfloat; typedef __m128i vint2; // -#ifdef __GNUC__ -#if (!defined(WIN32) || defined( __x86_64__ )) #define LVF(x) _mm_load_ps((float*)&x) #define LVFU(x) _mm_loadu_ps(&x) #define STVF(x,y) _mm_store_ps(&x,y) #define STVFU(x,y) _mm_storeu_ps(&x,y) #define LVI(x) _mm_load_si128((__m128i*)&x) -#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3, also need to map the aligned functions to unaligned functions for WIN32 builds -#define LVF(x) _mm_loadu_ps((float*)&x) -#define LVFU(x) _mm_loadu_ps(&x) -#define STVF(x,y) _mm_storeu_ps(&x,y) -#define STVFU(x,y) _mm_storeu_ps(&x,y) -#define LVI(x) _mm_loadu_si128((__m128i*)&x) -#endif -#else -#define LVF(x) _mm_load_ps((float*)&x) -#define LVFU(x) _mm_loadu_ps(&x) -#define STVF(x,y) _mm_store_ps(&x,y) -#define STVFU(x,y) _mm_storeu_ps(&x,y) -#define LVI(x) _mm_load_si128((__m128i*)&x) -#endif -#if defined(__x86_64__) && defined(__AVX__) +#ifdef __AVX__ #define PERMUTEPS(a,mask) _mm_permute_ps(a,mask) #else #define PERMUTEPS(a,mask) _mm_shuffle_ps(a,a,mask) @@ -67,7 +51,7 @@ static INLINE vfloat LC2VFU(float &a) // Store a vector of 4 floats in a[0],a[2],a[4] and a[6] -#if defined(__x86_64__) && defined(__SSE4_1__) +#ifdef __SSE4_1__ // SSE4.1 => use _mm_blend_ps instead of _mm_set_epi32 and vself #define STC2VFU(a,v) {\ __m128 TST1V = _mm_loadu_ps(&a);\ diff --git a/rtengine/hilite_recon.cc b/rtengine/hilite_recon.cc index f9e630f9d..b8ad23e70 100644 --- a/rtengine/hilite_recon.cc +++ b/rtengine/hilite_recon.cc @@ -35,7 +35,7 @@ extern const Settings* settings; //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -SSEFUNCTION void RawImageSource::boxblur2(float** src, float** dst, float** temp, int H, int W, int box ) +void RawImageSource::boxblur2(float** src, float** dst, float** temp, int H, int W, int box ) { //box blur image channel; box size = 2*box+1 //horizontal blur diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 35e3912e9..dbfcbc84e 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -55,7 +55,7 @@ using namespace rtengine; void shadowToneCurve(const LUTf &shtonecurve, float *rtemp, float *gtemp, float *btemp, int istart, int tH, int jstart, int tW, int tileSize) { -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ vfloat cr = F2V(0.299f); vfloat cg = F2V(0.587f); vfloat cb = F2V(0.114f); @@ -63,7 +63,7 @@ void shadowToneCurve(const LUTf &shtonecurve, float *rtemp, float *gtemp, float for (int i = istart, ti = 0; i < tH; i++, ti++) { int j = jstart, tj = 0; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ for (; j < tW - 3; j += 4, tj += 4) { @@ -100,14 +100,14 @@ void shadowToneCurve(const LUTf &shtonecurve, float *rtemp, float *gtemp, float void highlightToneCurve(const LUTf &hltonecurve, float *rtemp, float *gtemp, float *btemp, int istart, int tH, int jstart, int tW, int tileSize, float exp_scale, float comp, float hlrange) { -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ vfloat threev = F2V(3.f); vfloat maxvalfv = F2V(MAXVALF); #endif for (int i = istart, ti = 0; i < tH; i++, ti++) { int j = jstart, tj = 0; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ for (; j < tW - 3; j += 4, tj += 4) { @@ -169,7 +169,7 @@ void proPhotoBlue(float *rtemp, float *gtemp, float *btemp, int istart, int tH, // this is a hack to avoid the blue=>black bug (Issue 2141) for (int i = istart, ti = 0; i < tH; i++, ti++) { int j = jstart, tj = 0; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ for (; j < tW - 3; j += 4, tj += 4) { vfloat rv = LVF(rtemp[ti * tileSize + tj]); @@ -3791,7 +3791,7 @@ void ImProcFunctions::rgbProc(Imagefloat* working, LabImage* lab, PipetteBuffer } else { for (int i = istart, ti = 0; i < tH; i++, ti++) { int j = jstart, tj = 0; -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ for (; j < tW - 3; j += 4, tj += 4) { //brightness/contrast @@ -5423,7 +5423,7 @@ void ImProcFunctions::luminanceCurve(LabImage* lold, LabImage* lnew, LUTf & curv -SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf & acurve, LUTf & bcurve, LUTf & satcurve, LUTf & lhskcurve, LUTf & clcurve, LUTf & curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLCurve) +void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf & acurve, LUTf & bcurve, LUTf & satcurve, LUTf & lhskcurve, LUTf & clcurve, LUTf & curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLCurve) { if (!params->labCurve.enabled) { return; @@ -7078,7 +7078,7 @@ void ImProcFunctions::rgb2lab(const Imagefloat &src, LabImage &dst, const Glib:: } } -SSEFUNCTION void ImProcFunctions::lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace) +void ImProcFunctions::lab2rgb (const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace) { TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix(workingSpace); const float wip[3][3] = { diff --git a/rtengine/impulse_denoise.cc b/rtengine/impulse_denoise.cc index a40577f39..907afc1a1 100644 --- a/rtengine/impulse_denoise.cc +++ b/rtengine/impulse_denoise.cc @@ -31,7 +31,7 @@ using namespace std; namespace rtengine { -SSEFUNCTION void ImProcFunctions::impulse_nr (LabImage* lab, double thresh) +void ImProcFunctions::impulse_nr (LabImage* lab, double thresh) { // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // impulse noise removal @@ -260,7 +260,7 @@ SSEFUNCTION void ImProcFunctions::impulse_nr (LabImage* lab, double thresh) } -SSEFUNCTION void ImProcFunctions::impulse_nrcam (CieImage* ncie, double thresh, float **buffers[3]) +void ImProcFunctions::impulse_nrcam (CieImage* ncie, double thresh, float **buffers[3]) { // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // impulse noise removal diff --git a/rtengine/iplocalcontrast.cc b/rtengine/iplocalcontrast.cc index 24739fb6b..aa1eeff7d 100644 --- a/rtengine/iplocalcontrast.cc +++ b/rtengine/iplocalcontrast.cc @@ -62,7 +62,7 @@ void ImProcFunctions::localContrast(LabImage *lab) bufval *= (bufval > 0.f) ? light : dark; } - lab->L[y][x] += bufval; + lab->L[y][x] = std::max(0.0001f, lab->L[y][x] + bufval); } } } diff --git a/rtengine/ipresize.cc b/rtengine/ipresize.cc index ba559b2a0..03502e99b 100644 --- a/rtengine/ipresize.cc +++ b/rtengine/ipresize.cc @@ -178,7 +178,7 @@ void ImProcFunctions::Lanczos (const Imagefloat* src, Imagefloat* dst, float sca } -SSEFUNCTION void ImProcFunctions::Lanczos (const LabImage* src, LabImage* dst, float scale) +void ImProcFunctions::Lanczos (const LabImage* src, LabImage* dst, float scale) { const float delta = 1.0f / scale; const float a = 3.0f; diff --git a/rtengine/ipsharpen.cc b/rtengine/ipsharpen.cc index 98b279bbf..7deda7305 100644 --- a/rtengine/ipsharpen.cc +++ b/rtengine/ipsharpen.cc @@ -34,7 +34,7 @@ namespace rtengine #define ABS(a) ((a)<0?-(a):(a)) extern const Settings* settings; -SSEFUNCTION void ImProcFunctions::dcdamping (float** aI, float** aO, float damping, int W, int H) +void ImProcFunctions::dcdamping (float** aI, float** aO, float damping, int W, int H) { const float dampingFac = -2.0 / (damping * damping); diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index cbe34d4a5..03d940f0b 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -140,7 +140,7 @@ struct cont_params { int wavNestedLevels = 1; -SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, LUTf &wavclCurve, int skip) +void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, LUTf &wavclCurve, int skip) { #ifdef _DEBUG @@ -644,7 +644,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int numthreads = MIN (numthreads, maxnumberofthreadsforwavelet); } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP wavNestedLevels = omp_get_max_threads() / numthreads; bool oldNested = omp_get_nested(); @@ -719,7 +719,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int Lold = lab->L; } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -783,7 +783,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -867,7 +867,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int if (!Ldecomp->memoryAllocationFailed) { float madL[8][3]; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for schedule(dynamic) collapse(2) num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -1075,7 +1075,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int bool highlight = params->toneCurve.hrenabled; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -1245,7 +1245,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int delete [] varchro; } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP omp_set_nested (oldNested); #endif @@ -1275,12 +1275,12 @@ void ImProcFunctions::Aver ( float * RESTRICT DataList, int datalen, float &ave float thres = 5.f;//different fom zero to take into account only data large enough max = 0.f; min = 0.f; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif { float lmax = 0.f, lmin = 0.f; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for reduction(+:averaP,averaN,countP,countN) nowait #endif @@ -1304,7 +1304,7 @@ void ImProcFunctions::Aver ( float * RESTRICT DataList, int datalen, float &ave } } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp critical #endif { @@ -1334,7 +1334,7 @@ void ImProcFunctions::Sigma ( float * RESTRICT DataList, int datalen, float ave float variP = 0.f, variN = 0.f; float thres = 5.f;//different fom zero to take into account only data large enough -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for reduction(+:variP,variN,countP,countN) num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -1433,7 +1433,7 @@ float *ImProcFunctions::ContrastDR(float *Source, int W_L, int H_L, float *Contr } memcpy (Contrast, Source, n * sizeof (float)); -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for #endif @@ -1444,19 +1444,19 @@ float *ImProcFunctions::ContrastDR(float *Source, int W_L, int H_L, float *Contr return Contrast; } -SSEFUNCTION float *ImProcFunctions::CompressDR(float *Source, int W_L, int H_L, float Compression, float DetailBoost, float *Compressed) +float *ImProcFunctions::CompressDR(float *Source, int W_L, int H_L, float Compression, float DetailBoost, float *Compressed) { const float eps = 0.000001f; int n = W_L * H_L; #ifdef __SSE2__ -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel #endif { __m128 epsv = _mm_set1_ps ( eps ); -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for #endif @@ -1470,7 +1470,7 @@ SSEFUNCTION float *ImProcFunctions::CompressDR(float *Source, int W_L, int H_L, } #else -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for #endif @@ -1507,7 +1507,7 @@ SSEFUNCTION float *ImProcFunctions::CompressDR(float *Source, int W_L, int H_L, } #ifdef __SSE2__ -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel #endif { @@ -1515,7 +1515,7 @@ SSEFUNCTION float *ImProcFunctions::CompressDR(float *Source, int W_L, int H_L, __m128 epsv = _mm_set1_ps ( eps ); __m128 DetailBoostv = _mm_set1_ps ( DetailBoost ); __m128 tempv = _mm_set1_ps ( temp ); -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for #endif @@ -1536,7 +1536,7 @@ SSEFUNCTION float *ImProcFunctions::CompressDR(float *Source, int W_L, int H_L, } #else -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for #endif @@ -1571,7 +1571,7 @@ void ImProcFunctions::ContrastResid(float * WavCoeffs_L0, struct cont_params &cp min0 = 0.0f; } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for #endif @@ -1591,7 +1591,7 @@ void ImProcFunctions::ContrastResid(float * WavCoeffs_L0, struct cont_params &cp CompressDR(WavCoeffs_L0, W_L, H_L, Compression, DetailBoost, WavCoeffs_L0); -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for // removed schedule(dynamic,10) #endif @@ -1623,7 +1623,7 @@ void ImProcFunctions::EPDToneMapResid (float * WavCoeffs_L0, unsigned int Itera } // max0=32768.f; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for #endif @@ -1648,7 +1648,7 @@ void ImProcFunctions::EPDToneMapResid (float * WavCoeffs_L0, unsigned int Itera epd2.CompressDynamicRange(WavCoeffs_L0, (float)sca / skip, edgest, Compression, DetailBoost, Iterates, rew); //Restore past range, also desaturate a bit per Mantiuk's Color correction for tone mapping. -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for // removed schedule(dynamic,10) #endif @@ -1691,7 +1691,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float min0 = FLT_MAX; if (contrast != 0.f || (cp.tonemap && cp.resena)) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for reduction(+:avedbl) num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -1699,14 +1699,14 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * avedbl += WavCoeffs_L0[i]; } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif { float lminL = FLT_MAX; float lmaxL = 0.f; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for #endif @@ -1721,7 +1721,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp critical #endif { @@ -1781,13 +1781,13 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * koeLi[j][i] = 0.f; } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif { if (contrast != 0.f && cp.resena) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for #endif @@ -1816,18 +1816,18 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * if (cp.tonemap && cp.contmet == 1 && cp.resena) { float maxp = max0 * 256.f; float minp = min0 * 256.f; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp single #endif ContrastResid(WavCoeffs_L0, cp, W_L, H_L, maxp, minp); } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp barrier #endif if ((cp.conres != 0.f || cp.conresH != 0.f) && cp.resena) { // cp.conres = 0.f and cp.comresH = 0.f means that all will be multiplied by 1.f, so we can skip this step -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for nowait #endif @@ -1889,7 +1889,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * tmC[i] = &tmCBuffer[i * W_L]; } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) #endif @@ -1909,7 +1909,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float aamp = 1.f + cp.eddetthrHi / 100.f; for (int lvl = 0; lvl < 4; lvl++) { -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for schedule(dynamic,16) #endif @@ -2012,7 +2012,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * // end } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) #endif @@ -2047,7 +2047,7 @@ void ImProcFunctions::WaveletAandBAllAB(wavelet_decomposition &WaveletCoeffs_a, float * WavCoeffs_a0 = WaveletCoeffs_a.coeff0; float * WavCoeffs_b0 = WaveletCoeffs_b.coeff0; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif { @@ -2055,7 +2055,7 @@ void ImProcFunctions::WaveletAandBAllAB(wavelet_decomposition &WaveletCoeffs_a, float huebuffer[W_L] ALIGNED64; float chrbuffer[W_L] ALIGNED64; #endif // __SSE2__ -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for schedule(dynamic,16) #endif @@ -2115,13 +2115,13 @@ void ImProcFunctions::WaveletcontAllAB (LabImage * labco, float ** varhue, float float * WavCoeffs_ab0 = WaveletCoeffs_ab.coeff0; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif { if (cp.chrores != 0.f && cp.resena) { // cp.chrores == 0.f means all will be multiplied by 1.f, so we can skip the processing of residual -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for nowait #endif @@ -2174,7 +2174,7 @@ void ImProcFunctions::WaveletcontAllAB (LabImage * labco, float ** varhue, float if (cp.cbena && cp.resena) { //if user select Toning and color balance -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for nowait #endif @@ -2229,7 +2229,7 @@ void ImProcFunctions::WaveletcontAllAB (LabImage * labco, float ** varhue, float } } -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) #endif @@ -2424,7 +2424,7 @@ void ImProcFunctions::finalContAllL (float ** WavCoeffs_L, float * WavCoeffs_L0, float bsig = 0.5f - asig * mean[level]; float amean = 0.5f / mean[level]; -#ifdef _RT_NESTED_OPENMP +#ifdef _OPENMP #pragma omp parallel for schedule(dynamic, W_L * 16) num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index baaa88767..a1484cdf6 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -1131,7 +1131,7 @@ void rtengine::LCPMapper::correctCA(double& x, double& y, int cx, int cy, int ch y -= cy; } -SSEFUNCTION void rtengine::LCPMapper::processVignetteLine(int width, int y, float* line) const +void rtengine::LCPMapper::processVignetteLine(int width, int y, float* line) const { // No need for swapXY, since vignette is in RAW and always before rotation float yd = ((float)y - mc.y0) * mc.rfy; @@ -1169,7 +1169,7 @@ SSEFUNCTION void rtengine::LCPMapper::processVignetteLine(int width, int y, floa } } -SSEFUNCTION void rtengine::LCPMapper::processVignetteLine3Channels(int width, int y, float* line) const +void rtengine::LCPMapper::processVignetteLine3Channels(int width, int y, float* line) const { // No need for swapXY, since vignette is in RAW and always before rotation float yd = ((float)y - mc.y0) * mc.rfy; diff --git a/rtengine/opthelper.h b/rtengine/opthelper.h index d6af9a745..711322f56 100644 --- a/rtengine/opthelper.h +++ b/rtengine/opthelper.h @@ -26,44 +26,19 @@ #ifdef __SSE2__ #include "sleefsseavx.c" - #ifdef __GNUC__ - #if defined(WIN32) && !defined( __x86_64__ ) - // needed for actual versions of GCC with 32-Bit Windows - #define SSEFUNCTION __attribute__((force_align_arg_pointer)) - #else - #define SSEFUNCTION - #endif - #else - #define SSEFUNCTION - #endif - #else - #ifdef __SSE__ - #ifdef __GNUC__ - #if defined(WIN32) && !defined( __x86_64__ ) - // needed for actual versions of GCC with 32-Bit Windows - #define SSEFUNCTION __attribute__((force_align_arg_pointer)) - #else - #define SSEFUNCTION - #endif - #else - #define SSEFUNCTION - #endif - #else - #define SSEFUNCTION - #endif #endif #ifdef __GNUC__ #define RESTRICT __restrict__ - #define LIKELY(x) __builtin_expect (!!(x), 1) - #define UNLIKELY(x) __builtin_expect (!!(x), 0) - #if (!defined(WIN32) || defined( __x86_64__ )) - #define ALIGNED64 __attribute__ ((aligned (64))) - #define ALIGNED16 __attribute__ ((aligned (16))) - #else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3, also needed for WIN32 builds - #define ALIGNED64 - #define ALIGNED16 + #if __SIZEOF_POINTER__ == 4 && __GNUC__ >= 7 // there seems to be a bug with __builtin_expect on 32bit systems when using gcc >= 7 + #define LIKELY(x) (x) + #define UNLIKELY(x) (x) + #else + #define LIKELY(x) __builtin_expect (!!(x), 1) + #define UNLIKELY(x) __builtin_expect (!!(x), 0) #endif + #define ALIGNED64 __attribute__ ((aligned (64))) + #define ALIGNED16 __attribute__ ((aligned (16))) #else #define RESTRICT #define LIKELY(x) (x) @@ -71,7 +46,4 @@ #define ALIGNED64 #define ALIGNED16 #endif - #if defined _OPENMP - #define _RT_NESTED_OPENMP - #endif #endif diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 92cbda443..8f135e26e 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1468,7 +1468,8 @@ bool EPDParams::operator !=(const EPDParams& other) const FattalToneMappingParams::FattalToneMappingParams() : enabled(false), threshold(0), - amount(30) + amount(30), + anchor(50) { } @@ -1477,7 +1478,8 @@ bool FattalToneMappingParams::operator ==(const FattalToneMappingParams& other) return enabled == other.enabled && threshold == other.threshold - && amount == other.amount; + && amount == other.amount + && anchor == other.anchor; } bool FattalToneMappingParams::operator !=(const FattalToneMappingParams& other) const @@ -3426,6 +3428,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->fattal.enabled, "FattalToneMapping", "Enabled", fattal.enabled, keyFile); saveToKeyfile(!pedited || pedited->fattal.threshold, "FattalToneMapping", "Threshold", fattal.threshold, keyFile); saveToKeyfile(!pedited || pedited->fattal.amount, "FattalToneMapping", "Amount", fattal.amount, keyFile); + saveToKeyfile(!pedited || pedited->fattal.anchor, "FattalToneMapping", "Anchor", fattal.anchor, keyFile); // Shadows & highlights saveToKeyfile(!pedited || pedited->sh.enabled, "Shadows & Highlights", "Enabled", sh.enabled, keyFile); @@ -3890,7 +3893,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->raw.bayersensor.pixelShiftSmooth, "RAW Bayer", "pixelShiftSmoothFactor", raw.bayersensor.pixelShiftSmoothFactor, keyFile); saveToKeyfile(!pedited || pedited->raw.bayersensor.pixelShiftExp0, "RAW Bayer", "pixelShiftExp0", raw.bayersensor.pixelShiftExp0, keyFile); saveToKeyfile(!pedited || pedited->raw.bayersensor.pixelShiftLmmse, "RAW Bayer", "pixelShiftLmmse", raw.bayersensor.pixelShiftLmmse, keyFile); - saveToKeyfile(!pedited || pedited->raw.bayersensor.pixelShiftOneGreen, "RAW Bayer", "pixelShiftOneGreen", raw.bayersensor.pixelShiftOneGreen, keyFile); +// saveToKeyfile(!pedited || pedited->raw.bayersensor.pixelShiftOneGreen, "RAW Bayer", "pixelShiftOneGreen", raw.bayersensor.pixelShiftOneGreen, keyFile); saveToKeyfile(!pedited || pedited->raw.bayersensor.pixelShiftEqualBright, "RAW Bayer", "pixelShiftEqualBright", raw.bayersensor.pixelShiftEqualBright, keyFile); saveToKeyfile(!pedited || pedited->raw.bayersensor.pixelShiftEqualBrightChannel, "RAW Bayer", "pixelShiftEqualBrightChannel", raw.bayersensor.pixelShiftEqualBrightChannel, keyFile); saveToKeyfile(!pedited || pedited->raw.bayersensor.pixelShiftNonGreenCross, "RAW Bayer", "pixelShiftNonGreenCross", raw.bayersensor.pixelShiftNonGreenCross, keyFile); @@ -4446,6 +4449,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "FattalToneMapping", "Enabled", pedited, fattal.enabled, pedited->fattal.enabled); assignFromKeyfile(keyFile, "FattalToneMapping", "Threshold", pedited, fattal.threshold, pedited->fattal.threshold); assignFromKeyfile(keyFile, "FattalToneMapping", "Amount", pedited, fattal.amount, pedited->fattal.amount); + assignFromKeyfile(keyFile, "FattalToneMapping", "Anchor", pedited, fattal.anchor, pedited->fattal.anchor); } if (keyFile.has_group("Shadows & Highlights")) { @@ -5377,7 +5381,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "RAW Bayer", "pixelShiftSmoothFactor", pedited, raw.bayersensor.pixelShiftSmoothFactor, pedited->raw.bayersensor.pixelShiftSmooth); assignFromKeyfile(keyFile, "RAW Bayer", "pixelShiftExp0", pedited, raw.bayersensor.pixelShiftExp0, pedited->raw.bayersensor.pixelShiftExp0); assignFromKeyfile(keyFile, "RAW Bayer", "pixelShiftLmmse", pedited, raw.bayersensor.pixelShiftLmmse, pedited->raw.bayersensor.pixelShiftLmmse); - assignFromKeyfile(keyFile, "RAW Bayer", "pixelShiftOneGreen", pedited, raw.bayersensor.pixelShiftOneGreen, pedited->raw.bayersensor.pixelShiftOneGreen); +// assignFromKeyfile(keyFile, "RAW Bayer", "pixelShiftOneGreen", pedited, raw.bayersensor.pixelShiftOneGreen, pedited->raw.bayersensor.pixelShiftOneGreen); assignFromKeyfile(keyFile, "RAW Bayer", "pixelShiftEqualBright", pedited, raw.bayersensor.pixelShiftEqualBright, pedited->raw.bayersensor.pixelShiftEqualBright); assignFromKeyfile(keyFile, "RAW Bayer", "pixelShiftEqualBrightChannel", pedited, raw.bayersensor.pixelShiftEqualBrightChannel, pedited->raw.bayersensor.pixelShiftEqualBrightChannel); assignFromKeyfile(keyFile, "RAW Bayer", "pixelShiftNonGreenCross", pedited, raw.bayersensor.pixelShiftNonGreenCross, pedited->raw.bayersensor.pixelShiftNonGreenCross); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index c2e124dde..9c8bfb3a1 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -733,6 +733,7 @@ struct FattalToneMappingParams { bool enabled; int threshold; int amount; + int anchor; FattalToneMappingParams(); diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 81c4dc3e2..bf350a92d 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1343,7 +1343,7 @@ int RawImageSource::interpolateBadPixelsXtrans(PixelsMap &bitmapBads) * (Taken from Emil Martinec idea) * (Optimized by Ingo Weyrich 2013 and 2015) */ -SSEFUNCTION int RawImageSource::findHotDeadPixels(PixelsMap &bpMap, float thresh, bool findHotPixels, bool findDeadPixels) +int RawImageSource::findHotDeadPixels( PixelsMap &bpMap, float thresh, bool findHotPixels, bool findDeadPixels ) { float varthresh = (20.0 * (thresh / 100.0) + 1.0) / 24.f; @@ -3181,7 +3181,7 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw } } -SSEFUNCTION void RawImageSource::cfaboxblur(RawImage *riFlatFile, float* cfablur, const int boxH, const int boxW) +void RawImageSource::cfaboxblur(RawImage *riFlatFile, float* cfablur, const int boxH, const int boxW) { if (boxW == 0 && boxH == 0) { // nothing to blur diff --git a/rtengine/shmap.cc b/rtengine/shmap.cc index 26674c906..b34aac7af 100644 --- a/rtengine/shmap.cc +++ b/rtengine/shmap.cc @@ -358,7 +358,7 @@ void SHMap::forceStat (float max_, float min_, float avg_) avg = avg_; } -SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, int width, int height, LUTf & rangefn, int level, int scale) +void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, int width, int height, LUTf & rangefn, int level, int scale) { //scale is spacing of directional averaging weights @@ -375,7 +375,7 @@ SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, i #pragma omp parallel #endif { -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ vfloat dirwtv, valv, normv, dftemp1v, dftemp2v; #endif // __SSE2__ int j; @@ -402,7 +402,7 @@ SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, i data_coarse[i][j] = val / norm; // low pass filter } -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ int inbrMin = max(i - scalewin, i % scale); for(; j < (width - scalewin) - 3; j += 4) { @@ -482,7 +482,7 @@ SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, i #pragma omp parallel #endif { -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ vfloat dirwtv, valv, normv, dftemp1v, dftemp2v; float domkerv[5][5][4] ALIGNED16 = {{{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}}; @@ -510,7 +510,7 @@ SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, i data_coarse[i][j] = val / norm; // low pass filter } -#if defined( __SSE2__ ) && defined( __x86_64__ ) +#ifdef __SSE2__ for(; j < width - scalewin - 3; j += 4) { valv = _mm_setzero_ps(); diff --git a/rtengine/sleefsseavx.c b/rtengine/sleefsseavx.c index dcea09e2b..706d5585d 100644 --- a/rtengine/sleefsseavx.c +++ b/rtengine/sleefsseavx.c @@ -906,7 +906,7 @@ typedef struct { static INLINE vfloat vabsf(vfloat f) { return (vfloat)vandnotm((vmask)vcast_vf_f(-0.0f), (vmask)f); } static INLINE vfloat vnegf(vfloat f) { return (vfloat)vxorm((vmask)f, (vmask)vcast_vf_f(-0.0f)); } -#if defined( __SSE4_1__ ) && defined( __x86_64__ ) +#ifdef __SSE4_1__ // only one instruction when using SSE4.1 static INLINE vfloat vself(vmask mask, vfloat x, vfloat y) { return _mm_blendv_ps(y,x,(vfloat)mask); diff --git a/rtengine/tmo_fattal02.cc b/rtengine/tmo_fattal02.cc index 4fb11ff19..b2721b2b7 100644 --- a/rtengine/tmo_fattal02.cc +++ b/rtengine/tmo_fattal02.cc @@ -1104,7 +1104,8 @@ void ImProcFunctions::ToneMapFattal02 (Imagefloat *rgb) } float oldMedian; - findMinMaxPercentile (Yr.data(), Yr.getRows() * Yr.getCols(), 0.5f, oldMedian, 0.5f, oldMedian, multiThread); + const float percentile = float(LIM(1, params->fattal.anchor, 100)) / 100.f; + findMinMaxPercentile (Yr.data(), Yr.getRows() * Yr.getCols(), percentile, oldMedian, percentile, oldMedian, multiThread); // median filter on the deep shadows, to avoid boosting noise // because w2 >= w and h2 >= h, we can use the L buffer as temporary buffer for Median_Denoise() int w2 = find_fast_dim (w) + 1; @@ -1146,7 +1147,7 @@ void ImProcFunctions::ToneMapFattal02 (Imagefloat *rgb) const float wr = float(w2) / float(w); float newMedian; - findMinMaxPercentile (L.data(), L.getRows() * L.getCols(), 0.5f, newMedian, 0.5f, newMedian, multiThread); + findMinMaxPercentile (L.data(), L.getRows() * L.getCols(), percentile, newMedian, percentile, newMedian, multiThread); const float scale = (oldMedian == 0.f || newMedian == 0.f) ? 65535.f : (oldMedian / newMedian); // avoid Nan #ifdef _OPENMP diff --git a/rtgui/addsetids.h b/rtgui/addsetids.h index f94075ce4..49eefc794 100644 --- a/rtgui/addsetids.h +++ b/rtgui/addsetids.h @@ -127,12 +127,13 @@ enum { ADDSET_EPD_EDGESTOPPING, ADDSET_EPD_SCALE, ADDSET_EPD_REWEIGHTINGITERATES, - ADDSET_FATTAL_ALPHA, - ADDSET_FATTAL_BETA, + ADDSET_FATTAL_THRESHOLD, + ADDSET_FATTAL_AMOUNT, ADDSET_LOCALCONTRAST_RADIUS, ADDSET_LOCALCONTRAST_AMOUNT, ADDSET_LOCALCONTRAST_DARKNESS, ADDSET_LOCALCONTRAST_LIGHTNESS, + ADDSET_FATTAL_ANCHOR, ADDSET_PARAM_NUM // THIS IS USED AS A DELIMITER!! }; diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index 1fae45a5a..7d7bbe32d 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -153,7 +153,7 @@ void BatchToolPanelCoordinator::initSession () sharpenMicro->setAdjusterBehavior (false, false); icm->setAdjusterBehavior (false, false); epd->setAdjusterBehavior (false, false, false, false, false); - fattal->setAdjusterBehavior (false, false); + fattal->setAdjusterBehavior (false, false, false); chmixer->setAdjusterBehavior (false); blackwhite->setAdjusterBehavior (false, false); @@ -194,7 +194,7 @@ void BatchToolPanelCoordinator::initSession () sharpening->setAdjusterBehavior (options.baBehav[ADDSET_SHARP_RADIUS], options.baBehav[ADDSET_SHARP_AMOUNT], options.baBehav[ADDSET_SHARP_DAMPING], options.baBehav[ADDSET_SHARP_ITER], options.baBehav[ADDSET_SHARP_EDGETOL], options.baBehav[ADDSET_SHARP_HALOCTRL]); prsharpening->setAdjusterBehavior (options.baBehav[ADDSET_SHARP_RADIUS], options.baBehav[ADDSET_SHARP_AMOUNT], options.baBehav[ADDSET_SHARP_DAMPING], options.baBehav[ADDSET_SHARP_ITER], options.baBehav[ADDSET_SHARP_EDGETOL], options.baBehav[ADDSET_SHARP_HALOCTRL]); epd->setAdjusterBehavior (options.baBehav[ADDSET_EPD_STRENGTH], options.baBehav[ADDSET_EPD_GAMMA], options.baBehav[ADDSET_EPD_EDGESTOPPING], options.baBehav[ADDSET_EPD_SCALE], options.baBehav[ADDSET_EPD_REWEIGHTINGITERATES]); - fattal->setAdjusterBehavior (options.baBehav[ADDSET_FATTAL_ALPHA], options.baBehav[ADDSET_FATTAL_BETA]); + fattal->setAdjusterBehavior (options.baBehav[ADDSET_FATTAL_AMOUNT], options.baBehav[ADDSET_FATTAL_THRESHOLD], options.baBehav[ADDSET_FATTAL_ANCHOR]); localContrast->setAdjusterBehavior(options.baBehav[ADDSET_LOCALCONTRAST_RADIUS], options.baBehav[ADDSET_LOCALCONTRAST_AMOUNT], options.baBehav[ADDSET_LOCALCONTRAST_DARKNESS], options.baBehav[ADDSET_LOCALCONTRAST_LIGHTNESS]); sharpenEdge->setAdjusterBehavior (options.baBehav[ADDSET_SHARPENEDGE_AMOUNT], options.baBehav[ADDSET_SHARPENEDGE_PASS]); diff --git a/rtgui/bqentryupdater.cc b/rtgui/bqentryupdater.cc index 1bb7e4257..f5adf56f9 100644 --- a/rtgui/bqentryupdater.cc +++ b/rtgui/bqentryupdater.cc @@ -73,14 +73,8 @@ void BatchQueueEntryUpdater::process (guint8* oimg, int ow, int oh, int newh, BQ stopped = false; tostop = false; -#if __GNUC__ == 4 && __GNUC_MINOR__ == 8 && defined( WIN32 ) && defined(__x86_64__) -#undef THREAD_PRIORITY_NORMAL - // See Issue 2384 comment #3 - thread = Glib::Thread::create(sigc::mem_fun(*this, &BatchQueueEntryUpdater::processThread), (unsigned long int)0, true, true, Glib::THREAD_PRIORITY_NORMAL); -#else #undef THREAD_PRIORITY_LOW thread = Glib::Thread::create(sigc::mem_fun(*this, &BatchQueueEntryUpdater::processThread), (unsigned long int)0, true, true, Glib::THREAD_PRIORITY_LOW); -#endif } } diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 6e13cd2a5..9c23053aa 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -1074,7 +1074,7 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) // normal redraw don't work, so this is the hard way // Disabled this with Issue 2435 because it seems to work fine now // if (!options.tabbedUI && iareapanel->imageArea->mainCropWindow->getZoomFitVal() == 1.0) { -// iareapanel->imageArea->mainCropWindow->cropHandler.update(); + iareapanel->imageArea->mainCropWindow->cropHandler.update(); // } } else { Gtk::Allocation alloc; diff --git a/rtgui/fattaltonemap.cc b/rtgui/fattaltonemap.cc index 5e4aa20d9..af2b9eddf 100644 --- a/rtgui/fattaltonemap.cc +++ b/rtgui/fattaltonemap.cc @@ -18,6 +18,7 @@ * along with RawTherapee. If not, see . */ #include "fattaltonemap.h" +#include "eventmapper.h" #include #include @@ -26,32 +27,43 @@ using namespace rtengine::procparams; FattalToneMapping::FattalToneMapping(): FoldableToolPanel(this, "fattal", M("TP_TM_FATTAL_LABEL"), true, true) { + auto m = ProcEventMapper::getInstance(); + EvTMFattalAnchor = m->newEvent(HDR, "HISTORY_MSG_TM_FATTAL_ANCHOR"); + amount = Gtk::manage(new Adjuster (M("TP_TM_FATTAL_AMOUNT"), 1., 100., 1., 30.)); threshold = Gtk::manage(new Adjuster (M("TP_TM_FATTAL_THRESHOLD"), -100., 100., 1., 0.0)); + Gtk::Image *al = Gtk::manage(new RTImage("adj-black.png")); + Gtk::Image *ar = Gtk::manage(new RTImage("adj-white.png")); + anchor = Gtk::manage(new Adjuster(M("TP_TM_FATTAL_ANCHOR"), 1, 100, 1, 50, al, ar)); amount->setAdjusterListener(this); threshold->setAdjusterListener(this); + anchor->setAdjusterListener(this); amount->show(); threshold->show(); + anchor->show(); pack_start(*amount); pack_start(*threshold); + pack_start(*anchor); } void FattalToneMapping::read(const ProcParams *pp, const ParamsEdited *pedited) { disableListener(); - if(pedited) { + if (pedited) { threshold->setEditedState(pedited->fattal.threshold ? Edited : UnEdited); amount->setEditedState(pedited->fattal.amount ? Edited : UnEdited); + anchor->setEditedState(pedited->fattal.anchor ? Edited : UnEdited); set_inconsistent(multiImage && !pedited->fattal.enabled); } setEnabled(pp->fattal.enabled); threshold->setValue(pp->fattal.threshold); amount->setValue(pp->fattal.amount); + anchor->setValue(pp->fattal.anchor); enableListener(); } @@ -60,11 +72,13 @@ void FattalToneMapping::write(ProcParams *pp, ParamsEdited *pedited) { pp->fattal.threshold = threshold->getValue(); pp->fattal.amount = amount->getValue(); + pp->fattal.anchor = anchor->getValue(); pp->fattal.enabled = getEnabled(); if(pedited) { pedited->fattal.threshold = threshold->getEditedState(); pedited->fattal.amount = amount->getEditedState(); + pedited->fattal.anchor = anchor->getEditedState(); pedited->fattal.enabled = !get_inconsistent(); } } @@ -73,13 +87,16 @@ void FattalToneMapping::setDefaults(const ProcParams *defParams, const ParamsEdi { threshold->setDefault(defParams->fattal.threshold); amount->setDefault(defParams->fattal.amount); + anchor->setDefault(defParams->fattal.anchor); if(pedited) { threshold->setDefaultEditedState(pedited->fattal.threshold ? Edited : UnEdited); amount->setDefaultEditedState(pedited->fattal.amount ? Edited : UnEdited); + anchor->setDefaultEditedState(pedited->fattal.anchor ? Edited : UnEdited); } else { threshold->setDefaultEditedState(Irrelevant); amount->setDefaultEditedState(Irrelevant); + anchor->setDefaultEditedState(Irrelevant); } } @@ -90,6 +107,8 @@ void FattalToneMapping::adjusterChanged(Adjuster* a, double newval) listener->panelChanged(EvTMFattalThreshold, a->getTextValue()); } else if(a == amount) { listener->panelChanged(EvTMFattalAmount, a->getTextValue()); + } else if(a == anchor) { + listener->panelChanged(EvTMFattalAnchor, a->getTextValue()); } } } @@ -113,11 +132,13 @@ void FattalToneMapping::setBatchMode(bool batchMode) threshold->showEditedCB(); amount->showEditedCB(); + anchor->showEditedCB(); } -void FattalToneMapping::setAdjusterBehavior (bool alphaAdd, bool betaAdd) +void FattalToneMapping::setAdjusterBehavior(bool amountAdd, bool thresholdAdd, bool anchorAdd) { - threshold->setAddMode(alphaAdd); - amount->setAddMode(betaAdd); + amount->setAddMode(amountAdd); + threshold->setAddMode(thresholdAdd); + anchor->setAddMode(anchorAdd); } diff --git a/rtgui/fattaltonemap.h b/rtgui/fattaltonemap.h index 2398970ce..90f92a965 100644 --- a/rtgui/fattaltonemap.h +++ b/rtgui/fattaltonemap.h @@ -28,7 +28,10 @@ class FattalToneMapping: public ToolParamBlock, public AdjusterListener, public protected: Adjuster *threshold; Adjuster *amount; + Adjuster *anchor; + rtengine::ProcEvent EvTMFattalAnchor; + public: FattalToneMapping(); @@ -40,7 +43,6 @@ public: void adjusterChanged (Adjuster* a, double newval); void enabledChanged (); - void setAdjusterBehavior (bool alphaAdd, bool betaAdd); - + void setAdjusterBehavior(bool amountAdd, bool thresholdAdd, bool anchorAdd); }; diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 002c4608b..51e288951 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -944,7 +944,7 @@ void HistogramArea::update (LUTu &histRed, LUTu &histGreen, LUTu &histBlue, LUTu idle_register.add(func, haih); } -SSEFUNCTION void HistogramArea::updateBackBuffer () +void HistogramArea::updateBackBuffer () { if (!get_realized ()) { diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index a61808bd9..3fc82cfb5 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -280,6 +280,7 @@ void ParamsEdited::set(bool v) fattal.enabled = v; fattal.threshold = v; fattal.amount = v; + fattal.anchor = v; sh.enabled = v; sh.hq = v; sh.highlights = v; @@ -957,6 +958,7 @@ void ParamsEdited::initFrom(const std::vector& fattal.enabled = fattal.enabled && p.fattal.enabled == other.fattal.enabled; fattal.threshold = fattal.threshold && p.fattal.threshold == other.fattal.threshold; fattal.amount = fattal.amount && p.fattal.amount == other.fattal.amount; + fattal.anchor = fattal.anchor && p.fattal.anchor == other.fattal.anchor; sh.enabled = sh.enabled && p.sh.enabled == other.sh.enabled; sh.hq = sh.hq && p.sh.hq == other.sh.hq; @@ -2303,6 +2305,9 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng if (fattal.amount) { toEdit.fattal.amount = mods.fattal.amount; + } + if (fattal.anchor) { + toEdit.fattal.anchor = mods.fattal.anchor; } if (sh.enabled) { diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index f6f5d31e5..b147a8d68 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -389,6 +389,7 @@ public: bool enabled; bool threshold; bool amount; + bool anchor; }; diff --git a/rtgui/partialpastedlg.cc b/rtgui/partialpastedlg.cc index f8fbd0383..2909a970d 100644 --- a/rtgui/partialpastedlg.cc +++ b/rtgui/partialpastedlg.cc @@ -43,56 +43,53 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren meta ->set_name ("PartialPasteHeader"); raw = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAWGROUP"))); raw ->set_name ("PartialPasteHeader"); - advanced = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_ADVANCEDGROUP"))); - advanced ->set_name("PartialPasteHeader"); + advanced = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_ADVANCEDGROUP"))); + advanced ->set_name("PartialPasteHeader"); loc = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_LOCGROUP"))); loc ->set_name ("PartialPasteHeader"); - // options in basic: + // Basic Settings: wb = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_WHITEBALANCE"))); exposure = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_EXPOSURE"))); localcontrast = Gtk::manage(new Gtk::CheckButton(M("PARTIALPASTE_LOCALCONTRAST"))); sh = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_SHADOWSHIGHLIGHTS"))); epd = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_EPD"))); fattal = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_TM_FATTAL"))); - retinex = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RETINEX"))); pcvignette = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PCVIGNETTE"))); gradient = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_GRADIENT"))); labcurve = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_LABCURVE"))); - colorappearance = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COLORAPP"))); - // options in detail: + // Detail Settings: sharpen = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_SHARPENING"))); sharpenedge = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_SHARPENEDGE"))); sharpenmicro = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_SHARPENMICRO"))); impden = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_IMPULSEDENOISE"))); - dirpyreq = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_DIRPYREQUALIZER"))); + dirpyrden = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DIRPYRDENOISE"))); defringe = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_DEFRINGE"))); + dirpyreq = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DIRPYREQUALIZER"))); - // options in wavelet: - wavelet = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_EQUALIZER"))); //TODO - rename to wavelet - // options in loc: - // locallab = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_LOCALLAB"))); + // Advanced Settings: + retinex = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RETINEX"))); + colorappearance = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COLORAPP"))); + wavelet = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_EQUALIZER"))); - // options in color: + // Color-Related Settings icm = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_ICMSETTINGS"))); - //gam = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_ICMGAMMA"))); vibrance = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_VIBRANCE"))); chmixer = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_CHANNELMIXER"))); blackwhite = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_CHANNELMIXERBW"))); - dirpyrden = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_DIRPYRDENOISE"))); hsveq = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_HSVEQUALIZER"))); filmSimulation = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_FILMSIMULATION")) ); rgbcurves = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RGBCURVES"))); colortoning = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_COLORTONING"))); - // options in lens: + // Lens-Related Settings distortion = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_DISTORTION"))); cacorr = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_CACORRECTION"))); vignetting = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_VIGNETTING"))); lcp = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_LENSPROFILE"))); - // options in composition: + // Composition Settings: coarserot = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_COARSETRANS"))); finerot = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_ROTATION"))); crop = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_CROP"))); @@ -101,36 +98,40 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren perspective = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_PERSPECTIVE"))); commonTrans = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_COMMONTRANSFORMPARAMS"))); - // options in meta: + // Metadata: + metadata = Gtk::manage(new Gtk::CheckButton(M("PARTIALPASTE_METADATA"))); exifch = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_EXIFCHANGES"))); iptc = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_IPTCINFO"))); - // options in raw: - raw_expos = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAWEXPOS_LINEAR"))); - raw_preser = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAWEXPOS_PRESER"))); - raw_black = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAWEXPOS_BLACK"))); - raw_ca_autocorrect = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAWCACORR_AUTO"))); - raw_caredblue = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAWCACORR_CAREDBLUE"))); - raw_hotpix_filt = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_PREPROCESS_HOTPIXFILT"))); - raw_deadpix_filt = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_PREPROCESS_DEADPIXFILT"))); - raw_linenoise = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_PREPROCESS_LINEDENOISE"))); - raw_greenthresh = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_PREPROCESS_GREENEQUIL"))); + // Raw Settings: raw_method = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAW_DMETHOD"))); raw_imagenum = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAW_IMAGENUM"))); raw_pixelshift = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAW_PIXELSHIFT"))); raw_ccSteps = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAW_FALSECOLOR"))); raw_dcb_iterations = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAW_DCBITERATIONS"))); raw_dcb_enhance = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAW_DCBENHANCE"))); - //raw_all_enhance = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_ALLENHANCE"))); raw_lmmse_iterations = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_RAW_LMMSEITERATIONS"))); - + //--- + raw_linenoise = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_LINEDENOISE"))); + raw_greenthresh = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_GREENEQUIL"))); + raw_hotpix_filt = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_HOTPIXFILT"))); + raw_deadpix_filt = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_DEADPIXFILT"))); + //--- + raw_expos = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_LINEAR"))); + raw_preser = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_PRESER"))); + raw_black = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_BLACK"))); + //--- df_file = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_DARKFRAMEFILE"))); df_AutoSelect = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_DARKFRAMEAUTOSELECT"))); + //--- ff_file = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_FLATFIELDFILE"))); ff_AutoSelect = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_FLATFIELDAUTOSELECT"))); - ff_BlurRadius = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_FLATFIELDBLURRADIUS"))); ff_BlurType = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_FLATFIELDBLURTYPE"))); + ff_BlurRadius = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FLATFIELDBLURRADIUS"))); ff_ClipControl = Gtk::manage (new Gtk::CheckButton (M ("PARTIALPASTE_FLATFIELDCLIPCONTROL"))); + //--- + raw_ca_autocorrect = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_AUTO"))); + raw_caredblue = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_CAREDBLUE"))); Gtk::VBox* vboxes[9]; Gtk::HSeparator* hseps[9]; @@ -171,7 +172,6 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren vboxes[2]->pack_start (*color, Gtk::PACK_SHRINK, 2); vboxes[2]->pack_start (*hseps[2], Gtk::PACK_SHRINK, 2); vboxes[2]->pack_start (*icm, Gtk::PACK_SHRINK, 2); - //vboxes[2]->pack_start (*gam, Gtk::PACK_SHRINK, 2); vboxes[2]->pack_start (*vibrance, Gtk::PACK_SHRINK, 2); vboxes[2]->pack_start (*chmixer, Gtk::PACK_SHRINK, 2); vboxes[2]->pack_start (*blackwhite, Gtk::PACK_SHRINK, 2); @@ -199,17 +199,24 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren vboxes[4]->pack_start (*perspective, Gtk::PACK_SHRINK, 2); vboxes[4]->pack_start (*commonTrans, Gtk::PACK_SHRINK, 2); - //WAVELET + //ADVANCED vboxes[5]->pack_start (*advanced, Gtk::PACK_SHRINK, 2); vboxes[5]->pack_start (*hseps[5], Gtk::PACK_SHRINK, 2); vboxes[5]->pack_start (*retinex, Gtk::PACK_SHRINK, 2); vboxes[5]->pack_start (*colorappearance, Gtk::PACK_SHRINK, 2); vboxes[5]->pack_start (*wavelet, Gtk::PACK_SHRINK, 2); - //LOC - vboxes[6]->pack_start (*loc, Gtk::PACK_SHRINK, 2); + //META + vboxes[6]->pack_start (*meta, Gtk::PACK_SHRINK, 2); vboxes[6]->pack_start (*hseps[6], Gtk::PACK_SHRINK, 2); - // vboxes[6]->pack_start (*locallab, Gtk::PACK_SHRINK, 2); + vboxes[6]->pack_start(*metadata, Gtk::PACK_SHRINK, 2); + vboxes[6]->pack_start (*exifch, Gtk::PACK_SHRINK, 2); + vboxes[6]->pack_start (*iptc, Gtk::PACK_SHRINK, 2); + vboxes[7]->pack_start (*raw_pixelshift, Gtk::PACK_SHRINK, 2); + vboxes[7]->pack_start (*raw_ccSteps, Gtk::PACK_SHRINK, 2); + vboxes[7]->pack_start (*raw_dcb_iterations, Gtk::PACK_SHRINK, 2); + vboxes[7]->pack_start (*raw_dcb_enhance, Gtk::PACK_SHRINK, 2); + vboxes[7]->pack_start (*raw_lmmse_iterations, Gtk::PACK_SHRINK, 2); //RAW vboxes[7]->pack_start (*raw, Gtk::PACK_SHRINK, 2); @@ -221,7 +228,6 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren vboxes[7]->pack_start (*raw_dcb_iterations, Gtk::PACK_SHRINK, 2); vboxes[7]->pack_start (*raw_dcb_enhance, Gtk::PACK_SHRINK, 2); vboxes[7]->pack_start (*raw_lmmse_iterations, Gtk::PACK_SHRINK, 2); - //vboxes[6]->pack_start (*raw_all_enhance, Gtk::PACK_SHRINK, 2); vboxes[7]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0); vboxes[7]->pack_start (*raw_linenoise, Gtk::PACK_SHRINK, 2); vboxes[7]->pack_start (*raw_greenthresh, Gtk::PACK_SHRINK, 2); @@ -244,12 +250,6 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren vboxes[7]->pack_start (*raw_ca_autocorrect, Gtk::PACK_SHRINK, 2); vboxes[7]->pack_start (*raw_caredblue, Gtk::PACK_SHRINK, 2); - //META - vboxes[8]->pack_start (*meta, Gtk::PACK_SHRINK, 2); - vboxes[8]->pack_start (*hseps[8], Gtk::PACK_SHRINK, 2); - vboxes[8]->pack_start (*exifch, Gtk::PACK_SHRINK, 2); - vboxes[8]->pack_start (*iptc, Gtk::PACK_SHRINK, 2); - Gtk::VBox* vbCol1 = Gtk::manage (new Gtk::VBox ()); Gtk::VBox* vbCol2 = Gtk::manage (new Gtk::VBox ()); Gtk::VBox* vbCol3 = Gtk::manage (new Gtk::VBox ()); @@ -262,14 +262,14 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren vbCol2->pack_start (*vboxes[i], Gtk::PACK_SHRINK, 2); } - for (int i = 7; i < 9; i++) { + for (int i = 7; i < 8; i++) { vbCol3->pack_start (*vboxes[i], Gtk::PACK_SHRINK, 2); } Gtk::VBox* vbtop = Gtk::manage (new Gtk::VBox ()); vbtop->pack_start (*everything, Gtk::PACK_SHRINK, 2); - Gtk::Dialog::get_content_area()->pack_start (*vbtop, Gtk::PACK_SHRINK, 2); // TODO replace with get_content_area() with GTK upgrade + Gtk::Dialog::get_content_area()->pack_start (*vbtop, Gtk::PACK_SHRINK, 2); Gtk::HBox* hbmain = Gtk::manage (new Gtk::HBox ()); hbmain->pack_start (*vbCol1); @@ -291,7 +291,7 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren scrolledwindow->add (*hbmain); - Gtk::Dialog::get_content_area()->pack_start (*scrolledwindow, Gtk::PACK_EXPAND_WIDGET, 2);// TODO replace with get_content_area() with GTK upgrade + Gtk::Dialog::get_content_area()->pack_start (*scrolledwindow, Gtk::PACK_EXPAND_WIDGET, 2); hbmain->show(); scrolledwindow->show (); @@ -306,34 +306,36 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren compositionConn = composition->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::compositionToggled)); metaConn = meta->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::metaToggled)); rawConn = raw->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::rawToggled)); - advancedConn = advanced->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::advancedToggled)); + advancedConn = advanced->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::advancedToggled)); // locConn = loc->signal_toggled().connect (sigc::mem_fun (*this, &PartialPasteDlg::locToggled)); + // Basic Settings wbConn = wb->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); exposureConn = exposure->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); localcontrastConn = localcontrast->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); shConn = sh->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); epdConn = epd->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); fattalConn = fattal->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); - retinexConn = retinex->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); pcvignetteConn = pcvignette->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); gradientConn = gradient->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); labcurveConn = labcurve->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); - colorappearanceConn = colorappearance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); + // Detail Settings: sharpenConn = sharpen->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true)); gradsharpenConn = sharpenedge->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true)); microcontrastConn = sharpenmicro->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true)); impdenConn = impden->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true)); dirpyrdenConn = dirpyrden->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true)); - dirpyreqConn = dirpyreq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true)); defringeConn = defringe->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true)); - // locallabConn = locallab->signal_toggled().connect (sigc::bind (sigc::mem_fun (*basic, &Gtk::CheckButton::set_inconsistent), true)); + dirpyreqConn = dirpyreq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true)); + // Advanced Settings: + retinexConn = retinex->signal_toggled().connect (sigc::bind (sigc::mem_fun(*advanced, &Gtk::CheckButton::set_inconsistent), true)); + colorappearanceConn = colorappearance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*advanced, &Gtk::CheckButton::set_inconsistent), true)); waveletConn = wavelet->signal_toggled().connect (sigc::bind (sigc::mem_fun(*advanced, &Gtk::CheckButton::set_inconsistent), true)); + // Color-related Settings: icmConn = icm->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true)); - //gamcsconn = gam->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true)); vibranceConn = vibrance->signal_toggled().connect (sigc::bind (sigc::mem_fun (*color, &Gtk::CheckButton::set_inconsistent), true)); chmixerConn = chmixer->signal_toggled().connect (sigc::bind (sigc::mem_fun (*color, &Gtk::CheckButton::set_inconsistent), true)); chmixerbwConn = blackwhite->signal_toggled().connect (sigc::bind (sigc::mem_fun (*color, &Gtk::CheckButton::set_inconsistent), true)); @@ -342,11 +344,13 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren rgbcurvesConn = rgbcurves->signal_toggled().connect (sigc::bind (sigc::mem_fun (*color, &Gtk::CheckButton::set_inconsistent), true)); colortoningConn = colortoning->signal_toggled().connect (sigc::bind (sigc::mem_fun (*color, &Gtk::CheckButton::set_inconsistent), true)); + // Lens-Related Settings: distortionConn = distortion->signal_toggled().connect (sigc::bind (sigc::mem_fun (*lens, &Gtk::CheckButton::set_inconsistent), true)); cacorrConn = cacorr->signal_toggled().connect (sigc::bind (sigc::mem_fun (*lens, &Gtk::CheckButton::set_inconsistent), true)); vignettingConn = vignetting->signal_toggled().connect (sigc::bind (sigc::mem_fun (*lens, &Gtk::CheckButton::set_inconsistent), true)); lcpConn = lcp->signal_toggled().connect (sigc::bind (sigc::mem_fun (*lens, &Gtk::CheckButton::set_inconsistent), true)); + // Composition Settings: coarserotConn = coarserot->signal_toggled().connect (sigc::bind (sigc::mem_fun (*composition, &Gtk::CheckButton::set_inconsistent), true)); finerotConn = finerot->signal_toggled().connect (sigc::bind (sigc::mem_fun (*composition, &Gtk::CheckButton::set_inconsistent), true)); cropConn = crop->signal_toggled().connect (sigc::bind (sigc::mem_fun (*composition, &Gtk::CheckButton::set_inconsistent), true)); @@ -355,34 +359,40 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren perspectiveConn = perspective->signal_toggled().connect (sigc::bind (sigc::mem_fun (*composition, &Gtk::CheckButton::set_inconsistent), true)); commonTransConn = commonTrans->signal_toggled().connect (sigc::bind (sigc::mem_fun (*composition, &Gtk::CheckButton::set_inconsistent), true)); + // Metadata: + metadataConn = metadata->signal_toggled().connect(sigc::bind (sigc::mem_fun(*meta, &Gtk::CheckButton::set_inconsistent), true)); exifchConn = exifch->signal_toggled().connect (sigc::bind (sigc::mem_fun (*meta, &Gtk::CheckButton::set_inconsistent), true)); iptcConn = iptc->signal_toggled().connect (sigc::bind (sigc::mem_fun (*meta, &Gtk::CheckButton::set_inconsistent), true)); + // Raw Settings: raw_methodConn = raw_method->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_imagenumConn = raw_imagenum->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); + raw_pixelshiftConn = raw_pixelshift->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_ccStepsConn = raw_ccSteps->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_dcb_iterationsConn = raw_dcb_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_dcb_enhanceConn = raw_dcb_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); - //raw_all_enhanceConn = raw_all_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_lmmse_iterationsConn = raw_lmmse_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); - raw_pixelshiftConn = raw_pixelshift->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); - + //--- + raw_linenoiseConn = raw_linenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); + raw_greenthreshConn = raw_greenthresh->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); + raw_hotpix_filtConn = raw_hotpix_filt->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); + raw_deadpix_filtConn = raw_deadpix_filt->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); + //--- raw_exposConn = raw_expos->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_preserConn = raw_preser->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_blackConn = raw_black->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); - raw_ca_autocorrectConn = raw_ca_autocorrect->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); - raw_caredblueConn = raw_caredblue->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); - raw_hotpix_filtConn = raw_hotpix_filt->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); - raw_deadpix_filtConn = raw_deadpix_filt->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); - raw_linenoiseConn = raw_linenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); - raw_greenthreshConn = raw_greenthresh->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); + //--- df_fileConn = df_file->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); df_AutoSelectConn = df_AutoSelect->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); + //--- ff_fileConn = ff_file->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); ff_AutoSelectConn = ff_AutoSelect->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); - ff_BlurRadiusConn = ff_BlurRadius->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); ff_BlurTypeConn = ff_BlurType->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); + ff_BlurRadiusConn = ff_BlurRadius->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); ff_ClipControlConn = ff_ClipControl->signal_toggled().connect (sigc::bind (sigc::mem_fun (*raw, &Gtk::CheckButton::set_inconsistent), true)); + //--- + raw_ca_autocorrectConn = raw_ca_autocorrect->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); + raw_caredblueConn = raw_caredblue->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); add_button (M ("GENERAL_OK"), Gtk::RESPONSE_OK); add_button (M ("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); @@ -434,55 +444,53 @@ void PartialPasteDlg::rawToggled () ConnectionBlocker raw_methodBlocker(raw_methodConn); ConnectionBlocker raw_imagenumBlocker(raw_imagenumConn); + ConnectionBlocker raw_pixelshiftBlocker(raw_pixelshiftConn); ConnectionBlocker raw_ccStepsBlocker(raw_ccStepsConn); ConnectionBlocker raw_dcb_iterationsBlocker(raw_dcb_iterationsConn); ConnectionBlocker raw_dcb_enhanceBlocker(raw_dcb_enhanceConn); - //ConnectionBlocker raw_all_enhanceConnBlocker(raw_all_enhanceConnConn); ConnectionBlocker raw_lmmse_iterationsBlocker(raw_lmmse_iterationsConn); - ConnectionBlocker raw_pixelshiftBlocker(raw_pixelshiftConn); + ConnectionBlocker raw_linenoiseBlocker(raw_linenoiseConn); + ConnectionBlocker raw_greenthreshBlocker(raw_greenthreshConn); + ConnectionBlocker raw_hotpix_filtBlocker(raw_hotpix_filtConn); + ConnectionBlocker raw_deadpix_filtBlocker(raw_deadpix_filtConn); ConnectionBlocker raw_exposBlocker(raw_exposConn); ConnectionBlocker raw_preserBlocker(raw_preserConn); ConnectionBlocker raw_blackBlocker(raw_blackConn); - ConnectionBlocker raw_ca_autocorrectBlocker(raw_ca_autocorrectConn); - ConnectionBlocker raw_caredblueBlocker(raw_caredblueConn); - ConnectionBlocker raw_hotpix_filtBlocker(raw_hotpix_filtConn); - ConnectionBlocker raw_deadpix_filtBlocker(raw_deadpix_filtConn); - ConnectionBlocker raw_linenoiseBlocker(raw_linenoiseConn); - ConnectionBlocker raw_greenthreshBlocker(raw_greenthreshConn); ConnectionBlocker df_fileBlocker(df_fileConn); ConnectionBlocker df_AutoSelectBlocker(df_AutoSelectConn); ConnectionBlocker ff_fileBlocker(ff_fileConn); ConnectionBlocker ff_AutoSelectBlocker(ff_AutoSelectConn); - ConnectionBlocker ff_BlurRadiusBlocker(ff_BlurRadiusConn); ConnectionBlocker ff_BlurTypeBlocker(ff_BlurTypeConn); + ConnectionBlocker ff_BlurRadiusBlocker(ff_BlurRadiusConn); ConnectionBlocker ff_ClipControlBlocker(ff_ClipControlConn); + ConnectionBlocker raw_ca_autocorrectBlocker(raw_ca_autocorrectConn); + ConnectionBlocker raw_caredblueBlocker(raw_caredblueConn); raw->set_inconsistent (false); raw_method->set_active (raw->get_active ()); raw_imagenum->set_active (raw->get_active ()); + raw_pixelshift->set_active (raw->get_active ()); raw_ccSteps->set_active (raw->get_active ()); raw_dcb_iterations->set_active (raw->get_active ()); raw_dcb_enhance->set_active (raw->get_active ()); raw_lmmse_iterations->set_active (raw->get_active ()); - raw_pixelshift->set_active (raw->get_active ()); - //raw_all_enhance->set_active (raw->get_active ()); + raw_linenoise->set_active (raw->get_active ()); + raw_greenthresh->set_active (raw->get_active ()); + raw_hotpix_filt->set_active (raw->get_active ()); + raw_deadpix_filt->set_active (raw->get_active ()); raw_expos->set_active (raw->get_active ()); raw_preser->set_active (raw->get_active ()); raw_black->set_active (raw->get_active ()); - raw_ca_autocorrect->set_active (raw->get_active ()); - raw_caredblue->set_active (raw->get_active ()); - raw_hotpix_filt->set_active (raw->get_active ()); - raw_deadpix_filt->set_active (raw->get_active ()); - raw_linenoise->set_active (raw->get_active ()); - raw_greenthresh->set_active (raw->get_active ()); df_file->set_active (raw->get_active ()); df_AutoSelect->set_active (raw->get_active ()); ff_file->set_active (raw->get_active ()); ff_AutoSelect->set_active (raw->get_active ()); - ff_BlurRadius->set_active (raw->get_active ()); ff_BlurType->set_active (raw->get_active ()); + ff_BlurRadius->set_active (raw->get_active ()); ff_ClipControl->set_active (raw->get_active ()); + raw_ca_autocorrect->set_active (raw->get_active ()); + raw_caredblue->set_active (raw->get_active ()); } void PartialPasteDlg::basicToggled () @@ -554,14 +562,15 @@ void PartialPasteDlg::detailToggled () void PartialPasteDlg::advancedToggled () { - ConnectionBlocker waveletBlocker(waveletConn); ConnectionBlocker retinexBlocker(retinexConn); ConnectionBlocker colorappearanceBlocker(colorappearanceConn); + ConnectionBlocker waveletBlocker(waveletConn); advanced->set_inconsistent (false); + + retinex->set_active (advanced->get_active ()); + colorappearance->set_active (advanced->get_active ()); wavelet->set_active (advanced->get_active ()); - retinex->set_active (basic->get_active ()); - colorappearance->set_active (basic->get_active ()); } /* void PartialPasteDlg::locToggled () @@ -585,14 +594,12 @@ void PartialPasteDlg::colorToggled () ConnectionBlocker chmixerbwBlocker(chmixerbwConn); ConnectionBlocker hsveqBlocker(hsveqConn); ConnectionBlocker filmSimulationBlocker(filmSimulationConn); - //ConnectionBlocker gamcsconnBlocker(gamcsconnConn); ConnectionBlocker rgbcurvesBlocker(rgbcurvesConn); ConnectionBlocker colortoningBlocker(colortoningConn); color->set_inconsistent (false); icm->set_active (color->get_active ()); - //gam->set_active (color->get_active ()); vibrance->set_active (color->get_active ()); chmixer->set_active (color->get_active ()); blackwhite->set_active (color->get_active ()); @@ -643,11 +650,13 @@ void PartialPasteDlg::compositionToggled () void PartialPasteDlg::metaToggled () { + ConnectionBlocker metadataBlocker(metadataConn); ConnectionBlocker exifchBlocker(exifchConn); ConnectionBlocker iptcBlocker(iptcConn); meta->set_inconsistent (false); + metadata->set_active(meta->get_active()); exifch->set_active (meta->get_active ()); iptc->set_active (meta->get_active ()); } @@ -828,6 +837,10 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param filterPE.commonTrans = falsePE.commonTrans; } + if (!metadata->get_active()) { + filterPE.metadata = falsePE.metadata; + } + if (!exifch->get_active ()) { filterPE.exif = falsePE.exif; } diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h index 7308e0784..f3d5e2430 100644 --- a/rtgui/partialpastedlg.h +++ b/rtgui/partialpastedlg.h @@ -97,6 +97,7 @@ public: Gtk::CheckButton* commonTrans; // options in meta: + Gtk::CheckButton *metadata; Gtk::CheckButton* exifch; Gtk::CheckButton* iptc; @@ -134,7 +135,7 @@ public: sigc::connection vibranceConn, chmixerConn, hsveqConn, rgbcurvesConn, chmixerbwConn, colortoningConn, filmSimulationConn; sigc::connection distortionConn, cacorrConn, vignettingConn, lcpConn; sigc::connection coarserotConn, finerotConn, cropConn, resizeConn, prsharpeningConn, perspectiveConn, commonTransConn; - sigc::connection exifchConn, iptcConn, icmConn; + sigc::connection metadataConn, exifchConn, iptcConn, icmConn; sigc::connection df_fileConn, df_AutoSelectConn, ff_fileConn, ff_AutoSelectConn, ff_BlurRadiusConn, ff_BlurTypeConn, ff_ClipControlConn; sigc::connection raw_caredblueConn, raw_ca_autocorrectConn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_imagenumConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_pixelshiftConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index fb1a7f670..dc057f63e 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -205,8 +205,9 @@ Gtk::Widget* Preferences::getBatchProcPanel() mi = behModel->append(); mi->set_value(behavColumns.label, M("TP_TM_FATTAL_LABEL")); - appendBehavList(mi, M("TP_TM_FATTAL_THRESHOLD"), ADDSET_FATTAL_ALPHA, false); - appendBehavList(mi, M("TP_TM_FATTAL_AMOUNT"), ADDSET_FATTAL_BETA, false); + appendBehavList (mi, M ("TP_TM_FATTAL_AMOUNT"), ADDSET_FATTAL_AMOUNT, false); + appendBehavList (mi, M ("TP_TM_FATTAL_THRESHOLD"), ADDSET_FATTAL_THRESHOLD, false); + appendBehavList (mi, M ("TP_TM_FATTAL_ANCHOR"), ADDSET_FATTAL_ANCHOR, false); mi = behModel->append(); mi->set_value(behavColumns.label, M("TP_RETINEX_LABEL")); diff --git a/tools/source_icons/README b/tools/source_icons/README index 826b58b2b..dbdd03e24 100644 --- a/tools/source_icons/README +++ b/tools/source_icons/README @@ -29,4 +29,4 @@ How to easily work with new icons 2- Creates a .file for each .svg (change "w22" and "actions" as needed, explained above): for f in *.svg; do printf "%s\n" "${f%%.*}.png,w22,actions" > "${f%%.*}.file"; done 3- Makes the PNG icons (you need to run the script from it's containing dir): - cd ~/rawtherapee/tools/source_icons/script && ./make_all_icon_theme.bash /path/to/new/svg/icons/ /tmp/png + cd ~/programs/code-rawtherapee/tools/source_icons/script && ./make_all_icon_theme.bash /path/to/new/svg/icons/ /tmp/png diff --git a/tools/source_icons/scalable/adj-black.svg b/tools/source_icons/scalable/adj-black.svg new file mode 100644 index 000000000..0fa707113 --- /dev/null +++ b/tools/source_icons/scalable/adj-black.svg @@ -0,0 +1,102 @@ + + + + + Icons for the "Expert" tab in RawTherapee + + + + + + + + image/svg+xml + + Icons for the "Expert" tab in RawTherapee + + + Morgan Hardwood + + + + + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/adj-white.svg b/tools/source_icons/scalable/adj-white.svg new file mode 100644 index 000000000..83a0d66aa --- /dev/null +++ b/tools/source_icons/scalable/adj-white.svg @@ -0,0 +1,103 @@ + + + + + Icons for the "Expert" tab in RawTherapee + + + + + + + + image/svg+xml + + Icons for the "Expert" tab in RawTherapee + + + Morgan Hardwood + + + + + + + + + + + + + + + + + +