diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 248d27f36..17cf14fd6 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,4 +1,4 @@
-RAWTHERAPEE 5.5-dev RELEASE NOTES
+RAWTHERAPEE 5.6-dev RELEASE NOTES
This is a development version of RawTherapee. We update the code almost daily. Every few months, once enough changes have accumulated and the code is stabilized, we make a new official release. Every code change between these releases is known as a "development" version, and this is one of them.
@@ -26,7 +26,7 @@ In order to use RawTherapee efficiently you should know that:
- All curves support the Shift and Ctrl keys while dragging a point. Shift+drag makes the point snap to a meaningful axis (top, bottom, diagonal, other), while Ctrl+drag makes your mouse movement super-fine for precise point positioning.
- There are many keyboard shortcuts which make working with RawTherapee much faster and give you greater control. Make sure you familiarize yourself with them on RawPedia's "Keyboard Shortcuts" page!
-New features since 5.5:
+New features since 5.6:
TODO.
@@ -35,7 +35,7 @@ NEWS RELEVANT TO PACKAGE MAINTAINERS
In general:
- To get the source code, either clone from git or use the tarball from http://rawtherapee.com/shared/source/ . Do not use the auto-generated GitHub release tarballs.
-- Requires GTK+ version >=3.16, though >=3.22.24 is recommended.
+- Requires GTK+ version >=3.16, though >=3.22.24 is recommended. GTK+ versions 3.24.2 - 3.24.6 have an issue with missing combobox menu arrows and are to be avoided.
- RawTherapee 5 requires GCC-4.9 or higher, or Clang.
- Do not use -ffast-math, it will not make RawTherapee faster but will introduce artifacts.
- Use -O3, it will make RawTherapee faster with no known side-effects.
diff --git a/com.rawtherapee.RawTherapee.appdata.xml b/com.rawtherapee.RawTherapee.appdata.xml
index 0dace6772..32cfe30c7 100644
--- a/com.rawtherapee.RawTherapee.appdata.xml
+++ b/com.rawtherapee.RawTherapee.appdata.xml
@@ -35,6 +35,9 @@
https://discuss.pixls.us/t/localization-how-to-translate-rawtherapee-and-rawpedia/2594
rawtherapee.desktop
+
+
+
diff --git a/rtdata/images/svg/splash.svg b/rtdata/images/svg/splash.svg
index 0578fac27..2e46f0e6d 100644
--- a/rtdata/images/svg/splash.svg
+++ b/rtdata/images/svg/splash.svg
@@ -16,7 +16,7 @@
version="1.1"
id="svg783"
inkscape:version="0.92.2 2405546, 2018-03-11"
- sodipodi:docname="rt-splash.svg"
+ sodipodi:docname="splash.svg"
inkscape:export-filename="/tmp/splash.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
@@ -479,9 +479,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="2.3815029"
- inkscape:cx="209.44539"
- inkscape:cy="173"
+ inkscape:zoom="0.93979686"
+ inkscape:cx="-66.836581"
+ inkscape:cy="136.82017"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -574,14 +574,31 @@
RawTherapee splash screen
- 2019-03-11
+ 2019-02-27
Maciej Dworak
www.rawtherapee.com
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -903,20 +865,6 @@
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:80px;line-height:1.25;font-family:'Eras Bold ITC';-inkscape-font-specification:'Eras Bold ITC Bold'"
id="path660" />
-
-
-
-
. 5
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:49.34799576px;line-height:1.25;font-family:'Eras Bold ITC';-inkscape-font-specification:'Eras Bold ITC Bold';letter-spacing:-7.09514618px">. 6
Raw
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala
index 38d8c7588..1a8a7ccac 100644
--- a/rtdata/languages/Catala
+++ b/rtdata/languages/Catala
@@ -1470,6 +1470,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: -
!PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color
!PREFERENCES_APPEARANCE_MAINFONT;Main font
!PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Navigator guide color
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_APPEARANCE_THEME;Theme
!PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit
!PREFERENCES_BEHADDALL;All to 'Add'
diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified)
index df3093b9d..45d9b912a 100644
--- a/rtdata/languages/Chinese (Simplified)
+++ b/rtdata/languages/Chinese (Simplified)
@@ -1495,6 +1495,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: -
!PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font
!PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color
!PREFERENCES_APPEARANCE_MAINFONT;Main font
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_APPEARANCE_THEME;Theme
!PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit
!PREFERENCES_BEHADDALLHINT;Set all parameters to the Add mode.\nAdjustments of parameters in the batch tool panel will be deltas to the stored values.
diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech
index ff8293acb..3ac2273c0 100644
--- a/rtdata/languages/Czech
+++ b/rtdata/languages/Czech
@@ -42,6 +42,7 @@
#41 2018-03-03 updated by mkyral
#42 2018-04-28 updated by mkyral
#43 2018-12-13 updated by mkyral
+#44 2019-04-17 updated by mkyral
ABOUT_TAB_BUILD;Verze
ABOUT_TAB_CREDITS;Zásluhy
@@ -152,6 +153,7 @@ FILEBROWSER_APPLYPROFILE;Použít
FILEBROWSER_APPLYPROFILE_PARTIAL;Aplikovat - částečně
FILEBROWSER_AUTODARKFRAME;Automatický tmavý snímek
FILEBROWSER_AUTOFLATFIELD;Auto Flat Field
+FILEBROWSER_BROWSEPATHBUTTONHINT;Klikněte pro otevření zadané cesty, obnovte složku a aplikujte klíčové slovo "find".
FILEBROWSER_BROWSEPATHHINT;Vložte cestu pro procházení.\n\nKlávesové zkratky:\nCtrl-o pro přepnutí do adresního řádku.\nEnter/ Ctrl-Enter pro procházení ;\nEsc pro zrušení změn.\nShift-Esc pro zrušení přepnutí.\n\nZkratky pro cesty:\n~\t- domácí složka uživatele.\n!\t- složka s obrázky uživatele.
FILEBROWSER_CACHE;Mezipaměť
FILEBROWSER_CACHECLEARFROMFULL;Smazat vše včetně profilů zpracování v mezipaměti
@@ -808,6 +810,7 @@ HISTORY_MSG_RAWCACORR_AUTOIT;Raw korekce CA - Iterace
HISTORY_MSG_RAWCACORR_COLORSHIFT;Raw korekce CA - Zabránit posunu barev
HISTORY_MSG_RAW_BORDER;Okraj Raw
HISTORY_MSG_RESIZE_ALLOWUPSCALING;Změna rozměrů - Povolit zvětšení
+HISTORY_MSG_SHARPENING_BLUR;Doostření - Poloměr rozmazání
HISTORY_MSG_SHARPENING_CONTRAST;Doostření - Práh kontrastu
HISTORY_MSG_SH_COLORSPACE;S/S - Barevný prostor
HISTORY_MSG_SOFTLIGHT_ENABLED;Měkké světlo
@@ -918,6 +921,7 @@ MAIN_FRAME_FILEBROWSER;Prohlížeč souborů
MAIN_FRAME_FILEBROWSER_TOOLTIP;Prohlížeč souborů.\nZkratka: Ctrl-F2
MAIN_FRAME_PLACES;Místa
MAIN_FRAME_PLACES_ADD;Přidat
+MAIN_FRAME_PLACES_DEL;Smazat
MAIN_FRAME_QUEUE;Fronta
MAIN_FRAME_QUEUE_TOOLTIP;Fronta zpracování.\nZkratka: Ctrl-F3
MAIN_FRAME_RECENT;Poslední složky
@@ -946,6 +950,8 @@ MAIN_TAB_EXIF;Exif
MAIN_TAB_EXPORT; Rychlý export
MAIN_TAB_EXPOSURE;Expozice
MAIN_TAB_EXPOSURE_TOOLTIP;Zkratka: Alt-e
+MAIN_TAB_FAVORITES;Oblíbené
+MAIN_TAB_FAVORITES_TOOLTIP;Zkratka: Alt-u
MAIN_TAB_FILTER; Filtr
MAIN_TAB_INSPECT; Prohlížení
MAIN_TAB_IPTC;IPTC
@@ -1093,6 +1099,12 @@ PREFERENCES_CACHECLEAR_SAFETY;Jsou smazány pouze soubory ve vyrovnávací pamě
PREFERENCES_CACHEMAXENTRIES;Maximální počet záznamů v mezipaměti
PREFERENCES_CACHEOPTS;Vlastnosti mezipaměti
PREFERENCES_CACHETHUMBHEIGHT;Maximální výška náhledu
+PREFERENCES_CHUNKSIZES;Dlaždic na vlákno
+PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE demozajkování
+PREFERENCES_CHUNKSIZE_RAW_CA;Raw korekce CA
+PREFERENCES_CHUNKSIZE_RAW_RCD;RCD demozajkování
+PREFERENCES_CHUNKSIZE_RAW_XT;Xtrans demozajkování
+PREFERENCES_CHUNKSIZE_RGB;RGB zpracování
PREFERENCES_CLIPPINGIND;Indikace oříznutí
PREFERENCES_CLUTSCACHE;Mezipaměť HaldCLUT
PREFERENCES_CLUTSCACHE_LABEL;Maximální počet přednačtených CLUTů
@@ -1180,6 +1192,8 @@ PREFERENCES_PARSEDEXTADDHINT;Vymazat označenou příponu ze seznamu.
PREFERENCES_PARSEDEXTDELHINT;Vymazat označenou příponu ze seznamu.
PREFERENCES_PARSEDEXTDOWNHINT;Vybranou příponu posunout na seznamu níže.
PREFERENCES_PARSEDEXTUPHINT;Vybranou příponu posunout na seznamu výše.
+PREFERENCES_PERFORMANCE_MEASURE;Měřit
+PREFERENCES_PERFORMANCE_MEASURE_HINT;Vypisovat časy zpracování v konzoli
PREFERENCES_PERFORMANCE_THREADS;Vlákna
PREFERENCES_PERFORMANCE_THREADS_LABEL;Maximální počet vláken pro Redukci šumu a Úrovně vlnky (0 = Automaticky)
PREFERENCES_PREVDEMO;Metoda demozajkování náhledu
@@ -1254,6 +1268,11 @@ PROFILEPANEL_TOOLTIPCOPY;Kopírovat současný profil do schránky.\nCtrl-kli
PROFILEPANEL_TOOLTIPLOAD;Nahrát profil ze souboru.\nCtrl-klik umožní vybrat parametry pro nahrání.
PROFILEPANEL_TOOLTIPPASTE;Vložit profil ze schránky.\nCtrl-klik umožní vybrat parametry pro vložení.
PROFILEPANEL_TOOLTIPSAVE;Uložit současný profil.\nCtrl-klik umožní vybrat parametry pro uložení.
+PROGRESSBAR_DECODING;Dekodování...
+PROGRESSBAR_GREENEQUIL;Vyrovnání zelené...
+PROGRESSBAR_HLREC;Rekonstrukce světel...
+PROGRESSBAR_HOTDEADPIXELFILTER;Filtr vypálených/mrtvých pixelů...
+PROGRESSBAR_LINEDENOISE;Filtr linkového rušení...
PROGRESSBAR_LOADING;Načítání obrázku...
PROGRESSBAR_LOADINGTHUMBS;Načítání náhledů...
PROGRESSBAR_LOADJPEG;Načítání JPEG...
@@ -1262,6 +1281,7 @@ PROGRESSBAR_LOADTIFF;Načítání TIFF...
PROGRESSBAR_NOIMAGES;Složka neobsahuje obrázky
PROGRESSBAR_PROCESSING;Zpracovávaní obrázku...
PROGRESSBAR_PROCESSING_PROFILESAVED;Profil zpracování uložen
+PROGRESSBAR_RAWCACORR;RAW korekce chromatické aberace...
PROGRESSBAR_READY;Připraven
PROGRESSBAR_SAVEJPEG;Ukládání JPEG souboru...
PROGRESSBAR_SAVEPNG;Ukládání PNG souboru...
@@ -1279,7 +1299,8 @@ QUEUE_DESTFILENAME;Cesta a název souboru
QUEUE_FORMAT_TITLE;Formát souboru
QUEUE_LOCATION_FOLDER;Ulož do souboru
QUEUE_LOCATION_TEMPLATE;Použít šablonu
-QUEUE_LOCATION_TEMPLATE_TOOLTIP;Lze použít následující formátovací řetězce:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nTyto formátovací řetězce reprezentují různé části cesty k uložené fotografii, některé vlastnosti fotografie nebo pořadí v dávce.\n\nNapříklad pokud má zpracovávaná fotografie následující cestu:\n/home/tomas/fotky/2010-10-31/dsc0042.nef,\nmají jednotlivé formátovací řetězce tento význam:\n%d4 = home\n%d3 = tomas\n%d2 = fotky\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tomas/fotky/2010-10-31/\n%p2 = /home/tomas/fotky/\n%p3 = /home/tomas/\n%p4 = /home/\n\n%r bude nahrazeno hodnocením fotografie. Pokud není fotografie ohodnocena, bude %r nahrazeno '0'. Pokud je fotografie v koši, bude %r nahrazeno 'x'.\n\n%s1, %s2, atd. bude nahrazeno pořadím v dávce doplněném na 1 až 9 číslic. Každé spuštění zpracování fronty jej vždy nastaví na jedna a po každé zpracované fotografii se o jedna zvýší .\n\nPokud si přejete uložit výstupní obrázek vedle originálu, napište:\n%p1/%f\n\nPokud si jej ale přejete uložit do adresáře "zpracovano" ve stejném adresáři jako otevřený obrázek, napište:\n%p1/zpracovano/%f\n\nPro uložení výstupního obrázku do adresáře\n"/home/tom/fotky/zpracovano/2010-10-31", napište:\n%p2/zpracovano/%d1/%f
+QUEUE_LOCATION_TEMPLATE_TOOLTIP;Specifikujte kam se mají uložit výstupy. Lze použít umístění zdrojových souborů, pořadí, stav koše nebo pozice ve frontě.\n\nNapříklad pokud má zpracovávaná fotografie následující cestu:\n/home/tomas/fotky/2010-10-31/dsc0042.nef,\nmají jednotlivé formátovací řetězce tento význam:\n%d4 = home\n%d3 = tomas\n%d2 = fotky\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tomas/fotky/2010-10-31/\n%p2 = /home/tomas/fotky/\n%p3 = /home/tomas/\n%p4 = /home/\n\n%r bude nahrazeno hodnocením fotografie.Pokud není fotografie ohodnocena, bude %r nahrazeno '0'.Pokud je fotografie v koši, bude %r nahrazeno 'x'.\n\nPokud si přejete uložit výstupní obrázek vedle originálu, napište:\n%p1/%f\n\nPokud si jej ale přejete uložit do adresáře "converted" ve stejném adresáři jako otevřený obrázek, napište:\n%p1/converted/%f\n\nPro uložení výstupního obrázku do adresáře"/home/tom/photos/converted/2010-10-31", napište:\n%p2/converted/%d1/%f
+QUEUE_LOCATION_TITLE;Výstupní umístění
QUEUE_STARTSTOP_TOOLTIP;Spustit nebo zastavit zpracování obrázků ve frontě.\n\nZkratka: Ctrl+s
SAMPLEFORMAT_0;Neznámý datový formát
SAMPLEFORMAT_1;8-bitový neznaménkový
@@ -1316,7 +1337,7 @@ THRESHOLDSELECTOR_HINT;Držte klávesu Shift pro přesun individuálních
THRESHOLDSELECTOR_T;Nahoře
THRESHOLDSELECTOR_TL;Nahoře vlevo
THRESHOLDSELECTOR_TR;Nahoře vpravo
-TOOLBAR_TOOLTIP_COLORPICKER;Uzamykatelný Průzkumník barev\n\nPokud je nástroj aktivní:\n- Přidání sondy: levý-klik.\n- Posunutí sondy: levý-klik a posunutí.\n- Smazání sondy: pravý-klik.\n- Smazání všech sond: shift+pravý-klik.\n- Návrat k nástroji posunu: pravý-klik.
+TOOLBAR_TOOLTIP_COLORPICKER;Uzamykatelný Průzkumník barev\n\nPokud je nástroj aktivní:\n- Přidání sondy: levý-klik.\n- Posunutí sondy: levý-klik a posunutí.\n- Smazání sondy: pravý-klik.\n- Smazání všech sond: Ctrl+Shift+pravý-klik.\n- Návrat k nástroji posunu: pravý-klik mimo průzkumníky.
TOOLBAR_TOOLTIP_CROP;Oříznutí výběru.\nZkratka: c\nVýřez posunete pomocí Shift + tažení myši
TOOLBAR_TOOLTIP_HAND;Posun.\nZkratka: h
TOOLBAR_TOOLTIP_STRAIGHTEN;Vyznačení roviny / rotace.\nZkratka: s\n\nZobrazení míry rotace pomocí vodící linky na náhledu snímky. Úhel rotace je zobrazen vedle vodící linky. Střed rotace je geometrický střed snímku.
@@ -1533,6 +1554,7 @@ TP_CROP_GTTRIANGLE2;Zlaté trojúhelníky 2
TP_CROP_GUIDETYPE;Druh vodítek:
TP_CROP_H;Výška
TP_CROP_LABEL;Ořez
+TP_CROP_PPI;PPI
TP_CROP_RESETCROP;Obnovit
TP_CROP_SELECTCROP;Vybrat
TP_CROP_W;Šířka
@@ -1773,10 +1795,15 @@ TP_LABCURVE_RSTPRO_TOOLTIP;Pracuje s posuvníkem barevnosti a CC křivkou.
TP_LENSGEOM_AUTOCROP;Automatický ořez
TP_LENSGEOM_FILL;Automatické vyplnění
TP_LENSGEOM_LABEL;Objektiv / Geometrie
+TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automaticky vybráno
TP_LENSPROFILE_CORRECTION_LCPFILE;LCP soubor
+TP_LENSPROFILE_CORRECTION_MANUAL;Ručně vybráno
TP_LENSPROFILE_LABEL;Korekční profily objektivů
TP_LENSPROFILE_LENS_WARNING;Varování: crop factor použitý pro profilování objektivu je větší než crop factor fotoaparátu. Výsledek může být nesprávný.
+TP_LENSPROFILE_MODE_HEADER;Profil objektivu
TP_LENSPROFILE_USE_CA;Chromatická aberace
+TP_LENSPROFILE_USE_GEOMETRIC;Geometrické zkreslení
+TP_LENSPROFILE_USE_HEADER;Opravit
TP_LENSPROFILE_USE_VIGNETTING;Vinětace
TP_LOCALCONTRAST_AMOUNT;Míra
TP_LOCALCONTRAST_DARKNESS;Úroveň tmavé
@@ -1861,7 +1888,8 @@ TP_RAW_HD_TOOLTIP;Nižší hodnoty učiní detekci vypálených/mrtvých bodů a
TP_RAW_HPHD;HPHD
TP_RAW_IGV;IGV
TP_RAW_IMAGENUM;Dílčí snímek
-TP_RAW_IMAGENUM_TOOLTIP;Některé raw snímky obsahují několik podsnímků (Pentax/Sony Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nV případě, že je pro demozajkování použita jiná metoda než Pixel Shift, tato volba určí, který podsnímek se použije.\n\nPokud je použita Pixel Shift metoda demozajkování na Pixel Shift raw soubory, budou použity všechny podsnímky a tato volba určí, který snímek bude použit pro pohyblivé části.
+TP_RAW_IMAGENUM_SN;Režim SN
+TP_RAW_IMAGENUM_TOOLTIP;Některé raw snímky obsahují několik podsnímků (Pentax/Sony Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel, Fuji EXR).\n\nV případě, že je pro demozajkování použita jiná metoda než Pixel Shift, tato volba určí, který podsnímek se použije.\n\nPokud je použita Pixel Shift metoda demozajkování na Pixel Shift raw soubory, budou použity všechny podsnímky a tato volba určí, který snímek bude použit pro pohyblivé části.
TP_RAW_LABEL;Demozajkování
TP_RAW_LMMSE;LMMSE
TP_RAW_LMMSEITERATIONS;Kroky rozšíření LMMSE
@@ -1901,6 +1929,8 @@ TP_RAW_SENSOR_BAYER_LABEL;Snímač s Bayerovou maskou
TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;Tří průchodová dává lepší výsledky (doporučeno pro fotky s nízkým ISO).\nJednoprůchodová je téměř k nerozeznání od tří průchodové pro vysoké ISO a je rychlejší.\n+rychlá vytváří méně artefaktů v plochých oblastech
TP_RAW_SENSOR_XTRANS_LABEL;Senzory s X-Trans maticí
TP_RAW_VNG4;VNG4
+TP_RAW_XTRANS;X-Trans
+TP_RAW_XTRANSFAST;Fast X-Trans
TP_RESIZE_ALLOW_UPSCALING;Povolit zvětšení
TP_RESIZE_APPLIESTO;Aplikovat na:
TP_RESIZE_CROPPEDAREA;Oblast ořezu
@@ -2017,6 +2047,7 @@ TP_SHARPENEDGE_LABEL;Hrany
TP_SHARPENEDGE_PASSES;Počet průchodů
TP_SHARPENEDGE_THREE;Pouze jas
TP_SHARPENING_AMOUNT;Míra
+TP_SHARPENING_BLUR;Poloměr rozostření
TP_SHARPENING_CONTRAST;Práh kontrastu
TP_SHARPENING_EDRADIUS;Poloměr
TP_SHARPENING_EDTOLERANCE;Tolerance k hranám
@@ -2287,37 +2318,4 @@ ZOOMPANEL_ZOOMFITSCREEN;Přizpůsobit celý obrázek obrazovce\nZkratka: Alt<
ZOOMPANEL_ZOOMIN;Přiblížit\nZkratka: +
ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: -
-!!!!!!!!!!!!!!!!!!!!!!!!!
-! Untranslated keys follow; remove the ! prefix after an entry is translated.
-!!!!!!!!!!!!!!!!!!!!!!!!!
-
-!FILEBROWSER_BROWSEPATHBUTTONHINT;Click to open specified path, reload folder and apply "find" keywords.
-!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
-!MAIN_FRAME_PLACES_DEL;Remove
-!MAIN_TAB_FAVORITES;Favorites
-!MAIN_TAB_FAVORITES_TOOLTIP;Shortcut: Alt-u
-!PREFERENCES_CHUNKSIZES;Tiles per thread
-!PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE demosaic
-!PREFERENCES_CHUNKSIZE_RAW_CA;Raw CA correction
-!PREFERENCES_CHUNKSIZE_RAW_RCD;RCD demosaic
-!PREFERENCES_CHUNKSIZE_RAW_XT;Xtrans demosaic
-!PREFERENCES_CHUNKSIZE_RGB;RGB processing
-!PREFERENCES_PERFORMANCE_MEASURE;Measure
-!PREFERENCES_PERFORMANCE_MEASURE_HINT;Logs processing times in console
-!PROGRESSBAR_DECODING;Decoding...
-!PROGRESSBAR_GREENEQUIL;Green equilibration...
-!PROGRESSBAR_HLREC;Highlight reconstruction...
-!PROGRESSBAR_HOTDEADPIXELFILTER;Hot/dead pixel filter...
-!PROGRESSBAR_LINEDENOISE;Line noise filter...
-!PROGRESSBAR_RAWCACORR;Raw CA correction...
-!QUEUE_LOCATION_TITLE;Output Location
-!TP_CROP_PPI;PPI
-!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
-!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
-!TP_LENSPROFILE_MODE_HEADER;Lens Profile
-!TP_LENSPROFILE_USE_GEOMETRIC;Geometric distortion
-!TP_LENSPROFILE_USE_HEADER;Correct
-!TP_RAW_IMAGENUM_SN;SN mode
-!TP_RAW_XTRANS;X-Trans
-!TP_RAW_XTRANSFAST;Fast X-Trans
-!TP_SHARPENING_BLUR;Blur radius
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
\ No newline at end of file
diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch
index db136f330..2398c1bb6 100644
--- a/rtdata/languages/Deutsch
+++ b/rtdata/languages/Deutsch
@@ -79,6 +79,7 @@
#78 19.01.2019 Erweiterung (TooWaBoo) RT 5.5
#79 24.02.2019 Erweiterung (TooWaBoo) RT 5.5
#80 25.03.2019 Erweiterung (TooWaBoo) RT 5.6
+#81 15.04.2019 Erweiterung (TooWaBoo) RT 5.6
ABOUT_TAB_BUILD;Version
ABOUT_TAB_CREDITS;Danksagungen
@@ -1118,6 +1119,7 @@ PREFERENCES_APPEARANCE_COLORPICKERFONT;Schriftart Farbwähler
PREFERENCES_APPEARANCE_CROPMASKCOLOR;Farbe/Transparenz für Schnittmaske
PREFERENCES_APPEARANCE_MAINFONT;Schriftart:
PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Farbe der Navigationshilfe
+PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI-Modus
PREFERENCES_APPEARANCE_THEME;Oberflächendesign
PREFERENCES_APPLNEXTSTARTUP;erfordert Neustart
PREFERENCES_AUTOMONPROFILE;Automatisch das für den aktuellen Monitor festgelegte Profil verwenden
@@ -1337,6 +1339,7 @@ QUEUE_FORMAT_TITLE;Dateiformat
QUEUE_LOCATION_FOLDER;In dieses Verzeichnis speichern
QUEUE_LOCATION_TEMPLATE;Dynamisches Verzeichnis verwenden
QUEUE_LOCATION_TEMPLATE_TOOLTIP;Die folgenden Variablen können verwendet werden:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nDiese Variablen beinhalten bestimmte Teile des Verzeichnispfades, in welchem sich das Bild befindet, oder Attribute des Bildes.\n\nWenn zum Beispiel /home/tom/photos/2010-10-31/dsc0042.nef geöffnet wurde, dann haben die Variablen den folgenden Inhalt:\n%d4 = home\n%d3 = tom\n%d2 = photos\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tom/photos/2010-10-31\n%p2 = /home/tom/photos\n%p3 = /home/tom\n%p4 = /home\n\nWenn Sie die Ausgabedatei in dasselbe Verzeichnis wie das Originalbild speichern wollen, dann wählen Sie:\n%p1/%f\n\nWenn Sie die Ausgabedatei in ein Unterverzeichnis mit dem Namen "converted" schreiben wollen, dann wählen Sie:\n%p1/converted/%f\n\nWenn Sie die Ausgabedatei im Verzeichnispfad "/home/tom/photos/converted" speichern wollen, dort jedoch in einem mit dem Namen des Ursprungsverzeichnisses betitelten Unterverzeichnis, dann wählen Sie:\n%p2/converted/%d1/%f\n\nDie Variable %r enthält die Bewertung des Bildes.
+QUEUE_LOCATION_TITLE;Ausgabeverzeichnis
QUEUE_STARTSTOP_TOOLTIP;Startet / Stoppt die Verarbeitung\nder Warteschlange.\n\nTaste: Strg + s
SAMPLEFORMAT_0;Unbekanntes Datenformat
SAMPLEFORMAT_1;8 Bit ohne Vorzeichen
@@ -2355,8 +2358,3 @@ ZOOMPANEL_ZOOMFITSCREEN;An Bildschirm anpassen.\nTaste: Alt + f
ZOOMPANEL_ZOOMIN;Hineinzoomen\nTaste: +
ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: -
-!!!!!!!!!!!!!!!!!!!!!!!!!
-! Untranslated keys follow; remove the ! prefix after an entry is translated.
-!!!!!!!!!!!!!!!!!!!!!!!!!
-
-!QUEUE_LOCATION_TITLE;Output Location
diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK)
index ac4b15e3d..45493ac97 100644
--- a/rtdata/languages/English (UK)
+++ b/rtdata/languages/English (UK)
@@ -1115,6 +1115,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!PREFERENCES_ADD;Add
!PREFERENCES_APPEARANCE;Appearance
!PREFERENCES_APPEARANCE_MAINFONT;Main font
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_APPEARANCE_THEME;Theme
!PREFERENCES_APPLNEXTSTARTUP;restart required
!PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit
diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US)
index 10ad1f740..4d510c4b5 100644
--- a/rtdata/languages/English (US)
+++ b/rtdata/languages/English (US)
@@ -1040,6 +1040,7 @@
!PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color
!PREFERENCES_APPEARANCE_MAINFONT;Main font
!PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Navigator guide color
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_APPEARANCE_THEME;Theme
!PREFERENCES_APPLNEXTSTARTUP;restart required
!PREFERENCES_AUTOMONPROFILE;Use operating system's main monitor color profile
diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol
index 9ffbb0323..dfb4d8acc 100644
--- a/rtdata/languages/Espanol
+++ b/rtdata/languages/Espanol
@@ -2324,6 +2324,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nTecla de Atajo: -
!MAIN_FRAME_PLACES_DEL;Remove
!MAIN_TAB_FAVORITES;Favorites
!MAIN_TAB_FAVORITES_TOOLTIP;Shortcut: Alt-u
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_CHUNKSIZES;Tiles per thread
!PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE demosaic
!PREFERENCES_CHUNKSIZE_RAW_CA;Raw CA correction
diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais
index 36ffa2afa..2036a2ce3 100644
--- a/rtdata/languages/Francais
+++ b/rtdata/languages/Francais
@@ -1036,6 +1036,7 @@ PREFERENCES_APPEARANCE_COLORPICKERFONT;Police des ancres de vérification couleu
PREFERENCES_APPEARANCE_CROPMASKCOLOR;Couleur du masque de recadrage
PREFERENCES_APPEARANCE_MAINFONT;Police principale
PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Couleur du cadre dans le Navigateur
+PREFERENCES_APPEARANCE_PSEUDOHIDPI;Mode pseudo-HiDPI
PREFERENCES_APPEARANCE_THEME;Thème
PREFERENCES_APPLNEXTSTARTUP;appliqué au prochain lancement
PREFERENCES_AUTOMONPROFILE;Utiliser automatiquement le profil de l'écran principal
diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano
index cece7e78b..3c5a0201a 100644
--- a/rtdata/languages/Italiano
+++ b/rtdata/languages/Italiano
@@ -1671,6 +1671,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: -
!PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font
!PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color
!PREFERENCES_APPEARANCE_MAINFONT;Main font
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_APPEARANCE_THEME;Theme
!PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit
!PREFERENCES_CACHECLEAR;Clear
diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese
index 2e5e103bf..96b509789 100644
--- a/rtdata/languages/Japanese
+++ b/rtdata/languages/Japanese
@@ -2311,4 +2311,5 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: -
! Untranslated keys follow; remove the ! prefix after an entry is translated.
!!!!!!!!!!!!!!!!!!!!!!!!!
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!QUEUE_LOCATION_TITLE;Output Location
diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar
index 692c02c83..8c77b48a5 100644
--- a/rtdata/languages/Magyar
+++ b/rtdata/languages/Magyar
@@ -1409,6 +1409,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés -
!PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color
!PREFERENCES_APPEARANCE_MAINFONT;Main font
!PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Navigator guide color
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_APPEARANCE_THEME;Theme
!PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit
!PREFERENCES_BEHADDALL;All to 'Add'
diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands
index 3ac4d8d6c..5cf76e569 100644
--- a/rtdata/languages/Nederlands
+++ b/rtdata/languages/Nederlands
@@ -2129,6 +2129,7 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: -
!PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font
!PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color
!PREFERENCES_APPEARANCE_MAINFONT;Main font
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_APPEARANCE_THEME;Theme
!PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit
!PREFERENCES_CACHECLEAR;Clear
diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish
index 75453e6e7..1e60f840b 100644
--- a/rtdata/languages/Polish
+++ b/rtdata/languages/Polish
@@ -1748,6 +1748,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: -
!PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font
!PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color
!PREFERENCES_APPEARANCE_MAINFONT;Main font
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_APPEARANCE_THEME;Theme
!PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit
!PREFERENCES_CACHECLEAR;Clear
diff --git a/rtdata/languages/Portugues b/rtdata/languages/Portugues
index 57b2758a7..912687542 100644
--- a/rtdata/languages/Portugues
+++ b/rtdata/languages/Portugues
@@ -2264,6 +2264,7 @@ ZOOMPANEL_ZOOMOUT;Afastar\nAtalho: -
!FILEBROWSER_BROWSEPATHBUTTONHINT;Click to open specified path, reload folder and apply "find" keywords.
!MAIN_FRAME_PLACES_DEL;Remove
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PROGRESSBAR_DECODING;Decoding...
!PROGRESSBAR_GREENEQUIL;Green equilibration...
!PROGRESSBAR_HLREC;Highlight reconstruction...
diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil)
index 8e6dbd45d..0493dfc6a 100644
--- a/rtdata/languages/Portugues (Brasil)
+++ b/rtdata/languages/Portugues (Brasil)
@@ -2258,6 +2258,7 @@ ZOOMPANEL_ZOOMOUT;Menos Zoom\nAtalho: -
!HISTORY_MSG_COLORTONING_LABREGION_OFFSET;CT - region offset
!HISTORY_MSG_COLORTONING_LABREGION_POWER;CT - region power
!MAIN_FRAME_PLACES_DEL;Remove
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_CACHECLEAR_SAFETY;Only files in the cache are cleared. Processing profiles stored alongside the source images are not touched.
!PROGRESSBAR_DECODING;Decoding...
!PROGRESSBAR_GREENEQUIL;Green equilibration...
diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian
index 62c3d797d..1da4584f3 100644
--- a/rtdata/languages/Russian
+++ b/rtdata/languages/Russian
@@ -1784,6 +1784,7 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: -
!PARTIALPASTE_RAW_IMAGENUM;Sub-image
!PARTIALPASTE_RAW_PIXELSHIFT;Pixel Shift
!PARTIALPASTE_RETINEX;Retinex
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_CACHECLEAR_ALL;Clear all cached files:
!PREFERENCES_CACHECLEAR_ALLBUTPROFILES;Clear all cached files except for cached processing profiles:
!PREFERENCES_CACHECLEAR_ONLYPROFILES;Clear only cached processing profiles:
diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters)
index 066169b04..484d4f20b 100644
--- a/rtdata/languages/Serbian (Cyrilic Characters)
+++ b/rtdata/languages/Serbian (Cyrilic Characters)
@@ -1657,6 +1657,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике -
!PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color
!PREFERENCES_APPEARANCE_MAINFONT;Main font
!PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Navigator guide color
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_APPEARANCE_THEME;Theme
!PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit
!PREFERENCES_CACHECLEAR;Clear
diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish
index aa6fcb340..8394d306b 100644
--- a/rtdata/languages/Swedish
+++ b/rtdata/languages/Swedish
@@ -1986,6 +1986,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: -
!PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font
!PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color
!PREFERENCES_APPEARANCE_MAINFONT;Main font
+!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_APPEARANCE_THEME;Theme
!PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit
!PREFERENCES_CACHECLEAR;Clear
diff --git a/rtdata/languages/default b/rtdata/languages/default
index e783c41b7..a9e8ee8d2 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -740,28 +740,28 @@ HISTORY_MSG_489;DRC - Detail
HISTORY_MSG_490;DRC - Amount
HISTORY_MSG_491;White Balance
HISTORY_MSG_492;RGB Curves
-HISTORY_MSG_493;L*a*b* Adjustments
-HISTORY_MSG_495;L*a*b Spot created
-HISTORY_MSG_496;L*a*b Spot deleted
-HISTORY_MSG_497;L*a*b Spot selected
-HISTORY_MSG_498;L*a*b Spot name
-HISTORY_MSG_499;L*a*b Spot visibility
-HISTORY_MSG_500;L*a*b Spot shape
-HISTORY_MSG_501;L*a*b Spot method
-HISTORY_MSG_502;L*a*b Spot shape method
-HISTORY_MSG_503;L*a*b Spot locX
-HISTORY_MSG_504;L*a*b Spot locXL
-HISTORY_MSG_505;L*a*b Spot locY
-HISTORY_MSG_506;L*a*b Spot locYT
-HISTORY_MSG_507;L*a*b Spot center
-HISTORY_MSG_508;L*a*b Spot circrad
-HISTORY_MSG_509;L*a*b Spot quality method
-HISTORY_MSG_510;L*a*b Spot transition
-HISTORY_MSG_511;L*a*b Spot thresh
-HISTORY_MSG_512;L*a*b Spot deltaE-weakening
-HISTORY_MSG_513;L*a*b Spot scope
-HISTORY_MSG_514;L*a*b Spot structure
-HISTORY_MSG_515;Local L*a*b*
+HISTORY_MSG_493;Local Adjustments
+HISTORY_MSG_495;Local Spot created
+HISTORY_MSG_496;Local Spot deleted
+HISTORY_MSG_497;Local Spot selected
+HISTORY_MSG_498;Local Spot name
+HISTORY_MSG_499;Local Spot visibility
+HISTORY_MSG_500;Local Spot shape
+HISTORY_MSG_501;Local Spot method
+HISTORY_MSG_502;Local Spot shape method
+HISTORY_MSG_503;Local Spot locX
+HISTORY_MSG_504;Local Spot locXL
+HISTORY_MSG_505;Local Spot locY
+HISTORY_MSG_506;Local Spot locYT
+HISTORY_MSG_507;Local Spot center
+HISTORY_MSG_508;Local Spot circrad
+HISTORY_MSG_509;Local Spot quality method
+HISTORY_MSG_510;Local Spot transition
+HISTORY_MSG_511;Local Spot thresh
+HISTORY_MSG_512;Local Spot deltaE-weakening
+HISTORY_MSG_513;Local Spot scope
+HISTORY_MSG_514;Local Spot structure
+HISTORY_MSG_515;Local Adjustements
HISTORY_MSG_516;Local - Color and light
HISTORY_MSG_517;Local - Enable super
HISTORY_MSG_518;Local - Lightness
@@ -903,11 +903,22 @@ HISTORY_MSG_655;Local - SH mask slope
HISTORY_MSG_656;Local - Color soft radius
HISTORY_MSG_657;Local - Retinex soft radius
HISTORY_MSG_658;Local - CBDL soft radius
-HISTORY_MSG_659;L*a*b Spot transition-weakening
+HISTORY_MSG_659;Local Spot transition-weakening
HISTORY_MSG_660;Local - cbdl clarity
HISTORY_MSG_661;Local - cbdl contrast residual
HISTORY_MSG_662;Local - deNoise lum f 0
HISTORY_MSG_663;Local - deNoise lum f 2
+HISTORY_MSG_664;Local - cbdl Blur
+HISTORY_MSG_665;Local - cbdl mask Blend
+HISTORY_MSG_666;Local - cbdl mask radius
+HISTORY_MSG_667;Local - cbdl mask chroma
+HISTORY_MSG_668;Local - cbdl mask gamma
+HISTORY_MSG_669;Local - cbdl mask slope
+HISTORY_MSG_670;Local - cbdl mask C
+HISTORY_MSG_671;Local - cbdl mask L
+HISTORY_MSG_672;Local - cbdl mask CL
+HISTORY_MSG_673;Local - Use cbdl mask
+HISTORY_MSG_675;Local - TM soft radius
HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@@ -1140,7 +1151,7 @@ NAVIGATOR_XY_NA;x: --, y: --
OPTIONS_BUNDLED_MISSING;The bundled profile "%1" could not be found!\n\nYour installation could be damaged.\n\nDefault internal values will be used instead.
OPTIONS_DEFIMG_MISSING;The default profile for non-raw photos could not be found or is not set.\n\nPlease check your profiles' directory, it may be missing or damaged.\n\n"%1" will be used instead.
OPTIONS_DEFRAW_MISSING;The default profile for raw photos could not be found or is not set.\n\nPlease check your profiles' directory, it may be missing or damaged.\n\n"%1" will be used instead.
-PARTIALPASTE_LOCALLABGROUP;Local L*a*b Settings
+PARTIALPASTE_LOCALLABGROUP;Local Adjustements Settings
PARTIALPASTE_ADVANCEDGROUP;Advanced Settings
PARTIALPASTE_BASICGROUP;Basic Settings
PARTIALPASTE_CACORRECTION;Chromatic aberration correction
@@ -1180,7 +1191,7 @@ PARTIALPASTE_IMPULSEDENOISE;Impulse noise reduction
PARTIALPASTE_IPTCINFO;IPTC
PARTIALPASTE_LABCURVE;L*a*b* adjustments
PARTIALPASTE_LENSGROUP;Lens Related Settings
-PARTIALPASTE_LOCALLAB;Local L*a*b*
+PARTIALPASTE_LOCALLAB;Local Adjustements
PARTIALPASTE_LOCGROUP;Local
PARTIALPASTE_LENSPROFILE;Profiled lens correction
PARTIALPASTE_LOCALCONTRAST;Local contrast
@@ -1227,6 +1238,7 @@ PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font
PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color
PREFERENCES_APPEARANCE_MAINFONT;Main font
PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Navigator guide color
+PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
PREFERENCES_APPEARANCE_THEME;Theme
PREFERENCES_APPLNEXTSTARTUP;restart required
PREFERENCES_AUTOMONPROFILE;Use operating system's main monitor color profile
@@ -1965,6 +1977,7 @@ TP_LOCALLAB_BLUFR;Blur & Noise
TP_LOCALLAB_BLURDE;Blur Shape detection
TP_LOCALLAB_BLNORM;Normal
TP_LOCALLAB_BLINV;Inverse
+TP_LOCALLAB_BLURCBDL;Blur levels
TP_LOCALLAB_BLSYM;Symmetric
TP_LOCALLAB_CENTER_X;Center X
TP_LOCALLAB_CENTER_Y;Center Y
@@ -2036,7 +2049,7 @@ TP_LOCALLAB_REWEI;Reweighting iterates
TP_LOCALLAB_INDSL;Independent (mouse + sliders)
TP_LOCALLAB_IND;Independent (mouse)
TP_LOCALLAB_INVERS;Inverse
-TP_LOCALLAB_LABEL;Local L*a*b*
+TP_LOCALLAB_LABEL;Local Adjustements
TP_LOCALLAB_STD;Standard
TP_LOCALLAB_ENH;Enhanced
TP_LOCALLAB_ENHDEN;Enhanced + chroma denoise
diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css
index 32efbb41f..45dec6e39 100644
--- a/rtdata/themes/RawTherapee-GTK3-20_.css
+++ b/rtdata/themes/RawTherapee-GTK3-20_.css
@@ -1225,11 +1225,12 @@ dialog frame > label:not(.dummy) {
border-top-width: 0.083333333333333333em;
}
#Navigator {
- padding-top: 0.75em;
+ padding-top: 0.25em;
padding-bottom: 0.25em;
}
#Navigator label {
padding: 0;
+ margin: 0.083333333333333333em 0;
}
/*** PartialPaste ******************************************************************************/
diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css
index a3214b45c..7b5089430 100644
--- a/rtdata/themes/TooWaBlue-GTK3-20_.css
+++ b/rtdata/themes/TooWaBlue-GTK3-20_.css
@@ -2,7 +2,7 @@
This file is part of RawTherapee.
Copyright (c) 2016-2019 TooWaBoo
- Version 3.05
+ Version 3.08
RawTherapee is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -163,7 +163,7 @@ undershoot {
label {
padding: 0.083333333333333333em 0;
- margin: 0.19em;
+ margin: 0.125em 0.166666666666666666em;
min-height: 1.333333333333333333em;
}
@@ -274,13 +274,13 @@ textview:selected, treeview:selected {
margin-top: 0.25em;
}
#RightNotebook #HistoryPanel {
- margin-top: 0.333333333333333333em;
+ margin-top: 0.416666666666666666em;
}
#HistoryPanel > border {
margin-top: 1.75em;
}
#HistoryPanel > label {
- margin: 0 0 -1.5em 0;
+ margin: 0 0 -1.416666666666666666em 0;
padding: 0 0 0 0.083333333333333333em;
}
@@ -325,6 +325,7 @@ fontchooser scrolledwindow,
}
#Navigator label {
padding: 0;
+ margin: 0.083333333333333333em 0 0;
}
/*** end ***************************************************************************************/
@@ -692,7 +693,7 @@ scrollbar:not(.overlay-indicator):hover {
/*** Scale**************************************************************************************/
scale {
padding: 0;
- min-height: 1.833333333333333333em;
+ min-height: 1.833333333333333333em;
margin: 0 -0.333333333333333333em;
}
@@ -727,7 +728,7 @@ scale.color trough {
}
scale trough highlight {
- background-color: transparent;
+ background-color: @accent-color2;
background-image: linear-gradient(to bottom, shade (@accent-color2,1.22), shade(@accent-color2,.88));
border: 0.083333333333333333em solid shade(@bg-dark-grey,0.9);
margin: 0 -0.583333333333333333em;
@@ -779,7 +780,7 @@ progressbar trough {
}
progressbar trough progress {
- background-color: transparent;
+ background-color: @accent-color2;
border-radius: 0.416666666666666666em;
border: 0.083333333333333333em solid @bg-button-border;
}
@@ -816,6 +817,7 @@ progressbar.vertical trough.empty {
progressbar trough.empty progress {
border-color: transparent;
background-image: none;
+ background-color:transparent;
box-shadow: none;
}
@@ -1341,7 +1343,7 @@ button,
#BeforeAfterContainer button {
min-height: 1.666666666666666666em;
min-width: 1.666666666666666666em;/*x*/
- margin: 0.19em;
+ margin: 0.125em;
border-radius: 0.2em;
border: 0.083333333333333333em solid @bg-button-border;
background-color: transparent;
@@ -1414,7 +1416,7 @@ combobox entry.combo + button.combo {
}
#WB-Size-Helper {
min-width: 3.5em;
- margin: 0.19em;
+ margin: 0.125em;
}
combobox arrow {
@@ -1536,9 +1538,9 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) {
#RightNotebook > stack > scrolledwindow:last-child button.image-button, /* Fast Export */
#MetaPanelNotebook scrolledwindow + grid > button,
#MetaPanelNotebook scrolledwindow + grid + grid > button {
- min-height: 2.5em;
- min-width: 2.5em;
- margin: 0 0.19em;
+ min-height: 2.333333333333333333em;
+ min-width: 2.333333333333333333em;
+ margin: 0 0.125em;
}
#ToolBarPanelFileBrowser > button:first-child,
#EditorTopPanel > button:first-child,
@@ -1558,43 +1560,45 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) {
#MyExpander button.independent.toggle:not(.image-button):not(.text-button):first-child:only-child, /* Graduated filter button */
#MetaPanelNotebook scrolledwindow + grid > button,
#MetaPanelNotebook scrolledwindow + grid + grid > button {
- margin: 0.19em;
+ margin: 0.125em;
}
#EditorTopPanel button.narrowbutton {
+ min-width: 0;
+ padding: 0 0.13em;
+}
+
+#EditorTopPanel button.narrowbutton image{
min-width: 0.833333333333333333em;
- padding: 0 0.166666666666666666em;
}
/* Image close button */
#MainNotebook > header tab #CloseButton {
- padding: 0;
- margin: 0.333333333333333333em 0 0.416666666666666666em 0.19em;
- min-width: 1.5em;
+ padding: 0.166666666666666666em;
+ margin: 0.333333333333333333em 0 0.5em 0.19em;
+ min-width: 0;
min-height: 0;
}
-#MainNotebook > header tab #CloseButton image{
- min-width: 1.333333333333333333em;
- min-height: 1.333333333333333333em;
-}
/* Filter buttons*/
#ToolBarPanelFileBrowser .smallbuttonbox {
- min-height: 1.333333333333333333em;
+ min-height: 1.166666666666666666em;
padding: 0;
margin: 0;
}
#ToolBarPanelFileBrowser .smallbuttonbox:nth-child(2) {
- margin: 0.083333333333333333em 0 -0.166666666666666666em;
+ margin-top: 0.166666666666666666em;
+ margin-bottom: -0.166666666666666666em;
}
#ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton image {
- margin: -0.19em;
- min-width: 1.333333333333333333em;
- min-height: 1.333333333333333333em;
+ margin: -1em;
+ padding: 0;
+ min-width: 0;
+ min-height: 0;
}
#ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton {
min-height: 0;
- min-width: 1.333333333333333333em;
+ min-width: 1.166666666666666666em;
padding: 0;
margin: 0 0.25em;
border: none;
@@ -1806,7 +1810,7 @@ popover button.text-button:active {
checkbutton,
radiobutton {
padding: 0.083333333333333333em 0;
- margin: 0.19em;
+ margin: 0.125em;
min-height: 1.666666666666666666em;/*x*/
}
@@ -1847,10 +1851,10 @@ frame > checkbutton check{
#PartialPaste checkbutton {
padding: 0;
- margin: 0.19em 0 0 0.583333333333333333em;
+ margin: 0 0 0 0.583333333333333333em;
}
#PartialPaste checkbutton:not(#PartialPasteHeader) {
- margin: 0 0 0 1.166666666666666666em;
+ margin: 0 0 0 1.125em;
}
/*** end ***************************************************************************************/
@@ -1859,7 +1863,7 @@ frame > checkbutton check{
#MyExpander entry,
entry,
spinbutton {
- margin: 0.19em;
+ margin: 0.125em;
padding: 0 0.333333333333333333em;
min-height: 1.666666666666666666em;/*x*/
min-width: 0;
@@ -1891,7 +1895,7 @@ spinbutton {
}
#MyExpander spinbutton {
- margin: 0.19em;
+ margin: 0.125em;
padding: 0;
min-height: 1.333333333333333333em;
min-width: 0;
@@ -1904,12 +1908,12 @@ spinbutton {
}
/* Needed for Reset & and Auto button height*/
#MyExpander button + label + spinbutton {
- margin-top: 0.333333333333333333em;
- margin-bottom: 0.333333333333333333em;
+ margin-top: 0.25em;
+ margin-bottom: 0.25em;
}
#MyExpander checkbutton + label + spinbutton {
- margin-top: 0.416666666666666666em;
- margin-bottom: 0.416666666666666666em;
+ margin-top: 0.333333333333333333em;
+ margin-bottom: 0.333333333333333333em;
}
/**/
diff --git a/rtdata/themes/size.css b/rtdata/themes/size.css
index 86d2eaea5..e3a22f337 100644
--- a/rtdata/themes/size.css
+++ b/rtdata/themes/size.css
@@ -297,7 +297,7 @@ window.csd:not(.fullscreen) #MainNotebook > header.top {
#MyExpander image {
min-width: 1.333333333333333333em;
min-height: 0;
- margin: -0.083333333333333333em 0.19em;
+ margin: -0.083333333333333333em 0.125em;
}
#MyExpander .drawingarea:not(.slider) {
@@ -456,7 +456,7 @@ button,
#BeforeAfterContainer button {
min-height: 1.666666666666666666em;
min-width: 1.666666666666666666em;/*x*/
- margin: 0.19em;
+ margin: 0.125em;
border-radius: 0.2em;
border-width: 0.083333333333333333em;
}
@@ -482,7 +482,7 @@ combobox entry.combo + button.combo {
}
#WB-Size-Helper {
min-width: 3.5em;
- margin: 0.19em;
+ margin: 0.125em;
}
combobox arrow {
@@ -570,7 +570,7 @@ colorchooser colorswatch#add-color-button:first-child {
button.font label{
min-height: 0;
min-width: 0;
- margin: 0 0.19em;
+ margin: 0 0.125em;
}
/* Save, Cancel, OK ... buttons */
@@ -603,9 +603,9 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) {
#RightNotebook > stack > scrolledwindow:last-child button.image-button, /* Fast Export */
#MetaPanelNotebook scrolledwindow + grid > button,
#MetaPanelNotebook scrolledwindow + grid + grid > button {
- min-height: 2.5em;
- min-width: 2.5em;
- margin: 0 0.19em;
+ min-height: 2.333333333333333333em;
+ min-width: 2.333333333333333333em;
+ margin: 0 0.125em;
}
#ToolBarPanelFileBrowser > button:first-child,
#EditorTopPanel > button:first-child,
@@ -625,12 +625,12 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) {
#MyExpander button.independent.toggle:not(.image-button):not(.text-button):first-child:only-child, /* Graduated filter button */
#MetaPanelNotebook scrolledwindow + grid > button,
#MetaPanelNotebook scrolledwindow + grid + grid > button {
- margin: 0.19em;
+ margin: 0.125em;
}
#EditorTopPanel button.narrowbutton {
min-width: 0.833333333333333333em;
- padding: 0 0.166666666666666666em;
+ padding: 0 0.13em;
}
/* Image close button */
@@ -647,23 +647,25 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) {
/* Filter buttons*/
#ToolBarPanelFileBrowser .smallbuttonbox {
- min-height: 1.333333333333333333em;
+ min-height: 1.166666666666666666em;
padding: 0;
margin: 0;
}
#ToolBarPanelFileBrowser .smallbuttonbox:nth-child(2) {
- margin: 0.083333333333333333em 0 -0.166666666666666666em;
+ margin-top: 0.166666666666666666em;
+ margin-bottom: -0.166666666666666666em;
}
#ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton image {
- margin: -0.19em;
- min-width: 1.333333333333333333em;
- min-height: 1.333333333333333333em;
+ margin: -1em 0;
+ padding: 0;
+ min-width: 0;
+ min-height: 0;
}
#ToolBarPanelFileBrowser .smallbuttonbox button.smallbutton {
min-height: 0;
- min-width: 1.333333333333333333em;
+ min-width: 1.166666666666666666em;
padding: 0;
- margin: 0 0.25em;
+ margin: 0 0.166666666666666666em;
border: none;
border-radius: 0;
}
@@ -686,7 +688,7 @@ messagedialog .dialog-action-area button:not(:only-child):nth-child(2) {
#MyExpander .image-combo button.Left {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
- min-width: 2.5em;
+ min-width: 2.333333333333333333em;
margin-right: 0;
}
#MyExpander .image-combo button.Left {
@@ -820,7 +822,7 @@ button.text-button {
checkbutton,
radiobutton {
padding: 0.083333333333333333em 0;
- margin: 0.19em;
+ margin: 0.125em;
min-height: 1.666666666666666666em;/*x*/
}
@@ -852,7 +854,7 @@ frame > checkbutton check{
#PartialPaste checkbutton {
padding: 0;
- margin: 0.19em 0 0 0.583333333333333333em;
+ margin: 0.125em 0 0 0.583333333333333333em;
}
#PartialPaste checkbutton:not(#PartialPasteHeader) {
margin: 0 0 0 1.166666666666666666em;
@@ -864,7 +866,7 @@ frame > checkbutton check{
#MyExpander entry,
entry,
spinbutton {
- margin: 0.19em;
+ margin: 0.125em;
padding: 0 0.333333333333333333em;
min-height: 1.666666666666666666em;/*x*/
min-width: 0;
@@ -894,7 +896,7 @@ spinbutton {
}
#MyExpander spinbutton {
- margin: 0.19em;
+ margin: 0.125em;
padding: 0;
min-height: 1.333333333333333333em;
min-width: 0;
diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc
index 6ae17a24e..445c6d290 100644
--- a/rtengine/FTblockDN.cc
+++ b/rtengine/FTblockDN.cc
@@ -42,6 +42,7 @@
#ifdef _OPENMP
#include
#endif
+//#define BENCHMARK
#include "StopWatch.h"
#define TS 64 // Tile size
@@ -839,6 +840,12 @@ BENCHFUN
{static_cast(wprof[2][0]), static_cast(wprof[2][1]), static_cast(wprof[2][2])}
};
+ const float wpfast[3][3] = {
+ {static_cast(wprof[0][0]) / Color::D50x, static_cast(wprof[0][1]) / Color::D50x, static_cast(wprof[0][2]) / Color::D50x},
+ {static_cast(wprof[1][0]), static_cast(wprof[1][1]), static_cast(wprof[1][2])},
+ {static_cast(wprof[2][0]) / Color::D50z, static_cast(wprof[2][1]) / Color::D50z, static_cast(wprof[2][2]) / Color::D50z}
+ };
+
// begin tile processing of image
#ifdef _OPENMP
#pragma omp parallel num_threads(numthreads) if (numthreads>1)
@@ -925,51 +932,38 @@ BENCHFUN
if (!denoiseMethodRgb) { //lab mode
//modification Jacques feb 2013 and july 2014
#ifdef _OPENMP
- #pragma omp parallel for num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1)
+ #pragma omp parallel for schedule(dynamic,16) num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1)
#endif
for (int i = tiletop; i < tilebottom; ++i) {
- int i1 = i - tiletop;
+ const int i1 = i - tiletop;
for (int j = tileleft; j < tileright; ++j) {
- int j1 = j - tileleft;
- float R_ = gain * src->r(i, j);
- float G_ = gain * src->g(i, j);
- float B_ = gain * src->b(i, j);
+ const int j1 = j - tileleft;
- R_ = Color::denoiseIGammaTab[R_];
- G_ = Color::denoiseIGammaTab[G_];
- B_ = Color::denoiseIGammaTab[B_];
+ const float R_ = Color::denoiseIGammaTab[gain * src->r(i, j)];
+ const float G_ = Color::denoiseIGammaTab[gain * src->g(i, j)];
+ const float B_ = Color::denoiseIGammaTab[gain * src->b(i, j)];
//apply gamma noise standard (slider)
- R_ = R_ < 65535.f ? gamcurve[R_] : (Color::gammanf(R_ / 65535.f, gam) * 32768.f);
- G_ = G_ < 65535.f ? gamcurve[G_] : (Color::gammanf(G_ / 65535.f, gam) * 32768.f);
- B_ = B_ < 65535.f ? gamcurve[B_] : (Color::gammanf(B_ / 65535.f, gam) * 32768.f);
-
- //true conversion xyz=>Lab
- float X, Y, Z;
- Color::rgbxyz(R_, G_, B_, X, Y, Z, wp);
-
- //convert to Lab
- float L, a, b;
- Color::XYZ2Lab(X, Y, Z, L, a, b);
-
- labdn->L[i1][j1] = L;
- labdn->a[i1][j1] = a;
- labdn->b[i1][j1] = b;
+ labdn->L[i1][j1] = R_ < 65535.f ? gamcurve[R_] : Color::gammanf(R_ / 65535.f, gam) * 32768.f;
+ labdn->a[i1][j1] = G_ < 65535.f ? gamcurve[G_] : Color::gammanf(G_ / 65535.f, gam) * 32768.f;
+ labdn->b[i1][j1] = B_ < 65535.f ? gamcurve[B_] : Color::gammanf(B_ / 65535.f, gam) * 32768.f;
if (((i1 | j1) & 1) == 0) {
if (numTries == 1) {
- noisevarlum[(i1 >> 1)*width2 + (j1 >> 1)] = useNoiseLCurve ? lumcalc[i >> 1][j >> 1] : noisevarL;
- noisevarchrom[(i1 >> 1)*width2 + (j1 >> 1)] = useNoiseCCurve ? maxNoiseVarab * ccalc[i >> 1][j >> 1] : 1.f;
+ noisevarlum[(i1 >> 1) * width2 + (j1 >> 1)] = useNoiseLCurve ? lumcalc[i >> 1][j >> 1] : noisevarL;
+ noisevarchrom[(i1 >> 1) * width2 + (j1 >> 1)] = useNoiseCCurve ? maxNoiseVarab * ccalc[i >> 1][j >> 1] : 1.f;
} else {
- noisevarlum[(i1 >> 1)*width2 + (j1 >> 1)] = lumcalc[i >> 1][j >> 1];
- noisevarchrom[(i1 >> 1)*width2 + (j1 >> 1)] = ccalc[i >> 1][j >> 1];
+ noisevarlum[(i1 >> 1) * width2 + (j1 >> 1)] = lumcalc[i >> 1][j >> 1];
+ noisevarchrom[(i1 >> 1) * width2 + (j1 >> 1)] = ccalc[i >> 1][j >> 1];
}
}
//end chroma
}
+ //true conversion xyz=>Lab
+ Color::RGB2Lab(labdn->L[i1], labdn->a[i1], labdn->b[i1], labdn->L[i1], labdn->a[i1], labdn->b[i1], wpfast, width);
}
} else {//RGB mode
#ifdef _OPENMP
@@ -1606,27 +1600,13 @@ BENCHFUN
for (int i = tiletop; i < tilebottom; ++i) {
int i1 = i - tiletop;
-
+ //true conversion Lab==>xyz
+ Color::Lab2RGBLimit(labdn->L[i1], labdn->a[i1], labdn->b[i1], labdn->L[i1], labdn->a[i1], labdn->b[i1], wip, 9000000.f, 1.f + qhighFactor * realred, 1.f + qhighFactor * realblue, width);
for (int j = tileleft; j < tileright; ++j) {
int j1 = j - tileleft;
- //modification Jacques feb 2013
- //true conversion Lab==>xyz
- float L = labdn->L[i1][j1];
- float a = labdn->a[i1][j1];
- float b = labdn->b[i1][j1];
- float c_h = SQR(a) + SQR(b);
-
- if (c_h > 9000000.f) {
- a *= 1.f + qhighFactor * realred;
- b *= 1.f + qhighFactor * realblue;
- }
-
- //convert XYZ
- float X, Y, Z;
- Color::Lab2XYZ(L, a, b, X, Y, Z);
- //apply inverse gamma noise
- float r_, g_, b_;
- Color::xyz2rgb(X, Y, Z, r_, g_, b_, wip);
+ float r_ = labdn->L[i1][j1];
+ float g_ = labdn->a[i1][j1];
+ float b_ = labdn->b[i1][j1];
//inverse gamma standard (slider)
r_ = r_ < 32768.f ? igamcurve[r_] : (Color::gammanf(r_ / 32768.f, igam) * 65535.f);
g_ = g_ < 32768.f ? igamcurve[g_] : (Color::gammanf(g_ / 32768.f, igam) * 65535.f);
@@ -2132,52 +2112,7 @@ void ImProcFunctions::RGBoutput_tile_row(float *bloxrow_L, float ** Ldetail, flo
#undef epsilon
*/
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-float ImProcFunctions::MadMax(float * DataList, int & max, int datalen)
-{
-
- //computes Median Absolute Deviation and Maximum of DataList
- //DataList values should mostly have abs val < 65535
-
- int * histo = new int[65536];
-
- //memset(histo, 0, 65536*sizeof(histo));
- for (int i = 0; i < 65536; ++i) {
- histo[i] = 0;
- }
-
- //calculate histogram of absolute values of HH wavelet coeffs
- for (int i = 0; i < datalen; ++i) {
- histo[MAX(0, MIN(65535, abs((int)DataList[i])))]++;
- }
-
- //find median of histogram
- int median = 0, count = 0;
-
- while (count < datalen / 2) {
- count += histo[median];
- ++median;
- }
-
- //find max of histogram
- max = 65535;
-
- while (histo[max] == 0) {
- max--;
- }
-
- int count_ = count - histo[median - 1];
-
- delete[] histo;
-
- // interpolate
- return (((median - 1) + (datalen / 2 - count_) / (static_cast(count - count_))) / 0.6745);
-
-}
-
-float ImProcFunctions::Mad(float * DataList, const int datalen)
+float ImProcFunctions::Mad(const float * DataList, const int datalen)
{
if (datalen <= 1) { // Avoid possible buffer underrun
return 0;
@@ -2189,7 +2124,7 @@ float ImProcFunctions::Mad(float * DataList, const int datalen)
//calculate histogram of absolute values of wavelet coeffs
for (int i = 0; i < datalen; ++i) {
- histo[min(255, abs(static_cast(DataList[i])))]++;
+ histo[static_cast(rtengine::min(255.f, fabsf(DataList[i])))]++;
}
//find median of histogram
@@ -2206,7 +2141,7 @@ float ImProcFunctions::Mad(float * DataList, const int datalen)
return (((median - 1) + (datalen / 2 - count_) / (static_cast(count - count_))) / 0.6745);
}
-float ImProcFunctions::MadRgb(float * DataList, const int datalen)
+float ImProcFunctions::MadRgb(const float * DataList, const int datalen)
{
if (datalen <= 1) { // Avoid possible buffer underrun
return 0;
@@ -2221,10 +2156,8 @@ float ImProcFunctions::MadRgb(float * DataList, const int datalen)
}
//calculate histogram of absolute values of wavelet coeffs
- int i;
-
- for (i = 0; i < datalen; ++i) {
- histo[min(65535, abs(static_cast(DataList[i])))]++;
+ for (int i = 0; i < datalen; ++i) {
+ histo[static_cast(rtengine::min(65535.f, fabsf(DataList[i])))]++;
}
//find median of histogram
@@ -2244,27 +2177,23 @@ float ImProcFunctions::MadRgb(float * DataList, const int datalen)
-void ImProcFunctions::Noise_residualAB(wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb)
+void ImProcFunctions::Noise_residualAB(const wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb)
{
- int maxlvl = WaveletCoeffs_ab.maxlevel();
+
float resid = 0.f;
- float madC;
float maxresid = 0.f;
- for (int lvl = 0; lvl < maxlvl; ++lvl) {
+#ifdef _OPENMP
+ #pragma omp parallel for schedule(dynamic) collapse(2) reduction(+:resid) reduction(max:maxresid) num_threads(denoiseNestedLevels) if (denoiseNestedLevels>1)
+#endif
+ for (int lvl = 0; lvl < WaveletCoeffs_ab.maxlevel(); ++lvl) {
// compute median absolute deviation (MAD) of detail coefficients as robust noise estimator
-
- int Wlvl_ab = WaveletCoeffs_ab.level_W(lvl);
- int Hlvl_ab = WaveletCoeffs_ab.level_H(lvl);
-
- float ** WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl);
-
for (int dir = 1; dir < 4; ++dir) {
- if (denoiseMethodRgb) {
- madC = SQR(MadRgb(WavCoeffs_ab[dir], Wlvl_ab * Hlvl_ab));
- } else {
- madC = SQR(Mad(WavCoeffs_ab[dir], Wlvl_ab * Hlvl_ab));
- }
+ const int Wlvl_ab = WaveletCoeffs_ab.level_W(lvl);
+ const int Hlvl_ab = WaveletCoeffs_ab.level_H(lvl);
+
+ float ** WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl);
+ const float madC = SQR(denoiseMethodRgb ? MadRgb(WavCoeffs_ab[dir], Wlvl_ab * Hlvl_ab) : Mad(WavCoeffs_ab[dir], Wlvl_ab * Hlvl_ab));
resid += madC;
@@ -2742,7 +2671,7 @@ bool ImProcFunctions::WaveletDenoiseAllAB(wavelet_decomposition &WaveletCoeffs_L
if (!memoryAllocationFailed) {
#ifdef _OPENMP
- #pragma omp for schedule(dynamic) collapse(2)
+ #pragma omp for schedule(dynamic) collapse(2) nowait
#endif
for (int lvl = 0; lvl < maxlvl; ++lvl) {
diff --git a/rtengine/color.cc b/rtengine/color.cc
index a0e7b06d8..d7d26dc42 100644
--- a/rtengine/color.cc
+++ b/rtengine/color.cc
@@ -1809,10 +1809,10 @@ void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b,
{
#ifdef __SSE2__
- vfloat minvalfv = F2V(0.f);
- vfloat maxvalfv = F2V(MAXVALF);
- vfloat c500v = F2V(500.f);
- vfloat c200v = F2V(200.f);
+ const vfloat minvalfv = ZEROV;
+ const vfloat maxvalfv = F2V(MAXVALF);
+ const vfloat c500v = F2V(500.f);
+ const vfloat c200v = F2V(200.f);
#endif
int i = 0;
@@ -1826,9 +1826,7 @@ void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b,
const vfloat yv = F2V(wp[1][0]) * rv + F2V(wp[1][1]) * gv + F2V(wp[1][2]) * bv;
const vfloat zv = F2V(wp[2][0]) * rv + F2V(wp[2][1]) * gv + F2V(wp[2][2]) * bv;
- vmask maxMask = vmaskf_gt(vmaxf(xv, vmaxf(yv, zv)), maxvalfv);
- vmask minMask = vmaskf_lt(vminf(xv, vminf(yv, zv)), minvalfv);
- if (_mm_movemask_ps((vfloat)maxMask) || _mm_movemask_ps((vfloat)minMask)) {
+ if (_mm_movemask_ps((vfloat)vorm(vmaskf_gt(vmaxf(xv, vmaxf(yv, zv)), maxvalfv), vmaskf_lt(vminf(xv, vminf(yv, zv)), minvalfv)))) {
// take slower code path for all 4 pixels if one of the values is > MAXVALF. Still faster than non SSE2 version
for (int k = 0; k < 4; ++k) {
float x = xv[k];
@@ -1913,6 +1911,51 @@ void Color::RGB2L(float *R, float *G, float *B, float *L, const float wp[3][3],
}
}
+void Color::Lab2RGBLimit(float *L, float *a, float *b, float *R, float *G, float *B, const float wp[3][3], float limit, float afactor, float bfactor, int width)
+{
+
+ int i = 0;
+
+#ifdef __SSE2__
+ const vfloat wpv[3][3] = {
+ {F2V(wp[0][0]), F2V(wp[0][1]), F2V(wp[0][2])},
+ {F2V(wp[1][0]), F2V(wp[1][1]), F2V(wp[1][2])},
+ {F2V(wp[2][0]), F2V(wp[2][1]), F2V(wp[2][2])}
+ };
+ const vfloat limitv = F2V(limit);
+ const vfloat afactorv = F2V(afactor);
+ const vfloat bfactorv = F2V(bfactor);
+
+ for(;i < width - 3; i+=4) {
+ const vfloat Lv = LVFU(L[i]);
+ vfloat av = LVFU(a[i]);
+ vfloat bv = LVFU(b[i]);
+
+ const vmask mask = vmaskf_gt(SQRV(av) + SQRV(bv), limitv);
+ av = vself(mask, av * afactorv, av);
+ bv = vself(mask, bv * bfactorv, bv);
+ vfloat Xv, Yv, Zv;
+ Lab2XYZ(Lv, av, bv, Xv, Yv, Zv);
+ vfloat Rv, Gv, Bv;
+ xyz2rgb(Xv, Yv, Zv, Rv, Gv, Bv, wpv);
+ STVFU(R[i], Rv);
+ STVFU(G[i], Gv);
+ STVFU(B[i], Bv);
+ }
+#endif
+ for(;i < width; ++i) {
+ float X, Y, Z;
+ float av = a[i];
+ float bv = b[i];
+ if (SQR(av) + SQR(bv) > limit) {
+ av *= afactor;
+ bv *= bfactor;
+ }
+ Lab2XYZ(L[i], av, bv, X, Y, Z);
+ xyz2rgb(X, Y, Z, R[i], G[i], B[i], wp);
+ }
+}
+
void Color::XYZ2Lab(float X, float Y, float Z, float &L, float &a, float &b)
{
diff --git a/rtengine/color.h b/rtengine/color.h
index 2487b3a5b..7e36dd7aa 100644
--- a/rtengine/color.h
+++ b/rtengine/color.h
@@ -620,6 +620,7 @@ public:
*/
static void XYZ2Lab(float x, float y, float z, float &L, float &a, float &b);
static void RGB2Lab(float *X, float *Y, float *Z, float *L, float *a, float *b, const float wp[3][3], int width);
+ static void Lab2RGBLimit(float *L, float *a, float *b, float *R, float *G, float *B, const float wp[3][3], float limit, float afactor, float bfactor, int width);
static void RGB2L(float *X, float *Y, float *Z, float *L, const float wp[3][3], int width);
/**
@@ -844,7 +845,7 @@ public:
* @param go green channel of output color [0 ; 65535] (return value)
* @param bo blue channel of output color [0 ; 65535] (return value)
*/
- static void interpolateRGBColor(const float balance, const float r1, const float g1, const float b1, const float r2, const float g2, const float b2, int channels, const double xyz_rgb[3][3], const double rgb_xyz[3][3], float &ro, float &go, float &bo);
+ static void interpolateRGBColor (float balance, float r1, float g1, float b1, float r2, float g2, float b2, int channels, const double xyz_rgb[3][3], const double rgb_xyz[3][3], float &ro, float &go, float &bo);
/**
* @brief Interpolate 2 colors from their respective red/green/blue channels, with a balance factor
@@ -874,7 +875,7 @@ public:
* @param go green channel of output color [0 ; 65535] (return value)
* @param bo blue channel of output color [0 ; 65535] (return value)
*/
- static void interpolateRGBColor(float realL, float iplow, float iphigh, int algm, const float balance, int twoc, int metchrom, float chromat, float luma, const float r1, const float g1, const float b1, const float xl, const float yl, const float zl, const float x2, const float y2, const float z2, const double xyz_rgb[3][3], const double rgb_xyz[3][3], float &ro, float &go, float &bo);
+ static void interpolateRGBColor (float realL, float iplow, float iphigh, int algm, float balance, int twoc, int metchrom, float chromat, float luma, float r1, float g1, float b1, float xl, float yl, float zl, float x2, float y2, float z2, const double xyz_rgb[3][3], const double rgb_xyz[3][3], float &ro, float &go, float &bo);
/**
@@ -1438,15 +1439,15 @@ public:
* @param moreRGB (Debug target only) to calculate iterations for values >65535
*/
#ifdef _DEBUG
- static void gamutLchonly(float HH, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef, bool &neg, bool &more_rgb);
- static void gamutLchonly(float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef, bool &neg, bool &more_rgb);
- static void gamutLchonly(float2 sincosval, float &Lprov1, float &Chprov1, const float wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef, bool &neg, bool &more_rgb);
+ static void gamutLchonly (float HH, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef, bool &neg, bool &more_rgb);
+ static void gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef, bool &neg, bool &more_rgb);
+ static void gamutLchonly (float2 sincosval, float &Lprov1, float &Chprov1, const float wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef, bool &neg, bool &more_rgb);
#else
- static void gamutLchonly(float HH, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef);
- static void gamutLchonly(float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef);
- static void gamutLchonly(float2 sincosval, float &Lprov1, float &Chprov1, const float wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef);
+ static void gamutLchonly (float HH, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef);
+ static void gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &R, float &G, float &B, const double wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef);
+ static void gamutLchonly (float2 sincosval, float &Lprov1, float &Chprov1, const float wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef);
#endif
- static void gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &saturation, const float wip[3][3], const bool isHLEnabled, const float lowerCoef, const float higherCoef);
+ static void gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chprov1, float &saturation, const float wip[3][3], bool isHLEnabled, float lowerCoef, float higherCoef);
/**
@@ -1470,7 +1471,7 @@ public:
* @param wip matrix for working profile
* @param multiThread whether to parallelize the loop or not
*/
- static void LabGamutMunsell(float *labL, float *laba, float *labb, const int N, bool corMunsell, bool lumaMuns, bool isHLEnabled, bool gamut, const double wip[3][3]);
+ static void LabGamutMunsell (float *labL, float *laba, float *labb, int N, bool corMunsell, bool lumaMuns, bool isHLEnabled, bool gamut, const double wip[3][3]);
/*
@@ -1506,8 +1507,8 @@ public:
// -------------------------------- end Munsell
- static void scalered(const float rstprotection, const float param, const float limit, const float HH, const float deltaHH, float &scale, float &scaleext);
- static void transitred(const float HH, const float Chprov1, const float dred, const float factorskin, const float protect_red, const float factorskinext, const float deltaHH, const float factorsat, float &factor);
+ static void scalered ( float rstprotection, float param, float limit, float HH, float deltaHH, float &scale, float &scaleext);
+ static void transitred (float HH, float Chprov1, float dred, float factorskin, float protect_red, float factorskinext, float deltaHH, float factorsat, float &factor);
static void skinred(double J, double h, double sres, double Sp, float dred, float protect_red, int sk, float rstprotection, float ko, double &s);
static void skinredfloat(float J, float h, float sres, float Sp, float dred, float protect_red, int sk, float rstprotection, float ko, float &s);
// static void scaleredcdbl ( float skinprot, float param, float limit, float HH, float deltaHH, float &scale,float &scaleext);
diff --git a/rtengine/curves.cc b/rtengine/curves.cc
index c9b549896..aa54a307f 100644
--- a/rtengine/curves.cc
+++ b/rtengine/curves.cc
@@ -1563,6 +1563,146 @@ void LocretigainCurverab::Set(const std::vector &curvePoints)
}
}
+LocHHmaskcbCurve::LocHHmaskcbCurve() : sum(0.f) {};
+
+void LocHHmaskcbCurve::Reset()
+{
+ lutLocHHmaskcbCurve.reset();
+ sum = 0.f;
+}
+
+
+void LocHHmaskcbCurve::Set(const Curve &pCurve)
+{
+ if (pCurve.isIdentity()) {
+ Reset(); // raise this value if the quality suffers from this number of samples
+ return;
+ }
+
+ lutLocHHmaskcbCurve(501); // raise this value if the quality suffers from this number of samples
+ sum = 0.f;
+
+ for (int i = 0; i < 501; i++) {
+ lutLocHHmaskcbCurve[i] = pCurve.getVal(double (i) / 500.);
+
+ if (lutLocHHmaskcbCurve[i] < 0.02f) {
+ lutLocHHmaskcbCurve[i] = 0.02f;
+ }
+
+ sum += lutLocHHmaskcbCurve[i];
+ }
+
+ //lutLocHHCurve.dump("wav");
+}
+
+void LocHHmaskcbCurve::Set(const std::vector &curvePoints, bool & lhmascbutili)
+{
+ // if (HHutili && !curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) {
+ if (!curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) {
+ FlatCurve ttcurve(curvePoints, false, CURVES_MIN_POLY_POINTS / 2);
+ ttcurve.setIdentityValue(0.);
+ lhmascbutili = true;
+ Set(ttcurve);
+ } else {
+ Reset();
+ }
+}
+
+LocLLmaskcbCurve::LocLLmaskcbCurve() : sum(0.f) {};
+
+void LocLLmaskcbCurve::Reset()
+{
+ lutLocLLmaskcbCurve.reset();
+ sum = 0.f;
+}
+
+void LocLLmaskcbCurve::Set(const Curve &pCurve)
+{
+ if (pCurve.isIdentity()) {
+ Reset(); // raise this value if the quality suffers from this number of samples
+ return;
+ }
+
+ lutLocLLmaskcbCurve(501); // raise this value if the quality suffers from this number of samples
+ sum = 0.f;
+
+ for (int i = 0; i < 501; i++) {
+ lutLocLLmaskcbCurve[i] = pCurve.getVal(double (i) / 500.);
+
+ if (lutLocLLmaskcbCurve[i] < 0.02f) {
+ lutLocLLmaskcbCurve[i] = 0.02f; //avoid 0.f for wavelet : under 0.01f quasi no action for each value
+ }
+
+ sum += lutLocLLmaskcbCurve[i];
+ }
+
+ //lutLocHHCurve.dump("wav");
+}
+
+
+
+void LocLLmaskcbCurve::Set(const std::vector &curvePoints, bool & llmascbutili)
+{
+ // if (HHutili && !curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) {
+ if (!curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) {
+ FlatCurve ttcurve(curvePoints, false, CURVES_MIN_POLY_POINTS / 2);
+ ttcurve.setIdentityValue(0.);
+ llmascbutili = true;
+ Set(ttcurve);
+ } else {
+ Reset();
+ }
+}
+
+LocCCmaskcbCurve::LocCCmaskcbCurve() : sum(0.f) {};
+
+void LocCCmaskcbCurve::Reset()
+{
+ lutLocCCmaskcbCurve.reset();
+ sum = 0.f;
+}
+
+void LocCCmaskcbCurve::Set(const Curve &pCurve)
+{
+ if (pCurve.isIdentity()) {
+ Reset(); // raise this value if the quality suffers from this number of samples
+ return;
+ }
+
+ lutLocCCmaskcbCurve(501); // raise this value if the quality suffers from this number of samples
+ sum = 0.f;
+
+ for (int i = 0; i < 501; i++) {
+ lutLocCCmaskcbCurve[i] = pCurve.getVal(double (i) / 500.);
+
+ if (lutLocCCmaskcbCurve[i] < 0.02f) {
+ lutLocCCmaskcbCurve[i] = 0.02f; //avoid 0.f for wavelet : under 0.01f quasi no action for each value
+ }
+
+ sum += lutLocCCmaskcbCurve[i];
+ }
+
+ //lutLocHHCurve.dump("wav");
+}
+
+
+
+void LocCCmaskcbCurve::Set(const std::vector &curvePoints, bool & lcmascbutili)
+{
+ // if (HHutili && !curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) {
+ if (!curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) {
+ FlatCurve ttcurve(curvePoints, false, CURVES_MIN_POLY_POINTS / 2);
+ ttcurve.setIdentityValue(0.);
+ lcmascbutili = true;
+ Set(ttcurve);
+ } else {
+ Reset();
+ }
+}
+
+
+
+
LocHHmaskSHCurve::LocHHmaskSHCurve() : sum(0.f) {};
void LocHHmaskSHCurve::Reset()
diff --git a/rtengine/curves.h b/rtengine/curves.h
index a1f2321d1..fda8adcd6 100644
--- a/rtengine/curves.h
+++ b/rtengine/curves.h
@@ -647,6 +647,94 @@ public:
}
};
+class LocHHmaskcbCurve
+{
+private:
+ LUTf lutLocHHmaskcbCurve; // 0xffff range
+ void Set(const Curve &pCurve);
+
+public:
+ float sum;
+
+ virtual ~LocHHmaskcbCurve() {};
+ LocHHmaskcbCurve();
+ void Reset();
+ void Set(const std::vector &curvePoints, bool & lhmascbutili);
+ float getSum() const
+ {
+ return sum;
+ }
+
+ float operator[](float index) const
+ {
+ return lutLocHHmaskcbCurve[index];
+ }
+ operator bool (void) const
+ {
+ return lutLocHHmaskcbCurve;
+ }
+};
+
+
+class LocCCmaskcbCurve
+{
+private:
+ LUTf lutLocCCmaskcbCurve; // 0xffff range
+ void Set(const Curve &pCurve);
+
+public:
+ float sum;
+
+ virtual ~LocCCmaskcbCurve() {};
+ LocCCmaskcbCurve();
+ void Reset();
+ void Set(const std::vector &curvePoints, bool & lcmascbutili);
+ float getSum() const
+ {
+ return sum;
+ }
+
+ float operator[](float index) const
+ {
+ return lutLocCCmaskcbCurve[index];
+ }
+ operator bool (void) const
+ {
+ return lutLocCCmaskcbCurve;
+ }
+};
+
+class LocLLmaskcbCurve
+{
+private:
+ LUTf lutLocLLmaskcbCurve; // 0xffff range
+ void Set(const Curve &pCurve);
+
+public:
+ float sum;
+
+ virtual ~LocLLmaskcbCurve() {};
+ LocLLmaskcbCurve();
+ void Reset();
+ void Set(const std::vector &curvePoints, bool & llmascbutili);
+ float getSum() const
+ {
+ return sum;
+ }
+
+ float operator[](float index) const
+ {
+ return lutLocLLmaskcbCurve[index];
+ }
+ operator bool (void) const
+ {
+ return lutLocLLmaskcbCurve;
+ }
+};
+
+
+
+
class LocHHmaskexpCurve
{
private:
diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc
index 56eda0159..400353153 100644
--- a/rtengine/dcrop.cc
+++ b/rtengine/dcrop.cc
@@ -904,6 +904,9 @@ void Crop::update(int todo)
bool lhmasSHutili = parent->lhmasSHutili;
bool lcmasSHutili = parent->lcmasSHutili;
bool llmasSHutili = parent->llmasSHutili;
+ bool lhmascbutili = parent->lhmascbutili;
+ bool lcmascbutili = parent->lcmascbutili;
+ bool llmascbutili = parent->llmascbutili;
float avg = parent->avg;
LUTu dummy;
@@ -920,6 +923,9 @@ void Crop::update(int todo)
LocCCmaskSHCurve locccmasSHCurve;
LocLLmaskSHCurve locllmasSHCurve;
LocHHmaskSHCurve lochhmasSHCurve;
+ LocCCmaskcbCurve locccmascbCurve;
+ LocLLmaskcbCurve locllmascbCurve;
+ LocHHmaskcbCurve lochhmascbCurve;
LocretigainCurverab locRETgainCurverab;
locallutili = false;
@@ -942,6 +948,9 @@ void Crop::update(int todo)
locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve, lcmasSHutili);
locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve, llmasSHutili);
lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve, lhmasSHutili);
+ locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve, lcmascbutili);
+ locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve, llmascbutili);
+ lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve, lhmascbutili);
locallutili = false;
CurveFactory::curveLocal(locallutili, params.locallab.spots.at(sp).llcurve, lllocalcurve2, sca);
localcutili = false;
@@ -973,12 +982,14 @@ void Crop::update(int todo)
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,locallutili,
loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
- LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, parent->locallColorMask, parent->locallExpMask, parent->locallSHMask);
+ locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
+ LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, parent->locallColorMask, parent->locallExpMask, parent->locallSHMask, parent->locallcbMask);
} else {
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,locallutili,
loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
- LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0);
+ locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
+ LHutili, HHutili, cclocalcurve2, localcutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0, 0);
}
lllocalcurve2.clear();
cclocalcurve2.clear();
@@ -995,6 +1006,12 @@ void Crop::update(int todo)
locllmasexpCurve.Reset();
locccmasexpCurve.Reset();
lochhmasexpCurve.Reset();
+ locllmasSHCurve.Reset();
+ locccmasSHCurve.Reset();
+ lochhmasSHCurve.Reset();
+ locllmascbCurve.Reset();
+ locccmascbCurve.Reset();
+ lochhmascbCurve.Reset();
if (skip <= 2) {
usleep(settings->cropsleep); //wait to avoid crash when crop 100% and move window
diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc
index 9ca8f0f69..0d13ad2e4 100644
--- a/rtengine/dirpyr_equalizer.cc
+++ b/rtengine/dirpyr_equalizer.cc
@@ -24,10 +24,12 @@
#include "array2D.h"
#include "rt_math.h"
#include "opthelper.h"
+#include "boxblur.h"
#define RANGEFN(i) ((1000.0f / (i + 1000.0f)))
#define DIRWT(i1,j1,i,j) ( domker[(i1-i)/scale+halfwin][(j1-j)/scale+halfwin] * RANGEFN(fabsf((data_fine[i1][j1]-data_fine[i][j]))) )
-#define CLIPLL(x) LIM(x,0.f,32768.f) // limit L to about L=120 probably engh ?
+#define CLIPLL(x) LIM(x,0.f,32768.f)
+#define CLIPLLN(x) LIM(-32768.f,0.f,32768.f)
namespace rtengine
{
@@ -252,11 +254,11 @@ void ImProcFunctions :: dirpyr_equalizer(float ** src, float ** dst, int srcwidt
}
-void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, 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 ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, const float blurcb, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scaleprev, bool multiThread)
{
int lastlevel = maxlevelloc;
- if (settings->verbose) {
+ if (settings->verbose) {
printf("Dirpyr scaleprev=%i\n", scaleprev);
}
@@ -407,12 +409,12 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwid
for (int level = lastlevel - 1; level > 0; level--) {
- idirpyr_eq_channel_loc(dirpyrlo[level], dirpyrlo[level - 1], residbuff, srcwidth, srcheight, level, multi, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice);
+ idirpyr_eq_channel_loc(dirpyrlo[level], dirpyrlo[level - 1], residbuff, srcwidth, srcheight, level, multi, blurcb, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice, multiThread);
}
scale = scalesloc[0];
- idirpyr_eq_channel_loc(dirpyrlo[0], src, residbuff, srcwidth, srcheight, 0, multi, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice);
+ idirpyr_eq_channel_loc(dirpyrlo[0], src, residbuff, srcwidth, srcheight, 0, multi, blurcb, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice, multiThread);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
array2D loct(srcwidth, srcheight);
@@ -424,11 +426,25 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwid
float clar = 0.01f * mergeL;
+/*
+ if(clar == 0.f) {
+ clar = 0.0f;
+ }
+// printf("clar=%f \n", clar);
+*/
+ if(clar > 0.f) {
#pragma omp parallel for
for (int i = 0; i < srcheight; i++)
for (int j = 0; j < srcwidth; j++) {
loctemp[i][j] = CLIPLL((1.f + clar) * loct[i][j] - clar * resid5[i][j]);
}
+ } else {
+ #pragma omp parallel for
+ for (int i = 0; i < srcheight; i++)
+ for (int j = 0; j < srcwidth; j++) {
+ loctemp[i][j] = CLIPLL(loct[i][j]);
+ }
+ }
}
@@ -790,7 +806,7 @@ void ImProcFunctions::dirpyr_channel(float ** data_fine, float ** data_coarse, i
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[5], const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice)
+void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[5], const float blurcb, const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, bool multiThread)
{
// const float skinprotneg = -skinprot;
// const float factorHard = (1.f - skinprotneg / 100.f);
@@ -813,7 +829,7 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data
// if(level == 5 && mult[level] > 1.f) {
// multbis[level] = 1.f + 0.45f * (mult[level] - 1.f);
// }
- double sensicrash = settings->cbdlsensi;
+ double sensicrash = 1.;//settings->cbdlsensi;
LUTf irangefn(0x20000);
{
const float noisehi = 1.33f * noise * sensicrash * dirpyrThreshold / expf(level * log(3.0)), noiselo = 0.66f * noise * sensicrash * dirpyrThreshold / expf(level * log(3.0));
@@ -834,56 +850,28 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data
}
- // if (skinprot == 0.f)
+
+ AlignedBuffer blurbufcbdl(width * height);
+ float rad = 0.05f * blurcb * fabs((level + 1) * (multbis[level] - 1.f));
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
+
float hipass = (data_fine[i][j] - data_coarse[i][j]);
- buffer[i][j] += CLIPLL(irangefn[hipass + 0x10000] * hipass);
- buffer[i][j] = CLIPLL(buffer[i][j]);
+ buffer[i][j] += irangefn[hipass + 0x10000] * hipass;
+
}
}
+ if(blurcb > 0.f) {
+#ifdef _OPENMP
+ #pragma omp parallel if (multiThread)
+#endif
+ boxblur(buffer, buffer, blurbufcbdl.data, rad, rad, width, height);
+ }
irangefn.clear();
- /*
- else if(skinprot > 0.f)
- #ifdef _OPENMP
- #pragma omp parallel for schedule(dynamic,16)
- #endif
- for(int i = 0; i < height; i++) {
- for(int j = 0; j < width; j++) {
- float scale = 1.f;
- float hipass = (data_fine[i][j] - data_coarse[i][j]);
- // These values are precalculated now
- float modhue = hue[i][j];
- float modchro = chrom[i][j];
- Color::SkinSatCbdl ((data_fine[i][j]) / 327.68f, modhue, modchro, skinprot, scale, true, b_l, t_l, t_r);
- buffer[i][j] += (1.f + (irangefn[hipass + 0x10000]) * scale) * hipass ;
- }
- }
- else
- #ifdef _OPENMP
- #pragma omp parallel for schedule(dynamic,16)
- #endif
- for(int i = 0; i < height; i++) {
- for(int j = 0; j < width; j++) {
- float scale = 1.f;
- float hipass = (data_fine[i][j] - data_coarse[i][j]);
- // These values are precalculated now
- float modhue = hue[i][j];
- float modchro = chrom[i][j];
- Color::SkinSatCbdl ((data_fine[i][j]) / 327.68f, modhue, modchro, skinprotneg, scale, false, b_l, t_l, t_r);
- float correct = irangefn[hipass + 0x10000];
-
- if (scale == 1.f) {//image hard
- buffer[i][j] += (1.f + (correct) * (factorHard)) * hipass ;
- } else { //image soft with scale < 1 ==> skin
- buffer[i][j] += (1.f + (correct)) * hipass ;
- }
- }
- }
- */
+ blurbufcbdl.resize(0);
}
void ImProcFunctions::idirpyr_eq_channel(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[maxlevel], const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, float b_l, float t_l, float t_r)
diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc
index 9433a07c5..cb63f025f 100644
--- a/rtengine/improccoordinator.cc
+++ b/rtengine/improccoordinator.cc
@@ -180,6 +180,9 @@ ImProcCoordinator::ImProcCoordinator() :
lcmasSHutili(false),
lhmasSHutili(false),
llmasSHutili(false),
+ lcmascbutili(false),
+ lhmascbutili(false),
+ llmascbutili(false),
LHutili(false),
HHutili(false),
huerefs(500, -100000.f),
@@ -200,6 +203,7 @@ ImProcCoordinator::ImProcCoordinator() :
locallColorMask(0),
locallExpMask(0),
locallSHMask(0),
+ locallcbMask(0),
avg(0),
retistrsav(nullptr)
@@ -875,6 +879,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
lcmasSHutili = false;
lhmasSHutili = false;
llmasSHutili = false;
+ lcmascbutili = false;
+ lhmascbutili = false;
+ llmascbutili = false;
lhmasutili = false;
lcmasutili = false;
locRETgainCurve.Set(params->locallab.spots.at(sp).localTgaincurve);
@@ -889,6 +896,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
locllmasSHCurve.Set(params->locallab.spots.at(sp).LLmaskSHcurve, llmasSHutili);
locccmasSHCurve.Set(params->locallab.spots.at(sp).CCmaskSHcurve, lcmasSHutili);
lochhmasSHCurve.Set(params->locallab.spots.at(sp).HHmaskSHcurve, lhmasSHutili);
+ locllmascbCurve.Set(params->locallab.spots.at(sp).LLmaskcbcurve, llmascbutili);
+ locccmascbCurve.Set(params->locallab.spots.at(sp).CCmaskcbcurve, lcmascbutili);
+ lochhmascbCurve.Set(params->locallab.spots.at(sp).HHmaskSHcurve, lhmascbutili);
CurveFactory::curveLocal(locallutili, params->locallab.spots.at(sp).llcurve, lllocalcurve, sca);
CurveFactory::curveCCLocal(localcutili, params->locallab.spots.at(sp).cccurve, cclocalcurve, sca);
CurveFactory::curveexLocal(localexutili, params->locallab.spots.at(sp).excurve, exlocalcurve, sca);
@@ -934,11 +944,13 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if (sp == params->locallab.selspot) {
ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
- LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, locallColorMask, locallExpMask, locallSHMask);
+ locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
+ LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, locallColorMask, locallExpMask, locallSHMask, locallcbMask);
} else {
ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
- LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, 0, 0, 0);
+ locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
+ LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, 0, 0, 0, 0);
}
//recalculate references after
if (params->locallab.spots.at(sp).spotMethod == "exc") {
@@ -962,6 +974,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
locllmasexpCurve.Reset();
locccmasexpCurve.Reset();
lochhmasexpCurve.Reset();
+ locllmasSHCurve.Reset();
+ locccmasSHCurve.Reset();
+ lochhmasSHCurve.Reset();
+ locllmascbCurve.Reset();
+ locccmascbCurve.Reset();
+ lochhmascbCurve.Reset();
}
}
diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h
index b19fdaa7d..05795e7d5 100644
--- a/rtengine/improccoordinator.h
+++ b/rtengine/improccoordinator.h
@@ -245,6 +245,9 @@ protected:
LocCCmaskSHCurve locccmasSHCurve;
LocLLmaskSHCurve locllmasSHCurve;
LocHHmaskSHCurve lochhmasSHCurve;
+ LocCCmaskcbCurve locccmascbCurve;
+ LocLLmaskcbCurve locllmascbCurve;
+ LocHHmaskcbCurve lochhmascbCurve;
bool locallutili;
bool localcutili;
@@ -258,6 +261,9 @@ protected:
bool lcmasSHutili;
bool lhmasSHutili;
bool llmasSHutili;
+ bool lcmascbutili;
+ bool lhmascbutili;
+ bool llmascbutili;
bool LHutili;
bool HHutili;
LUTf huerefs;
@@ -272,6 +278,7 @@ protected:
int locallColorMask;
int locallExpMask;
int locallSHMask;
+ int locallcbMask;
float avg;
public:
@@ -341,11 +348,12 @@ public:
updaterThreadStart.unlock();
}
- void setLocallabMaskVisibility (int locallColorMask, int locallExpMask, int locallSHMask) override
+ void setLocallabMaskVisibility (int locallColorMask, int locallExpMask, int locallSHMask, int locallcbMask) override
{
this->locallColorMask = locallColorMask;
this->locallExpMask = locallExpMask;
this->locallSHMask = locallSHMask;
+ this->locallcbMask = locallcbMask;
}
void setProgressListener (ProgressListener* pl) override
diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h
index 542bedf6b..17834ca36 100644
--- a/rtengine/improcfun.h
+++ b/rtengine/improcfun.h
@@ -303,7 +303,8 @@ public:
void paste_ref(LabImage* spotbuffer, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp);
void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, bool & locallutili, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, const LocHHmaskCurve & lochhmasCurve, bool & lhmasutili, const LocCCmaskexpCurve & locccmasexpCurve, bool &lcmasexputili, const LocLLmaskexpCurve & locllmasexpCurve, bool &llmasexputili, const LocHHmaskexpCurve & lochhmasexpCurve, bool & lhmasexputili,
const LocCCmaskSHCurve & locccmasSHCurve, bool &lcmasSHutili, const LocLLmaskSHCurve & locllmasSHCurve, bool &llmasSHutili, const LocHHmaskSHCurve & lochhmasSHCurve, bool & lhmasSHutili,
- bool &LHutili, bool &HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int llColorMask, int llExpMask, int llSHMask);
+ const LocCCmaskcbCurve & locccmascbCurve, bool &lcmascbutili, const LocLLmaskcbCurve & locllmascbCurve, bool &llmascbutili, const LocHHmaskcbCurve & lochhmascbCurve, bool & lhmascbutili,
+ bool &LHutili, bool &HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int llColorMask, int llExpMask, int llSHMask, int llcbMask);
void addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk);
void BlurNoise_Localold(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);
void InverseBlurNoise_Local(const struct local_params& lp, const float hueref, const float chromaref, const float lumaref, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy, int sk);
@@ -312,7 +313,7 @@ public:
static void strcurv_data(std::string retistr, int *s_datc, int &siz);
void blendstruc(int bfw, int bfh, LabImage* bufcolorig, float radius, float stru, array2D & blend2, int sk, bool multiThread);
- void transit_shapedetect_retinex(int senstype, LabImage * bufexporig, float **buflight, float **bufchro, float ** bufhh, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
+ void transit_shapedetect_retinex(int senstype, LabImage * bufexporig, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
void transit_shapedetect(int senstype, const LabImage *bufexporig, LabImage * originalmask, float **buflight, float **bufchro, float **buf_a_cat, float ** buf_b_cat, float ** bufhh, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
void exlabLocal(const local_params& lp, int bfh, int bfw, LabImage* bufexporig, LabImage* lab, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve);
void Exclude_Local(float **deltaso, float hueref, float chromaref, float lumaref, float sobelref, float meansobel, const struct local_params & lp, const LabImage * original, LabImage * transformed, const LabImage * rsv, const LabImage * reserv, int cx, int cy, int sk);
@@ -379,15 +380,14 @@ public:
void 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);
- void Noise_residualAB(wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb);
+ void Noise_residualAB(const wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb);
void calcautodn_info(float &chaut, float &delta, int Nb, int levaut, float maxmax, float lumema, float chromina, int mode, int lissage, float redyel, float skinc, float nsknc);
- float MadMax(float * DataList, int &max, int datalen);
- float Mad(float * DataList, const int datalen);
- float MadRgb(float * DataList, const int datalen);
+ float Mad(const float * DataList, int datalen);
+ float MadRgb(const float * DataList, int datalen);
// pyramid wavelet
- void cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale);
- void idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float multi[5], const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice);
+ void cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, const float blurcb, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale, bool multiThread);
+ void idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float multi[5], const float blucb, const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, bool multiThread);
void 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 scale); //Emil's directional pyramid wavelet
void dirpyr_equalizercam(CieImage* ncie, float ** src, float ** dst, int srcwidth, int srcheight, float ** h_p, float ** C_p, const double * mult, const double dirpyrThreshold, const double skinprot, bool execdir, float b_l, float t_l, float t_r, int scale); //Emil's directional pyramid wavelet
void dirpyr_channel(float ** data_fine, float ** data_coarse, int width, int height, int level, int scale);
diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc
index 163bb3a03..12f38d9b8 100644
--- a/rtengine/iplocallab.cc
+++ b/rtengine/iplocallab.cc
@@ -165,6 +165,7 @@ struct local_params {
int chro, cont, sens, sensh, senscb, sensbn, senstm, sensex, sensexclu, sensden, senslc, senssf, senshs;
float clarityml;
float contresid;
+ float blurcbdl;
float struco;
float strengrid;
float struexc;
@@ -181,12 +182,18 @@ struct local_params {
float softradiuscol;
float softradiuscb;
float softradiusret;
+ float softradiustm;
float blendmaexp;
float radmaSH;
float blendmaSH;
float chromaSH;
float gammaSH;
float slomaSH;
+ float radmacb;
+ float blendmacb;
+ float chromacb;
+ float gammacb;
+ float slomacb;
float struexp;
float blurexp;
float blurcol;
@@ -219,6 +226,7 @@ struct local_params {
int showmaskcolmet;
int showmaskexpmet;
int showmaskSHmet;
+ int showmaskcbmet;
int blurmet;
float noiself;
float noiself0;
@@ -232,7 +240,7 @@ struct local_params {
float noisecc;
float mulloc[5];
float threshol;
- float chromacb;
+// float chromacb;
float strengt;
float gamm;
float esto;
@@ -266,6 +274,7 @@ struct local_params {
bool enaColorMask;
bool enaExpMask;
bool enaSHMask;
+ bool enacbMask;
int highlihs;
int shadowhs;
int radiushs;
@@ -353,7 +362,7 @@ static void SobelCannyLuma(float **sobelL, float **luma, int bfw, int bfh, float
-static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locallab, struct local_params& lp, int llColorMask, int llExpMask, int llSHMask)
+static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locallab, struct local_params& lp, int llColorMask, int llExpMask, int llSHMask, int llcbMask)
{
int w = oW;
int h = oH;
@@ -415,9 +424,11 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.showmaskcolmet = llColorMask;
lp.showmaskexpmet = llExpMask;
lp.showmaskSHmet = llSHMask;
- lp.enaColorMask = locallab.spots.at(sp).enaColorMask && llColorMask == 0 && llExpMask == 0 && llSHMask == 0; // Color & Light mask is deactivated if Exposure mask is visible
- lp.enaExpMask = locallab.spots.at(sp).enaExpMask && llExpMask == 0 && llColorMask == 0 && llSHMask == 0; // Exposure mask is deactivated if Color & Light mask is visible
- lp.enaSHMask = locallab.spots.at(sp).enaSHMask && llSHMask == 0 && llColorMask == 0 && llExpMask == 0; // SH mask is deactivated if Color & Light mask is visible
+ lp.showmaskcbmet = llcbMask;
+ lp.enaColorMask = locallab.spots.at(sp).enaColorMask && llColorMask == 0 && llExpMask == 0 && llSHMask == 0 && llcbMask == 0;; // Color & Light mask is deactivated if Exposure mask is visible
+ lp.enaExpMask = locallab.spots.at(sp).enaExpMask && llExpMask == 0 && llColorMask == 0 && llSHMask == 0 && llcbMask == 0;; // Exposure mask is deactivated if Color & Light mask is visible
+ lp.enaSHMask = locallab.spots.at(sp).enaSHMask && llSHMask == 0 && llColorMask == 0 && llExpMask == 0 && llcbMask == 0;; //
+ lp.enacbMask = locallab.spots.at(sp).enacbMask && llcbMask == 0 && llColorMask == 0 && llExpMask == 0 && llSHMask == 0;;
if (locallab.spots.at(sp).blurMethod == "norm") {
@@ -472,6 +483,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
int local_sensicb = locallab.spots.at(sp).sensicb;
float local_clarityml = (float) locallab.spots.at(sp).clarityml;
float local_contresid = (float) locallab.spots.at(sp).contresid;
+ int local_blurcbdl = (float) locallab.spots.at(sp).blurcbdl;
int local_contrast = locallab.spots.at(sp).contrast;
float local_lightness = (float) locallab.spots.at(sp).lightness;
float labgridALowloc = locallab.spots.at(sp).labgridALow;
@@ -494,6 +506,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
float softradiusexpo = ((float) locallab.spots.at(sp).softradiusexp);
float softradiuscolor = ((float) locallab.spots.at(sp).softradiuscol);
float softradiusreti = ((float) locallab.spots.at(sp).softradiusret);
+ float softradiustma = ((float) locallab.spots.at(sp).softradiustm);
float softradiuscbdl = ((float) locallab.spots.at(sp).softradiuscb);
float blendmaskSH = ((float) locallab.spots.at(sp).blendmaskSH) / 100.f ;
float radmaskSH = ((float) locallab.spots.at(sp).radmaskSH);
@@ -537,6 +550,11 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
int shadhs = locallab.spots.at(sp).shadows;
int shtonals = locallab.spots.at(sp).s_tonalwidth;
int radhs = locallab.spots.at(sp).sh_radius;
+ float blendmaskcb = ((float) locallab.spots.at(sp).blendmaskcb) / 100.f ;
+ float radmaskcb = ((float) locallab.spots.at(sp).radmaskcb);
+ float chromaskcb = ((float) locallab.spots.at(sp).chromaskcb);
+ float gammaskcb = ((float) locallab.spots.at(sp).gammaskcb);
+ float slomaskcb = ((float) locallab.spots.at(sp).slomaskcb);
lp.cir = circr;
lp.actsp = acti;
@@ -564,6 +582,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.softradiuscol = softradiuscolor;
lp.softradiusret = softradiusreti;
lp.softradiuscb = softradiuscbdl;
+ lp.softradiustm = softradiustma;
lp.struexc = structexclude;
lp.blendmaexp = blendmaskexpo;
lp.blendmaSH = blendmaskSH;
@@ -571,6 +590,11 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.chromaSH = chromaskSH;
lp.gammaSH = gammaskSH;
lp.slomaSH = slomaskSH;
+ lp.blendmacb = blendmaskcb;
+ lp.radmacb = radmaskcb;
+ lp.chromacb = chromaskcb;
+ lp.gammacb = gammaskcb;
+ lp.slomacb = slomaskcb;
lp.struexp = structexpo;
lp.blurexp = blurexpo;
@@ -581,7 +605,9 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.dehaze = local_dehaze;
lp.senscb = local_sensicb;
lp.clarityml = local_clarityml;
+ //printf("lpclari=%f \n", lp.clarityml);
lp.contresid = local_contresid;
+ lp.blurcbdl = local_blurcbdl;
lp.cont = local_contrast;
lp.ligh = local_lightness;
lp.lowA = labgridALowloc;
@@ -674,7 +700,6 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.expcomp = CLIP24(lp.expcomp); //to prevent crash with Old pp3 with integer
lp.expchroma = locallab.spots.at(sp).expchroma / 100.;
lp.sensex = local_sensiex;
-// lp.strucc = local_struc;
lp.war = local_warm;
lp.hsena = locallab.spots.at(sp).expshadhigh && llColorMask == 0 && llExpMask == 0;// Shadow Highlight tool is deactivated if Color & Light mask or SHmask is visible
lp.highlihs = highhs;
@@ -1241,18 +1266,18 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in
// BENCHFUN
const float ach = (float)lp.trans / 100.f;
+ const float factnoise1 = 1.f + (lp.noisecf) / 500.f;
+ const float factnoise2 = 1.f + (lp.noisecc) / 500.f;
+ const float factnoise = factnoise1 * factnoise2;
- float factnoise1 = 1.f + (lp.noisecf) / 500.f;
- float factnoise2 = 1.f + (lp.noisecc) / 500.f;
+ const int GW = transformed->W;
+ const int GH = transformed->H;
+ const float refa = chromaref * cos(hueref);
+ const float refb = chromaref * sin(hueref);
- int GW = transformed->W;
- int GH = transformed->H;
- float refa = chromaref * cos(hueref);
- float refb = chromaref * sin(hueref);
+ std::unique_ptr origblur(new LabImage(GW, GH));
- LabImage *origblur = new LabImage(GW, GH);
-
- float radius = 3.f / sk;
+ const float radius = 3.f / sk;
#ifdef _OPENMP
#pragma omp parallel
#endif
@@ -1260,9 +1285,11 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in
gaussianBlur(original->L, origblur->L, GW, GH, radius);
gaussianBlur(original->a, origblur->a, GW, GH, radius);
gaussianBlur(original->b, origblur->b, GW, GH, radius);
-
}
+ const int begx = int (lp.xc - lp.lxL);
+ const int begy = int (lp.yc - lp.lyT);
+
#ifdef _OPENMP
#pragma omp parallel if (multiThread)
#endif
@@ -1283,19 +1310,11 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in
const bool isZone0 = loy > lp.yc + lp.ly || loy < lp.yc - lp.lyT; // whole line is zone 0 => we can skip a lot of processing
if (isZone0) { // outside selection and outside transition zone => no effect, keep original values
- for (int x = 0; x < transformed->W; x++) {
- transformed->L[y][x] = original->L[y][x];
- transformed->a[y][x] = original->a[y][x];
- transformed->b[y][x] = original->b[y][x];
- }
-
continue;
}
for (int x = 0, lox = cx + x; x < transformed->W; x++, lox++) {
int zone = 0;
- int begx = int (lp.xc - lp.lxL);
- int begy = int (lp.yc - lp.lyT);
float localFactor = 1.f;
@@ -1305,11 +1324,7 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in
calcTransitionrect(lox, loy, ach, lp, zone, localFactor);
}
-
if (zone == 0) { // outside selection and outside transition zone => no effect, keep original values
- transformed->L[y][x] = original->L[y][x];
- transformed->a[y][x] = original->a[y][x];
- transformed->b[y][x] = original->b[y][x];
continue;
}
@@ -1332,15 +1347,7 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in
}
switch (zone) {
- case 0: { // outside selection and outside transition zone => no effect, keep original values
- transformed->L[y][x] = original->L[y][x];
- transformed->a[y][x] = original->a[y][x];
- transformed->b[y][x] = original->b[y][x];
- break;
- }
-
case 1: { // inside transition zone
- float factorx = localFactor;
float difL, difa, difb;
if (call == 2 /*|| call == 1 || call == 3 */) { //simpleprocess
@@ -1354,12 +1361,12 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in
}
- difL *= factorx * reducdEL;
- difa *= factorx * reducdEa;
- difb *= factorx * reducdEb;
+ difL *= localFactor * reducdEL;
+ difa *= localFactor * reducdEa;
+ difb *= localFactor * reducdEb;
transformed->L[y][x] = CLIP(original->L[y][x] + difL);
- transformed->a[y][x] = CLIPC((original->a[y][x] + difa) * factnoise1 * factnoise2);
- transformed->b[y][x] = CLIPC((original->b[y][x] + difb) * factnoise1 * factnoise2) ;
+ transformed->a[y][x] = CLIPC((original->a[y][x] + difa) * factnoise);
+ transformed->b[y][x] = CLIPC((original->b[y][x] + difb) * factnoise) ;
break;
}
@@ -1382,23 +1389,26 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, in
difb *= reducdEb;
transformed->L[y][x] = CLIP(original->L[y][x] + difL);
- transformed->a[y][x] = CLIPC((original->a[y][x] + difa) * factnoise1 * factnoise2);
- transformed->b[y][x] = CLIPC((original->b[y][x] + difb) * factnoise1 * factnoise2);
+ transformed->a[y][x] = CLIPC((original->a[y][x] + difa) * factnoise);
+ transformed->b[y][x] = CLIPC((original->b[y][x] + difb) * factnoise);
}
}
}
}
}
- delete origblur;
-
}
-void ImProcFunctions::BlurNoise_Local(LabImage * tmp1, const float hueref, const float chromaref, const float lumaref, const local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk)
+void ImProcFunctions::BlurNoise_Local(LabImage *tmp1, const float hueref, const float chromaref, const float lumaref, const local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk)
{
//local BLUR
BENCHFUN
+ const int ystart = std::max(static_cast(lp.yc - lp.lyT) - cy, 0);
+ const int yend = std::min(static_cast(lp.yc + lp.ly) - cy, original->H);
+ const int xstart = std::max(static_cast(lp.xc - lp.lxL) - cx, 0);
+ const int xend = std::min(static_cast(lp.xc + lp.lx) - cx, original->W);
+
const float ach = lp.trans / 100.f;
const int GW = transformed->W;
const int GH = transformed->H;
@@ -1430,8 +1440,6 @@ void ImProcFunctions::BlurNoise_Local(LabImage * tmp1, const float hueref, const
#endif
{
const int limscope = 80;
- const int begy = int (lp.yc - lp.lyT);
- const int begx = int (lp.xc - lp.lxL);
const float mindE = 4.f + MINSCOPE * lp.sensbn * lp.thr;//best usage ?? with blurnoise
const float maxdE = 5.f + MAXSCOPE * lp.sensbn * (1 + 0.1f * lp.thr);
const float mindElim = 2.f + MINSCOPE * limscope * lp.thr;
@@ -1441,16 +1449,9 @@ void ImProcFunctions::BlurNoise_Local(LabImage * tmp1, const float hueref, const
#pragma omp for schedule(dynamic,16)
#endif
- for (int y = 0; y < transformed->H; y++) {
+ for (int y = ystart; y < yend; y++) {
const int loy = cy + y;
-
- const bool isZone0 = loy > lp.yc + lp.ly || loy < lp.yc - lp.lyT; // whole line is zone 0 => we can skip a lot of processing
-
- if (isZone0) { // outside selection and outside transition zone => no effect, keep original values
- continue;
- }
-
- for (int x = 0, lox = cx + x; x < transformed->W; x++, lox++) {
+ for (int x = xstart, lox = cx + x; x < xend; x++, lox++) {
int zone = 0;
float localFactor = 1.f;
@@ -1460,7 +1461,6 @@ void ImProcFunctions::BlurNoise_Local(LabImage * tmp1, const float hueref, const
calcTransitionrect(lox, loy, ach, lp, zone, localFactor);
}
-
if (zone == 0) { // outside selection and outside transition zone => no effect, keep original values
continue;
}
@@ -1470,55 +1470,20 @@ void ImProcFunctions::BlurNoise_Local(LabImage * tmp1, const float hueref, const
float reducdE;
calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, lp.sensbn , reducdE);
- switch (zone) {
+ const float difL = (tmp1->L[y - ystart][x - xstart] - original->L[y][x]) * localFactor * reducdE;
+ transformed->L[y][x] = CLIP(original->L[y][x] + difL);
- case 1: { // inside transition zone
- float difL, difa, difb;
- difL = tmp1->L[loy - begy][lox - begx] - original->L[y][x];
- difa = tmp1->a[loy - begy][lox - begx] - original->a[y][x];
- difb = tmp1->b[loy - begy][lox - begx] - original->b[y][x];
- difL *= localFactor * reducdE;
-
- transformed->L[y][x] = CLIP(original->L[y][x] + difL);
-
- if (!lp.actsp) {
- difa *= localFactor * reducdE;
- difb *= localFactor * reducdE;
-
- transformed->a[y][x] = CLIPC(original->a[y][x] + difa);
- transformed->b[y][x] = CLIPC(original->b[y][x] + difb);
- }
-
- break;
- }
-
- case 2: { // inside selection => full effect, no transition
- float difL, difa, difb;
-
- difL = tmp1->L[loy - begy][lox - begx] - original->L[y][x];
- difa = tmp1->a[loy - begy][lox - begx] - original->a[y][x];
- difb = tmp1->b[loy - begy][lox - begx] - original->b[y][x];
-
- difL *= reducdE;//(100.f + realstrdE) / 100.f;
-
- transformed->L[y][x] = CLIP(original->L[y][x] + difL);
-
- if (!lp.actsp) {
- difa *= reducdE;
- difb *= reducdE;
-
- transformed->a[y][x] = CLIPC(original->a[y][x] + difa); ;
- transformed->b[y][x] = CLIPC(original->b[y][x] + difb);
- }
- }
+ if (!lp.actsp) {
+ const float difa = (tmp1->a[y - ystart][x - xstart] - original->a[y][x]) * localFactor * reducdE;;
+ const float difb = (tmp1->b[y - ystart][x - xstart] - original->b[y][x]) * localFactor * reducdE;;
+ transformed->a[y][x] = CLIPC(original->a[y][x] + difa);
+ transformed->b[y][x] = CLIPC(original->b[y][x] + difb);
}
}
}
}
}
-
-
void ImProcFunctions::InverseReti_Local(const struct local_params & lp, const float hueref, const float chromaref, const float lumaref, LabImage * original, LabImage * transformed, const LabImage * const tmp1, int cx, int cy, int chro, int sk)
{
// BENCHFUN
@@ -1753,7 +1718,6 @@ void ImProcFunctions::InverseBlurNoise_Local(const struct local_params & lp, co
}
static void calclight(float lum, float koef, float &lumnew, const LUTf &lightCurveloc)
-//replace L-curve that does not work in local or bad
{
lumnew = koef != -100.f ? CLIPLOC(lightCurveloc[lum]) : 0.f;
}
@@ -2262,40 +2226,27 @@ void ImProcFunctions::Exclude_Local(float **deltaso, float hueref, float chromar
}
}
-void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufexporig, float **buflight, float **bufchro, float ** bufhh, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk)
+void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufexporig, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk)
{
BENCHFUN {
const float ach = (float)lp.trans / 100.f;
- float varsens = lp.sensh;
-
- //sobel
- sobelref /= 100.;
- meansobel /= 100.f;
-
- if (sobelref > 60.)
- {
- sobelref = 60.;
- }
-
- sobelref = log1p(sobelref);
+ const float varsens = lp.sensh;
int GW = transformed->W;
int GH = transformed->H;
- float refa = chromaref * cos(hueref);
- float refb = chromaref * sin(hueref);
-
-
- LabImage *origblur = new LabImage(GW, GH);
-
- float radius = 3.f / sk;
+ const float refa = chromaref * cos(hueref);
+ const float refb = chromaref * sin(hueref);
//balance deltaE
float kL = lp.balance;
float kab = 1.f;
balancedeltaE(kL, kab);
+ std::unique_ptr origblur(new LabImage(GW, GH));
+ const float radius = 3.f / sk;
+
#ifdef _OPENMP
#pragma omp parallel
#endif
@@ -2316,11 +2267,6 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex
const float maxdE = 5.f + MAXSCOPE * varsens * (1 + 0.1f * lp.thr);
const float mindElim = 2.f + MINSCOPE * limscope * lp.thr;
const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr);
-
-
-#ifdef __SSE2__
- float atan2Buffer[transformed->W] ALIGNED16;
-#endif
#ifdef _OPENMP
#pragma omp for schedule(dynamic,16)
@@ -2335,24 +2281,6 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex
continue;
}
-#ifdef __SSE2__
-
- if (HHutili) {
- int i = 0;
-
- for (; i < transformed->W - 3; i += 4) {
- vfloat av = LVFU(origblur->a[y][i]);
- vfloat bv = LVFU(origblur->b[y][i]);
- STVF(atan2Buffer[i], xatan2f(bv, av));
- }
-
- for (; i < transformed->W; i++) {
- atan2Buffer[i] = xatan2f(origblur->b[y][i], origblur->a[y][i]);
- }
- }
-
-#endif
-
for (int x = 0; x < transformed->W; x++) {
const int lox = cx + x;
const int begx = int (lp.xc - lp.lxL);
@@ -2372,136 +2300,47 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex
continue;
}
- float rhue = 0;
-
- if (HHutili) {
-#ifdef __SSE2__
- rhue = atan2Buffer[x];
-#else
- rhue = xatan2f(origblur->b[y][x], origblur->a[y][x]);
-#endif
- }
-
float rL = origblur->L[y][x] / 327.68f;
- float rsob = 0.f;
+ const float dE = sqrt(kab * SQR(refa - origblur->a[y][x] / 327.68f) + kab * SQR(refb - origblur->b[y][x] / 327.68f) + kL * SQR(lumaref - rL));
- float dE = rsob + sqrt(kab * SQR(refa - origblur->a[y][x] / 327.68f) + kab * SQR(refb - origblur->b[y][x] / 327.68f) + kL * SQR(lumaref - rL));
-
- float cli = 0.f;
- float clc = 0.f;
- float hhro = 0.f;
-
- if (HHutili) {
- hhro = bufhh[loy - begy][lox - begx];
- }
-
- cli = buflight[loy - begy][lox - begx];
- clc = bufchro[loy - begy][lox - begx];
+ float cli = buflight[loy - begy][lox - begx];
+ float clc = bufchro[loy - begy][lox - begx];
float reducdE;
calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, varsens , reducdE);
- float realstrdE = reducdE * cli;
- float realstrchdE = reducdE * clc;
- float realhhdE = reducdE * hhro;
-
-
- float tempa = 0.f;
- float tempb = 0.f;
+ reducdE /= 100.f;
+ cli *= reducdE;
+ clc *= reducdE;
if (rL > 0.1f) { //to avoid crash with very low gamut in rare cases ex : L=0.01 a=0.5 b=-0.9
-
-
-
- switch (zone) {
- case 1: { // inside transition zone
- float factorx = localFactor;
- float newhr = 0.f;
-
- if (senstype == 4) {//all except color and light (TODO) and exposure
- float lightc = bufexporig->L[loy - begy][lox - begx];
- float fli = ((100.f + realstrdE) / 100.f);
- float diflc = lightc * fli - original->L[y][x];
- diflc *= factorx;
- transformed->L[y][x] = CLIP(original->L[y][x] + diflc);
- }
-
- if (HHutili && hhro != 0.f) {
- float addh = 0.01f * realhhdE * factorx;
- newhr = rhue + addh;
-
- if (newhr > rtengine::RT_PI) {
- newhr -= 2 * rtengine::RT_PI;
- } else if (newhr < -rtengine::RT_PI) {
- newhr += 2 * rtengine::RT_PI;
- }
- }
-
- float flia = 1.f;
- float flib = 1.f;
- float chra = bufexporig->a[loy - begy][lox - begx];
- float chrb = bufexporig->b[loy - begy][lox - begx];
-
- if (senstype == 4) {
- flia = flib = ((100.f + realstrchdE) / 100.f);
- }
-
- float difa = chra * flia - original->a[y][x];
- float difb = chrb * flib - original->b[y][x];
- difa *= factorx;
- difb *= factorx;
-
- transformed->a[y][x] = tempa = CLIPC(original->a[y][x] + difa);
- transformed->b[y][x] = tempb = CLIPC(original->b[y][x] + difb);
-
- break;
-
- }
-
- case 2: { // inside selection => full effect, no transition
- float newhr = 0.f;
-
- if (senstype == 4) { //retinex & cbdl
- float lightc = bufexporig->L[loy - begy][lox - begx];
- float fli = ((100.f + realstrdE) / 100.f);
- float diflc = lightc * fli - original->L[y][x];
- transformed->L[y][x] = CLIP(original->L[y][x] + diflc);
- }
-
- if (HHutili && hhro != 0.f) {
- float addh = 0.01f * realhhdE;
- newhr = rhue + addh;
-
- if (newhr > rtengine::RT_PI) {
- newhr -= 2 * rtengine::RT_PI;
- } else if (newhr < -rtengine::RT_PI) {
- newhr += 2 * rtengine::RT_PI;
- }
- }
-
- float flia = 1.f;
- float flib = 1.f;
- float chra = bufexporig->a[loy - begy][lox - begx];
- float chrb = bufexporig->b[loy - begy][lox - begx];
-
- if (senstype == 4) {
- flia = flib = (100.f + realstrchdE) / 100.f;
- }
-
- float difa = chra * flia - original->a[y][x];
- float difb = chrb * flib - original->b[y][x];
-
- transformed->a[y][x] = tempa = CLIPC(original->a[y][x] + difa);
- transformed->b[y][x] = tempb = CLIPC(original->b[y][x] + difb);
- }
+ if (senstype == 4) {//all except color and light (TODO) and exposure
+ float lightc = bufexporig->L[loy - begy][lox - begx];
+ float fli = 1.f + cli;
+ float diflc = lightc * fli - original->L[y][x];
+ diflc *= localFactor;
+ transformed->L[y][x] = CLIP(original->L[y][x] + diflc);
}
+
+ float fliab = 1.f;
+ const float chra = bufexporig->a[loy - begy][lox - begx];
+ const float chrb = bufexporig->b[loy - begy][lox - begx];
+
+ if (senstype == 4) {
+ fliab = 1.f + clc;
+ }
+
+ const float difa = (chra * fliab - original->a[y][x]) * localFactor;
+ const float difb = (chrb * fliab - original->b[y][x]) * localFactor;
+
+ transformed->a[y][x] = CLIPC(original->a[y][x] + difa);
+ transformed->b[y][x] = CLIPC(original->b[y][x] + difb);
}
}
}
}
- delete origblur;
}
}
@@ -2560,9 +2399,11 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
const bool expshow = ((lp.showmaskexpmet == 1 || lp.showmaskexpmet == 2) && senstype == 1);
const bool colshow = ((lp.showmaskcolmet == 1 || lp.showmaskcolmet == 2) && senstype == 0);
const bool SHshow = ((lp.showmaskSHmet == 1 || lp.showmaskSHmet == 2) && senstype == 9);
+ const bool cbshow = ((lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2) && senstype == 6);
const bool previewcol = ((lp.showmaskcolmet == 5) && senstype == 0);
const bool previewexp = ((lp.showmaskexpmet == 5) && senstype == 1);
const bool previewSH = ((lp.showmaskSHmet == 4) && senstype == 9);
+ const bool previewcb = ((lp.showmaskcbmet == 4) && senstype == 6);
std::unique_ptr origblur(new LabImage(bfw, bfh));
std::unique_ptr origblurmask;
@@ -2589,7 +2430,8 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
const bool usemaskexp = (lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 5) && senstype == 1;
const bool usemaskcol = (lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 5) && senstype == 0;
const bool usemaskSH = (lp.showmaskSHmet == 2 || lp.enaSHMask || lp.showmaskSHmet == 4) && senstype == 9;
- const bool usemaskall = (usemaskSH || usemaskcol || usemaskexp);
+ const bool usemaskcb = (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 4) && senstype == 6;
+ const bool usemaskall = (usemaskSH || usemaskcol || usemaskexp || usemaskcb);
if (usemaskall)
{
@@ -2723,7 +2565,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
float clb = 0.f;
const float cli = buflight[y - ystart][x - xstart];
- const float clc = (previewcol || previewexp || previewSH) ? settings->previewselection * 100.f : bufchro[y - ystart][x - xstart];
+ const float clc = (previewcol || previewexp || previewSH || previewcb) ? settings->previewselection * 100.f : bufchro[y - ystart][x - xstart];
if (senstype <= 1) {
@@ -2738,7 +2580,22 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
const float realstradE = reducdE * cla;
const float realstrbdE = reducdE * clb;
const float realstrchdE = reducdE * clc;
-
+/* comment on processus deltaE
+ * the algo uses 3 different ways to manage deltaE according to the type of intervention
+ * if we call "applyproc" : the datas produced upstream in bfw, bfh coordinate by the function producing something curves, retinex, exposure, etc.
+
+ * direct : in this case we use directly the datas produced upstream by "applyproc", with only a regulation produce for deltaE by reducdE
+ * direct : we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, Denoise, Sharp, Localcontrast
+
+ * with first use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type 328.f * realstrdE
+ * in this case we found "applyproc" which result in direct use on Luminance : Exposure, Color and Light, Shadows highlight, SoftLight
+
+ * with second use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type fli = (100.f + realstrdE) / 100.f;
+ * in this case we found "applyproc" which result in large variations of L : Retinex, TM, and others
+
+ * if you change you must test before
+
+*/
if (rL > 0.1f) { //to avoid crash with very low gamut in rare cases ex : L=0.01 a=0.5 b=-0.9
switch (zone) {
@@ -2746,12 +2603,16 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
float factorx = localFactor;
float diflc = 0.f;
float newhr = 0.f;
+ float difL = 0.f;
- if (senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8) {//all except color and light (TODO) and exposure
+ if (senstype == 2 || senstype == 8) {
const float lightc = bufexporig->L[y - ystart][x - xstart];
const float fli = (100.f + realstrdE) / 100.f;
transformed->L[y][x] = CLIP(original->L[y][x] + (lightc * fli - original->L[y][x]) * factorx);
- } else if (senstype == 1 || senstype == 0 || senstype == 9) {
+ } else if (senstype == 6) {
+ difL = (bufexporig->L[y - ystart][x - xstart] - original->L[y][x]) * localFactor * reducdE;
+ transformed->L[y][x] = CLIP(original->L[y][x] + difL);
+ } else if (senstype == 1 || senstype == 0 || senstype == 9 || senstype == 3) {
if (HHutili) {
const float hhro = bufhh[y - ystart][x - xstart];
@@ -2787,10 +2648,10 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
const float chra = bufexporig->a[y - ystart][x - xstart];
const float chrb = bufexporig->b[y - ystart][x - xstart];
- if (senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8 || senstype == 9) {
+ if (senstype == 2 || senstype == 3 || senstype == 8 || senstype == 9 || senstype == 6) {
+
flia = flib = ((100.f + realstrchdE) / 100.f);
- } else if (senstype == 1) {
- // printf("rdE=%f chdE=%f", realstradE, realstrchdE);
+ } else if (senstype == 1) {
flia = (100.f + realstradE + 100.f * realstrchdE) / 100.f;
flib = (100.f + realstrbdE + 100.f * realstrchdE) / 100.f;
@@ -2802,7 +2663,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
flia = (100.f + 0.3f * lp.strengrid * realstradE + realstrchdE) / 100.f;
flib = (100.f + 0.3f * lp.strengrid * realstrbdE + realstrchdE) / 100.f;
- if (previewcol || previewexp || previewSH) {
+ if (previewcol || previewexp || previewSH || previewcb) {
flia = (100.f + realstradE + realstrchdE) / 100.f;
flib = (100.f + realstrbdE + realstrchdE) / 100.f;
}
@@ -2849,7 +2710,11 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
transformed->L[y][x] = CLIP(12000.f + diflc);
transformed->a[y][x] = CLIPC(difa);
transformed->b[y][x] = CLIPC(difb);
- } else if (previewcol || previewexp || previewSH) {
+ } else if (cbshow) {
+ transformed->L[y][x] = CLIP(12000.f + difL);
+ transformed->a[y][x] = CLIPC(difa);
+ transformed->b[y][x] = CLIPC(difb);
+ } else if (previewcol || previewexp || previewSH || previewcb) {
transformed->a[y][x] = 0.f;
transformed->b[y][x] = (difb);
}
@@ -2862,12 +2727,15 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
case 2: { // inside selection => full effect, no transition
float diflc = 0.f;
float newhr = 0.f;
-
- if (senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8) { //retinex & cbdl
- float lightc = bufexporig->L[y - ystart][x - xstart];
- float fli = ((100.f + realstrdE) / 100.f);
+ float difL = 0.f;
+ if (senstype == 2 || senstype == 8) {
+ const float lightc = bufexporig->L[y - ystart][x - xstart];
+ const float fli = (100.f + realstrdE) / 100.f;
transformed->L[y][x] = CLIP(original->L[y][x] + lightc * fli - original->L[y][x]);
- } else if (senstype == 1 || senstype == 0 || senstype == 9) {
+ } else if (senstype == 6) {
+ difL = (bufexporig->L[y - ystart][x - xstart] - original->L[y][x]) * reducdE;
+ transformed->L[y][x] = CLIP(original->L[y][x] + difL);
+ } else if (senstype == 1 || senstype == 0 || senstype == 9 || senstype == 3) {
if (HHutili) {
const float hhro = bufhh[y - ystart][x - xstart];
@@ -2903,7 +2771,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
const float chra = bufexporig->a[y - ystart][x - xstart];
const float chrb = bufexporig->b[y - ystart][x - xstart];
- if (senstype == 6 || senstype == 2 || senstype == 3 || senstype == 8 || senstype == 9) {
+ if (senstype == 2 || senstype == 3 || senstype == 8 || senstype == 9 || senstype == 6) {
flia = flib = (100.f + realstrchdE) / 100.f;
} else if (senstype == 1) {
flia = (100.f + realstradE + 100.f * realstrchdE) / 100.f;
@@ -2962,7 +2830,11 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
transformed->L[y][x] = CLIP(12000.f + diflc);
transformed->a[y][x] = CLIPC(difa);
transformed->b[y][x] = CLIPC(difb);
- } else if (previewcol || previewexp || previewSH) {
+ } else if (cbshow) {
+ transformed->L[y][x] = CLIP(12000.f + difL);
+ transformed->a[y][x] = CLIPC(difa);
+ transformed->b[y][x] = CLIPC(difb);
+ } else if (previewcol || previewexp || previewSH || previewcb) {
transformed->a[y][x] = 0.f;
transformed->b[y][x] = difb;
}
@@ -3378,7 +3250,7 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform
if (params->locallab.enabled) {
//always calculate hueref, chromaref, lumaref before others operations use in normal mode for all modules exceprt denoise
struct local_params lp;
- calcLocalParams(sp, oW, oH, params->locallab, lp, 0, 0, 0);
+ calcLocalParams(sp, oW, oH, params->locallab, lp, 0, 0, 0, 0);
int begy = lp.yc - lp.lyT;
int begx = lp.xc - lp.lxL;
int yEn = lp.yc + lp.ly;
@@ -3399,7 +3271,6 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform
avg2 /= 32768.f;
avg = avg2 / nc2;
-// printf("calc avg=%f \n", avg);
// double precision for large summations
double aveA = 0.;
double aveB = 0.;
@@ -3422,9 +3293,6 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform
int spotSise2; // = 0.88623f * max (1, lp.cir / sk); //18
// very small region, don't use omp here
-// printf("cy=%i cx=%i yc=%f xc=%f circ=%i spot=%i tH=%i tW=%i sk=%i\n", cy, cx, lp.yc, lp.xc, lp.cir, spotSize, transformed->H, transformed->W, sk);
-// printf("ymin=%i ymax=%i\n", max (cy, (int) (lp.yc - spotSize)),min (transformed->H + cy, (int) (lp.yc + spotSize + 1)) );
-// printf("xmin=%i xmax=%i\n", max (cx, (int) (lp.xc - spotSize)),min (transformed->W + cx, (int) (lp.xc + spotSize + 1)) );
LabImage *sobelL;
LabImage *deltasobelL;
LabImage *origsob;
@@ -3496,7 +3364,6 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform
aveL += original->L[y - cy][x - cx];
aveA += original->a[y - cy][x - cx];
aveB += original->b[y - cy][x - cx];
- // aveblend += 100.f * blend2[y - cy][x - cx];
aveChro += sqrtf(SQR(original->b[y - cy][x - cx]) + SQR(original->a[y - cy][x - cx]));
nab++;
}
@@ -3561,7 +3428,6 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform
lumarefblur = 0.f;
}
- // printf("hueblur=%f hue=%f\n", huerefblur, hueref);
chromaref = aveChro;
lumaref = avL;
@@ -3800,8 +3666,26 @@ void ImProcFunctions::fftw_denoise(int GW, int GH, int max_numblox_W, int min_nu
void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * original, LabImage * transformed, LabImage * reserved, int cx, int cy, int oW, int oH, int sk,
const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, bool & locallutili, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, const LocHHmaskCurve & lochhmasCurve, bool &lhmasutili, const LocCCmaskexpCurve & locccmasexpCurve, bool &lcmasexputili, const LocLLmaskexpCurve & locllmasexpCurve, bool &llmasexputili, const LocHHmaskexpCurve & lochhmasexpCurve, bool & lhmasexputili,
const LocCCmaskSHCurve & locccmasSHCurve, bool &lcmasSHutili, const LocLLmaskSHCurve & locllmasSHCurve, bool &llmasSHutili, const LocHHmaskSHCurve & lochhmasSHCurve, bool & lhmasSHutili,
- bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref, int llColorMask, int llExpMask, int llSHMask)
+ const LocCCmaskcbCurve & locccmascbCurve, bool &lcmascbutili, const LocLLmaskcbCurve & locllmascbCurve, bool &llmascbutili, const LocHHmaskcbCurve & lochhmascbCurve, bool & lhmascbutili,
+ bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref, int llColorMask, int llExpMask, int llSHMask, int llcbMask)
{
+/* comment on processus deltaE
+ * the algo uses 3 different ways to manage deltaE according to the type of intervention
+ * if we call "applyproc" : the datas produced upstream in bfw, bfh coordinate by the function producing something curves, retinex, exposure, etc.
+
+ * direct : in this case we use directly the datas produced upstream by "applyproc", with only a regulation produce for deltaE by reducdE
+ * direct : we found in this case "applyproc" modify data with low amplitude : BlurNoise, CBDL, Denoise, Sharp, Local contrast
+
+ * with first use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type 328.f * realstrdE
+ * in this case we found "applyproc" which result in direct use on Luminance : Exposure, Color and Light, Shadows highlight, SoftLight
+
+ * with second use of "buflight" on which is apply "applyproc", in this case we apply realstrdE = reducdE * buflight with a function of type fli = (100.f + realstrdE) / 100.f;
+ * in this case we found "applyproc" which result in large variations of L : Retinex, TM, and others
+
+ * if you change you must test before
+
+*/
+
//general call of others functions : important return hueref, chromaref, lumaref
if (params->locallab.enabled) {
BENCHFUN
@@ -3813,7 +3697,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
int del = 3; // to avoid crash with [loy - begy] and [lox - begx] and bfh bfw // with gtk2 [loy - begy-1] [lox - begx -1 ] and del = 1
struct local_params lp;
- calcLocalParams(sp, oW, oH, params->locallab, lp, llColorMask, llExpMask, llSHMask);
+ calcLocalParams(sp, oW, oH, params->locallab, lp, llColorMask, llExpMask, llSHMask, llcbMask);
const float radius = lp.rad / (sk * 1.4f); //0 to 70 ==> see skip
int strred = 1;//(lp.strucc - 1);
@@ -3831,11 +3715,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
}
-// we must here detect : general case, skin, sky,...foliages ???
-
-
-
-
if (lp.excmet == 1 && call <= 3) {//exclude
const int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone
const int bfw = int (lp.lx + lp.lxL) + del;
@@ -3911,53 +3790,42 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if (((radius >= 1.5 * GAUSS_SKIP && lp.rad > 1.) || lp.stren > 0.1) && lp.blurena) { // radius < GAUSS_SKIP means no gauss, just copy of original image
std::unique_ptr tmp1;
- std::unique_ptr bufgb;
- // LabImage *deltasobelL = nullptr;
- int GW = transformed->W;
- int GH = transformed->H;
- int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone
- int bfw = int (lp.lx + lp.lxL) + del;
- if (call <= 3 && lp.blurmet != 1) {
- bufgb.reset(new LabImage(bfw, bfh, true));
-
- int begy = lp.yc - lp.lyT;
- int begx = lp.xc - lp.lxL;
- int yEn = lp.yc + lp.ly;
- int xEn = lp.xc + lp.lx;
+ if (call <= 3 && lp.blurmet == 0) {
+ const int ystart = std::max(static_cast(lp.yc - lp.lyT) - cy, 0);
+ const int yend = std::min(static_cast(lp.yc + lp.ly) - cy, original->H);
+ const int xstart = std::max(static_cast(lp.xc - lp.lxL) - cx, 0);
+ const int xend = std::min(static_cast(lp.xc + lp.lx) - cx, original->W);
+ const int bfh = yend - ystart;
+ const int bfw = xend - xstart;
+ if (bfw > 0 && bfh > 0) {
+ tmp1.reset(new LabImage(bfw, bfh));
#ifdef _OPENMP
- #pragma omp parallel for schedule(dynamic,16)
+ #pragma omp parallel for schedule(dynamic,16)
#endif
- for (int y = 0; y < transformed->H ; y++) {
- const int loy = cy + y;
- if (loy >= begy && loy < yEn) {
- for (int x = 0; x < transformed->W; x++) {
- const int lox = cx + x;
- if (lox >= begx && lox < xEn) {
- bufgb->L[loy - begy][lox - begx] = original->L[y][x];
- bufgb->a[loy - begy][lox - begx] = original->a[y][x];
- bufgb->b[loy - begy][lox - begx] = original->b[y][x];
- }
+ for (int y = ystart; y < yend ; y++) {
+ for (int x = xstart; x < xend; x++) {
+ tmp1->L[y - ystart][x - xstart] = original->L[y][x];
+ tmp1->a[y - ystart][x - xstart] = original->a[y][x];
+ tmp1->b[y - ystart][x - xstart] = original->b[y][x];
}
}
- }
- tmp1.reset(new LabImage(bfw, bfh));
-
#ifdef _OPENMP
- #pragma omp parallel
+ #pragma omp parallel
#endif
- {
- gaussianBlur(bufgb->L, tmp1->L, bfw, bfh, radius);
- gaussianBlur(bufgb->a, tmp1->a, bfw, bfh, radius);
- gaussianBlur(bufgb->b, tmp1->b, bfw, bfh, radius);
+ {
+ gaussianBlur(tmp1->L, tmp1->L, bfw, bfh, radius);
+ gaussianBlur(tmp1->a, tmp1->a, bfw, bfh, radius);
+ gaussianBlur(tmp1->b, tmp1->b, bfw, bfh, radius);
+ }
}
-
-
} else {
+ const int GW = transformed->W;
+ const int GH = transformed->H;
tmp1.reset(new LabImage(transformed->W, transformed->H));
#ifdef _OPENMP
@@ -3967,20 +3835,19 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
gaussianBlur(original->L, tmp1->L, GW, GH, radius);
gaussianBlur(original->a, tmp1->a, GW, GH, radius);
gaussianBlur(original->b, tmp1->b, GW, GH, radius);
-
}
}
- if (lp.stren > 0.1f) {
- if (lp.blurmet <= 1) {
- float mean = 0.f;//0 best result
- float variance = lp.stren ; //(double) SQR(lp.stren)/sk;
- addGaNoise(tmp1.get(), tmp1.get(), mean, variance, sk) ;
- }
+ if (tmp1.get() && lp.stren > 0.1f) {
+ float mean = 0.f;//0 best result
+ float variance = lp.stren ;
+ addGaNoise(tmp1.get(), tmp1.get(), mean, variance, sk) ;
}
if (lp.blurmet == 0) { //blur and noise (center)
- BlurNoise_Local(tmp1.get(), hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk);
+ if (tmp1.get()) {
+ BlurNoise_Local(tmp1.get(), hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk);
+ }
} else {
InverseBlurNoise_Local(lp, hueref, chromaref, lumaref, original, transformed, tmp1.get(), cx, cy, sk);
}
@@ -3989,81 +3856,44 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
//local impulse
if ((lp.bilat > 0.f) && lp.denoiena) {
- int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone
- int bfw = int (lp.lx + lp.lxL) + del;
+ const int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone
+ const int bfw = int (lp.lx + lp.lxL) + del;
- LabImage *bufwv = nullptr;
+ std::unique_ptr bufwv;
if (call == 2) {//simpleprocess
- bufwv = new LabImage(bfw, bfh); //buffer for data in zone limit
+ bufwv.reset(new LabImage(bfw, bfh)); //buffer for data in zone limit
-
- int begy = lp.yc - lp.lyT;
- int begx = lp.xc - lp.lxL;
- int yEn = lp.yc + lp.ly;
- int xEn = lp.xc + lp.lx;
+ const int begy = lp.yc - lp.lyT;
+ const int begx = lp.xc - lp.lxL;
+ const int yEn = lp.yc + lp.ly;
+ const int xEn = lp.xc + lp.lx;
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
- for (int y = 0; y < transformed->H ; y++) //{
- for (int x = 0; x < transformed->W; x++) {
- int lox = cx + x;
- int loy = cy + y;
-
- if (lox >= begx && lox < xEn && loy >= begy && loy < yEn) {
- bufwv->L[loy - begy][lox - begx] = original->L[y][x];
- bufwv->a[loy - begy][lox - begx] = original->a[y][x];
- bufwv->b[loy - begy][lox - begx] = original->b[y][x];
- }
-
+ for (int y = rtengine::max(0, begy - cy); y < rtengine::min(transformed->H, yEn - cy); y++) {
+ const int loy = cy + y;
+ for (int x = rtengine::max(0, begx - cx); x < rtengine::min(transformed->W, xEn - cx); x++) {
+ const int lox = cx + x;
+ bufwv->L[loy - begy][lox - begx] = original->L[y][x];
+ bufwv->a[loy - begy][lox - begx] = original->a[y][x];
+ bufwv->b[loy - begy][lox - begx] = original->b[y][x];
}
+ }
} else {//dcrop.cc
-
- int GH = transformed->H;
- int GW = transformed->W;
-
- bufwv = new LabImage(GW, GH);
-#ifdef _OPENMP
- #pragma omp parallel for schedule(dynamic,16)
-#endif
-
- for (int ir = 0; ir < GH; ir++)
- for (int jr = 0; jr < GW; jr++) {
- bufwv->L[ir][jr] = original->L[ir][jr];
- bufwv->a[ir][jr] = original->a[ir][jr];
- bufwv->b[ir][jr] = original->b[ir][jr];
- }
-
-
+ bufwv.reset(new LabImage(transformed->W, transformed->H));
+ bufwv->CopyFrom(original);
} //end dcrop
- double thr = (float) lp.bilat / 20.0;
+ const double threshold = lp.bilat / 20.0;
if (bfh > 8 && bfw > 8) {
- ImProcFunctions::impulse_nr(bufwv, thr);
+ ImProcFunctions::impulse_nr(bufwv.get(), threshold);
}
- LabImage tmp1(bufwv->W, bufwv->H);
- //copy bufwv to tmp1 to use same algo for Denoise_local and DeNoise_Local_imp
-
-#ifdef _OPENMP
- #pragma omp parallel for schedule(dynamic,16)
-#endif
-
- for (int ir = 0; ir < bufwv->H; ir++)
- for (int jr = 0; jr < bufwv->W; jr++) {
- tmp1.L[ir][jr] = bufwv->L[ir][jr];
- tmp1.a[ir][jr] = bufwv->a[ir][jr];
- tmp1.b[ir][jr] = bufwv->b[ir][jr];
- }
-
-
-
- DeNoise_Local(call, lp, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, tmp1, cx, cy, sk);
-
- delete bufwv;
+ DeNoise_Local(call, lp, levred, huerefblur, lumarefblur, chromarefblur, original, transformed, *(bufwv.get()), cx, cy, sk);
}
//local denoise
@@ -5049,8 +4879,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if (bfw > 0 && bfh > 0) {
JaggedArray buflight(bfw, bfh);
JaggedArray bufl_ab(bfw, bfh);
- std::unique_ptr bufexporig(new LabImage(bfw, bfh)); //buffer for data in zone limit
- std::unique_ptr bufexpfin(new LabImage(bfw, bfh)); //buffer for data in zone limit
+ std::unique_ptr bufexporig(new LabImage(bfw, bfh));
+ std::unique_ptr bufexpfin(new LabImage(bfw, bfh));
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@@ -5107,10 +4937,10 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
const int bfw = xend - xstart;
if (bfw > 0 && bfh > 0) {
- JaggedArray buflight(bfw, bfh);
+ array2D buflight(bfw, bfh);
JaggedArray bufchro(bfw, bfh);
- std::unique_ptr bufgb(new LabImage(bfw, bfh)); //buffer for data in zone limit
- std::unique_ptr tmp1(new LabImage(bfw, bfh)); //buffer for data in zone limit
+ std::unique_ptr bufgb(new LabImage(bfw, bfh));
+ std::unique_ptr tmp1(new LabImage(bfw, bfh));
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@@ -5156,6 +4986,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bufchro[y][x] /= coefC;
}
}
+
+ if (lp.softradiustm > 0.f) {
+ softprocess(bufgb.get(), buflight, lp.softradiustm, bfh, bfw, sk, multiThread);
+ }
+
bufgb.reset();
transit_shapedetect(8, tmp1.get(), nullptr, buflight, bufchro, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk);
}
@@ -5164,7 +4999,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
//end TM
//begin cbdl
- if ((lp.mulloc[0] != 1.f || lp.mulloc[1] != 1.f || lp.mulloc[2] != 1.f || lp.mulloc[3] != 1.f || lp.mulloc[4] != 1.f || lp.clarityml != 0.f || lp.contresid != 0.f) && lp.cbdlena) {
+ if ((lp.mulloc[0] != 1.f || lp.mulloc[1] != 1.f || lp.mulloc[2] != 1.f || lp.mulloc[3] != 1.f || lp.mulloc[4] != 1.f || lp.clarityml != 0.f || lp.contresid != 0.f || lp.enacbMask || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) && lp.cbdlena) {
if (call <= 3) { //call from simpleprocess dcrop improcc
const int ystart = std::max(static_cast(lp.yc - lp.lyT) - cy, 0);
const int yend = std::min(static_cast(lp.yc + lp.ly) - cy, original->H);
@@ -5172,8 +5007,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
const int xend = std::min(static_cast(lp.xc + lp.lx) - cx, original->W);
int bfh = yend - ystart;
int bfw = xend - xstart;
- // int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone
- // int bfw = int (lp.lx + lp.lxL) + del;
if (bfw > 32 && bfh > 32) {
array2D bufsh(bfw, bfh);
@@ -5181,6 +5014,124 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
JaggedArray bufchrom(bfw, bfh, true);
std::unique_ptr loctemp(new LabImage(bfw, bfh));
std::unique_ptr origcbdl(new LabImage(bfw, bfh));
+ std::unique_ptr bufmaskorigcb;
+ std::unique_ptr bufmaskblurcb;
+ std::unique_ptr originalmaskcb;
+ if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) {
+ bufmaskorigcb.reset(new LabImage(bfw, bfh));
+ bufmaskblurcb.reset(new LabImage(bfw, bfh));
+ originalmaskcb.reset(new LabImage(bfw, bfh));
+ }
+
+ array2D ble(bfw, bfh);
+ array2D guid(bfw, bfh);
+ float meanfab, fab;
+
+ mean_fab(xstart, ystart, bfw, bfh, loctemp.get(), original, fab, meanfab, lp.chromaSH);
+
+#ifdef _OPENMP
+ #pragma omp parallel for schedule(dynamic,16)
+#endif
+
+ for (int y = 0; y < bfh; y++) {
+ for (int x = 0; x < bfw; x++) {
+ loctemp->L[y][x] = original->L[y + ystart][x + xstart];
+ }
+ }
+
+ if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) {
+
+#ifdef _OPENMP
+ #pragma omp parallel for schedule(dynamic,16)
+#endif
+
+ for (int ir = 0; ir < bfh; ir++) {
+ for (int jr = 0; jr < bfw; jr++) {
+ float kmaskLexp = 0;
+ float kmaskCH = 0;
+
+ if (locllmascbCurve && llmascbutili) {
+ float ligh = loctemp->L[ir][jr] / 32768.f;
+ kmaskLexp = 32768.f * LIM01(1.f - locllmascbCurve[500.f * ligh]);
+ }
+
+ if (lp.showmaskcbmet != 4) {
+ if (locccmascbCurve && lcmascbutili) {
+ float chromask = 0.0001f + sqrt(SQR((loctemp->a[ir][jr]) / fab) + SQR((loctemp->b[ir][jr]) / fab));
+ kmaskCH = LIM01(1.f - locccmascbCurve[500.f * chromask]);
+ }
+ }
+
+ if (lochhmascbCurve && lhmascbutili) {
+ float huema = xatan2f(loctemp->b[ir][jr], loctemp->a[ir][jr]);
+ float h = Color::huelab_to_huehsv2(huema);
+ h += 1.f / 6.f;
+
+ if (h > 1.f) {
+ h -= 1.f;
+ }
+
+ float valHH = LIM01(1.f - lochhmascbCurve[500.f * h]);
+
+ if (lp.showmaskcbmet != 4) {
+ kmaskCH += valHH;
+ }
+
+ kmaskLexp += 32768.f * valHH;
+ }
+
+ bufmaskblurcb->L[ir][jr] = CLIPLOC(kmaskLexp);
+ bufmaskblurcb->a[ir][jr] = kmaskCH;
+ bufmaskblurcb->b[ir][jr] = kmaskCH;
+ ble[ir][jr] = bufmaskblurcb->L[ir][jr] / 32768.f;
+ guid[ir][jr] = loctemp->L[ir][jr] / 32768.f;
+
+ }
+ }
+
+ if (lp.radmacb > 0.f) {
+ guidedFilter(guid, ble, ble, lp.radmacb * 10.f / sk, 0.001, multiThread, 4);
+ }
+
+ LUTf lutTonemaskcb(65536);
+ calcGammaLut(lp.gammacb, lp.slomacb, lutTonemaskcb);
+
+#ifdef _OPENMP
+ #pragma omp parallel for schedule(dynamic,16)
+#endif
+
+ for (int ir = 0; ir < bfh; ir++)
+ for (int jr = 0; jr < bfw; jr++) {
+ float L_;
+ bufmaskblurcb->L[ir][jr] = LIM01(ble[ir][jr]) * 32768.f;
+ L_ = 2.f * bufmaskblurcb->L[ir][jr];
+ bufmaskblurcb->L[ir][jr] = lutTonemaskcb[L_];
+ }
+
+ }
+
+ float radiusb = 1.f / sk;
+
+ if (lp.showmaskcbmet == 2 || lp.enacbMask || lp.showmaskcbmet == 3 || lp.showmaskcbmet == 4) {
+
+#ifdef _OPENMP
+ #pragma omp parallel
+#endif
+ {
+ gaussianBlur(bufmaskblurcb->L, bufmaskorigcb->L, bfw, bfh, radiusb);
+ gaussianBlur(bufmaskblurcb->a, bufmaskorigcb->a, bfw, bfh, 1.f + (0.5f * lp.radmacb) / sk);
+ gaussianBlur(bufmaskblurcb->b, bufmaskorigcb->b, bfw, bfh, 1.f + (0.5f * lp.radmacb) / sk);
+ }
+
+ if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 4 || lp.enacbMask) {
+
+ blendmask(lp, xstart, ystart, cx, cy, bfw, bfh, loctemp.get(), original, bufmaskorigcb.get(), originalmaskcb.get(), lp.blendmacb);
+
+ } else if (lp.showmaskcbmet == 3) {
+ showmask(lp, xstart, ystart, cx, cy, bfw, bfh, loctemp.get(), transformed, bufmaskorigcb.get());
+ return;
+ }
+ }
constexpr float b_l = -5.f;
constexpr float t_l = 25.f;
@@ -5188,6 +5139,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
constexpr float b_r = 170.f;
constexpr double skinprot = 0.;
constexpr int choice = 0;
+ if (lp.showmaskcbmet == 0 || lp.showmaskcbmet == 1 || lp.showmaskcbmet == 2 || lp.showmaskcbmet == 4 || lp.enacbMask) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@@ -5209,42 +5161,36 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
lp.mulloc[4]= 1.001f;
}
- ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, lp.mulloc, 1.f, lp.threshol, lp.clarityml, lp.contresid, skinprot, false, b_l, t_l, t_r, b_r, choice, sk);
-
- float minL = loctemp->L[0][0] - origcbdl->L[0][0];
- float maxL = minL;
-#ifdef _OPENMP
- #pragma omp parallel for reduction(max:maxL) reduction(min:minL) schedule(dynamic,16)
-#endif
- for (int ir = 0; ir < bfh; ir++) {
- for (int jr = 0; jr < bfw; jr++) {
- buflight[ir][jr] = loctemp->L[ir][jr] - origcbdl->L[ir][jr];
- minL = rtengine::min(minL, buflight[ir][jr]);
- maxL = rtengine::max(maxL, buflight[ir][jr]);
- }
- }
-
- float coef = 0.01f * (max(fabs(minL), fabs(maxL)));
-
-#ifdef _OPENMP
- #pragma omp parallel for schedule(dynamic,16)
-#endif
-
- for (int ir = 0; ir < bfh; ir++) {
- for (int jr = 0; jr < bfw; jr++) {
- buflight[ir][jr] /= coef;
- }
- }
+ ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, lp.mulloc, 1.f, lp.threshol, lp.clarityml, lp.contresid, lp.blurcbdl, skinprot, false, b_l, t_l, t_r, b_r, choice, sk, multiThread);
if (lp.softradiuscb > 0.f) {
- softprocess(origcbdl.get(), buflight, lp.softradiuscb, bfh, bfw, sk, multiThread);
+ array2D ble(bfw, bfh);
+ array2D guid(bfw, bfh);
+#ifdef _OPENMP
+ #pragma omp parallel for
+#endif
+ for (int ir = 0; ir < bfh; ir++)
+ for (int jr = 0; jr < bfw; jr++) {
+ ble[ir][jr] = (loctemp->L[ir][jr] - origcbdl->L[ir][jr]) / 32768.f;
+ guid[ir][jr] = origcbdl->L[ir][jr] / 32768.f;
+ }
+
+ rtengine::guidedFilter(guid, ble, ble, (lp.softradiuscb * 2.f / sk), 0.001, multiThread);
+#ifdef _OPENMP
+ #pragma omp parallel for
+#endif
+ for (int ir = 0; ir < bfh; ir++)
+ for (int jr = 0; jr < bfw; jr++) {
+ loctemp->L[ir][jr] = origcbdl->L[ir][jr] + 32768.f * ble[ir][jr];
+ }
}
-
- transit_shapedetect(6, loctemp.get(), nullptr, buflight, bufchrom, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk);
-
+ }
+ transit_shapedetect(6, loctemp.get(), originalmaskcb.get(), buflight, bufchrom, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk);
+
+ bool nochroma = (lp.showmaskcbmet == 2 || lp.showmaskcbmet == 1);
//chroma CBDL begin here
- if (lp.chromacb > 0.f) {
+ if (lp.chromacb > 0.f && !nochroma) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
@@ -5270,7 +5216,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
multc[lv] = rtengine::max((lp.chromacb * ((float) lp.mulloc[lv] - 1.f) / 100.f) + 1.f, 0.f);
}
- ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, multc, rtengine::max(lp.chromacb, 1.f), lp.threshol, clarich, 0.f, skinprot, false, b_l, t_l, t_r, b_r, choice, sk);
+ ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, multc, rtengine::max(lp.chromacb, 1.f), lp.threshol, clarich, 0.f, lp.blurcbdl, skinprot, false, b_l, t_l, t_r, b_r, choice, sk, multiThread);
float minC = loctemp->L[0][0] - sqrt(SQR(loctemp->a[0][0]) + SQR(loctemp->b[0][0]));
@@ -5553,7 +5499,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if (call == 2) { //call from simpleprocess
bufloca.reset(new LabImage(bfw, bfh));
- // JaggedArray hbuffer(bfw, bfh);
int begy = lp.yc - lp.lyT;
int begx = lp.xc - lp.lxL;
int yEn = lp.yc + lp.ly;
@@ -5824,7 +5769,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float coef = 0.01f * (max(fabs(minL), fabs(maxL)));
- //printf("minL=%f maxL=%f coef=%f\n", minL, maxL, coef);
for (int ir = 0; ir < Hd; ir++) {
for (int jr = 0; jr < Wd; jr++) {
@@ -5836,7 +5780,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
softprocess(bufreti, buflight, lp.softradiusret, Hd, Wd, sk, multiThread);
}
- transit_shapedetect_retinex(4, bufreti, buflight, bufchro, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, lp, original, transformed, cx, cy, sk);
+ transit_shapedetect_retinex(4, bufreti, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk);
} else {
InverseReti_Local(lp, hueref, chromaref, lumaref, original, transformed, tmpl, cx, cy, 0, sk);
}
@@ -5873,14 +5817,13 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if (!lp.invret && call <= 3) {
- float Chprov;
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int ir = 0; ir < Hd; ir += 1)
for (int jr = 0; jr < Wd; jr += 1) {
- Chprov = orig1[ir][jr];
+ const float Chprov = orig1[ir][jr];
float2 sincosval;
sincosval.y = Chprov == 0.0f ? 1.f : bufreti->a[ir][jr] / Chprov;
sincosval.x = Chprov == 0.0f ? 0.f : bufreti->b[ir][jr] / Chprov;
@@ -5888,31 +5831,28 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
tmpl->b[ir][jr] = orig[ir][jr] * sincosval.x;
}
- if (!lp.invret) {
- float minC = sqrt(SQR(tmpl->a[0][0]) + SQR(tmpl->b[0][0])) - Chprov;
- float maxC = minC;
+ float minC = sqrt(SQR(tmpl->a[0][0]) + SQR(tmpl->b[0][0]));
+ float maxC = minC;
#ifdef _OPENMP
- #pragma omp parallel for reduction(min:minC) reduction(max:maxC) schedule(dynamic,16)
+ #pragma omp parallel for reduction(min:minC) reduction(max:maxC) schedule(dynamic,16)
#endif
- for (int ir = 0; ir < Hd; ir++) {
- for (int jr = 0; jr < Wd; jr++) {
- bufchro[ir][jr] = sqrt(SQR(tmpl->a[ir][jr]) + SQR(tmpl->b[ir][jr])) - Chprov;
- minC = rtengine::min(minC, bufchro[ir][jr]);
- maxC = rtengine::max(maxC, bufchro[ir][jr]);
- }
- }
-
- float coefC = 0.01f * (max(fabs(minC), fabs(maxC)));
- // printf("minC=%f maxC=%f coefC=%f\n", minC, maxC, coefC);
-
- for (int ir = 0; ir < Hd; ir++) {
- for (int jr = 0; jr < Wd; jr++) {
- bufchro[ir][jr] /= coefC;
- }
+ for (int ir = 0; ir < Hd; ir++) {
+ for (int jr = 0; jr < Wd; jr++) {
+ bufchro[ir][jr] = sqrt(SQR(tmpl->a[ir][jr]) + SQR(tmpl->b[ir][jr]));
+ minC = rtengine::min(minC, bufchro[ir][jr]);
+ maxC = rtengine::max(maxC, bufchro[ir][jr]);
}
}
- } else {
+
+ const float coefC = 0.01f * (max(fabs(minC), fabs(maxC)));
+
+ for (int ir = 0; ir < Hd; ir++) {
+ for (int jr = 0; jr < Wd; jr++) {
+ bufchro[ir][jr] /= coefC;
+ }
+ }
+ } else {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@@ -5932,7 +5872,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if (!lp.invret) {
- transit_shapedetect_retinex(5, tmpl, buflight, bufchro, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, lp, original, transformed, cx, cy, sk);
+ transit_shapedetect_retinex(5, tmpl, buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk);
} else {
InverseReti_Local(lp, hueref, chromaref, lumaref, original, transformed, tmpl, cx, cy, 1, sk);
@@ -6171,7 +6111,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if (lp.expchroma != 0.f) {
constexpr float ampli = 70.f;
const float ch = (1.f + 0.02f * lp.expchroma);
- //convert data curve near values of slider -100 + 100, to be used after to detection shape
const float chprosl = ch <= 1.f ? 99.f * ch - 99.f : CLIPCHRO(ampli * ch - ampli);
#ifdef _OPENMP
@@ -6449,13 +6388,13 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float chprosl = 1.f;
if (lp.chro != 0.f) {
- const float ch = (1.f + 0.01f * lp.chro) ; //* (chromat * adjustr) / ((chromat + 0.00001f) * adjustr); //ch between 0 and 0 50 or more;
+ const float ch = (1.f + 0.01f * lp.chro) ;
- if (ch <= 1.f) {//convert data curve near values of slider -100 + 100, to be used after to detection shape
+ if (ch <= 1.f) {
chprosl = 99.f * ch - 99.f;
} else {
constexpr float ampli = 70.f;
- chprosl = CLIPCHRO(ampli * ch - ampli); //ampli = 25.f arbitrary empirical coefficient between 5 and 50
+ chprosl = CLIPCHRO(ampli * ch - ampli);
}
}
@@ -6475,7 +6414,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
const float chromat = sqrt(SQR(bufcolcalca) + SQR(bufcolcalcb));
const float ch = cclocalcurve[chromat * adjustr] / ((chromat + 0.00001f) * adjustr); //ch between 0 and 0 50 or more
constexpr float ampli = 25.f;
- chprocu = CLIPCHRO(ampli * ch - ampli); //ampli = 25.f arbitrary empirical coefficient between 5 and 50
+ chprocu = CLIPCHRO(ampli * ch - ampli);
}
bufchro[ir][jr] = chprosl + chprocu;
@@ -6492,7 +6431,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
}
if (lllocalcurve && locallutili && lp.qualcurvemet != 0) {// L=f(L) curve enhanced
- bufcolcalcL = 0.5f * lllocalcurve[bufcolcalcL * 2.f];// / ((lighn + 0.00001f) * 1.9f) ; // / ((lighn) / 1.9f) / 3.61f; //lh between 0 and 0 50 or more
+ bufcolcalcL = 0.5f * lllocalcurve[bufcolcalcL * 2.f];
}
if (loclhCurve && LHutili && lp.qualcurvemet != 0) {
diff --git a/rtengine/procevents.h b/rtengine/procevents.h
index 93cb9b9f4..621585a6a 100644
--- a/rtengine/procevents.h
+++ b/rtengine/procevents.h
@@ -690,7 +690,18 @@ enum ProcEventCode {
EvLocallabcontresid = 660,
Evlocallabnoiselumf0 = 661,
Evlocallabnoiselumf2 = 662,
-
+ EvLocallabblurcbdl = 663,
+ Evlocallabblendmaskcb = 664,
+ Evlocallabradmaskcb = 665,
+ Evlocallabchromaskcb = 666,
+ Evlocallabgammaskcb = 667,
+ Evlocallabslomaskcb = 668,
+ EvlocallabCCmaskcbshape = 669,
+ EvlocallabLLmaskcbshape = 670,
+ EvlocallabHHmaskcbshape = 671,
+ EvLocallabEnacbMask = 672,
+ EvlocallabshowmaskcbMethod = 673,
+ Evlocallabsoftradiustm = 674,
NUMOFEVENTS
};
diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc
index 405d970fe..e97b30777 100644
--- a/rtengine/procparams.cc
+++ b/rtengine/procparams.cc
@@ -2462,6 +2462,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
scaltm(10),
rewei(0),
sensitm(19),
+ softradiustm(0.0),
// Retinex
expreti(false),
retinexMethod("high"),
@@ -2497,9 +2498,19 @@ LocallabParams::LocallabSpot::LocallabSpot() :
chromacbdl(0),
threshold(0.2),
sensicb(15),
- clarityml(0),
+ clarityml(0.1),
contresid(0),
+ blurcbdl(0.),
softradiuscb(0.0),
+ enacbMask(false),
+ CCmaskcbcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35 },
+ LLmaskcbcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35},
+ HHmaskcbcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35},
+ blendmaskcb(0),
+ radmaskcb(10.0),
+ chromaskcb(0.0),
+ gammaskcb(1.0),
+ slomaskcb(0.0),
// Denoise
expdenoi(false),
noiselumf(0),
@@ -2647,6 +2658,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& scaltm == other.scaltm
&& rewei == other.rewei
&& sensitm == other.sensitm
+ && softradiustm == other.softradiustm
// Retinex
&& expreti == other.expreti
&& retinexMethod == other.retinexMethod
@@ -2693,7 +2705,17 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& sensicb == other.sensicb
&& clarityml == other.clarityml
&& contresid == other.contresid
+ && blurcbdl == other.blurcbdl
&& softradiuscb == other.softradiuscb
+ && enacbMask == other.enacbMask
+ && CCmaskcbcurve == other.CCmaskcbcurve
+ && LLmaskcbcurve == other.LLmaskcbcurve
+ && HHmaskcbcurve == other.HHmaskcbcurve
+ && blendmaskcb == other.blendmaskcb
+ && radmaskcb == other.radmaskcb
+ && chromaskcb == other.chromaskcb
+ && gammaskcb == other.gammaskcb
+ && slomaskcb == other.slomaskcb
// Denoise
&& expdenoi == other.expdenoi
&& noiselumf == other.noiselumf
@@ -3788,6 +3810,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).scaltm, "Locallab", "Scaltm_" + std::to_string(i), spot.scaltm, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).rewei, "Locallab", "Rewei_" + std::to_string(i), spot.rewei, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensitm, "Locallab", "Sensitm_" + std::to_string(i), spot.sensitm, keyFile);
+ saveToKeyfile(!pedited || pedited->locallab.spots.at(i).softradiustm, "Locallab", "Softradiustm_" + std::to_string(i), spot.softradiustm, keyFile);
// Retinex
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expreti, "Locallab", "Expreti_" + std::to_string(i), spot.expreti, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).retinexMethod, "Locallab", "retinexMethod_" + std::to_string(i), spot.retinexMethod, keyFile);
@@ -3829,7 +3852,17 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensicb, "Locallab", "Sensicb_" + std::to_string(i), spot.sensicb, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).clarityml, "Locallab", "Clarityml_" + std::to_string(i), spot.clarityml, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).contresid, "Locallab", "Contresid_" + std::to_string(i), spot.contresid, keyFile);
+ saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blurcbdl, "Locallab", "Blurcbdl_" + std::to_string(i), spot.blurcbdl, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).softradiuscb, "Locallab", "Softradiuscb_" + std::to_string(i), spot.softradiuscb, keyFile);
+ saveToKeyfile(!pedited || pedited->locallab.spots.at(i).enacbMask, "Locallab", "EnacbMask_" + std::to_string(i), spot.enacbMask, keyFile);
+ saveToKeyfile(!pedited || pedited->locallab.spots.at(i).CCmaskcbcurve, "Locallab", "CCmaskcbCurve_" + std::to_string(i), spot.CCmaskcbcurve, keyFile);
+ saveToKeyfile(!pedited || pedited->locallab.spots.at(i).LLmaskcbcurve, "Locallab", "LLmaskcbCurve_" + std::to_string(i), spot.LLmaskcbcurve, keyFile);
+ saveToKeyfile(!pedited || pedited->locallab.spots.at(i).HHmaskcbcurve, "Locallab", "HHmaskcbCurve_" + std::to_string(i), spot.HHmaskcbcurve, keyFile);
+ saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blendmaskcb, "Locallab", "Blendmaskcb_" + std::to_string(i), spot.blendmaskcb, keyFile);
+ saveToKeyfile(!pedited || pedited->locallab.spots.at(i).radmaskcb, "Locallab", "Radmaskcb_" + std::to_string(i), spot.radmaskcb, keyFile);
+ saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskcb, "Locallab", "Chromaskcb_" + std::to_string(i), spot.chromaskcb, keyFile);
+ saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskcb, "Locallab", "Gammaskcb_" + std::to_string(i), spot.gammaskcb, keyFile);
+ saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskcb, "Locallab", "Slomaskcb_" + std::to_string(i), spot.slomaskcb, keyFile);
// Denoise
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expdenoi, "Locallab", "Expdenoi_" + std::to_string(i), spot.expdenoi, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).noiselumf, "Locallab", "noiselumf_" + std::to_string(i), spot.noiselumf, keyFile);
@@ -5070,6 +5103,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Scaltm_" + std::to_string(i), pedited, spot.scaltm, spotEdited.scaltm);
assignFromKeyfile(keyFile, "Locallab", "Rewei_" + std::to_string(i), pedited, spot.rewei, spotEdited.rewei);
assignFromKeyfile(keyFile, "Locallab", "Sensitm_" + std::to_string(i), pedited, spot.sensitm, spotEdited.sensitm);
+ assignFromKeyfile(keyFile, "Locallab", "Softradiustm_" + std::to_string(i), pedited, spot.softradiustm, spotEdited.softradiustm);
// Retinex
assignFromKeyfile(keyFile, "Locallab", "Expreti_" + std::to_string(i), pedited, spot.expreti, spotEdited.expreti);
assignFromKeyfile(keyFile, "Locallab", "retinexMethod_" + std::to_string(i), pedited, spot.retinexMethod, spotEdited.retinexMethod);
@@ -5111,7 +5145,17 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Sensicb_" + std::to_string(i), pedited, spot.sensicb, spotEdited.sensicb);
assignFromKeyfile(keyFile, "Locallab", "Clarityml_" + std::to_string(i), pedited, spot.clarityml, spotEdited.clarityml);
assignFromKeyfile(keyFile, "Locallab", "Contresid_" + std::to_string(i), pedited, spot.contresid, spotEdited.contresid);
+ assignFromKeyfile(keyFile, "Locallab", "Blurcbdl_" + std::to_string(i), pedited, spot.blurcbdl, spotEdited.blurcbdl);
assignFromKeyfile(keyFile, "Locallab", "Softradiuscb_" + std::to_string(i), pedited, spot.softradiuscb, spotEdited.softradiuscb);
+ assignFromKeyfile(keyFile, "Locallab", "Blendmaskcb_" + std::to_string(i), pedited, spot.blendmaskcb, spotEdited.blendmaskcb);
+ assignFromKeyfile(keyFile, "Locallab", "EnacbMask_" + std::to_string(i), pedited, spot.enacbMask, spotEdited.enacbMask);
+ assignFromKeyfile(keyFile, "Locallab", "CCmaskcbCurve_" + std::to_string(i), pedited, spot.CCmaskcbcurve, spotEdited.CCmaskcbcurve);
+ assignFromKeyfile(keyFile, "Locallab", "LLmaskcbCurve_" + std::to_string(i), pedited, spot.LLmaskcbcurve, spotEdited.LLmaskcbcurve);
+ assignFromKeyfile(keyFile, "Locallab", "HHmaskcbCurve_" + std::to_string(i), pedited, spot.HHmaskcbcurve, spotEdited.HHmaskcbcurve);
+ assignFromKeyfile(keyFile, "Locallab", "Radmaskcb_" + std::to_string(i), pedited, spot.radmaskcb, spotEdited.radmaskcb);
+ assignFromKeyfile(keyFile, "Locallab", "Chromaskcb_" + std::to_string(i), pedited, spot.chromaskcb, spotEdited.chromaskcb);
+ assignFromKeyfile(keyFile, "Locallab", "Gammaskcb_" + std::to_string(i), pedited, spot.gammaskcb, spotEdited.gammaskcb);
+ assignFromKeyfile(keyFile, "Locallab", "Slomaskcb_" + std::to_string(i), pedited, spot.slomaskcb, spotEdited.slomaskcb);
// Denoise
assignFromKeyfile(keyFile, "Locallab", "Expdenoi_" + std::to_string(i), pedited, spot.expdenoi, spotEdited.expdenoi);
assignFromKeyfile(keyFile, "Locallab", "noiselumf_" + std::to_string(i), pedited, spot.noiselumf, spotEdited.noiselumf);
diff --git a/rtengine/procparams.h b/rtengine/procparams.h
index 7abefd222..6fb35ac71 100644
--- a/rtengine/procparams.h
+++ b/rtengine/procparams.h
@@ -1063,6 +1063,7 @@ struct LocallabParams {
int scaltm;
int rewei;
int sensitm;
+ double softradiustm;
// Retinex
bool expreti;
Glib::ustring retinexMethod;
@@ -1098,9 +1099,19 @@ struct LocallabParams {
int chromacbdl;
double threshold;
int sensicb;
- int clarityml;
+ double clarityml;
int contresid;
+ double blurcbdl;
double softradiuscb;
+ bool enacbMask;
+ std::vector CCmaskcbcurve;
+ std::vector LLmaskcbcurve;
+ std::vector HHmaskcbcurve;
+ int blendmaskcb;
+ double radmaskcb;
+ double chromaskcb;
+ double gammaskcb;
+ double slomaskcb;
// Denoise
bool expdenoi;
int noiselumf;
diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc
index d0f143d49..9760f0aa8 100644
--- a/rtengine/refreshmap.cc
+++ b/rtengine/refreshmap.cc
@@ -689,7 +689,19 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, // EvLocallabclarityml
LUMINANCECURVE, // EvLocallabcontresid
LUMINANCECURVE, //Evlocallabnoiselumf0
- LUMINANCECURVE //Evlocallabnoiselumf2
+ LUMINANCECURVE, //Evlocallabnoiselumf2
+ LUMINANCECURVE, //Evlocallabblurcbdl
+ LUMINANCECURVE, //Evlocallabblendmaskcb
+ LUMINANCECURVE, // Evlocallabradmaskcb
+ LUMINANCECURVE, //Evlocallabchromaskcb
+ LUMINANCECURVE, //Evlocallabgammaskcb
+ LUMINANCECURVE, //Evlocallabslomaskcb
+ LUMINANCECURVE, //EvlocallabCCmaskcbshape
+ LUMINANCECURVE, //EvlocallabLLmaskcbshape
+ LUMINANCECURVE, //EvlocallabHHmaskcbshape
+ LUMINANCECURVE, //EvLocallabEnacbMask
+ LUMINANCECURVE, //EvlocallabshowmaskcbMethod
+ LUMINANCECURVE //Evlocallabsoftradiustm
};
diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h
index 981f4c73a..a2d745127 100644
--- a/rtengine/rtengine.h
+++ b/rtengine/rtengine.h
@@ -499,7 +499,7 @@ public:
virtual void updateUnLock() = 0;
- virtual void setLocallabMaskVisibility(int locallColorMask, int locallExpMask, int locallSHMask) = 0;
+ virtual void setLocallabMaskVisibility(int locallColorMask, int locallExpMask, int locallSHMask, int locallcbMask) = 0;
/** Creates and returns a Crop instance that acts as a window on the image
* @param editDataProvider pointer to the EditDataProvider that communicates with the EditSubscriber
diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc
index f138483ae..f3379b0c5 100644
--- a/rtengine/simpleprocess.cc
+++ b/rtengine/simpleprocess.cc
@@ -1095,6 +1095,9 @@ private:
LocCCmaskSHCurve locccmasSHCurve;
LocLLmaskSHCurve locllmasSHCurve;
LocHHmaskSHCurve lochhmasSHCurve;
+ LocCCmaskcbCurve locccmascbCurve;
+ LocLLmaskcbCurve locllmascbCurve;
+ LocHHmaskcbCurve lochhmascbCurve;
LUTf lllocalcurve(65536, 0);
LUTf cclocalcurve(65536, 0);
LUTf hltonecurveloc(65536, 0);
@@ -1128,6 +1131,9 @@ private:
bool lcmasSHutili = false;
bool lhmasSHutili = false;
bool llmasSHutili = false;
+ bool lcmascbutili = false;
+ bool lhmascbutili = false;
+ bool llmascbutili = false;
bool lcmasutili = false;
bool lhmasutili = false;
locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve);
@@ -1142,6 +1148,9 @@ private:
locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve, lcmasSHutili);
locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve, llmasSHutili);
lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve, lhmasSHutili);
+ locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve, lcmascbutili);
+ locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve, llmascbutili);
+ lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve, lhmascbutili);
CurveFactory::curveLocal(locallutili, params.locallab.spots.at(sp).llcurve, lllocalcurve, 1);
CurveFactory::curveCCLocal(localcutili, params.locallab.spots.at(sp).cccurve, cclocalcurve, 1);
CurveFactory::curveexLocal(localexutili, params.locallab.spots.at(sp).excurve, exlocalcurve, 1);
@@ -1169,7 +1178,8 @@ private:
// No Locallab mask is shown in exported picture
ipf.Lab_Local(2, sp, (float**)shbuffer, labView, labView, reservView, 0, 0, fw, fh, 1, locRETgainCurve, lllocalcurve, locallutili, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
- LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0);
+ locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
+ LHutili, HHutili, cclocalcurve, localcutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, 0, 0, 0, 0);
// Clear local curves
diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt
index 165f30d8a..cdb8749bf 100644
--- a/rtgui/CMakeLists.txt
+++ b/rtgui/CMakeLists.txt
@@ -236,7 +236,8 @@ else()
)
endif()
-if(OPENMP_FOUND AND NOT APPLE)
+# Excluding libatomic needed by Clang/FreeBSD, #3636
+if(OPENMP_FOUND AND NOT APPLE AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
set(EXTRA_LIB_RTGUI ${EXTRA_LIB_RTGUI} "atomic")
endif()
diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc
index df2a79539..6c08eca2b 100644
--- a/rtgui/controlspotpanel.cc
+++ b/rtgui/controlspotpanel.cc
@@ -23,8 +23,10 @@
#include "multilangmgr.h"
#include
#include "editwidgets.h"
+#include "options.h"
using namespace rtengine;
+extern Options options;
//-----------------------------------------------------------------------------
// ControlSpotPanel
@@ -61,10 +63,10 @@ ControlSpotPanel::ControlSpotPanel():
centerY_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CENTER_Y"), -1000, 1000, 1, 0))),
circrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CIRCRADIUS"), 2, 150, 1, 18))),
transit_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITVALUE"), 5, 95, 1, 60))),
- thresh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESDELTAE"), 0.0, 8.0, 0.1, 2.0))),
- iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 0.2, 4.0, 0.1, 2.0))),
- balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.3, 1.7, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-white-small.png"))))),
- transitweak_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITWEAK"), 0.5, 4.0, 0.1, 1.0))),
+ thresh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESDELTAE"), 0.0, 10.0, 0.1, 2.0))),
+ iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 0.2, 10.0, 0.1, 2.0))),
+ balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-white-small.png"))))),
+ transitweak_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITWEAK"), 0.5, 8.0, 0.1, 1.0))),
avoid_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AVOID")))),
@@ -76,6 +78,8 @@ ControlSpotPanel::ControlSpotPanel():
eventType(None),
excluFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_EXCLUF"))))
{
+ bool showtooltip = options.showtooltip;
+
Gtk::HBox* const hbox1_ = Gtk::manage(new Gtk::HBox(true, 4));
buttonaddconn_ = button_add_->signal_clicked().connect(
sigc::mem_fun(*this, &ControlSpotPanel::on_button_add));
@@ -160,7 +164,7 @@ ControlSpotPanel::ControlSpotPanel():
Gtk::HBox* const ctboxspotmethod = Gtk::manage(new Gtk::HBox());
Gtk::Label* const labelspotmethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_EXCLUTYPE") + ":"));
ctboxspotmethod->pack_start(*labelspotmethod, Gtk::PACK_SHRINK, 4);
- ctboxspotmethod->set_tooltip_markup(M("TP_LOCALLAB_EXCLUTYPE_TOOLTIP"));
+ if(showtooltip) ctboxspotmethod->set_tooltip_markup(M("TP_LOCALLAB_EXCLUTYPE_TOOLTIP"));
spotMethod_->append(M("TP_LOCALLAB_EXNORM"));
spotMethod_->append(M("TP_LOCALLAB_EXECLU"));
spotMethod_->set_active(0);
@@ -171,9 +175,9 @@ ControlSpotPanel::ControlSpotPanel():
pack_start(*ctboxspotmethod);
excluFrame->set_label_align(0.025, 0.5);
- excluFrame->set_tooltip_text(M("TP_LOCALLAB_EXCLUF_TOOLTIP"));
+ if(showtooltip) excluFrame->set_tooltip_text(M("TP_LOCALLAB_EXCLUF_TOOLTIP"));
ToolParamBlock* const excluBox = Gtk::manage(new ToolParamBlock());
- sensiexclu_->set_tooltip_text(M("TP_LOCALLAB_SENSIEXCLU_TOOLTIP"));
+ if(showtooltip) sensiexclu_->set_tooltip_text(M("TP_LOCALLAB_SENSIEXCLU_TOOLTIP"));
sensiexclu_->setAdjusterListener(this);
structexclu_->setAdjusterListener(this);
excluBox->pack_start(*sensiexclu_);
@@ -184,7 +188,7 @@ ControlSpotPanel::ControlSpotPanel():
Gtk::HBox* const ctboxshapemethod = Gtk::manage(new Gtk::HBox());
Gtk::Label* const labelshapemethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_STYPE") + ":"));
ctboxshapemethod->pack_start(*labelshapemethod, Gtk::PACK_SHRINK, 4);
- ctboxshapemethod->set_tooltip_markup(M("TP_LOCALLAB_STYPE_TOOLTIP"));
+ if(showtooltip) ctboxshapemethod->set_tooltip_markup(M("TP_LOCALLAB_STYPE_TOOLTIP"));
shapeMethod_->append(M("TP_LOCALLAB_IND"));
shapeMethod_->append(M("TP_LOCALLAB_SYM"));
shapeMethod_->append(M("TP_LOCALLAB_INDSL"));
@@ -219,8 +223,8 @@ ControlSpotPanel::ControlSpotPanel():
Gtk::HBox* const ctboxqualitymethod = Gtk::manage(new Gtk::HBox());
Gtk::Label* const labelqualitymethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_QUAL_METHOD") + ":"));
- ctboxqualitymethod->pack_start(*labelqualitymethod, Gtk::PACK_SHRINK, 4);
- ctboxqualitymethod->set_tooltip_markup(M("TP_LOCALLAB_METHOD_TOOLTIP"));
+ ctboxqualitymethod->pack_start(*labelqualitymethod, Gtk::PACK_SHRINK, 4);
+ if(showtooltip) ctboxqualitymethod->set_tooltip_markup(M("TP_LOCALLAB_METHOD_TOOLTIP"));
qualityMethod_->append(M("TP_LOCALLAB_ENH"));
qualityMethod_->append(M("TP_LOCALLAB_ENHDEN"));
qualityMethod_->set_active(1);
@@ -232,10 +236,10 @@ ControlSpotPanel::ControlSpotPanel():
Gtk::Frame* const transitFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TRANSIT")));
transitFrame->set_label_align(0.025, 0.5);
- transitFrame->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP"));
+ if(showtooltip) transitFrame->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP"));
ToolParamBlock* const transitBox = Gtk::manage(new ToolParamBlock());
- transit_->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP"));
- transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP"));
+ if(showtooltip) transit_->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP"));
+ if(showtooltip) transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP"));
transit_->setAdjusterListener(this);
transitweak_->setAdjusterListener(this);
@@ -246,7 +250,7 @@ ControlSpotPanel::ControlSpotPanel():
Gtk::Frame* const artifFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_ARTIF")));
artifFrame->set_label_align(0.025, 0.5);
- artifFrame->set_tooltip_text(M("TP_LOCALLAB_ARTIF_TOOLTIP"));
+ if(showtooltip) artifFrame->set_tooltip_text(M("TP_LOCALLAB_ARTIF_TOOLTIP"));
ToolParamBlock* const artifBox = Gtk::manage(new ToolParamBlock());
thresh_->setAdjusterListener(this);
struc_->setAdjusterListener(this);
diff --git a/rtgui/cursormanager.cc b/rtgui/cursormanager.cc
index 9a28eb061..3181d288e 100644
--- a/rtgui/cursormanager.cc
+++ b/rtgui/cursormanager.cc
@@ -56,7 +56,7 @@ void CursorManager::init (Glib::RefPtr mainWindow)
Glib::RefPtr rotate = RTImage::createPixbufFromFile("rotate-aroundnode-hicontrast.png");
Glib::RefPtr wait = RTImage::createPixbufFromFile("gears.png"); // Currently unused, create *-hicontrast once used.
- double s = RTScalable::getTweakedDPI() / 96.; // RTScalable::getDPI() might be preferable, however it imply a lot of work to support this option
+ double s = RTScalable::getTweakedDPI() / RTScalable::baseDPI; // RTScalable::getDPI() might be preferable, however it imply a lot of work to support this option
cAdd = add ? Gdk::Cursor::create(display, add, (int)(8.*s), (int)(8.*s)) : Gdk::Cursor::create(display, Gdk::PLUS);
cAddPicker = colPickAdd ? Gdk::Cursor::create(display, colPickAdd, (int)(4.*s), (int)(21.*s)) : Gdk::Cursor::create(display, Gdk::PLUS);
diff --git a/rtgui/editwindow.cc b/rtgui/editwindow.cc
index 8ba829b26..ec7201f84 100644
--- a/rtgui/editwindow.cc
+++ b/rtgui/editwindow.cc
@@ -51,7 +51,7 @@ EditWindow* EditWindow::getInstance(RTWindow* p, bool restore)
return &instance_.editWnd;
}
-EditWindow::EditWindow (RTWindow* p) : resolution(96.), parent(p) , isFullscreen(false), isClosed(true)
+EditWindow::EditWindow (RTWindow* p) : resolution(RTScalable::baseDPI), parent(p) , isFullscreen(false), isClosed(true)
{
updateResolution();
@@ -128,7 +128,7 @@ bool EditWindow::updateResolution()
double res = get_screen()->get_resolution();
if (scale == 2) {
// from Windows' behavior : if scale==2, resolution = 192. (Gtk shows 96 dpi !?), there's no higher value
- res = 192.;
+ res = RTScalable::baseHiDPI;
}
bool retVal = res != resolution;
resolution = res;
@@ -141,11 +141,11 @@ void EditWindow::setAppIcon()
bool downsize = false;
// findIconAbsolutePath won't be able to select the image based on resolution with the
// storage of the images, we're doing the selection here
- if (resolution == 96.) {
+ if (resolution == RTScalable::baseDPI) {
fName = "rawtherapee-logo-24.png";
} else {
fName = "rawtherapee-logo-48.png";
- if (resolution < 192.) {
+ if (resolution < RTScalable::baseHiDPI) {
downsize = true;
}
}
@@ -155,7 +155,7 @@ void EditWindow::setAppIcon()
return;
}
if (downsize) {
- int size = int((48. * resolution) / 192.);
+ int size = int((48. * resolution) / RTScalable::baseHiDPI);
pixbuf->scale_simple(size, size, Gdk::InterpType::INTERP_BILINEAR);
}
diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc
index 0fb65a7ba..7a36fb194 100644
--- a/rtgui/locallab.cc
+++ b/rtgui/locallab.cc
@@ -1,7 +1,7 @@
/*
* This file is part of RawTherapee.
*
- * Copyright (c) 2004-2010 Gabor Horvath
+ * Copyright (c) 2004-2010 Gabor Horvath frame
*
*
* RawTherapee is free software: you can redistribute it and/or modify
@@ -58,6 +58,10 @@ Locallab::Locallab():
expcontrast(new MyExpander(true, M("TP_LOCALLAB_LOC_CONTRAST"))),
expcbdl(new MyExpander(true, new Gtk::HBox())),
expdenoi(new MyExpander(true, new Gtk::HBox())),
+ expmaskcol(new MyExpander(false, M("TP_LOCALLAB_SHOW"))),
+ expmaskexp(new MyExpander(false, M("TP_LOCALLAB_SHOW"))),
+ expmasksh(new MyExpander(false, M("TP_LOCALLAB_SHOW"))),
+ expmaskcb(new MyExpander(false, M("TP_LOCALLAB_SHOW"))),
// CurveEditorGroup widgets
// Color & Light
@@ -73,7 +77,9 @@ Locallab::Locallab():
curveEditorGG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL"))),
// Retinex
LocalcurveEditorgainT(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_TRANSMISSIONGAIN"))),
-
+ //CBDL
+ maskcbCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))),
+
// Adjuster widgets
// Color & Light
lightness(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LIGHTNESS"), -100, 100, 1, 0))),
@@ -137,6 +143,7 @@ Locallab::Locallab():
scaltm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALTM"), 1, 100, 1, 10))),
rewei(Gtk::manage(new Adjuster(M("TP_LOCALLAB_REWEI"), 0, 9, 1, 0))),
sensitm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))),
+ softradiustm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))),
// Retinex
str(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STR"), 0, 100, 1, 0))),
chrrt(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHRRT"), 0, 100, 1, 0))),
@@ -162,10 +169,16 @@ Locallab::Locallab():
// Contrast by detail levels
chromacbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMACBDL"), 0, 300, 1, 0))),
threshold(Gtk::manage(new Adjuster(M("TP_DIRPYREQUALIZER_THRESHOLD"), 0, 1., 0.01, 0.2))),
- clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0, 100, 1, 0))),
+ clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0.1, 100., 0.1, 0.1))),
contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))),
+ blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0., 100., 0.1, 0.))),
sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))),
softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))),
+ blendmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))),
+ radmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 10.))),
+ chromaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))),
+ gammaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))),
+ slomaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))),
// Denoise
noiselumf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINE"), MINCHRO, MAXCHRO, 1, 0))),
noiselumf0(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINEZERO"), MINCHRO, MAXCHRO, 1, 0))),
@@ -201,7 +214,9 @@ Locallab::Locallab():
inversret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))),
// Sharpening
inverssha(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))),
-
+ //CBDL
+ enacbMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))),
+
// ComboBox widgets
// Color & Light
qualitycurveMethod(Gtk::manage(new MyComboBoxText())),
@@ -215,6 +230,8 @@ Locallab::Locallab():
blurMethod(Gtk::manage(new MyComboBoxText())),
// Retinex
retinexMethod(Gtk::manage(new MyComboBoxText())),
+ //CBDL
+ showmaskcbMethod(Gtk::manage(new MyComboBoxText())),
// ThresholdAdjuster widgets
// Vibrance
@@ -225,9 +242,6 @@ Locallab::Locallab():
lumacontrastMinusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS")))),
lumaneutralButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL")))),
lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS")))),
- maskcolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))),
- maskexpFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))),
- maskSHFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))),
gridFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABGRID")))),
residFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RESID")))),
@@ -253,6 +267,9 @@ Locallab::Locallab():
expcolor->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expcolor));
enablecolorConn = expcolor->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expcolor));
// expcolor->set_tooltip_text(M("TP_LOCALLAB_EXPCOLOR_TOOLTIP"));
+ setExpandAlignProperties (expmaskcol, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
+ expmaskcol->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmaskcol));
+ expmaskcol->setLevel (2);
curvactivConn = curvactiv->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::curvactivChanged));
lightness->setAdjusterListener(this);
@@ -411,7 +428,6 @@ Locallab::Locallab():
colorBox->pack_start(*llCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
colorBox->pack_start(*HCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
colorBox->pack_start(*invers);
- maskcolFrame->set_label_align(0.025, 0.5);
ToolParamBlock* const maskcolBox = Gtk::manage(new ToolParamBlock());
maskcolBox->pack_start(*showmaskcolMethod, Gtk::PACK_SHRINK, 4);
maskcolBox->pack_start(*enaColorMask, Gtk::PACK_SHRINK, 0);
@@ -421,8 +437,8 @@ Locallab::Locallab():
maskcolBox->pack_start(*chromaskcol, Gtk::PACK_SHRINK, 0);
maskcolBox->pack_start(*gammaskcol, Gtk::PACK_SHRINK, 0);
maskcolBox->pack_start(*slomaskcol, Gtk::PACK_SHRINK, 0);
- maskcolFrame->add(*maskcolBox);
- colorBox->pack_start(*maskcolFrame);
+ expmaskcol->add(*maskcolBox);
+ colorBox->pack_start(*expmaskcol);
expcolor->add(*colorBox);
expcolor->setLevel(2);
@@ -434,6 +450,10 @@ Locallab::Locallab():
enableexposeConn = expexpose->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expexpose));
if(showtooltip) expexpose->set_tooltip_text(M("TP_LOCALLAB_EXPOSURE_TOOLTIP"));
+ setExpandAlignProperties (expmaskexp, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
+ expmaskexp->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmaskexp));
+ expmaskexp->setLevel (2);
+
expcomp->setAdjusterListener(this);
hlcompr->setAdjusterListener(this);
@@ -526,7 +546,6 @@ Locallab::Locallab():
exposeBox->pack_start(*softradiusexp);
exposeBox->pack_start(*curveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
exposeBox->pack_start(*inversex);
- maskexpFrame->set_label_align(0.025, 0.5);
ToolParamBlock* const maskexpBox = Gtk::manage(new ToolParamBlock());
maskexpBox->pack_start(*showmaskexpMethod, Gtk::PACK_SHRINK, 4);
maskexpBox->pack_start(*enaExpMask, Gtk::PACK_SHRINK, 0);
@@ -536,8 +555,8 @@ Locallab::Locallab():
maskexpBox->pack_start(*chromaskexp, Gtk::PACK_SHRINK, 0);
maskexpBox->pack_start(*gammaskexp, Gtk::PACK_SHRINK, 0);
maskexpBox->pack_start(*slomaskexp, Gtk::PACK_SHRINK, 0);
- maskexpFrame->add(*maskexpBox);
- exposeBox->pack_start(*maskexpFrame);
+ expmaskexp->add(*maskexpBox);
+ exposeBox->pack_start(*expmaskexp);
expexpose->add(*exposeBox);
expexpose->setLevel(2);
@@ -551,6 +570,10 @@ Locallab::Locallab():
enableshadhighConn = expshadhigh->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expshadhigh));
if(showtooltip) expshadhigh->set_tooltip_text(M("TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP"));
+ setExpandAlignProperties (expmasksh, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
+ expmasksh->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmasksh));
+ expmasksh->setLevel (2);
+
highlights->setAdjusterListener(this);
h_tonalwidth->setAdjusterListener(this);
shadows->setAdjusterListener(this);
@@ -612,7 +635,6 @@ Locallab::Locallab():
shadhighBox->pack_start(*blurSHde);
shadhighBox->pack_start(*inverssh);
- maskSHFrame->set_label_align(0.025, 0.5);
ToolParamBlock* const maskSHBox = Gtk::manage(new ToolParamBlock());
maskSHBox->pack_start(*showmaskSHMethod, Gtk::PACK_SHRINK, 4);
@@ -623,8 +645,8 @@ Locallab::Locallab():
maskSHBox->pack_start(*chromaskSH, Gtk::PACK_SHRINK, 0);
maskSHBox->pack_start(*gammaskSH, Gtk::PACK_SHRINK, 0);
maskSHBox->pack_start(*slomaskSH, Gtk::PACK_SHRINK, 0);
- maskSHFrame->add(*maskSHBox);
- shadhighBox->pack_start(*maskSHFrame);
+ expmasksh->add(*maskSHBox);
+ shadhighBox->pack_start(*expmasksh);
expshadhigh->add(*shadhighBox);
expshadhigh->setLevel(2);
@@ -747,6 +769,7 @@ Locallab::Locallab():
if(showtooltip) sensitm->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP"));
sensitm->setAdjusterListener(this);
+ softradiustm->setAdjusterListener(this);
ToolParamBlock* const tmBox = Gtk::manage(new ToolParamBlock());
tmBox->pack_start(*stren);
@@ -754,6 +777,7 @@ Locallab::Locallab():
tmBox->pack_start(*estop);
tmBox->pack_start(*scaltm);
tmBox->pack_start(*rewei);
+ tmBox->pack_start(*softradiustm);
tmBox->pack_start(*sensitm);
exptonemap->add(*tmBox);
exptonemap->setLevel(2);
@@ -904,6 +928,10 @@ Locallab::Locallab():
enablecbdlConn = expcbdl->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expcbdl));
if(showtooltip) expcbdl->set_tooltip_text(M("TP_LOCALLAB_EXPCBDL_TOOLTIP"));
+ setExpandAlignProperties (expmaskcb, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
+ expmaskcb->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmaskcb));
+ expmaskcb->setLevel (2);
+
for (int i = 0; i < 5; i++) {
Glib::ustring ss;
ss = Glib::ustring::format(i);
@@ -928,6 +956,50 @@ Locallab::Locallab():
softradiuscb->setAdjusterListener(this);
clarityml->setAdjusterListener(this);
contresid->setAdjusterListener(this);
+ blurcbdl->setAdjusterListener(this);
+ blendmaskcb->setAdjusterListener(this);
+ radmaskcb->setAdjusterListener(this);
+ chromaskcb->setAdjusterListener(this);
+ gammaskcb->setAdjusterListener(this);
+ slomaskcb->setAdjusterListener(this);
+
+ enacbMaskConn = enacbMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::enacbMaskChanged));
+
+ showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMNONE"));
+ showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIF"));
+ showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK"));
+ showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMASK"));
+ showmaskcbMethod->append(M("TP_LOCALLAB_PREVIEWSEL"));
+
+
+ showmaskcbMethod->set_active(0);
+ if(showtooltip) showmaskcbMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP"));
+ showmaskcbMethodConn = showmaskcbMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::showmaskcbMethodChanged));
+
+ maskcbCurveEditorG->setCurveListener(this);
+
+ CCmaskcbshape = static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false));
+ CCmaskcbshape->setIdentityValue(0.);
+ CCmaskcbshape->setResetCurve(FlatCurveType(defSpot.CCmaskcbcurve.at(0)), defSpot.CCmaskcbcurve);
+ if(showtooltip) CCmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP"));
+ CCmaskcbshape->setBottomBarColorProvider(this, 7);
+
+ LLmaskcbshape = static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false));
+ LLmaskcbshape->setIdentityValue(0.);
+ LLmaskcbshape->setResetCurve(FlatCurveType(defSpot.LLmaskcbcurve.at(0)), defSpot.LLmaskcbcurve);
+ if(showtooltip) LLmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP"));
+ LLmaskcbshape->setBottomBarBgGradient(mllshape);
+
+ HHmaskcbshape = static_cast(maskcbCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true));
+ HHmaskcbshape->setIdentityValue(0.);
+ HHmaskcbshape->setResetCurve(FlatCurveType(defSpot.HHmaskcbcurve.at(0)), defSpot.HHmaskcbcurve);
+ if(showtooltip) HHmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP"));
+ HHmaskcbshape->setCurveColorProvider(this, 6);
+ HHmaskcbshape->setBottomBarColorProvider(this, 6);
+
+ maskcbCurveEditorG->curveListComplete();
+
+
ToolParamBlock* const cbdlBox = Gtk::manage(new ToolParamBlock());
Gtk::HBox* buttonBox = Gtk::manage(new Gtk::HBox(true, 10));
@@ -943,10 +1015,22 @@ Locallab::Locallab():
cbdlBox->pack_start(*multiplier[i]);
}
+ ToolParamBlock* const maskcbBox = Gtk::manage(new ToolParamBlock());
+ maskcbBox->pack_start(*showmaskcbMethod, Gtk::PACK_SHRINK, 4);
+ maskcbBox->pack_start(*enacbMask, Gtk::PACK_SHRINK, 0);
+ maskcbBox->pack_start(*maskcbCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
+ maskcbBox->pack_start(*blendmaskcb, Gtk::PACK_SHRINK, 0);
+ maskcbBox->pack_start(*radmaskcb, Gtk::PACK_SHRINK, 0);
+ maskcbBox->pack_start(*chromaskcb, Gtk::PACK_SHRINK, 0);
+ maskcbBox->pack_start(*gammaskcb, Gtk::PACK_SHRINK, 0);
+ maskcbBox->pack_start(*slomaskcb, Gtk::PACK_SHRINK, 0);
+ expmaskcb->add(*maskcbBox);
+
Gtk::HSeparator *separator = Gtk::manage(new Gtk::HSeparator());
cbdlBox->pack_start(*separator, Gtk::PACK_SHRINK, 2);
cbdlBox->pack_start(*chromacbdl);
cbdlBox->pack_start(*threshold);
+ cbdlBox->pack_start(*blurcbdl);
residFrame->set_label_align(0.025, 0.5);
ToolParamBlock* const residBox = Gtk::manage(new ToolParamBlock());
residBox->pack_start(*clarityml);
@@ -955,6 +1039,7 @@ Locallab::Locallab():
cbdlBox->pack_start(*residFrame);
cbdlBox->pack_start(*softradiuscb);
cbdlBox->pack_start(*sensicb);
+ cbdlBox->pack_start(*expmaskcb);
expcbdl->add(*cbdlBox);
expcbdl->setLevel(2);
@@ -1052,6 +1137,10 @@ void Locallab::foldAllButMe(GdkEventButton* event, MyExpander *expander)
expcontrast->set_expanded(expcontrast == expander);
expcbdl->set_expanded(expcbdl == expander);
expdenoi->set_expanded(expdenoi == expander);
+ expmaskcol->set_expanded(expmaskcol == expander);
+ expmaskexp->set_expanded(expmaskexp == expander);
+ expmasksh->set_expanded(expmasksh == expander);
+ expmaskcb->set_expanded(expmaskcb == expander);
}
}
@@ -1138,6 +1227,10 @@ void Locallab::writeOptions(std::vector &tpOpen)
tpOpen.push_back(expcontrast->get_expanded());
tpOpen.push_back(expcbdl->get_expanded());
tpOpen.push_back(expdenoi->get_expanded());
+ tpOpen.push_back(expmaskcol->get_expanded());
+ tpOpen.push_back(expmaskexp->get_expanded());
+ tpOpen.push_back(expmasksh->get_expanded());
+ tpOpen.push_back(expmaskcb->get_expanded());
}
@@ -1182,6 +1275,11 @@ void Locallab::refChanged(double huer, double lumar, double chromar)
LLmaskSHshape->updateLocallabBackground(normLumar);
HHmaskSHshape->updateLocallabBackground(normHuer);
+ // Update CBDL mask background
+ CCmaskcbshape->updateLocallabBackground(normChromar);
+ LLmaskcbshape->updateLocallabBackground(normLumar);
+ HHmaskcbshape->updateLocallabBackground(normHuer);
+
return false;
}
);
@@ -1190,7 +1288,7 @@ void Locallab::refChanged(double huer, double lumar, double chromar)
void Locallab::updateToolState(std::vector &tpOpen)
{
- if (tpOpen.size() >= 14) {
+ if (tpOpen.size() >= 18) {
expsettings->setExpanded(tpOpen.at(0));
expcolor->set_expanded(tpOpen.at(1));
expexpose->set_expanded(tpOpen.at(2));
@@ -1204,6 +1302,10 @@ void Locallab::updateToolState(std::vector &tpOpen)
expcontrast->set_expanded(tpOpen.at(10));
expcbdl->set_expanded(tpOpen.at(11));
expdenoi->set_expanded(tpOpen.at(12));
+ expmaskcol->set_expanded(tpOpen.at(13));
+ expmaskexp->set_expanded(tpOpen.at(14));
+ expmasksh->set_expanded(tpOpen.at(15));
+ expmaskcb->set_expanded(tpOpen.at(16));
}
}
@@ -1820,6 +1922,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.spots.at(pp->locallab.selspot).scaltm = scaltm->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).rewei = rewei->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).sensitm = sensitm->getIntValue();
+ pp->locallab.spots.at(pp->locallab.selspot).softradiustm = softradiustm->getValue();
// Retinex
pp->locallab.spots.at(pp->locallab.selspot).expreti = expreti->getEnabled();
@@ -1867,9 +1970,22 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.spots.at(pp->locallab.selspot).chromacbdl = chromacbdl->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).threshold = threshold->getValue();
pp->locallab.spots.at(pp->locallab.selspot).sensicb = sensicb->getIntValue();
- pp->locallab.spots.at(pp->locallab.selspot).clarityml = clarityml->getIntValue();
+ pp->locallab.spots.at(pp->locallab.selspot).clarityml = clarityml->getValue();
pp->locallab.spots.at(pp->locallab.selspot).contresid = contresid->getIntValue();
+ pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getValue();
pp->locallab.spots.at(pp->locallab.selspot).softradiuscb = softradiuscb->getValue();
+ pp->locallab.spots.at(pp->locallab.selspot).enacbMask = enacbMask->get_active();
+
+ pp->locallab.spots.at(pp->locallab.selspot).LLmaskcbcurve = LLmaskcbshape->getCurve();
+ pp->locallab.spots.at(pp->locallab.selspot).CCmaskcbcurve = CCmaskcbshape->getCurve();
+ pp->locallab.spots.at(pp->locallab.selspot).HHmaskcbcurve = HHmaskcbshape->getCurve();
+
+ pp->locallab.spots.at(pp->locallab.selspot).blendmaskcb = blendmaskcb->getIntValue();
+ pp->locallab.spots.at(pp->locallab.selspot).radmaskcb = radmaskcb->getValue();
+ pp->locallab.spots.at(pp->locallab.selspot).chromaskcb = chromaskcb->getValue();
+ pp->locallab.spots.at(pp->locallab.selspot).gammaskcb = gammaskcb->getValue();
+ pp->locallab.spots.at(pp->locallab.selspot).slomaskcb = slomaskcb->getValue();
+
// Denoise
pp->locallab.spots.at(pp->locallab.selspot).expdenoi = expdenoi->getEnabled();
pp->locallab.spots.at(pp->locallab.selspot).noiselumf = noiselumf->getIntValue();
@@ -2012,6 +2128,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pe->locallab.spots.at(pp->locallab.selspot).scaltm = pe->locallab.spots.at(pp->locallab.selspot).scaltm || scaltm->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).rewei = pe->locallab.spots.at(pp->locallab.selspot).rewei || rewei->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).sensitm = pe->locallab.spots.at(pp->locallab.selspot).sensitm || sensitm->getEditedState();
+ pe->locallab.spots.at(pp->locallab.selspot).softradiustm = pe->locallab.spots.at(pp->locallab.selspot).softradiustm || softradiustm->getEditedState();
// Retinex
pe->locallab.spots.at(pp->locallab.selspot).expreti = pe->locallab.spots.at(pp->locallab.selspot).expreti || !expreti->get_inconsistent();
pe->locallab.spots.at(pp->locallab.selspot).retinexMethod = pe->locallab.spots.at(pp->locallab.selspot).retinexMethod || retinexMethod->get_active_text() != M("GENERAL_UNCHANGED");
@@ -2053,7 +2170,20 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pe->locallab.spots.at(pp->locallab.selspot).sensicb = pe->locallab.spots.at(pp->locallab.selspot).sensicb || sensicb->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).clarityml = pe->locallab.spots.at(pp->locallab.selspot).clarityml || clarityml->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).contresid = pe->locallab.spots.at(pp->locallab.selspot).contresid || contresid->getEditedState();
+ pe->locallab.spots.at(pp->locallab.selspot).blurcbdl = pe->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).softradiuscb = pe->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState();
+ pe->locallab.spots.at(pp->locallab.selspot).enacbMask = pe->locallab.spots.at(pp->locallab.selspot).enacbMask || !enacbMask->get_inconsistent();
+
+ pe->locallab.spots.at(pp->locallab.selspot).CCmaskcbcurve = pe->locallab.spots.at(pp->locallab.selspot).CCmaskcbcurve || !CCmaskcbshape->isUnChanged();
+ pe->locallab.spots.at(pp->locallab.selspot).LLmaskcbcurve = pe->locallab.spots.at(pp->locallab.selspot).LLmaskcbcurve || !LLmaskcbshape->isUnChanged();
+ pe->locallab.spots.at(pp->locallab.selspot).HHmaskcbcurve = pe->locallab.spots.at(pp->locallab.selspot).HHmaskcbcurve || !HHmaskcbshape->isUnChanged();
+
+ pe->locallab.spots.at(pp->locallab.selspot).blendmaskcb = pe->locallab.spots.at(pp->locallab.selspot).blendmaskcb || blendmaskcb->getEditedState();
+ pe->locallab.spots.at(pp->locallab.selspot).radmaskcb = pe->locallab.spots.at(pp->locallab.selspot).radmaskcb || radmaskcb->getEditedState();
+ pe->locallab.spots.at(pp->locallab.selspot).chromaskcb = pe->locallab.spots.at(pp->locallab.selspot).chromaskcb || chromaskcb->getEditedState();
+ pe->locallab.spots.at(pp->locallab.selspot).gammaskcb = pe->locallab.spots.at(pp->locallab.selspot).gammaskcb || gammaskcb->getEditedState();
+ pe->locallab.spots.at(pp->locallab.selspot).slomaskcb = pe->locallab.spots.at(pp->locallab.selspot).slomaskcb || slomaskcb->getEditedState();
+
// Denoise
pe->locallab.spots.at(pp->locallab.selspot).expdenoi = pe->locallab.spots.at(pp->locallab.selspot).expdenoi || !expdenoi->get_inconsistent();
pe->locallab.spots.at(pp->locallab.selspot).noiselumf = pe->locallab.spots.at(pp->locallab.selspot).noiselumf || noiselumf->getEditedState();
@@ -2198,6 +2328,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pedited->locallab.spots.at(pp->locallab.selspot).scaltm = pedited->locallab.spots.at(pp->locallab.selspot).scaltm || scaltm->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).rewei = pedited->locallab.spots.at(pp->locallab.selspot).rewei || rewei->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).sensitm = pedited->locallab.spots.at(pp->locallab.selspot).sensitm || sensitm->getEditedState();
+ pedited->locallab.spots.at(pp->locallab.selspot).softradiustm = pedited->locallab.spots.at(pp->locallab.selspot).softradiustm || softradiustm->getEditedState();
// Retinex
pedited->locallab.spots.at(pp->locallab.selspot).expreti = pedited->locallab.spots.at(pp->locallab.selspot).expreti || !expreti->get_inconsistent();
pedited->locallab.spots.at(pp->locallab.selspot).retinexMethod = pedited->locallab.spots.at(pp->locallab.selspot).retinexMethod || retinexMethod->get_active_text() != M("GENERAL_UNCHANGED");
@@ -2239,7 +2370,20 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pedited->locallab.spots.at(pp->locallab.selspot).sensicb = pedited->locallab.spots.at(pp->locallab.selspot).sensicb || sensicb->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).clarityml = pedited->locallab.spots.at(pp->locallab.selspot).clarityml || clarityml->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).contresid = pedited->locallab.spots.at(pp->locallab.selspot).contresid || contresid->getEditedState();
+ pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl = pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb = pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState();
+
+ pedited->locallab.spots.at(pp->locallab.selspot).enacbMask = pedited->locallab.spots.at(pp->locallab.selspot).enacbMask || !enacbMask->get_inconsistent();
+ pedited->locallab.spots.at(pp->locallab.selspot).CCmaskcbcurve = pedited->locallab.spots.at(pp->locallab.selspot).CCmaskcbcurve || !CCmaskcbshape->isUnChanged();
+ pedited->locallab.spots.at(pp->locallab.selspot).LLmaskcbcurve = pedited->locallab.spots.at(pp->locallab.selspot).LLmaskcbcurve || !LLmaskcbshape->isUnChanged();
+ pedited->locallab.spots.at(pp->locallab.selspot).HHmaskcbcurve = pedited->locallab.spots.at(pp->locallab.selspot).HHmaskcbcurve || !HHmaskcbshape->isUnChanged();
+
+ pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcb = pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcb || blendmaskcb->getEditedState();
+ pedited->locallab.spots.at(pp->locallab.selspot).radmaskcb = pedited->locallab.spots.at(pp->locallab.selspot).radmaskcb || radmaskcb->getEditedState();
+ pedited->locallab.spots.at(pp->locallab.selspot).chromaskcb = pedited->locallab.spots.at(pp->locallab.selspot).chromaskcb || chromaskcb->getEditedState();
+ pedited->locallab.spots.at(pp->locallab.selspot).gammaskcb = pedited->locallab.spots.at(pp->locallab.selspot).gammaskcb || gammaskcb->getEditedState();
+ pedited->locallab.spots.at(pp->locallab.selspot).slomaskcb = pedited->locallab.spots.at(pp->locallab.selspot).slomaskcb || slomaskcb->getEditedState();
+
// Denoise
pedited->locallab.spots.at(pp->locallab.selspot).expdenoi = pedited->locallab.spots.at(pp->locallab.selspot).expdenoi || !expdenoi->get_inconsistent();
pedited->locallab.spots.at(pp->locallab.selspot).noiselumf = pedited->locallab.spots.at(pp->locallab.selspot).noiselumf || noiselumf->getEditedState();
@@ -2450,6 +2594,28 @@ void Locallab::curveChanged(CurveEditor* ce)
}
}
+ //CBDL
+ if (getEnabled() && expcbdl->getEnabled()) {
+
+ if (ce == CCmaskcbshape) {
+ if (listener) {
+ listener->panelChanged(EvlocallabCCmaskcbshape, M("HISTORY_CUSTOMCURVE"));
+ }
+ }
+
+ if (ce == LLmaskcbshape) {
+ if (listener) {
+ listener->panelChanged(EvlocallabLLmaskcbshape, M("HISTORY_CUSTOMCURVE"));
+ }
+ }
+
+ if (ce == HHmaskcbshape) {
+ if (listener) {
+ listener->panelChanged(EvlocallabHHmaskcbshape, M("HISTORY_CUSTOMCURVE"));
+ }
+ }
+ }
+
// Vibrance
if (getEnabled() && expvibrance->getEnabled()) {
if (ce == skinTonesCurve) {
@@ -2520,7 +2686,9 @@ void Locallab::showmaskcolMethodChanged()
// When one mask state is changed, other masks are deactivated
disableListener();
- showmaskexpMethod->set_active(0);
+ showmaskexpMethod->set_active(0);
+ showmaskSHMethod->set_active(0);
+ showmaskcbMethod->set_active(0);
enableListener();
if (listener) {
@@ -2534,7 +2702,9 @@ void Locallab::showmaskexpMethodChanged()
// When one mask state is changed, other masks are deactivated
disableListener();
- showmaskcolMethod->set_active(0);
+ showmaskcolMethod->set_active(0);
+ showmaskcbMethod->set_active(0);
+ showmaskSHMethod->set_active(0);
enableListener();
if (listener) {
@@ -2548,7 +2718,9 @@ void Locallab::showmaskSHMethodChanged()
// When one mask state is changed, other masks are deactivated
disableListener();
- showmaskcolMethod->set_active(0);
+ showmaskcolMethod->set_active(0);
+ showmaskexpMethod->set_active(0);
+ showmaskcbMethod->set_active(0);
enableListener();
if (listener) {
@@ -2556,6 +2728,22 @@ void Locallab::showmaskSHMethodChanged()
}
}
+void Locallab::showmaskcbMethodChanged()
+{
+ // printf("showmaskSHMethodChanged\n");
+
+ // When one mask state is changed, other masks are deactivated
+ disableListener();
+ showmaskcolMethod->set_active(0);
+ showmaskSHMethod->set_active(0);
+ showmaskexpMethod->set_active(0);
+ enableListener();
+
+ if (listener) {
+ listener->panelChanged(EvlocallabshowmaskcbMethod, "");
+ }
+}
+
void Locallab::resetMaskVisibility()
{
// printf("resetMaskVisibility\n");
@@ -2564,6 +2752,7 @@ void Locallab::resetMaskVisibility()
showmaskcolMethod->set_active(0);
showmaskexpMethod->set_active(0);
showmaskSHMethod->set_active(0);
+ showmaskcbMethod->set_active(0);
enableListener();
}
@@ -2573,6 +2762,10 @@ Locallab::llMaskVisibility* Locallab::getMaskVisibility()
maskStruct->colorMask = showmaskcolMethod->get_active_row_number();
maskStruct->expMask = showmaskexpMethod->get_active_row_number();
maskStruct->SHMask = showmaskSHMethod->get_active_row_number();
+ maskStruct->cbMask = showmaskcbMethod->get_active_row_number();
+ // printf("SHmask=%i \n", maskStruct->SHMask);
+ // printf("cbmask=%i \n", maskStruct->cbMask);
+
return maskStruct;
}
@@ -2648,6 +2841,30 @@ void Locallab::enaSHMaskChanged()
}
}
+void Locallab::enacbMaskChanged()
+{
+ // printf("enacbMaskChanged\n");
+
+ if (multiImage) {
+ if (enacbMask->get_inconsistent()) {
+ enacbMask->set_inconsistent(false);
+ enacbMaskConn.block(true);
+ enacbMask->set_active(false);
+ enacbMaskConn.block(false);
+ }
+ }
+
+ if (getEnabled() && expcbdl->getEnabled()) {
+ if (listener) {
+ if (enacbMask->get_active()) {
+ listener->panelChanged(EvLocallabEnacbMask, M("GENERAL_ENABLED"));
+ } else {
+ listener->panelChanged(EvLocallabEnacbMask, M("GENERAL_DISABLED"));
+ }
+ }
+ }
+}
+
void Locallab::inversChanged()
{
// printf("inversChanged\n");
@@ -2669,7 +2886,7 @@ void Locallab::inversChanged()
curvactiv->hide();
qualitycurveMethod->show();
labqualcurv->show();
- maskcolFrame->show();
+ expmaskcol->show();
structcol->show();
strengthgrid->hide();
blurcolde->show();
@@ -2683,7 +2900,7 @@ void Locallab::inversChanged()
curvactiv->hide();
qualitycurveMethod->hide();
labqualcurv->hide();
- maskcolFrame->hide();
+ expmaskcol->hide();
structcol->hide();
blurcolde->show();
gridFrame->hide();
@@ -2697,7 +2914,7 @@ void Locallab::inversChanged()
curvactiv->hide();
qualitycurveMethod->show();
labqualcurv->show();
- maskcolFrame->show();
+ expmaskcol->show();
structcol->show();
blurcolde->show();
gridFrame->show();
@@ -2737,7 +2954,7 @@ void Locallab::inversexChanged()
if (multiImage && inversex->get_inconsistent()) {
sensiex->show();
curveEditorG->show();
- maskexpFrame->show();
+ expmaskexp->show();
structexp->show();
blurexpde->show();
softradiusexp->show();
@@ -2745,7 +2962,7 @@ void Locallab::inversexChanged()
} else if (inversex->get_active()) {
sensiex->show();
curveEditorG->show();
- maskexpFrame->hide();
+ expmaskexp->hide();
structexp->hide();
blurexpde->show();
softradiusexp->hide();
@@ -2753,7 +2970,7 @@ void Locallab::inversexChanged()
} else {
sensiex->show();
curveEditorG->show();
- maskexpFrame->show();
+ expmaskexp->show();
structexp->show();
blurexpde->show();
softradiusexp->show();
@@ -2792,17 +3009,17 @@ void Locallab::inversshChanged()
sensihs->show();
blurSHde->show();
- maskSHFrame->show();
+ expmasksh->show();
showmaskSHMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode
} else if (inverssh->get_active()) {
sensihs->show();
- maskSHFrame->hide();
+ expmasksh->hide();
blurSHde->show();
} else {
sensihs->show();
- maskSHFrame->show();
+ expmasksh->show();
blurSHde->show();
if (batchMode) {
@@ -3074,6 +3291,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
scaltm->setDefault((double)defSpot->scaltm);
rewei->setDefault((double)defSpot->rewei);
sensitm->setDefault((double)defSpot->sensitm);
+ softradiustm->setDefault(defSpot->softradiustm);
// Retinex
str->setDefault((double)defSpot->str);
chrrt->setDefault((double)defSpot->chrrt);
@@ -3104,9 +3322,16 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
chromacbdl->setDefault((double)defSpot->chromacbdl);
threshold->setDefault(defSpot->threshold);
sensicb->setDefault((double)defSpot->sensicb);
- clarityml->setDefault((double)defSpot->clarityml);
+ clarityml->setDefault(defSpot->clarityml);
contresid->setDefault((double)defSpot->contresid);
+ blurcbdl->setDefault(defSpot->blurcbdl);
softradiuscb->setDefault(defSpot->softradiuscb);
+ blendmaskcb->setDefault((double)defSpot->blendmaskcb);
+ radmaskcb->setDefault(defSpot->radmaskcb);
+ chromaskcb->setDefault(defSpot->chromaskcb);
+ gammaskcb->setDefault(defSpot->gammaskcb);
+ slomaskcb->setDefault(defSpot->slomaskcb);
+
// Denoise
noiselumf->setDefault((double)defSpot->noiselumf);
noiselumf0->setDefault((double)defSpot->noiselumf0);
@@ -3187,6 +3412,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
scaltm->setDefaultEditedState(Irrelevant);
rewei->setDefaultEditedState(Irrelevant);
sensitm->setDefaultEditedState(Irrelevant);
+ softradiustm->setDefaultEditedState(Irrelevant);
// Retinex
str->setDefaultEditedState(Irrelevant);
chrrt->setDefaultEditedState(Irrelevant);
@@ -3219,7 +3445,14 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
sensicb->setDefaultEditedState(Irrelevant);
clarityml->setDefaultEditedState(Irrelevant);
contresid->setDefaultEditedState(Irrelevant);
+ blurcbdl->setDefaultEditedState(Irrelevant);
softradiuscb->setDefaultEditedState(Irrelevant);
+ blendmaskcb->setDefaultEditedState(Irrelevant);
+ radmaskcb->setDefaultEditedState(Irrelevant);
+ chromaskcb->setDefaultEditedState(Irrelevant);
+ gammaskcb->setDefaultEditedState(Irrelevant);
+ slomaskcb->setDefaultEditedState(Irrelevant);
+
// Denoise
noiselumf->setDefaultEditedState(Irrelevant);
noiselumf0->setDefaultEditedState(Irrelevant);
@@ -3304,6 +3537,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
scaltm->setDefaultEditedState(defSpotState->scaltm ? Edited : UnEdited);
rewei->setDefaultEditedState(defSpotState->rewei ? Edited : UnEdited);
sensitm->setDefaultEditedState(defSpotState->sensitm ? Edited : UnEdited);
+ softradiustm->setDefaultEditedState(defSpotState->softradiustm ? Edited : UnEdited);
// Retinex
str->setDefaultEditedState(defSpotState->str ? Edited : UnEdited);
chrrt->setDefaultEditedState(defSpotState->chrrt ? Edited : UnEdited);
@@ -3336,7 +3570,15 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
sensicb->setDefaultEditedState(defSpotState->sensicb ? Edited : UnEdited);
clarityml->setDefaultEditedState(defSpotState->clarityml ? Edited : UnEdited);
contresid->setDefaultEditedState(defSpotState->contresid ? Edited : UnEdited);
+ blurcbdl->setDefaultEditedState(defSpotState->blurcbdl ? Edited : UnEdited);
softradiuscb->setDefaultEditedState(defSpotState->softradiuscb ? Edited : UnEdited);
+
+ blendmaskcb->setDefaultEditedState(defSpotState->blendmaskcb ? Edited : UnEdited);
+ radmaskcb->setDefaultEditedState(defSpotState->radmaskcb ? Edited : UnEdited);
+ chromaskcb->setDefaultEditedState(defSpotState->chromaskcb ? Edited : UnEdited);
+ gammaskcb->setDefaultEditedState(defSpotState->gammaskcb ? Edited : UnEdited);
+ slomaskcb->setDefaultEditedState(defSpotState->slomaskcb ? Edited : UnEdited);
+
// Denoise
noiselumf->setDefaultEditedState(defSpotState->noiselumf ? Edited : UnEdited);
noiselumf0->setDefaultEditedState(defSpotState->noiselumf0 ? Edited : UnEdited);
@@ -3758,6 +4000,13 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
listener->panelChanged(Evlocallabsensitm, sensitm->getTextValue());
}
}
+
+ if (a == softradiustm) {
+ if (listener) {
+ listener->panelChanged(Evlocallabsoftradiustm, softradiustm->getTextValue());
+ }
+ }
+
}
// Retinex
@@ -3925,19 +4174,55 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
}
if (a == contresid) {
- //clarityml->setValue(0.);
if (listener) {
listener->panelChanged(EvLocallabcontresid, contresid->getTextValue());
}
}
+ if (a == blurcbdl) {
+
+ if (listener) {
+ listener->panelChanged(EvLocallabblurcbdl, blurcbdl->getTextValue());
+ }
+ }
+
if (a == softradiuscb) {
if (listener) {
listener->panelChanged(Evlocallabsoftradiuscb, softradiuscb->getTextValue());
}
}
-
+
+ if (a == blendmaskcb) {
+ if (listener) {
+ listener->panelChanged(Evlocallabblendmaskcb, blendmaskcb->getTextValue());
+ }
+ }
+
+ if (a == radmaskcb) {
+ if (listener) {
+ listener->panelChanged(Evlocallabradmaskcb, radmaskcb->getTextValue());
+ }
+ }
+
+ if (a == chromaskcb) {
+ if (listener) {
+ listener->panelChanged(Evlocallabchromaskcb, chromaskcb->getTextValue());
+ }
+ }
+
+ if (a == gammaskcb) {
+ if (listener) {
+ listener->panelChanged(Evlocallabgammaskcb, gammaskcb->getTextValue());
+ }
+ }
+
+ if (a == slomaskcb) {
+ if (listener) {
+ listener->panelChanged(Evlocallabslomaskcb, slomaskcb->getTextValue());
+ }
+ }
+
}
// Denoise
@@ -4108,6 +4393,7 @@ void Locallab::setBatchMode(bool batchMode)
scaltm->showEditedCB();
rewei->showEditedCB();
sensitm->showEditedCB();
+ softradiustm->showEditedCB();
// Retinex
str->showEditedCB();
chrrt->showEditedCB();
@@ -4138,7 +4424,14 @@ void Locallab::setBatchMode(bool batchMode)
sensicb->showEditedCB();
clarityml->showEditedCB();
contresid->showEditedCB();
+ blurcbdl->showEditedCB();
softradiuscb->showEditedCB();
+ blendmaskcb->showEditedCB();
+ radmaskcb->showEditedCB();
+ chromaskcb->showEditedCB();
+ gammaskcb->showEditedCB();
+ slomaskcb->showEditedCB();
+
// Denoise
noiselumf->showEditedCB();
noiselumc->showEditedCB();
@@ -4165,6 +4458,7 @@ void Locallab::setBatchMode(bool batchMode)
showmaskcolMethod->hide();
showmaskexpMethod->hide();
showmaskSHMethod->hide();
+ showmaskcbMethod->hide();
}
std::vector Locallab::getCurvePoints(ThresholdSelector* tAdjuster) const
@@ -4342,6 +4636,8 @@ void Locallab::enableListener()
enablecontrastConn.block(false);
// Contrast by detail levels
enablecbdlConn.block(false);
+ enacbMaskConn.block(false);
+ showmaskcbMethodConn.block(false);
// Denoise
enabledenoiConn.block(false);
}
@@ -4393,6 +4689,8 @@ void Locallab::disableListener()
enablecontrastConn.block(true);
// Contrast by detail levels
enablecbdlConn.block(true);
+ enacbMaskConn.block(true);
+ showmaskcbMethodConn.block(true);
// Denoise
enabledenoiConn.block(true);
}
@@ -4526,6 +4824,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
scaltm->setValue(pp->locallab.spots.at(index).scaltm);
rewei->setValue(pp->locallab.spots.at(index).rewei);
sensitm->setValue(pp->locallab.spots.at(index).sensitm);
+ softradiustm->setValue(pp->locallab.spots.at(index).softradiustm);
// Retinex
expreti->setEnabled(pp->locallab.spots.at(index).expreti);
@@ -4579,7 +4878,17 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
sensicb->setValue(pp->locallab.spots.at(index).sensicb);
clarityml->setValue(pp->locallab.spots.at(index).clarityml);
contresid->setValue(pp->locallab.spots.at(index).contresid);
+ blurcbdl->setValue(pp->locallab.spots.at(index).blurcbdl);
softradiuscb->setValue(pp->locallab.spots.at(index).softradiuscb);
+ blendmaskcb->setValue(pp->locallab.spots.at(index).blendmaskcb);
+ radmaskcb->setValue(pp->locallab.spots.at(index).radmaskcb);
+ chromaskcb->setValue(pp->locallab.spots.at(index).chromaskcb);
+ gammaskcb->setValue(pp->locallab.spots.at(index).gammaskcb);
+ slomaskcb->setValue(pp->locallab.spots.at(index).slomaskcb);
+ enacbMask->set_active(pp->locallab.spots.at(index).enacbMask);
+ CCmaskcbshape->setCurve(pp->locallab.spots.at(index).CCmaskcbcurve);
+ LLmaskcbshape->setCurve(pp->locallab.spots.at(index).LLmaskcbcurve);
+ HHmaskcbshape->setCurve(pp->locallab.spots.at(index).HHmaskcbcurve);
// Denoise
expdenoi->setEnabled(pp->locallab.spots.at(index).expdenoi);
@@ -4751,6 +5060,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
scaltm->setEditedState(spotState->scaltm ? Edited : UnEdited);
rewei->setEditedState(spotState->rewei ? Edited : UnEdited);
sensitm->setEditedState(spotState->sensitm ? Edited : UnEdited);
+ softradiustm->setEditedState(spotState->softradiustm ? Edited : UnEdited);
// Retinex
expreti->set_inconsistent(!spotState->expreti);
@@ -4800,7 +5110,17 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
sensicb->setEditedState(spotState->sensicb ? Edited : UnEdited);
clarityml->setEditedState(spotState->clarityml ? Edited : UnEdited);
contresid->setEditedState(spotState->contresid ? Edited : UnEdited);
+ blurcbdl->setEditedState(spotState->blurcbdl ? Edited : UnEdited);
softradiuscb->setEditedState(spotState->softradiuscb ? Edited : UnEdited);
+ blendmaskcb->setEditedState(spotState->blendmaskcb ? Edited : UnEdited);
+ radmaskcb->setEditedState(spotState->radmaskcb ? Edited : UnEdited);
+ chromaskcb->setEditedState(spotState->chromaskcb ? Edited : UnEdited);
+ gammaskcb->setEditedState(spotState->gammaskcb ? Edited : UnEdited);
+ slomaskcb->setEditedState(spotState->slomaskcb ? Edited : UnEdited);
+ enacbMask->set_inconsistent(multiImage && !spotState->enacbMask);
+ CCmaskcbshape->setUnChanged(!spotState->CCmaskcbcurve);
+ LLmaskcbshape->setUnChanged(!spotState->LLmaskcbcurve);
+ HHmaskcbshape->setUnChanged(!spotState->HHmaskcbcurve);
// Denoise
expdenoi->set_inconsistent(!spotState->expdenoi);
@@ -4831,7 +5151,7 @@ void Locallab::updateSpecificGUIState()
curvactiv->hide();
qualitycurveMethod->show();
labqualcurv->show();
- maskcolFrame->show();
+ expmaskcol->show();
structcol->show();
blurcolde->show();
softradiuscol->show();
@@ -4844,7 +5164,7 @@ void Locallab::updateSpecificGUIState()
curvactiv->hide();
qualitycurveMethod->hide();
labqualcurv->hide();
- maskcolFrame->hide();
+ expmaskcol->hide();
softradiuscol->hide();
structcol->hide();
blurcolde->show();
@@ -4856,7 +5176,7 @@ void Locallab::updateSpecificGUIState()
curvactiv->hide();
qualitycurveMethod->show();
labqualcurv->show();
- maskcolFrame->show();
+ expmaskcol->show();
structcol->show();
blurcolde->show();
gridFrame->show();
@@ -4871,7 +5191,7 @@ void Locallab::updateSpecificGUIState()
if (multiImage && inversex->get_inconsistent()) {
sensiex->show();
curveEditorG->show();
- maskexpFrame->show();
+ // maskexpFrame->show();
structexp->show();
blurexpde->show();
softradiusexp->show();
@@ -4879,14 +5199,14 @@ void Locallab::updateSpecificGUIState()
} else if (inversex->get_active()) {
sensiex->show();
curveEditorG->show();
- maskexpFrame->hide();
+ // maskexpFrame->hide();
structexp->hide();
blurexpde->show();
softradiusexp->hide();
} else {
sensiex->show();
curveEditorG->show();
- maskexpFrame->show();
+ // maskexpFrame->show();
structexp->show();
blurexpde->show();
softradiusexp->show();
@@ -4899,16 +5219,16 @@ void Locallab::updateSpecificGUIState()
// Update SH GUI according to black adjuster state (to be compliant with adjusterChanged function)
if (multiImage && inversex->get_inconsistent()) {
sensihs->show();
- maskSHFrame->show();
+ // maskSHFrame->show();
blurSHde->show();
showmaskSHMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode
} else if (inverssh->get_active()) {
sensihs->show();
- maskSHFrame->hide();
+ // maskSHFrame->hide();
blurSHde->show();
} else {
sensihs->show();
- maskSHFrame->show();
+ // maskSHFrame->show();
blurSHde->show();
if (batchMode) {
diff --git a/rtgui/locallab.h b/rtgui/locallab.h
index 273b29075..8fbb3830c 100644
--- a/rtgui/locallab.h
+++ b/rtgui/locallab.h
@@ -60,6 +60,10 @@ private:
MyExpander* const expcontrast;
MyExpander* const expcbdl;
MyExpander* const expdenoi;
+ MyExpander* const expmaskcol;
+ MyExpander* const expmaskexp;
+ MyExpander* const expmasksh;
+ MyExpander* const expmaskcb;
sigc::connection enablecolorConn, enableexposeConn, enableshadhighConn, enablevibranceConn, enablesoftConn, enableblurConn, enabletonemapConn, enableretiConn, enablesharpConn, enablecontrastConn, enablecbdlConn, enabledenoiConn;
// Curve widgets
@@ -92,7 +96,12 @@ private:
// Retinex
CurveEditorGroup* const LocalcurveEditorgainT;
FlatCurveEditor* cTgainshape;
-
+ //Cbdl
+ CurveEditorGroup* const maskcbCurveEditorG;
+ FlatCurveEditor* CCmaskcbshape;
+ FlatCurveEditor* LLmaskcbshape;
+ FlatCurveEditor* HHmaskcbshape;
+
// Adjuster widgets
// Color & Light
Adjuster* const lightness;
@@ -156,6 +165,7 @@ private:
Adjuster* const scaltm;
Adjuster* const rewei;
Adjuster* const sensitm;
+ Adjuster* const softradiustm;
// Retinex
Adjuster* const str;
Adjuster* const chrrt;
@@ -184,8 +194,15 @@ private:
Adjuster* const threshold;
Adjuster* const clarityml;
Adjuster* const contresid;
+ Adjuster* const blurcbdl;
Adjuster* const sensicb;
Adjuster* const softradiuscb;
+ Adjuster* const blendmaskcb;
+ Adjuster* const radmaskcb;
+ Adjuster* const chromaskcb;
+ Adjuster* const gammaskcb;
+ Adjuster* const slomaskcb;
+
// Denoise
Adjuster* const noiselumf;
Adjuster* const noiselumf0;
@@ -230,7 +247,10 @@ private:
// Sharpening
Gtk::CheckButton* const inverssha;
sigc::connection inversshaConn;
-
+ //CBDL
+ Gtk::CheckButton* const enacbMask;
+ sigc::connection enacbMaskConn;
+
// ComboBox widgets
// Color & Light
MyComboBoxText* const qualitycurveMethod;
@@ -251,7 +271,9 @@ private:
// Retinex
MyComboBoxText* const retinexMethod;
sigc::connection retinexMethodConn;
-
+ //CBDL
+ MyComboBoxText* const showmaskcbMethod;
+ sigc::connection showmaskcbMethodConn;
// ThresholdAdjuster widgets
// Vibrance
ThresholdAdjuster* const psThreshold;
@@ -262,9 +284,6 @@ private:
Gtk::Button* const lumaneutralButton;
Gtk::Button* const lumacontrastPlusButton;
sigc::connection lumacontrastMinusPressedConn, lumaneutralPressedConn, lumacontrastPlusPressedConn;
- Gtk::Frame* maskcolFrame;
- Gtk::Frame* maskexpFrame;
- Gtk::Frame* maskSHFrame;
Gtk::Frame* gridFrame;
Gtk::Frame* residFrame;
LabGrid *labgrid;
@@ -310,7 +329,8 @@ private:
void inversretChanged();
// Sharpening
void inversshaChanged();
-
+ //CBDL
+ void enacbMaskChanged();
// ComboBox event functions
// Color & Light
void qualitycurveMethodChanged();
@@ -324,7 +344,8 @@ private:
void blurMethodChanged();
// Retinex
void retinexMethodChanged();
-
+ //CBDL
+ void showmaskcbMethodChanged();
// Other widgets event functions
void lumacontrastMinusPressed();
void lumaneutralPressed();
@@ -359,6 +380,7 @@ public:
int colorMask;
int expMask;
int SHMask;
+ int cbMask;
};
void resetMaskVisibility();
diff --git a/rtgui/main.cc b/rtgui/main.cc
index a2c237d59..b42baee11 100644
--- a/rtgui/main.cc
+++ b/rtgui/main.cc
@@ -376,14 +376,6 @@ int main (int argc, char **argv)
Glib::init(); // called by Gtk::Main, but this may be important for thread handling, so we call it ourselves now
Gio::init ();
- // Reading/updating GDK_SCALE early if it exists
- const gchar *gscale = g_getenv("GDK_SCALE");
- if (gscale && gscale[0] == '2') {
- initialGdkScale = 2;
- }
- // HOMBRE: On Windows, if resolution is set to 200%, Gtk internal variables are SCALE=2 and DPI=96
- g_setenv("GDK_SCALE", "1", true);
-
#ifdef WIN32
if (GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)) == 0x0003) {
// started from msys2 console => do not buffer stdout
@@ -537,6 +529,16 @@ int main (int argc, char **argv)
int ret = 0;
+ if (options.pseudoHiDPISupport) {
+ // Reading/updating GDK_SCALE early if it exists
+ const gchar *gscale = g_getenv("GDK_SCALE");
+ if (gscale && gscale[0] == '2') {
+ initialGdkScale = 2;
+ }
+ // HOMBRE: On Windows, if resolution is set to 200%, Gtk internal variables are SCALE=2 and DPI=96
+ g_setenv("GDK_SCALE", "1", true);
+ }
+
gdk_threads_set_lock_functions (G_CALLBACK (myGdkLockEnter), (G_CALLBACK (myGdkLockLeave)));
gdk_threads_init();
gtk_init (&argc, &argv); // use the "--g-fatal-warnings" command line flag to make warnings fatal
diff --git a/rtgui/options.cc b/rtgui/options.cc
index 01cfe0e10..d439658bf 100644
--- a/rtgui/options.cc
+++ b/rtgui/options.cc
@@ -349,6 +349,7 @@ void Options::setDefaults()
fontSize = 10;
CPFontFamily = "default";
CPFontSize = 8;
+ pseudoHiDPISupport = false;
lastScale = 5;
lastShowAllExif = false;
panAccelFactor = 5;
@@ -594,7 +595,7 @@ void Options::setDefaults()
rtSettings.reduclow = 0.85;//transition for luminance out scope
rtSettings.detectshape = true;//experimental new detection shape
rtSettings.previewselection = 5;//betwen 1 to 40
- rtSettings.cbdlsensi = 0.4;//betwen 0.001 to 1
+ rtSettings.cbdlsensi = 1.0;//betwen 0.001 to 1
// end locallab
@@ -1284,6 +1285,10 @@ void Options::readFromFile(Glib::ustring fname)
CPFontSize = keyFile.get_integer("GUI", "CPFontSize");
}
+ if (keyFile.has_key("GUI", "PseudoHiDPISupport")) {
+ pseudoHiDPISupport = keyFile.get_boolean("GUI", "PseudoHiDPISupport");
+ }
+
if (keyFile.has_key("GUI", "LastPreviewScale")) {
lastScale = keyFile.get_integer("GUI", "LastPreviewScale");
}
@@ -2129,6 +2134,7 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_integer("GUI", "FontSize", fontSize);
keyFile.set_string("GUI", "CPFontFamily", CPFontFamily);
keyFile.set_integer("GUI", "CPFontSize", CPFontSize);
+ keyFile.set_boolean("GUI", "PseudoHiDPISupport", pseudoHiDPISupport);
keyFile.set_integer("GUI", "LastPreviewScale", lastScale);
keyFile.set_boolean("GUI", "LastShowAllExif", lastShowAllExif);
keyFile.set_integer("GUI", "PanAccelFactor", panAccelFactor);
diff --git a/rtgui/options.h b/rtgui/options.h
index 21c2963e4..03a860931 100644
--- a/rtgui/options.h
+++ b/rtgui/options.h
@@ -212,6 +212,7 @@ public:
int fontSize; // RT's main font size (units: pt)
Glib::ustring CPFontFamily; // ColorPicker font family
int CPFontSize; // ColorPicker font size (units: pt)
+ bool pseudoHiDPISupport;
bool fbOnlyRaw;
bool fbShowDateTime;
bool fbShowBasicExif;
diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc
index 9e7e7aa03..5cf0125e1 100644
--- a/rtgui/paramsedited.cc
+++ b/rtgui/paramsedited.cc
@@ -1052,6 +1052,7 @@ void ParamsEdited::initFrom(const std::vector&
locallab.spots.at(j).scaltm = locallab.spots.at(j).scaltm && pSpot.scaltm == otherSpot.scaltm;
locallab.spots.at(j).rewei = locallab.spots.at(j).rewei && pSpot.rewei == otherSpot.rewei;
locallab.spots.at(j).sensitm = locallab.spots.at(j).sensitm && pSpot.sensitm == otherSpot.sensitm;
+ locallab.spots.at(j).softradiustm = locallab.spots.at(j).softradiustm && pSpot.softradiustm == otherSpot.softradiustm;
// Retinex
locallab.spots.at(j).expreti = locallab.spots.at(j).expreti && pSpot.expreti == otherSpot.expreti;
locallab.spots.at(j).retinexMethod = locallab.spots.at(j).retinexMethod && pSpot.retinexMethod == otherSpot.retinexMethod;
@@ -1093,7 +1094,17 @@ void ParamsEdited::initFrom(const std::vector&
locallab.spots.at(j).sensicb = locallab.spots.at(j).sensicb && pSpot.sensicb == otherSpot.sensicb;
locallab.spots.at(j).clarityml = locallab.spots.at(j).clarityml && pSpot.clarityml == otherSpot.clarityml;
locallab.spots.at(j).contresid = locallab.spots.at(j).contresid && pSpot.contresid == otherSpot.contresid;
+ locallab.spots.at(j).blurcbdl = locallab.spots.at(j).blurcbdl && pSpot.blurcbdl == otherSpot.blurcbdl;
+ locallab.spots.at(j).blendmaskcb = locallab.spots.at(j).blendmaskcb && pSpot.blendmaskcb == otherSpot.blendmaskcb;
+ locallab.spots.at(j).radmaskcb = locallab.spots.at(j).radmaskcb && pSpot.radmaskcb == otherSpot.radmaskcb;
+ locallab.spots.at(j).chromaskcb = locallab.spots.at(j).chromaskcb && pSpot.chromaskcb == otherSpot.chromaskcb;
+ locallab.spots.at(j).gammaskcb = locallab.spots.at(j).gammaskcb && pSpot.gammaskcb == otherSpot.gammaskcb;
+ locallab.spots.at(j).slomaskcb = locallab.spots.at(j).slomaskcb && pSpot.slomaskcb == otherSpot.slomaskcb;
locallab.spots.at(j).softradiuscb = locallab.spots.at(j).softradiuscb && pSpot.softradiuscb == otherSpot.softradiuscb;
+ locallab.spots.at(j).enacbMask = locallab.spots.at(j).enacbMask && pSpot.enacbMask == otherSpot.enacbMask;
+ locallab.spots.at(j).CCmaskcbcurve = locallab.spots.at(j).CCmaskcbcurve && pSpot.CCmaskcbcurve == otherSpot.CCmaskcbcurve;
+ locallab.spots.at(j).LLmaskcbcurve = locallab.spots.at(j).LLmaskcbcurve && pSpot.LLmaskcbcurve == otherSpot.LLmaskcbcurve;
+ locallab.spots.at(j).HHmaskcbcurve = locallab.spots.at(j).HHmaskcbcurve && pSpot.HHmaskcbcurve == otherSpot.HHmaskcbcurve;
// Denoise
locallab.spots.at(j).expdenoi = locallab.spots.at(j).expdenoi && pSpot.expdenoi == otherSpot.expdenoi;
locallab.spots.at(j).noiselumf = locallab.spots.at(j).noiselumf && pSpot.noiselumf == otherSpot.noiselumf;
@@ -3009,6 +3020,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).sensitm = mods.locallab.spots.at(i).sensitm;
}
+ if (locallab.spots.at(i).softradiustm) {
+ toEdit.locallab.spots.at(i).softradiustm = mods.locallab.spots.at(i).softradiustm;
+ }
+
// Retinex
if (locallab.spots.at(i).expreti) {
toEdit.locallab.spots.at(i).expreti = mods.locallab.spots.at(i).expreti;
@@ -3147,6 +3162,46 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).contresid = mods.locallab.spots.at(i).contresid;
}
+ if (locallab.spots.at(i).blurcbdl) {
+ toEdit.locallab.spots.at(i).blurcbdl = mods.locallab.spots.at(i).blurcbdl;
+ }
+
+ if (locallab.spots.at(i).blendmaskcb) {
+ toEdit.locallab.spots.at(i).blendmaskcb = mods.locallab.spots.at(i).blendmaskcb;
+ }
+
+ if (locallab.spots.at(i).radmaskcb) {
+ toEdit.locallab.spots.at(i).radmaskcb = mods.locallab.spots.at(i).radmaskcb;
+ }
+
+ if (locallab.spots.at(i).chromaskcb) {
+ toEdit.locallab.spots.at(i).chromaskcb = mods.locallab.spots.at(i).chromaskcb;
+ }
+
+ if (locallab.spots.at(i).gammaskcb) {
+ toEdit.locallab.spots.at(i).gammaskcb = mods.locallab.spots.at(i).gammaskcb;
+ }
+
+ if (locallab.spots.at(i).slomaskcb) {
+ toEdit.locallab.spots.at(i).slomaskcb = mods.locallab.spots.at(i).slomaskcb;
+ }
+
+ if (locallab.spots.at(i).enacbMask) {
+ toEdit.locallab.spots.at(i).enacbMask = mods.locallab.spots.at(i).enacbMask;
+ }
+
+ if (locallab.spots.at(i).CCmaskcbcurve) {
+ toEdit.locallab.spots.at(i).CCmaskcbcurve = mods.locallab.spots.at(i).CCmaskcbcurve;
+ }
+
+ if (locallab.spots.at(i).LLmaskcbcurve) {
+ toEdit.locallab.spots.at(i).LLmaskcbcurve = mods.locallab.spots.at(i).LLmaskcbcurve;
+ }
+
+ if (locallab.spots.at(i).HHmaskcbcurve) {
+ toEdit.locallab.spots.at(i).HHmaskcbcurve = mods.locallab.spots.at(i).HHmaskcbcurve;
+ }
+
if (locallab.spots.at(i).softradiuscb) {
toEdit.locallab.spots.at(i).softradiuscb = mods.locallab.spots.at(i).softradiuscb;
}
@@ -4270,6 +4325,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
scaltm(v),
rewei(v),
sensitm(v),
+ softradiustm(v),
// Retinex
expreti(v),
retinexMethod(v),
@@ -4307,7 +4363,17 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
sensicb(v),
clarityml(v),
contresid(v),
+ blurcbdl(v),
+ blendmaskcb(v),
+ radmaskcb(v),
+ chromaskcb(v),
+ gammaskcb(v),
+ slomaskcb(v),
softradiuscb(v),
+ enacbMask(v),
+ CCmaskcbcurve(v),
+ LLmaskcbcurve(v),
+ HHmaskcbcurve(v),
// Denoise
expdenoi(v),
noiselumf(v),
@@ -4452,6 +4518,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
scaltm = v;
rewei = v;
sensitm = v;
+ softradiustm = v;
// Retinex
expreti = v;
retinexMethod = v;
@@ -4493,7 +4560,17 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
sensicb = v;
clarityml = v;
contresid = v;
+ blurcbdl = v;
+ blendmaskcb = v;
+ radmaskcb = v;
+ chromaskcb = v;
+ gammaskcb = v;
+ slomaskcb = v;
softradiuscb = v;
+ enacbMask = v;
+ CCmaskcbcurve = v;
+ LLmaskcbcurve = v;
+ HHmaskcbcurve = v;
// Denoise
expdenoi = v;
noiselumf = v;
diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h
index 8be8f0a94..6636f877c 100644
--- a/rtgui/paramsedited.h
+++ b/rtgui/paramsedited.h
@@ -479,6 +479,7 @@ public:
bool scaltm;
bool rewei;
bool sensitm;
+ bool softradiustm;
// Retinex
bool expreti;
bool retinexMethod;
@@ -516,7 +517,18 @@ public:
bool sensicb;
bool clarityml;
bool contresid;
+ bool blurcbdl;
+ bool blendmaskcb;
+ bool radmaskcb;
+ bool chromaskcb;
+ bool gammaskcb;
+ bool slomaskcb;
bool softradiuscb;
+ bool enacbMask;
+ bool CCmaskcbcurve;
+ bool LLmaskcbcurve;
+ bool HHmaskcbcurve;
+
// Denoise
bool expdenoi;
bool noiselumf;
diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc
index da0a5773e..1017607cd 100644
--- a/rtgui/preferences.cc
+++ b/rtgui/preferences.cc
@@ -960,7 +960,7 @@ Gtk::Widget* Preferences::getGeneralPanel()
ckbshowtooltiplocallab = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_SHOWTOOLTIP")));
setExpandAlignProperties(ckbshowtooltiplocallab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START);
- workflowGrid->attach(*ckbshowtooltiplocallab,0, 3);
+ workflowGrid->attach_next_to(*ckbshowtooltiplocallab, *ckbFileBrowserToolbarSingleRow, Gtk::POS_RIGHT, 1, 1);
fworklflow->add(*workflowGrid);
@@ -1055,13 +1055,16 @@ Gtk::Widget* Preferences::getGeneralPanel()
navGuideColorCB = Gtk::manage(new Gtk::ColorButton());
navGuideColorCB->set_use_alpha(true);
+ pseudoHiDPI = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_APPEARANCE_PSEUDOHIDPI") + Glib::ustring (" (") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")"));
+ setExpandAlignProperties(pseudoHiDPI, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
+
Gtk::VSeparator *vSep = Gtk::manage(new Gtk::VSeparator());
appearanceGrid->attach(*themeLbl, 0, 0, 1, 1);
appearanceGrid->attach(*themeCBT, 1, 0, 1, 1);
appearanceGrid->attach(*themeRestartLbl, 2, 0, 2, 1);
- appearanceGrid->attach(*vSep, 2, 1, 1, 3);
+ appearanceGrid->attach(*vSep, 2, 1, 1, 2);
appearanceGrid->attach(*mainFontLbl, 0, 1, 1, 1);
appearanceGrid->attach(*mainFontFB, 1, 1, 1, 1);
appearanceGrid->attach(*cropMaskColorLbl, 3, 1, 1, 1);
@@ -1070,6 +1073,7 @@ Gtk::Widget* Preferences::getGeneralPanel()
appearanceGrid->attach(*colorPickerFontFB, 1, 2, 1, 1);
appearanceGrid->attach(*navGuideColorLbl, 3, 2, 1, 1);
appearanceGrid->attach(*navGuideColorCB, 4, 2, 1, 1);
+ appearanceGrid->attach(*pseudoHiDPI, 0, 3, 5, 1);
appearanceFrame->add(*appearanceGrid);
vbGeneral->attach_next_to(*appearanceFrame, *flang, Gtk::POS_BOTTOM, 2, 1);
@@ -1649,6 +1653,8 @@ void Preferences::storePreferences()
moptions.CPFontSize = cpfd.get_size() / Pango::SCALE;
}
+ moptions.pseudoHiDPISupport = pseudoHiDPI->get_active();
+
#ifdef WIN32
moptions.gimpDir = gimpDir->get_filename();
moptions.psDir = psDir->get_filename();
@@ -1913,6 +1919,8 @@ void Preferences::fillPreferences()
colorPickerFontFB->set_font_name (Glib::ustring::compose ("%1 %2", options.CPFontFamily, options.CPFontSize));
}
+ pseudoHiDPI->set_active(options.pseudoHiDPISupport);
+
showDateTime->set_active(moptions.fbShowDateTime);
showBasicExif->set_active(moptions.fbShowBasicExif);
showExpComp->set_active(moptions.fbShowExpComp);
diff --git a/rtgui/preferences.h b/rtgui/preferences.h
index fde3c4d06..c7f5c4983 100644
--- a/rtgui/preferences.h
+++ b/rtgui/preferences.h
@@ -145,6 +145,8 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener
Gtk::FontButton* colorPickerFontFB;
Gtk::ColorButton* cropMaskColorCB;
Gtk::ColorButton* navGuideColorCB;
+ Gtk::CheckButton* pseudoHiDPI;
+
Gtk::SpinButton* maxRecentFolders;
Gtk::SpinButton* maxThumbHeightSB;
diff --git a/rtgui/rtimage.cc b/rtgui/rtimage.cc
index cc734456e..6a289ead6 100644
--- a/rtgui/rtimage.cc
+++ b/rtgui/rtimage.cc
@@ -120,6 +120,10 @@ void RTImage::changeImage (const Glib::ustring& imageName)
{
clear ();
+ if (imageName.empty()) {
+ return;
+ }
+
if (pixbuf) {
auto iterator = pixbufCache.find (imageName);
assert(iterator != pixbufCache.end ());
@@ -169,6 +173,17 @@ void RTImage::init()
scaleBack = RTScalable::getScale();
}
+void RTImage::cleanup()
+{
+ for (auto& entry : pixbufCache) {
+ entry.second.reset();
+ }
+ for (auto& entry : surfaceCache) {
+ entry.second.clear();
+ }
+ RTScalable::cleanup();
+}
+
void RTImage::updateImages()
{
for (auto& entry : pixbufCache) {
diff --git a/rtgui/rtimage.h b/rtgui/rtimage.h
index 481772ad6..5679f6edc 100644
--- a/rtgui/rtimage.h
+++ b/rtgui/rtimage.h
@@ -52,6 +52,7 @@ public:
static void init();
+ static void cleanup();
static void updateImages ();
static void setDPInScale (const double newDPI, const int newScale);
static void setScale (const int newScale);
diff --git a/rtgui/rtscalable.cc b/rtgui/rtscalable.cc
index 7aa3c82c8..aaa10bd21 100644
--- a/rtgui/rtscalable.cc
+++ b/rtgui/rtscalable.cc
@@ -36,6 +36,12 @@ Gtk::TextDirection RTScalable::direction = Gtk::TextDirection::TEXT_DIR_NONE;
void RTScalable::setDPInScale (const double newDPI, const int newScale)
{
+ if (!options.pseudoHiDPISupport) {
+ scale = 1;
+ dpi = baseDPI;
+ return;
+ }
+
if (scale != newScale || (scale == 1 && dpi != newDPI)) {
// reload all images
scale = newScale;
@@ -225,7 +231,7 @@ Cairo::RefPtr RTScalable::loadImage(const Glib::ustring &fn
RsvgDimensionData dim;
rsvg_handle_get_dimensions(handle, &dim);
- double r = dpi / 96.;
+ double r = dpi / baseDPI;
Cairo::RefPtr surf = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, (int)(dim.width * r + 0.499), (int)(dim.height * r + 0.499));
Cairo::RefPtr c = Cairo::Context::create(surf);
c->set_source_rgba (0., 0., 0., 0.);
diff --git a/rtgui/rtscalable.h b/rtgui/rtscalable.h
index c3ff19e60..e6180eaa1 100644
--- a/rtgui/rtscalable.h
+++ b/rtgui/rtscalable.h
@@ -40,11 +40,13 @@ protected:
public:
#ifdef __APPLE__
- static constexpr double baseDPI = 72;
- static constexpr double baseHiDPI = 144;
+ static constexpr double baseDPI = 72.;
+ static constexpr double baseHiDPI = 144.;
+ static constexpr int baseFontSize = 12;
#else
- static constexpr double baseDPI = 96;
- static constexpr double baseHiDPI = 192;
+ static constexpr double baseDPI = 96.;
+ static constexpr double baseHiDPI = 192.;
+ static constexpr int baseFontSize = 9;
#endif
static void init(Gtk::Window *window);
diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc
index f5e57cce9..f7d06feb9 100644
--- a/rtgui/rtwindow.cc
+++ b/rtgui/rtwindow.cc
@@ -106,12 +106,6 @@ RTWindow::RTWindow ()
Gtk::Settings::get_for_screen (screen)->property_gtk_theme_name() = "Adwaita";
Gtk::Settings::get_for_screen (screen)->property_gtk_application_prefer_dark_theme() = true;
-#if defined(__APPLE__)
- // This will force screen resolution regarding font, but I don't think it's compliant with Gtk guidelines...
- // Do not confuse with screen scaling, where everything is scaled up !
- screen->set_resolution (96.);
-#endif
-
Glib::RefPtr regex = Glib::Regex::create (THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS);
Glib::ustring filename;
Glib::MatchInfo mInfo;
@@ -170,7 +164,9 @@ RTWindow::RTWindow ()
css = Glib::ustring::compose ("* { font-family: %1; font-size: %2pt}", options.fontFamily, options.fontSize * (int)initialGdkScale);
#endif
//GTK318
- fontScale = options.fontSize / 9.f;
+ if (options.pseudoHiDPISupport) {
+ fontScale = options.fontSize / (float)RTScalable::baseFontSize;
+ }
if (options.rtSettings.verbose) {
printf("\"Non-Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", options.fontSize, (int)initialGdkScale, fontScale);
}
@@ -184,27 +180,27 @@ RTWindow::RTWindow ()
int resolution = (int)style->get_screen()->get_resolution();
if (isPix) {
// HOMBRE: guessing here...
- // if resolution is lower than 192ppi, we're supposing that it's already expressed in a scale==1 scenario
+ // if resolution is lower than baseHiDPI, we're supposing that it's already expressed in a scale==1 scenario
if (resolution >= int(RTScalable::baseHiDPI)) {
// converting the resolution to a scale==1 scenario
resolution /= 2;
}
// 1pt = 1/72in @ 96 ppi
// HOMBRE: If the font unit is px, is it already scaled up to match the resolution ?
- // px >inch >pt >"scaled pt"
- pt = (int)(double(fontSize) / RTScalable::baseDPI * 72. * (RTScalable::baseHiDPI / resolution) + 0.49);
+ // px >inch >pt >"scaled pt"
+ pt = (int)(double(fontSize) / RTScalable::baseDPI * 72. * (96. / (double)resolution) + 0.49);
} else {
pt = fontSize / Pango::SCALE;
}
- fontScale = (float)pt / 9.f;
- if ((int)initialGdkScale > 1 || pt != 9) {
+ if (options.pseudoHiDPISupport) {
+ fontScale = (float)pt / (float)RTScalable::baseFontSize;
+ }
+ if ((int)initialGdkScale > 1 || pt != RTScalable::baseFontSize) {
css = Glib::ustring::compose ("* { font-size: %1pt}", pt * (int)initialGdkScale);
if (options.rtSettings.verbose) {
printf("\"Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", pt, (int)initialGdkScale, fontScale);
}
}
- } else {
- fontScale = 1.f;
}
}
if (!css.empty()) {
@@ -463,7 +459,7 @@ RTWindow::~RTWindow()
delete fpanel;
}
- RTScalable::cleanup();
+ RTImage::cleanup();
}
void RTWindow::on_realize ()
diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc
index b81885bd2..5111b9283 100644
--- a/rtgui/toolpanelcoord.cc
+++ b/rtgui/toolpanelcoord.cc
@@ -466,9 +466,9 @@ void ToolPanelCoordinator::panelChanged(const rtengine::ProcEvent& event, const
}
// Manage Locallab mask visibility
- if (event == rtengine::EvlocallabshowmaskcolMethod || event == rtengine::EvlocallabshowmaskexpMethod || event == rtengine::EvlocallabshowmaskSHMethod) {
+ if (event == rtengine::EvlocallabshowmaskcolMethod || event == rtengine::EvlocallabshowmaskexpMethod || event == rtengine::EvlocallabshowmaskSHMethod || event == rtengine::EvlocallabshowmaskcbMethod) {
Locallab::llMaskVisibility* maskStruc = locallab->getMaskVisibility();
- ipc->setLocallabMaskVisibility(maskStruc->colorMask, maskStruc->expMask, maskStruc->SHMask);
+ ipc->setLocallabMaskVisibility(maskStruc->colorMask, maskStruc->expMask, maskStruc->SHMask, maskStruc->cbMask);
}
ipc->endUpdateParams(changeFlags); // starts the IPC processing
@@ -576,7 +576,7 @@ void ToolPanelCoordinator::profileChange(
// Reset Locallab mask visibility when a picture is loaded
if (event == rtengine::EvPhotoLoaded) {
locallab->resetMaskVisibility();
- ipc->setLocallabMaskVisibility(0, 0, 0);
+ ipc->setLocallabMaskVisibility(0, 0, 0, 0);
}
// start the IPC processing