From 4a765cc91fde51c1ff2fbc046fdcc4db4e57bff0 Mon Sep 17 00:00:00 2001 From: George Hilliard Date: Mon, 29 Oct 2018 10:52:06 -0500 Subject: [PATCH 01/20] Unify inconsistent notifyListener() logic Previously, this function required a `queueEmptied` bool, which I changed to `queueRunning`. But I goofed the logic on this bool; it should always be "is `processing` nullptr." --- rtgui/batchqueue.cc | 13 ++++++------- rtgui/batchqueue.h | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index a66fda153..6c42ef89f 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -229,7 +229,7 @@ void BatchQueue::addEntries (const std::vector& entries, bool saveBatchQueue (); redraw (); - notifyListener (true); + notifyListener (); } bool BatchQueue::saveBatchQueue () @@ -387,7 +387,7 @@ bool BatchQueue::loadBatchQueue () } redraw (); - notifyListener (true); + notifyListener (); return !fd.empty (); } @@ -460,7 +460,7 @@ void BatchQueue::cancelItems (const std::vector& items) saveBatchQueue (); redraw (); - notifyListener (true); + notifyListener (); } void BatchQueue::headItems (const std::vector& items) @@ -775,8 +775,7 @@ rtengine::ProcessingJob* BatchQueue::imageReady(rtengine::IImagefloat* img) } redraw (); - const bool queueRunning = processing; - notifyListener (queueRunning); + notifyListener (); return processing ? processing->job : nullptr; } @@ -971,9 +970,9 @@ void BatchQueue::buttonPressed (LWButton* button, int actionCode, void* actionDa } } -void BatchQueue::notifyListener (bool queueRunning) +void BatchQueue::notifyListener () { - + const bool queueRunning = processing; if (listener) { NLParams* params = new NLParams; params->listener = listener; diff --git a/rtgui/batchqueue.h b/rtgui/batchqueue.h index 6b0e047cb..a922e5e1f 100644 --- a/rtgui/batchqueue.h +++ b/rtgui/batchqueue.h @@ -93,7 +93,7 @@ protected: Glib::ustring autoCompleteFileName (const Glib::ustring& fileName, const Glib::ustring& format); Glib::ustring getTempFilenameForParams( const Glib::ustring &filename ); bool saveBatchQueue (); - void notifyListener (bool queueRunning); + void notifyListener (); BatchQueueEntry* processing; // holds the currently processed image FileCatalog* fileCatalog; From cc6cbe8347dcf9c03b21de203a6f18ed377ec7a5 Mon Sep 17 00:00:00 2001 From: George Hilliard Date: Thu, 1 Nov 2018 00:47:06 -0500 Subject: [PATCH 02/20] Distinguish between "desired" and "reported" batch queue state This allows the switch to both reflect the state of the queue and function as an input widget. --- rtgui/batchqueuepanel.cc | 74 +++++++++++++++++++++------------------- rtgui/batchqueuepanel.h | 3 +- 2 files changed, 41 insertions(+), 36 deletions(-) diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index 8da66183a..a2358a3b5 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -249,20 +249,13 @@ void BatchQueuePanel::queueSizeChanged(int qsize, bool queueRunning, bool queueE { updateTab (qsize); - if (qsize == 0 || (qsize == 1 && queueRunning)) { - qStartStop->set_sensitive(false); - } else { - qStartStop->set_sensitive(true); - } + setGuiFromBatchState(queueRunning, qsize); - if (!queueRunning) { - stopBatchProc (); - fdir->set_sensitive (true); - fformat->set_sensitive (true); + if (!queueRunning && qsize == 0 && queueShouldRun) { + // There was work, but it is all done now. + queueShouldRun = false; - if (qsize == 0) { - SoundManager::playSoundAsync(options.sndBatchQueueDone); - } + SoundManager::playSoundAsync(options.sndBatchQueueDone); } if (queueError) { @@ -273,8 +266,7 @@ void BatchQueuePanel::queueSizeChanged(int qsize, bool queueRunning, bool queueE void BatchQueuePanel::startOrStopBatchProc() { - bool state = qStartStop->get_state(); - if (state) { + if (qStartStop->get_state()) { startBatchProc(); } else { stopBatchProc(); @@ -283,22 +275,17 @@ void BatchQueuePanel::startOrStopBatchProc() void BatchQueuePanel::startBatchProc () { - // Update switch when queue started programmatically - qStartStopConn.block (true); - qStartStop->set_active(true); - qStartStopState = true; - qStartStopConn.block (false); - if (batchQueue->hasJobs()) { - fdir->set_sensitive (false); - fformat->set_sensitive (false); - if (batchQueue->getEntries().size() == 1) { - qStartStop->set_sensitive(false); - } + // Update the *desired* state of the queue, then launch it. The switch + // state is not updated here; it is changed by the queueSizeChanged() + // callback in response to the *reported* state. + queueShouldRun = true; + + // Don't need an update callback from the queue to know it is started: + setGuiFromBatchState(true, batchQueue->getEntries().size()); + saveOptions(); batchQueue->startProcessing (); - } else { - stopBatchProc (); } updateTab (batchQueue->getEntries().size()); @@ -306,20 +293,37 @@ void BatchQueuePanel::startBatchProc () void BatchQueuePanel::stopBatchProc () { - // Update switch when queue started programmatically - qStartStopConn.block (true); - qStartStop->set_active(false); - qStartStopState = false; - qStartStopConn.block (false); + // There is nothing much to do here except set the desired state, which the + // background queue thread must check. It will notify queueSizeChanged() + // when it stops. + queueShouldRun = false; updateTab (batchQueue->getEntries().size()); } +void BatchQueuePanel::setGuiFromBatchState(bool queueRunning, int qsize) +{ + // Change the GUI state in response to the reported queue state + if (qsize == 0 || (qsize == 1 && queueRunning)) { + qStartStop->set_sensitive(false); + } else { + qStartStop->set_sensitive(true); + } + + qStartStopConn.block(true); + qStartStop->set_active(queueRunning); + qStartStopConn.block(false); + + fdir->set_sensitive (!queueRunning); + fformat->set_sensitive (!queueRunning); +} + void BatchQueuePanel::addBatchQueueJobs(const std::vector& entries, bool head) { batchQueue->addEntries(entries, head); if (!qStartStop->get_active() && qAutoStart->get_active()) { + // Auto-start as if the user had pressed the qStartStop switch startBatchProc (); } } @@ -354,9 +358,9 @@ bool BatchQueuePanel::handleShortcutKey (GdkEventKey* event) bool BatchQueuePanel::canStartNext () { - // This function is called from the background BatchQueue thread. - // It cannot call UI functions, so grab the stored state of qStartStop. - return qStartStopState; + // This function is called from the background BatchQueue thread. It + // cannot call UI functions; we keep the desired state in an atomic. + return queueShouldRun; } void BatchQueuePanel::pathFolderButtonPressed () diff --git a/rtgui/batchqueuepanel.h b/rtgui/batchqueuepanel.h index 74c9750e7..e21e01352 100644 --- a/rtgui/batchqueuepanel.h +++ b/rtgui/batchqueuepanel.h @@ -53,7 +53,7 @@ class BatchQueuePanel : public Gtk::VBox, Gtk::HBox* bottomBox; Gtk::HBox* topBox; - std::atomic qStartStopState; + std::atomic queueShouldRun; IdleRegister idle_register; @@ -76,6 +76,7 @@ private: void startBatchProc (); void stopBatchProc (); void startOrStopBatchProc(); + void setGuiFromBatchState(bool queueRunning, int qsize); void pathFolderChanged (); void pathFolderButtonPressed (); From aeae61f67f94a0b980f157690427989957ec3269 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Thu, 1 Nov 2018 17:36:20 +0100 Subject: [PATCH 03/20] Updated Preferences > File Browser > Cache Options - UI updated to use grid so that the options nicely align. - "Clear only cached processing profiles" and "Clear all" buttons are hidden when Preferences > Image Processing > Processing profile saving location is set to "next to the input file", #4911 --- rtdata/languages/Catala | 3 - rtdata/languages/Chinese (Simplified) | 3 - rtdata/languages/Chinese (Traditional) | 3 - rtdata/languages/Czech | 3 - rtdata/languages/Dansk | 3 - rtdata/languages/Deutsch | 3 - rtdata/languages/English (UK) | 3 - rtdata/languages/English (US) | 3 - rtdata/languages/Espanol | 3 - rtdata/languages/Euskara | 3 - rtdata/languages/Francais | 3 - rtdata/languages/Greek | 3 - rtdata/languages/Hebrew | 3 - rtdata/languages/Italiano | 3 - rtdata/languages/Japanese | 3 - rtdata/languages/Latvian | 3 - rtdata/languages/Magyar | 3 - rtdata/languages/Nederlands | 3 - rtdata/languages/Norsk BM | 3 - rtdata/languages/Polish | 3 - rtdata/languages/Polish (Latin Characters) | 3 - rtdata/languages/Portugues (Brasil) | 3 - rtdata/languages/Russian | 3 - rtdata/languages/Serbian (Cyrilic Characters) | 3 - rtdata/languages/Serbian (Latin Characters) | 3 - rtdata/languages/Slovak | 3 - rtdata/languages/Suomi | 3 - rtdata/languages/Swedish | 3 - rtdata/languages/Turkish | 3 - rtdata/languages/default | 8 +- rtgui/preferences.cc | 98 ++++++++++++------- rtgui/preferences.h | 7 +- 32 files changed, 70 insertions(+), 130 deletions(-) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 1c89d23c5..fa7141087 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -491,9 +491,6 @@ PREFERENCES_APPLNEXTSTARTUP;Efectiu en reiniciar PREFERENCES_AUTOMONPROFILE;Usa els perfils dels monitors dels sist. operatius automàticament PREFERENCES_BATCH_PROCESSING;Process. per lots PREFERENCES_BEHAVIOR;Comportament -PREFERENCES_CACHECLEARALL;Esborrar tot -PREFERENCES_CACHECLEARPROFILES;Esborrar perfils -PREFERENCES_CACHECLEARTHUMBS;Esborra minifotos PREFERENCES_CACHEMAXENTRIES;Màxim nombre d'entrades a la mem. cau PREFERENCES_CACHEOPTS;Opcions memòria cau PREFERENCES_CACHETHUMBHEIGHT;Màxima alçada de minifoto diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 05b11dd4f..ff45df98b 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -492,9 +492,6 @@ PREFERENCES_BEHADDALL;全 '添加' PREFERENCES_BEHAVIOR;行为 PREFERENCES_BEHSETALL;全 '设定' PREFERENCES_BLACKBODY;钨丝灯 -PREFERENCES_CACHECLEARALL;全部清除 -PREFERENCES_CACHECLEARPROFILES;清除配置 -PREFERENCES_CACHECLEARTHUMBS;清除缩略图 PREFERENCES_CACHEMAXENTRIES;最大缓存数量 PREFERENCES_CACHEOPTS;缓存选项 PREFERENCES_CACHETHUMBHEIGHT;最大缩略图高度 diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index d58343b6a..47a604554 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -239,9 +239,6 @@ PARTIALPASTE_SHARPENING;Sharpening PARTIALPASTE_VIGNETTING;Vignetting correction PARTIALPASTE_WHITEBALANCE;White balance PREFERENCES_APPLNEXTSTARTUP;下次啟動生效 -PREFERENCES_CACHECLEARALL;Clear All -PREFERENCES_CACHECLEARPROFILES;Clear Profiles -PREFERENCES_CACHECLEARTHUMBS;Clear Thumbnails PREFERENCES_CACHEMAXENTRIES;Maximal Number of Cache Entries PREFERENCES_CACHEOPTS;Cache Options PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index dbc606070..4be6bdc58 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -989,9 +989,6 @@ PREFERENCES_BEHAVIOR;Režim PREFERENCES_BEHSETALL;Vše do 'Nastavit' PREFERENCES_BEHSETALLHINT;Nastaví všechny parametry do módu Nastavit.\nZměna parametrů v panelu dávkového zpracování se aplikuje jako absolutní, budou zobrazeny aktuální hodnoty. PREFERENCES_BLACKBODY;Wolfram -PREFERENCES_CACHECLEARALL;Vymazat vše -PREFERENCES_CACHECLEARPROFILES;Smazat profily zpracování -PREFERENCES_CACHECLEARTHUMBS;Vymazat náhledy PREFERENCES_CACHEMAXENTRIES;Maximální počet záznamů v mezipaměti PREFERENCES_CACHEOPTS;Vlastnosti mezipaměti PREFERENCES_CACHETHUMBHEIGHT;Maximální výška náhledu diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index da5616b31..7658914f7 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -230,9 +230,6 @@ PARTIALPASTE_SHARPENING;Skarphed PARTIALPASTE_VIGNETTING;Vignettering PARTIALPASTE_WHITEBALANCE;Hvidbalance PREFERENCES_APPLNEXTSTARTUP;Anvendes ved næste opstart -PREFERENCES_CACHECLEARALL;Ryd alt -PREFERENCES_CACHECLEARPROFILES;Ryd profiler -PREFERENCES_CACHECLEARTHUMBS;Ryd miniaturer PREFERENCES_CACHEMAXENTRIES;Maksimalt antal indskrivninger i cache PREFERENCES_CACHEOPTS;Cache-indstillinger PREFERENCES_CACHETHUMBHEIGHT;Maksimal miniaturehøjde diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 3cf1b32da..fc3374db6 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -1099,9 +1099,6 @@ PREFERENCES_BEHAVIOR;Verhalten PREFERENCES_BEHSETALL;Alle setzen PREFERENCES_BEHSETALLHINT;Setzt alle Parameter auf Setzen.\nAnpassungen der Parameter in der Hintergrundstapelverarbeitung werden als Absolut zu den gespeicherten Werten interpretiert. PREFERENCES_BLACKBODY;Wolfram -PREFERENCES_CACHECLEARALL;Alles löschen -PREFERENCES_CACHECLEARPROFILES;Profile löschen -PREFERENCES_CACHECLEARTHUMBS;Miniaturbilder löschen PREFERENCES_CACHEMAXENTRIES;Maximale Anzahl der Miniaturbilder im Festplatten-Cache PREFERENCES_CACHEOPTS;Einstellungen des Festplatten-Cache für Miniaturbilder PREFERENCES_CACHETHUMBHEIGHT;Maximale Höhe der Miniaturbilder diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index 8fcaafd56..6be9b3308 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -1102,9 +1102,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_BEHSETALL;All to 'Set' !PREFERENCES_BEHSETALLHINT;Set all parameters to the Set mode.\nAdjustments of parameters in the batch tool panel will be absolute, the actual values will be displayed. !PREFERENCES_BLACKBODY;Tungsten -!PREFERENCES_CACHECLEARALL;Clear All -!PREFERENCES_CACHECLEARPROFILES;Clear Processing Profiles -!PREFERENCES_CACHECLEARTHUMBS;Clear Thumbnails !PREFERENCES_CACHEMAXENTRIES;Maximum number of cache entries !PREFERENCES_CACHEOPTS;Cache Options !PREFERENCES_CACHETHUMBHEIGHT;Maximum thumbnail height diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index 53a2aec91..f8ec04d1f 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -1026,9 +1026,6 @@ !PREFERENCES_BEHSETALL;All to 'Set' !PREFERENCES_BEHSETALLHINT;Set all parameters to the Set mode.\nAdjustments of parameters in the batch tool panel will be absolute, the actual values will be displayed. !PREFERENCES_BLACKBODY;Tungsten -!PREFERENCES_CACHECLEARALL;Clear All -!PREFERENCES_CACHECLEARPROFILES;Clear Processing Profiles -!PREFERENCES_CACHECLEARTHUMBS;Clear Thumbnails !PREFERENCES_CACHEMAXENTRIES;Maximum number of cache entries !PREFERENCES_CACHEOPTS;Cache Options !PREFERENCES_CACHETHUMBHEIGHT;Maximum thumbnail height diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 4284523ab..7b0645778 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -721,9 +721,6 @@ PREFERENCES_BEHAVIOR;Comportamiento PREFERENCES_BEHSETALL;Todo para 'Establecer' PREFERENCES_BEHSETALLHINT;Todos los parámetros para el modo Establecer.\nLos ajustes de parámetros en el panel de la herramienta de lotes serán serán absolutos, se mostrarán los valores vigentes PREFERENCES_BLACKBODY;Tungsteno -PREFERENCES_CACHECLEARALL;Borrar todo -PREFERENCES_CACHECLEARPROFILES;Borrar perfiles -PREFERENCES_CACHECLEARTHUMBS;Borrar miniaturas PREFERENCES_CACHEMAXENTRIES;Cantidad máxima de entradas en la memoria intermedia PREFERENCES_CACHEOPTS;Opciones de memoria intermedia PREFERENCES_CACHETHUMBHEIGHT;Altura máxima de las miniaturas diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index a604d6aef..06bfc9ae5 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -230,9 +230,6 @@ PARTIALPASTE_SHARPENING;Sharpening PARTIALPASTE_VIGNETTING;Vignetting correction PARTIALPASTE_WHITEBALANCE;White balance PREFERENCES_APPLNEXTSTARTUP;hurrengo abioan aplikatua -PREFERENCES_CACHECLEARALL;Clear All -PREFERENCES_CACHECLEARPROFILES;Clear Profiles -PREFERENCES_CACHECLEARTHUMBS;Clear Thumbnails PREFERENCES_CACHEMAXENTRIES;Maximal Number of Cache Entries PREFERENCES_CACHEOPTS;Cache Options PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 2bf82f6e1..19a8ce8d4 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -988,9 +988,6 @@ PREFERENCES_BEHAVIOR;Comportement PREFERENCES_BEHSETALL;Tout à 'Remplace' PREFERENCES_BEHSETALLHINT;Règle tous les paramètres sur le mode Remplace.\nLa modification des paramètres dans le panneau d'édition en par lot sera absolue, les valeurs réelles seront affichées PREFERENCES_BLACKBODY;Tungstène -PREFERENCES_CACHECLEARALL;Tout nettoyer -PREFERENCES_CACHECLEARPROFILES;Nettoyer les profils -PREFERENCES_CACHECLEARTHUMBS;Nettoyer les vignettes PREFERENCES_CACHEMAXENTRIES;Nombre maximal d'éléments dans le Cache PREFERENCES_CACHEOPTS;Options du Cache PREFERENCES_CACHETHUMBHEIGHT;Hauteur maximale des vignettes diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index 0c416e421..cf9aef8ae 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -230,9 +230,6 @@ PARTIALPASTE_SHARPENING;Sharpening PARTIALPASTE_VIGNETTING;Vignetting correction PARTIALPASTE_WHITEBALANCE;White balance PREFERENCES_APPLNEXTSTARTUP;εφαρμόζεται στην επόμενη εκκίνηση -PREFERENCES_CACHECLEARALL;Clear All -PREFERENCES_CACHECLEARPROFILES;Clear Profiles -PREFERENCES_CACHECLEARTHUMBS;Clear Thumbnails PREFERENCES_CACHEMAXENTRIES;Maximal Number of Cache Entries PREFERENCES_CACHEOPTS;Cache Options PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index 358045544..e8814d80f 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -230,9 +230,6 @@ PARTIALPASTE_SHARPENING;Sharpening PARTIALPASTE_VIGNETTING;Vignetting correction PARTIALPASTE_WHITEBALANCE;White balance PREFERENCES_APPLNEXTSTARTUP;ייושם באתחול הבא -PREFERENCES_CACHECLEARALL;Clear All -PREFERENCES_CACHECLEARPROFILES;Clear Profiles -PREFERENCES_CACHECLEARTHUMBS;Clear Thumbnails PREFERENCES_CACHEMAXENTRIES;Maximal Number of Cache Entries PREFERENCES_CACHEOPTS;Cache Options PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index e8a49771a..1c24cc52e 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -627,9 +627,6 @@ PREFERENCES_BEHAVIOR;Comportamento PREFERENCES_BEHSETALL;Tutti a 'Imposta' PREFERENCES_BEHSETALLHINT;Imposta tutti i parametri nella modalità Imposta.\nLe regolazioni dei parametri nel pannello strumenti batch saranno assoluti, verranno mostrati i valori reali. PREFERENCES_BLACKBODY;Tungsteno -PREFERENCES_CACHECLEARALL;Rimuovi tutto -PREFERENCES_CACHECLEARPROFILES;Rimuovi i profili di sviluppo -PREFERENCES_CACHECLEARTHUMBS;Rimuovi le miniature PREFERENCES_CACHEMAXENTRIES;Numero massimo di voci in memoria PREFERENCES_CACHEOPTS;Opzioni della memoria PREFERENCES_CACHETHUMBHEIGHT;Massima altezza delle miniature diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 0bc015fe9..bc5fa66e0 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -1056,9 +1056,6 @@ PREFERENCES_BEHAVIOR;ビヘイビア PREFERENCES_BEHSETALL;すべて '設定' PREFERENCES_BEHSETALLHINT;すべてのパラメータを 設定モードにします\nバッチツールパネルで設定される調整値が、各画像の既定値に取って代わり同一になります PREFERENCES_BLACKBODY;タングステン -PREFERENCES_CACHECLEARALL;すべてクリア -PREFERENCES_CACHECLEARPROFILES;プロファイルのクリア -PREFERENCES_CACHECLEARTHUMBS;サムネイルのクリア PREFERENCES_CACHEMAXENTRIES;キャッシュエントリーの最大数 PREFERENCES_CACHEOPTS;cache オプション PREFERENCES_CACHETHUMBHEIGHT;サムネイル縦の最大値 diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index 23887cfb1..2a3ca3759 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -230,9 +230,6 @@ PARTIALPASTE_SHARPENING;Asināšana PARTIALPASTE_VIGNETTING;Vinjetes labošana PARTIALPASTE_WHITEBALANCE;Baltā līdzsvarss PREFERENCES_APPLNEXTSTARTUP;lietos nākamā reizē -PREFERENCES_CACHECLEARALL;Attīrīt visu -PREFERENCES_CACHECLEARPROFILES;Attīrīt Profilus -PREFERENCES_CACHECLEARTHUMBS;Attīrīt sīktēlus PREFERENCES_CACHEMAXENTRIES;Maksimālais keša ierakstu skaits PREFERENCES_CACHEOPTS;Keša opcijas PREFERENCES_CACHETHUMBHEIGHT;Keša maksimālais sīktēla augstums diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index 4e463a8fd..9bd662821 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -475,9 +475,6 @@ PREFERENCES_APPLNEXTSTARTUP;újraindítás után érvényes PREFERENCES_AUTOMONPROFILE;Oprendszerben beállított monitor-színprofil automatikus használata PREFERENCES_BATCH_PROCESSING;Kötegelt feldolgozás PREFERENCES_BEHAVIOR;Viselkedés -PREFERENCES_CACHECLEARALL;Teljes gyorsítótár törlése -PREFERENCES_CACHECLEARPROFILES;Feldolg. param. törlése -PREFERENCES_CACHECLEARTHUMBS;Előnézeti képek törlése PREFERENCES_CACHEMAXENTRIES;Gyorsítótárban tárolt képek max. száma PREFERENCES_CACHEOPTS;Gyorsítótár beállítások PREFERENCES_CACHETHUMBHEIGHT;Előnézeti kép maximális magassága diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index fd0036952..15f7b959b 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -912,9 +912,6 @@ PREFERENCES_BEHAVIOR;Gedrag PREFERENCES_BEHSETALL;Alles op 'Activeer' PREFERENCES_BEHSETALLHINT;Zet alle parameters in de Activeer mode.\nWijzigingen van parameters in de batch tool zijn absoluut. De actuele waarden worden gebruikt. PREFERENCES_BLACKBODY;Tungsten(wolfraam) -PREFERENCES_CACHECLEARALL;Wis alles -PREFERENCES_CACHECLEARPROFILES;Wis profielen -PREFERENCES_CACHECLEARTHUMBS;Wis miniaturen PREFERENCES_CACHEMAXENTRIES;Maximaal aantal elementen in cache PREFERENCES_CACHEOPTS;Cache-opties PREFERENCES_CACHETHUMBHEIGHT;Maximale hoogte miniaturen diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index 4a4995aef..958ed12ad 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -230,9 +230,6 @@ PARTIALPASTE_SHARPENING;Oppskarping PARTIALPASTE_VIGNETTING;Vignetteringskorreksjon PARTIALPASTE_WHITEBALANCE;Hvitbalanse PREFERENCES_APPLNEXTSTARTUP;Endres ved neste oppstart -PREFERENCES_CACHECLEARALL;Slett alle -PREFERENCES_CACHECLEARPROFILES;Slett profiler -PREFERENCES_CACHECLEARTHUMBS;Slett thumbnails PREFERENCES_CACHEMAXENTRIES;Maksimalt antall cache oppføringer PREFERENCES_CACHEOPTS;Cache innstillinger PREFERENCES_CACHETHUMBHEIGHT;Maksimal Thumbnail Høyde diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index b271178e0..3e853bf20 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -676,9 +676,6 @@ PREFERENCES_BEHAVIOR;Zachowanie PREFERENCES_BEHSETALL;'Ustaw' wszystkie PREFERENCES_BEHSETALLHINT;Ustaw wszystkie narzędzia w tryb Ustaw.\nZmiany parametrów w panelu edycji zbiorczej zostaną traktowane jako absolutne, nie biorąc pod uwagę poprzednich wartości. PREFERENCES_BLACKBODY;Wolfram -PREFERENCES_CACHECLEARALL;Wyczyść wszystko -PREFERENCES_CACHECLEARPROFILES;Wyczyść profile -PREFERENCES_CACHECLEARTHUMBS;Wyczyść miniaturki PREFERENCES_CACHEMAXENTRIES;Maksymalna liczba wpisów w pamięci podręcznej PREFERENCES_CACHEOPTS;Opcje pamięci podręcznej PREFERENCES_CACHETHUMBHEIGHT;Maksymalna wysokość miniatury diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index 310a1ed13..f847eb6b9 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -676,9 +676,6 @@ PREFERENCES_BEHAVIOR;Zachowanie PREFERENCES_BEHSETALL;'Ustaw' wszystkie PREFERENCES_BEHSETALLHINT;Ustaw wszystkie narzedzia w tryb Ustaw.\nZmiany parametrow w panelu edycji zbiorczej zostana traktowane jako absolutne, nie biorac pod uwage poprzednich wartosci. PREFERENCES_BLACKBODY;Wolfram -PREFERENCES_CACHECLEARALL;Wyczysc wszystko -PREFERENCES_CACHECLEARPROFILES;Wyczysc profile -PREFERENCES_CACHECLEARTHUMBS;Wyczysc miniaturki PREFERENCES_CACHEMAXENTRIES;Maksymalna liczba wpisow w pamieci podrecznej PREFERENCES_CACHEOPTS;Opcje pamieci podrecznej PREFERENCES_CACHETHUMBHEIGHT;Maksymalna wysokosc miniatury diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index c737ddcfd..d8e5ccc1f 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -1020,9 +1020,6 @@ PREFERENCES_BEHAVIOR;Comportamento PREFERENCES_BEHSETALL;Tudo para 'Configurar' PREFERENCES_BEHSETALLHINT;Definir todos os parâmetros para o Configurar modo.\nAjustes de parâmetros no painel de ferramentas de lote serão absoluto, os valores reais serão exibidos. PREFERENCES_BLACKBODY;Tungstênio -PREFERENCES_CACHECLEARALL;Limpar Tudo -PREFERENCES_CACHECLEARPROFILES;Limpar Perfis de Processamento -PREFERENCES_CACHECLEARTHUMBS;Limpar Miniaturas PREFERENCES_CACHEMAXENTRIES;Número máximo de entradas de cache PREFERENCES_CACHEOPTS;Opções de Cache PREFERENCES_CACHETHUMBHEIGHT;Altura máxima da miniatura diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index 3c89c4a74..176d86511 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -672,9 +672,6 @@ PREFERENCES_BEHAVIOR;Поведение PREFERENCES_BEHSETALL;Всё в "Установить" PREFERENCES_BEHSETALLHINT;Выставить все параметры в режим Установить.\nНастройки параметров в панели пакетной обработки будут абсолютными, будут показаны используемые значения PREFERENCES_BLACKBODY;Лампа накаливания -PREFERENCES_CACHECLEARALL;Удалить все -PREFERENCES_CACHECLEARPROFILES;Удалить параметры обработки -PREFERENCES_CACHECLEARTHUMBS;Удалить эскизы PREFERENCES_CACHEMAXENTRIES;Максимальное число элементов в кэше PREFERENCES_CACHEOPTS;Параметры кэширования PREFERENCES_CACHETHUMBHEIGHT;Максимальная высота эскиза diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 34c62bf06..4b570abb7 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -597,9 +597,6 @@ PREFERENCES_BEHAVIOR;Понашање PREFERENCES_BEHSETALL;Све у „Постави“ PREFERENCES_BEHSETALLHINT;Поставља све параметре у режим Постави.\nЊихово подешавање помоћу алата из панела за заказано ће бити апсолутне вредности као што су и изабране. PREFERENCES_BLACKBODY;Обична сијалица -PREFERENCES_CACHECLEARALL;Обриши све -PREFERENCES_CACHECLEARPROFILES;Обриши профиле -PREFERENCES_CACHECLEARTHUMBS;Обриши приказе PREFERENCES_CACHEMAXENTRIES;Највећи број мест у остави PREFERENCES_CACHEOPTS;Подешавање оставе PREFERENCES_CACHETHUMBHEIGHT;Највећа висина приказа diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index 5dd1fa04d..a5d5094c6 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -597,9 +597,6 @@ PREFERENCES_BEHAVIOR;Ponašanje PREFERENCES_BEHSETALL;Sve u „Postavi“ PREFERENCES_BEHSETALLHINT;Postavlja sve parametre u režim Postavi.\nNjihovo podešavanje pomoću alata iz panela za zakazano će biti apsolutne vrednosti kao što su i izabrane. PREFERENCES_BLACKBODY;Obična sijalica -PREFERENCES_CACHECLEARALL;Obriši sve -PREFERENCES_CACHECLEARPROFILES;Obriši profile -PREFERENCES_CACHECLEARTHUMBS;Obriši prikaze PREFERENCES_CACHEMAXENTRIES;Najveći broj mest u ostavi PREFERENCES_CACHEOPTS;Podešavanje ostave PREFERENCES_CACHETHUMBHEIGHT;Najveća visina prikaza diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index 15c4050ad..7e7fcdf86 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -274,9 +274,6 @@ PREFERENCES_ADD;Pridať PREFERENCES_APPLNEXTSTARTUP;Aplikovaný pri ďalšom spustení PREFERENCES_BATCH_PROCESSING;dávkové spracovanie PREFERENCES_BEHAVIOR;Správanie sa -PREFERENCES_CACHECLEARALL;Vyčistiť všetko -PREFERENCES_CACHECLEARPROFILES;Vyčistiť profily -PREFERENCES_CACHECLEARTHUMBS;Vyčistiť zmenšeniny PREFERENCES_CACHEMAXENTRIES;Maximálny počet vstupov v cache PREFERENCES_CACHEOPTS;Možnosti cache PREFERENCES_CACHETHUMBHEIGHT;Maximálna výška zmenšenín diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index b0d075188..6e32cea61 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -230,9 +230,6 @@ PARTIALPASTE_SHARPENING;Terävöinti PARTIALPASTE_VIGNETTING;Vinjetoinnin korjaus PARTIALPASTE_WHITEBALANCE;Valkotasapaino PREFERENCES_APPLNEXTSTARTUP;käytössä käynnistyksen jälkeen -PREFERENCES_CACHECLEARALL;Tyhjennä kaikki -PREFERENCES_CACHECLEARPROFILES;Tyhjennä profiilit -PREFERENCES_CACHECLEARTHUMBS;Tyhjennä esikatselukuvat PREFERENCES_CACHEMAXENTRIES;Välimuistin koko PREFERENCES_CACHEOPTS;Välimuistin asetukset PREFERENCES_CACHETHUMBHEIGHT;Suurin esikatselukuvan korkeus diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index 82b11df1e..510d6696d 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -817,9 +817,6 @@ PREFERENCES_BEHAVIOR;Uppträdande PREFERENCES_BEHSETALL;Sätt allt till 'Ange' PREFERENCES_BEHSETALLHINT;Sätt alla parametrar till Ange-läge.\nFörändringar i parametrar i batch-verktyget kommer att vara absoluta och de faktiska värdena kommer att visas. PREFERENCES_BLACKBODY;Glödlampa -PREFERENCES_CACHECLEARALL;Återställ alla -PREFERENCES_CACHECLEARPROFILES;Återställ profiler -PREFERENCES_CACHECLEARTHUMBS;Ta bort cachade miniatyrbilder PREFERENCES_CACHEMAXENTRIES;Maximalt antal cachefiler PREFERENCES_CACHEOPTS;Cacheinställningar PREFERENCES_CACHETHUMBHEIGHT;Maximal höjd på miniatyrbilderna diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index 051c99217..1ab598c2c 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -230,9 +230,6 @@ PARTIALPASTE_SHARPENING;Sharpening PARTIALPASTE_VIGNETTING;Vignetting correction PARTIALPASTE_WHITEBALANCE;White balance PREFERENCES_APPLNEXTSTARTUP;Bir sonraki başlamada uygulacacak. -PREFERENCES_CACHECLEARALL;Clear All -PREFERENCES_CACHECLEARPROFILES;Clear Profiles -PREFERENCES_CACHECLEARTHUMBS;Clear Thumbnails PREFERENCES_CACHEMAXENTRIES;Maximal Number of Cache Entries PREFERENCES_CACHEOPTS;Cache Options PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height diff --git a/rtdata/languages/default b/rtdata/languages/default index 1a1d4a18b..85a21dfe7 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1038,9 +1038,11 @@ PREFERENCES_BEHAVIOR;Behavior PREFERENCES_BEHSETALL;All to 'Set' PREFERENCES_BEHSETALLHINT;Set all parameters to the Set mode.\nAdjustments of parameters in the batch tool panel will be absolute, the actual values will be displayed. PREFERENCES_BLACKBODY;Tungsten -PREFERENCES_CACHECLEARALL;Clear All -PREFERENCES_CACHECLEARPROFILES;Clear Processing Profiles -PREFERENCES_CACHECLEARTHUMBS;Clear Thumbnails +PREFERENCES_CACHECLEAR;Clear +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: +PREFERENCES_CACHECLEAR_SAFETY;Only files in the cache are cleared. Processing profiles stored alongside the source images are not touched. PREFERENCES_CACHEMAXENTRIES;Maximum number of cache entries PREFERENCES_CACHEOPTS;Cache Options PREFERENCES_CACHETHUMBHEIGHT;Maximum thumbnail height diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index b15e10e49..9d58244f4 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -1334,40 +1334,66 @@ Gtk::Widget* Preferences::getFileBrowserPanel () fre->add (*vbre); - Gtk::Frame* frc = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CACHEOPTS")) ); - Gtk::VBox* vbc = Gtk::manage ( new Gtk::VBox () ); + // Cache + + Gtk::Frame* frc = Gtk::manage (new Gtk::Frame(M("PREFERENCES_CACHEOPTS"))); + Gtk::VBox* vbc = Gtk::manage (new Gtk::VBox()); frc->add (*vbc); - Gtk::HBox* hb3 = Gtk::manage ( new Gtk::HBox () ); - Gtk::Label* chlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CACHETHUMBHEIGHT") + ":") ); - maxThumbSize = Gtk::manage ( new Gtk::SpinButton () ); - hb3->pack_start (*chlab, Gtk::PACK_SHRINK, 4); - hb3->pack_start (*maxThumbSize, Gtk::PACK_SHRINK, 4); + Gtk::Grid* cacheGrid = Gtk::manage(new Gtk::Grid()); + cacheGrid->get_style_context()->add_class("grid-spacing"); + setExpandAlignProperties(cacheGrid, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - maxThumbSize->set_digits (0); - maxThumbSize->set_increments (1, 10); - maxThumbSize->set_range (40, 800); - vbc->pack_start (*hb3, Gtk::PACK_SHRINK, 4); + Gtk::Label* maxThumbHeightLbl = Gtk::manage (new Gtk::Label(M("PREFERENCES_CACHETHUMBHEIGHT") + ":")); + setExpandAlignProperties(maxThumbHeightLbl, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + maxThumbHeightSB = Gtk::manage (new Gtk::SpinButton()); + maxThumbHeightSB->set_digits (0); + maxThumbHeightSB->set_increments (1, 10); + maxThumbHeightSB->set_range (40, 800); - Gtk::HBox* hb4 = Gtk::manage ( new Gtk::HBox () ); - Gtk::Label* celab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CACHEMAXENTRIES") + ":") ); - maxCacheEntries = Gtk::manage ( new Gtk::SpinButton () ); - hb4->pack_start (*celab, Gtk::PACK_SHRINK, 4); - hb4->pack_start (*maxCacheEntries, Gtk::PACK_SHRINK, 4); + Gtk::Label* maxCacheEntriesLbl = Gtk::manage (new Gtk::Label(M("PREFERENCES_CACHEMAXENTRIES") + ":")); + setExpandAlignProperties(maxCacheEntriesLbl, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + maxCacheEntriesSB = Gtk::manage (new Gtk::SpinButton()); + maxCacheEntriesSB->set_digits (0); + maxCacheEntriesSB->set_increments (1, 10); + maxCacheEntriesSB->set_range (10, 100000); - maxCacheEntries->set_digits (0); - maxCacheEntries->set_increments (1, 10); - maxCacheEntries->set_range (10, 100000); - vbc->pack_start (*hb4, Gtk::PACK_SHRINK, 4); + // Separation is needed so that a button is not accidentally clicked when one wanted + // to click a spinbox. Ideally, the separation wouldn't require attaching a widget, but how? + Gtk::Label *separator = Gtk::manage (new Gtk::Label()); - Gtk::HBox* hb5 = Gtk::manage ( new Gtk::HBox () ); - clearThumbnails = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARTHUMBS")) ); - clearProfiles = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARPROFILES")) ); - clearAll = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARALL")) ); - hb5->pack_start (*clearThumbnails, Gtk::PACK_SHRINK, 4); - hb5->pack_start (*clearProfiles, Gtk::PACK_SHRINK, 4); - hb5->pack_start (*clearAll, Gtk::PACK_SHRINK, 4); - vbc->pack_start (*hb5, Gtk::PACK_SHRINK, 4); + Gtk::Label* clearThumbsLbl = Gtk::manage (new Gtk::Label(M("PREFERENCES_CACHECLEAR_ALLBUTPROFILES"))); + setExpandAlignProperties(clearThumbsLbl, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + Gtk::Button* clearThumbsBtn = Gtk::manage (new Gtk::Button(M("PREFERENCES_CACHECLEAR"))); + + Gtk::Label* clearProfilesLbl = Gtk::manage (new Gtk::Label(M("PREFERENCES_CACHECLEAR_ONLYPROFILES"))); + setExpandAlignProperties(clearProfilesLbl, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + Gtk::Button* clearProfilesBtn = Gtk::manage (new Gtk::Button(M("PREFERENCES_CACHECLEAR"))); + + Gtk::Label* clearAllLbl = Gtk::manage (new Gtk::Label(M("PREFERENCES_CACHECLEAR_ALL"))); + setExpandAlignProperties(clearAllLbl, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + Gtk::Button* clearAllBtn = Gtk::manage (new Gtk::Button(M("PREFERENCES_CACHECLEAR"))); + + cacheGrid->attach (*maxThumbHeightLbl, 0, 0, 1, 1); + cacheGrid->attach (*maxThumbHeightSB, 1, 0, 1, 1); + cacheGrid->attach (*maxCacheEntriesLbl, 0, 1, 1, 1); + cacheGrid->attach (*maxCacheEntriesSB, 1, 1, 1, 1); + cacheGrid->attach (*separator, 0, 2, 2, 1); + cacheGrid->attach (*clearThumbsLbl, 0, 3, 1, 1); + cacheGrid->attach (*clearThumbsBtn, 1, 3, 1, 1); + if (moptions.saveParamsCache) { + cacheGrid->attach (*clearProfilesLbl, 0, 4, 1, 1); + cacheGrid->attach (*clearProfilesBtn, 1, 4, 1, 1); + cacheGrid->attach (*clearAllLbl, 0, 5, 1, 1); + cacheGrid->attach (*clearAllBtn, 1, 5, 1, 1); + } + + vbc->pack_start (*cacheGrid, Gtk::PACK_SHRINK, 4); + + Gtk::Label* clearSafetyLbl = Gtk::manage (new Gtk::Label(M("PREFERENCES_CACHECLEAR_SAFETY"))); + setExpandAlignProperties(clearSafetyLbl, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + clearSafetyLbl->set_line_wrap(true); + vbc->pack_start(*clearSafetyLbl, Gtk::PACK_SHRINK, 4); Gtk::HBox* hb6 = Gtk::manage ( new Gtk::HBox () ); Gtk::VBox* vb6 = Gtk::manage ( new Gtk::VBox () ); @@ -1386,9 +1412,11 @@ Gtk::Widget* Preferences::getFileBrowserPanel () moveExtUp->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::moveExtUpPressed) ); moveExtDown->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::moveExtDownPressed) ); extension->signal_activate().connect ( sigc::mem_fun (*this, &Preferences::addExtPressed) ); - clearThumbnails->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearThumbImagesPressed) ); - clearProfiles->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearProfilesPressed) ); - clearAll->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearAllPressed) ); + clearThumbsBtn->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearThumbImagesPressed) ); + if (moptions.saveParamsCache) { + clearProfilesBtn->signal_clicked().connect(sigc::mem_fun(*this, &Preferences::clearProfilesPressed)); + clearAllBtn->signal_clicked().connect(sigc::mem_fun(*this, &Preferences::clearAllPressed)); + } swFileBrowser->add(*vbFileBrowser); return swFileBrowser; @@ -1701,8 +1729,8 @@ void Preferences::storePreferences () } moptions.maxRecentFolders = (int)maxRecentFolders->get_value(); - moptions.maxThumbnailHeight = (int)maxThumbSize->get_value (); - moptions.maxCacheEntries = (int)maxCacheEntries->get_value (); + moptions.maxThumbnailHeight = (int)maxThumbHeightSB->get_value (); + moptions.maxCacheEntries = (int)maxCacheEntriesSB->get_value (); moptions.overlayedFileNames = overlayedFileNames->get_active (); moptions.filmStripOverlayedFileNames = filmStripOverlayedFileNames->get_active(); moptions.sameThumbSize = sameThumbSize->get_active(); @@ -1917,9 +1945,9 @@ void Preferences::fillPreferences () row[extensionColumns.ext] = moptions.parseExtensions[i]; } - maxThumbSize->set_value (moptions.maxThumbnailHeight); maxRecentFolders->set_value (moptions.maxRecentFolders); - maxCacheEntries->set_value (moptions.maxCacheEntries); + maxThumbHeightSB->set_value (moptions.maxThumbnailHeight); + maxCacheEntriesSB->set_value (moptions.maxCacheEntries); overlayedFileNames->set_active (moptions.overlayedFileNames); filmStripOverlayedFileNames->set_active (moptions.filmStripOverlayedFileNames); sameThumbSize->set_active (moptions.sameThumbSize); diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 949f50376..6019604e5 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -146,12 +146,9 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Gtk::ColorButton* butCropCol; Gtk::ColorButton* butNavGuideCol; - Gtk::SpinButton* maxThumbSize; - Gtk::SpinButton* maxCacheEntries; Gtk::SpinButton* maxRecentFolders; - Gtk::Button* clearThumbnails; - Gtk::Button* clearProfiles; - Gtk::Button* clearAll; + Gtk::SpinButton* maxThumbHeightSB; + Gtk::SpinButton* maxCacheEntriesSB; Gtk::Entry* extension; Gtk::TreeView* extensions; Gtk::Button* addExt; From 41b802bdd34c7d12137fce5c54ab43997b71531e Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 1 Nov 2018 18:51:17 +0100 Subject: [PATCH 04/20] Colortoning Lab regions: use xlogf and xexpf from sleef.c, #4914 --- rtengine/iplabregions.cc | 13 ++++++++----- rtengine/sleef.c | 11 +++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/rtengine/iplabregions.cc b/rtengine/iplabregions.cc index 2a4d431e6..49a426afa 100644 --- a/rtengine/iplabregions.cc +++ b/rtengine/iplabregions.cc @@ -24,6 +24,9 @@ #include "improcfun.h" #include "guidedfilter.h" +#define BENCHMARK +#include "StopWatch.h" +#include "sleef.c" namespace rtengine { @@ -32,7 +35,7 @@ void ImProcFunctions::labColorCorrectionRegions(LabImage *lab) if (!params->colorToning.enabled || params->colorToning.method != "LabRegions") { return; } - +BENCHFUN int n = params->colorToning.labregions.size(); int show_mask_idx = params->colorToning.labregionsShowMask; if (show_mask_idx >= n) { @@ -64,7 +67,7 @@ void ImProcFunctions::labColorCorrectionRegions(LabImage *lab) abmask[i](lab->W, lab->H); Lmask[i](lab->W, lab->H); } - + #ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif @@ -77,13 +80,13 @@ void ImProcFunctions::labColorCorrectionRegions(LabImage *lab) Color::Lab2Lch(a, b, c, h); // magic constant c_factor: normally chromaticity is in [0; 42000] (see color.h), but here we use the constant to match how the chromaticity pipette works (see improcfun.cc lines 4705-4706 and color.cc line 1930 constexpr float c_factor = 327.68f / 48000.f; - float c1 = lin2log(c * c_factor, 10.f); + float c1 = xlin2log(c * c_factor, 10.f); float h1 = Color::huelab_to_huehsv2(h); h1 = h1 + 1.f/6.f; // offset the hue because we start from purple instead of red if (h1 > 1.f) { h1 -= 1.f; } - h1 = lin2log(h1, 3.f); + h1 = xlin2log(h1, 3.f); float l1 = l / 32768.f; for (int i = begin_idx; i < end_idx; ++i) { @@ -132,7 +135,7 @@ void ImProcFunctions::labColorCorrectionRegions(LabImage *lab) const auto abcoord = [](float x) -> float { - return 12000.f * SGN(x) * log2lin(std::abs(x), 4.f); + return 12000.f * SGN(x) * xlog2lin(std::abs(x), 4.f); }; #ifdef _OPENMP diff --git a/rtengine/sleef.c b/rtengine/sleef.c index 901d04f7d..cc92be108 100644 --- a/rtengine/sleef.c +++ b/rtengine/sleef.c @@ -23,6 +23,7 @@ #define L2U .69314718055966295651160180568695068359375 #define L2L .28235290563031577122588448175013436025525412068e-12 #define R_LN2 1.442695040888963407359924681001892137426645954152985934135449406931 +#define pow_F(a,b) (xexpf(b*xlogf(a))) __inline int64_t doubleToRawLongBits(double d) { union { @@ -1263,6 +1264,16 @@ __inline float xdivf( float d, int n){ return uflint.floatval; } +__inline float xlin2log(float x, float base) +{ + constexpr float one(1); + return xlogf(x * (base - one) + one) / xlogf(base); +} +__inline float xlog2lin(float x, float base) +{ + constexpr float one(1); + return (pow_F(base, x) - one) / (base - one); +} #endif From dd635de72cced54dfebc8612e5beadc193413cb0 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 1 Nov 2018 20:09:30 +0100 Subject: [PATCH 05/20] Colortoning Lab regions: move some calculations outside last loop, #4914 --- rtengine/iplabregions.cc | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/rtengine/iplabregions.cc b/rtengine/iplabregions.cc index 49a426afa..dfa0872b2 100644 --- a/rtengine/iplabregions.cc +++ b/rtengine/iplabregions.cc @@ -138,6 +138,18 @@ BENCHFUN return 12000.f * SGN(x) * xlog2lin(std::abs(x), 4.f); }; + float abca[n]; + float abcb[n]; + float rs[n]; + float rl[n]; + for (int i = 0; i < n; ++i) { + auto &r = params->colorToning.labregions[i]; + abca[i] = abcoord(r.a); + abcb[i] = abcoord(r.b); + rs[i] = 1.f + r.saturation / 100.f; + rl[i] = 1.f + float(r.lightness) / 500.f; + } + #ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif @@ -148,12 +160,11 @@ BENCHFUN float b = lab->b[y][x]; for (int i = 0; i < n; ++i) { - auto &r = params->colorToning.labregions[i]; float blend = abmask[i][y][x]; - float s = 1.f + r.saturation / 100.f; - float a_new = LIM(s * (a + abcoord(r.a)), -42000.f, 42000.f); - float b_new = LIM(s * (b + abcoord(r.b)), -42000.f, 42000.f); - float l_new = LIM(l * (1.f + float(r.lightness) / 500.f), 0.f, 32768.f); + float s = rs[i]; + float a_new = LIM(s * (a + abca[i]), -42000.f, 42000.f); + float b_new = LIM(s * (b + abcb[i]), -42000.f, 42000.f); + float l_new = LIM(l * rl[i], 0.f, 32768.f); l = intp(Lmask[i][y][x], l_new, l); a = intp(blend, a_new, a); b = intp(blend, b_new, b); From 906cf63ecd33569813bcc4c594b096499b76e7e5 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 1 Nov 2018 22:30:26 +0100 Subject: [PATCH 06/20] Colortoning Lab regions: some vectorized precalculations in first loop, #4914 --- rtengine/color.cc | 18 + rtengine/color.h | 4 +- rtengine/iplabregions.cc | 49 +- rtengine/sleef.c.save-failed | 1288 ++++++++++++++++++++++++++++++++++ 4 files changed, 1354 insertions(+), 5 deletions(-) create mode 100644 rtengine/sleef.c.save-failed diff --git a/rtengine/color.cc b/rtengine/color.cc index 599aceaa1..29844f64d 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -1931,6 +1931,24 @@ void Color::Lab2Lch(float a, float b, float &c, float &h) h = xatan2f(b, a); } +#ifdef __SSE2__ +void Color::Lab2Lch(float *a, float *b, float *c, float *h, int w) +{ + int i = 0; + vfloat c327d68v = F2V(327.68f); + for (; i < w - 3; i += 4) { + vfloat av = LVFU(a[i]); + vfloat bv = LVFU(b[i]); + STVFU(c[i], vsqrtf(SQRV(av) + SQRV(bv)) / c327d68v); + STVFU(h[i], xatan2f(bv, av)); + } + for (; i < w; ++i) { + c[i] = sqrtf(SQR(a[i]) + SQR(b[i])) / 327.68f; + h[i] = xatan2f(b[i], a[i]); + } +} +#endif + void Color::Lch2Lab(float c, float h, float &a, float &b) { float2 sincosval = xsincosf(h); diff --git a/rtengine/color.h b/rtengine/color.h index b6459adc4..9f8863343 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -651,7 +651,9 @@ public: * @param h 'h' channel return value, in [-PI ; +PI] (return value) */ static void Lab2Lch(float a, float b, float &c, float &h); - +#ifdef __SSE2__ + static void Lab2Lch(float *a, float *b, float *c, float *h, int w); +#endif /** * @brief Convert 'c' and 'h' channels of the Lch color space to the 'a' and 'b' channels of the L*a*b color space (channel 'L' is identical [0 ; 32768]) diff --git a/rtengine/iplabregions.cc b/rtengine/iplabregions.cc index dfa0872b2..aec6efa6f 100644 --- a/rtengine/iplabregions.cc +++ b/rtengine/iplabregions.cc @@ -28,6 +28,26 @@ #include "StopWatch.h" #include "sleef.c" +namespace { +#ifdef __SSE2__ +void fastlin2log(float *x, float factor, float base, int w) +{ + float baseLog = 1.f / xlogf(base); + vfloat baseLogv = F2V(baseLog); + factor = factor * (base - 1.f); + vfloat factorv = F2V(factor); + vfloat onev = F2V(1.f); + int i = 0; + for (; i < w - 3; i += 4) { + STVFU(x[i], xlogf(LVFU(x[i]) * factorv + onev) * baseLogv); + } + for (; i < w; ++i) { + x[i] = xlogf(x[i] * factor + 1.f) * baseLog; + } +} +#endif +} + namespace rtengine { void ImProcFunctions::labColorCorrectionRegions(LabImage *lab) @@ -69,18 +89,39 @@ BENCHFUN } #ifdef _OPENMP - #pragma omp parallel for if (multiThread) + #pragma omp parallel if (multiThread) +#endif + { +#ifdef __SSE2__ + float cBuffer[lab->W]; + float hBuffer[lab->W]; + // magic constant c_factor: normally chromaticity is in [0; 42000] (see color.h), but here we use the constant to match how the chromaticity pipette works (see improcfun.cc lines 4705-4706 and color.cc line 1930 + constexpr float c_factor = 327.68f / 48000.f; +#endif +#ifdef _OPENMP + #pragma omp for #endif for (int y = 0; y < lab->H; ++y) { +#ifdef __SSE2__ + // vectorized precalculation + Color::Lab2Lch(lab->a[y], lab->b[y], cBuffer, hBuffer, lab->W); + fastlin2log(cBuffer, c_factor, 10.f, lab->W); +#endif for (int x = 0; x < lab->W; ++x) { float l = lab->L[y][x]; +#ifdef __SSE2__ + // use precalculated values + float c1 = cBuffer[x]; + float h = hBuffer[x]; +#else + // magic constant c_factor: normally chromaticity is in [0; 42000] (see color.h), but here we use the constant to match how the chromaticity pipette works (see improcfun.cc lines 4705-4706 and color.cc line 1930 + constexpr float c_factor = 327.68f / 48000.f; float a = lab->a[y][x]; float b = lab->b[y][x]; float c, h; Color::Lab2Lch(a, b, c, h); - // magic constant c_factor: normally chromaticity is in [0; 42000] (see color.h), but here we use the constant to match how the chromaticity pipette works (see improcfun.cc lines 4705-4706 and color.cc line 1930 - constexpr float c_factor = 327.68f / 48000.f; float c1 = xlin2log(c * c_factor, 10.f); +#endif float h1 = Color::huelab_to_huehsv2(h); h1 = h1 + 1.f/6.f; // offset the hue because we start from purple instead of red if (h1 > 1.f) { @@ -98,7 +139,7 @@ BENCHFUN } } } - + } { array2D guide(lab->W, lab->H, lab->L); #ifdef _OPENMP diff --git a/rtengine/sleef.c.save-failed b/rtengine/sleef.c.save-failed new file mode 100644 index 000000000..0cde64be6 --- /dev/null +++ b/rtengine/sleef.c.save-failed @@ -0,0 +1,1288 @@ +//////////////////////////////////////////////////////////////// +// +// this code was taken from http://shibatch.sourceforge.net/ +// Many thanks to the author of original version: Naoki Shibata +// +// This version contains modifications made by Ingo Weyrich +// +//////////////////////////////////////////////////////////////// + +#ifndef _SLEEFC_ +#define _SLEEFC_ + +#include +#include +#include "rt_math.h" +#include "opthelper.h" + +#define PI4_A .7853981554508209228515625 +#define PI4_B .794662735614792836713604629039764404296875e-8 +#define PI4_C .306161699786838294306516483068750264552437361480769e-16 +#define M_4_PI 1.273239544735162542821171882678754627704620361328125 + +#define L2U .69314718055966295651160180568695068359375 +#define L2L .28235290563031577122588448175013436025525412068e-12 +#define R_LN2 1.442695040888963407359924681001892137426645954152985934135449406931 +#define pow_F(a,b) (xexpf(b*xlogf(a))) + +__inline int64_t doubleToRawLongBits(double d) { + union { + double f; + int64_t i; + } tmp; + tmp.f = d; + return tmp.i; +} + +__inline double longBitsToDouble(int64_t i) { + union { + double f; + int64_t i; + } tmp; + tmp.i = i; + return tmp.f; +} + +__inline double xfabs(double x) { + return longBitsToDouble(0x7fffffffffffffffLL & doubleToRawLongBits(x)); +} + +__inline double mulsign(double x, double y) { + return longBitsToDouble(doubleToRawLongBits(x) ^ (doubleToRawLongBits(y) & (1LL << 63))); +} + +__inline double sign(double d) { return mulsign(1, d); } +__inline double mla(double x, double y, double z) { return x * y + z; } +__inline double xrint(double x) { return x < 0 ? (int)(x - 0.5) : (int)(x + 0.5); } + +__inline int xisnan(double x) { return x != x; } +__inline int xisinf(double x) { return x == rtengine::RT_INFINITY || x == -rtengine::RT_INFINITY; } +__inline int xisminf(double x) { return x == -rtengine::RT_INFINITY; } +__inline int xispinf(double x) { return x == rtengine::RT_INFINITY; } + +__inline double ldexpk(double x, int q) { + double u; + int m; + m = q >> 31; + m = (((m + q) >> 9) - m) << 7; + q = q - (m << 2); + u = longBitsToDouble(((int64_t)(m + 0x3ff)) << 52); + double u2 = u*u; + u2 = u2 * u2; + x = x * u2; + u = longBitsToDouble(((int64_t)(q + 0x3ff)) << 52); + return x * u; +} + +__inline double xldexp(double x, int q) { return ldexpk(x, q); } + +__inline int ilogbp1(double d) { + int m = d < 4.9090934652977266E-91; + d = m ? 2.037035976334486E90 * d : d; + int q = (doubleToRawLongBits(d) >> 52) & 0x7ff; + q = m ? q - (300 + 0x03fe) : q - 0x03fe; + return q; +} + +__inline int xilogb(double d) { + int e = ilogbp1(xfabs(d)) - 1; + e = d == 0 ? (-2147483647 - 1) : e; + e = d == rtengine::RT_INFINITY || d == -rtengine::RT_INFINITY ? 2147483647 : e; + return e; +} + +__inline double upper(double d) { + return longBitsToDouble(doubleToRawLongBits(d) & 0xfffffffff8000000LL); +} + +typedef struct { + double x, y; +} double2; + +typedef struct { + float x, y; +} float2; + +__inline double2 dd(double h, double l) { + double2 ret; + ret.x = h; ret.y = l; + return ret; +} + +__inline double2 normalize_d(double2 t) { + double2 s; + + s.x = t.x + t.y; + s.y = t.x - s.x + t.y; + + return s; +} + +__inline double2 scale_d(double2 d, double s) { + double2 r; + + r.x = d.x * s; + r.y = d.y * s; + + return r; +} + +__inline double2 add2_ss(double x, double y) { + double2 r; + + r.x = x + y; + double v = r.x - x; + r.y = (x - (r.x - v)) + (y - v); + + return r; +} + +__inline double2 add_ds(double2 x, double y) { + // |x| >= |y| + + double2 r; + + assert(xisnan(x.x) || xisnan(y) || xfabs(x.x) >= xfabs(y)); + + r.x = x.x + y; + r.y = x.x - r.x + y + x.y; + + return r; +} + +__inline double2 add2_ds(double2 x, double y) { + // |x| >= |y| + + double2 r; + + r.x = x.x + y; + double v = r.x - x.x; + r.y = (x.x - (r.x - v)) + (y - v); + r.y += x.y; + + return r; +} + +__inline double2 add_sd(double x, double2 y) { + // |x| >= |y| + + double2 r; + + assert(xisnan(x) || xisnan(y.x) || xfabs(x) >= xfabs(y.x)); + + r.x = x + y.x; + r.y = x - r.x + y.x + y.y; + + return r; +} + +__inline double2 add_dd(double2 x, double2 y) { + // |x| >= |y| + + double2 r; + + assert(xisnan(x.x) || xisnan(y.x) || xfabs(x.x) >= xfabs(y.x)); + + r.x = x.x + y.x; + r.y = x.x - r.x + y.x + x.y + y.y; + + return r; +} + +__inline double2 add2_dd(double2 x, double2 y) { + double2 r; + + r.x = x.x + y.x; + double v = r.x - x.x; + r.y = (x.x - (r.x - v)) + (y.x - v); + r.y += x.y + y.y; + + return r; +} + +__inline double2 div_dd(double2 n, double2 d) { + double t = 1.0 / d.x; + double dh = upper(d.x), dl = d.x - dh; + double th = upper(t ), tl = t - th; + double nhh = upper(n.x), nhl = n.x - nhh; + + double2 q; + + q.x = n.x * t; + + double u = -q.x + nhh * th + nhh * tl + nhl * th + nhl * tl + + q.x * (1 - dh * th - dh * tl - dl * th - dl * tl); + + q.y = t * (n.y - q.x * d.y) + u; + + return q; +} + +__inline double2 mul_ss(double x, double y) { + double xh = upper(x), xl = x - xh; + double yh = upper(y), yl = y - yh; + double2 r; + + r.x = x * y; + r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl; + + return r; +} + +__inline double2 mul_ds(double2 x, double y) { + double xh = upper(x.x), xl = x.x - xh; + double yh = upper(y ), yl = y - yh; + double2 r; + + r.x = x.x * y; + r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl + x.y * y; + + return r; +} + +__inline double2 mul_dd(double2 x, double2 y) { + double xh = upper(x.x), xl = x.x - xh; + double yh = upper(y.x), yl = y.x - yh; + double2 r; + + r.x = x.x * y.x; + r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl + x.x * y.y + x.y * y.x; + + return r; +} + +__inline double2 squ_d(double2 x) { + double xh = upper(x.x), xl = x.x - xh; + double2 r; + + r.x = x.x * x.x; + r.y = xh * xh - r.x + (xh + xh) * xl + xl * xl + x.x * (x.y + x.y); + + return r; +} + +__inline double2 rec_s(double d) { + double t = 1.0 / d; + double dh = upper(d), dl = d - dh; + double th = upper(t), tl = t - th; + double2 q; + + q.x = t; + q.y = t * (1 - dh * th - dh * tl - dl * th - dl * tl); + + return q; +} + +__inline double2 sqrt_d(double2 d) { + double t = sqrt(d.x + d.y); + return scale_d(mul_dd(add2_dd(d, mul_ss(t, t)), rec_s(t)), 0.5); +} + +__inline double atan2k(double y, double x) { + double s, t, u; + int q = 0; + + if (x < 0) { x = -x; q = -2; } + if (y > x) { t = x; x = y; y = -t; q += 1; } + + s = y / x; + t = s * s; + + u = -1.88796008463073496563746e-05; + u = u * t + (0.000209850076645816976906797); + u = u * t + (-0.00110611831486672482563471); + u = u * t + (0.00370026744188713119232403); + u = u * t + (-0.00889896195887655491740809); + u = u * t + (0.016599329773529201970117); + u = u * t + (-0.0254517624932312641616861); + u = u * t + (0.0337852580001353069993897); + u = u * t + (-0.0407629191276836500001934); + u = u * t + (0.0466667150077840625632675); + u = u * t + (-0.0523674852303482457616113); + u = u * t + (0.0587666392926673580854313); + u = u * t + (-0.0666573579361080525984562); + u = u * t + (0.0769219538311769618355029); + u = u * t + (-0.090908995008245008229153); + u = u * t + (0.111111105648261418443745); + u = u * t + (-0.14285714266771329383765); + u = u * t + (0.199999999996591265594148); + u = u * t + (-0.333333333333311110369124); + + t = u * t * s + s; + t = q * (rtengine::RT_PI_2) + t; + + return t; +} + +__inline double xatan2(double y, double x) { + double r = atan2k(xfabs(y), x); + + r = mulsign(r, x); + if (xisinf(x) || x == 0) r = rtengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (rtengine::RT_PI_2)) : 0); + if (xisinf(y) ) r = rtengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (rtengine::RT_PI*1/4)) : 0); + if ( y == 0) r = (sign(x) == -1 ? rtengine::RT_PI : 0); + + return xisnan(x) || xisnan(y) ? rtengine::RT_NAN : mulsign(r, y); +} + +__inline double xasin(double d) { + return mulsign(atan2k(xfabs(d), sqrt((1+d)*(1-d))), d); +} + +__inline double xacos(double d) { + return mulsign(atan2k(sqrt((1+d)*(1-d)), xfabs(d)), d) + (d < 0 ? rtengine::RT_PI : 0); +} + +__inline double xatan(double s) { + double t, u; + int q = 0; + + if (s < 0) { s = -s; q = 2; } + if (s > 1) { s = 1.0 / s; q |= 1; } + + t = s * s; + + u = -1.88796008463073496563746e-05; + u = u * t + (0.000209850076645816976906797); + u = u * t + (-0.00110611831486672482563471); + u = u * t + (0.00370026744188713119232403); + u = u * t + (-0.00889896195887655491740809); + u = u * t + (0.016599329773529201970117); + u = u * t + (-0.0254517624932312641616861); + u = u * t + (0.0337852580001353069993897); + u = u * t + (-0.0407629191276836500001934); + u = u * t + (0.0466667150077840625632675); + u = u * t + (-0.0523674852303482457616113); + u = u * t + (0.0587666392926673580854313); + u = u * t + (-0.0666573579361080525984562); + u = u * t + (0.0769219538311769618355029); + u = u * t + (-0.090908995008245008229153); + u = u * t + (0.111111105648261418443745); + u = u * t + (-0.14285714266771329383765); + u = u * t + (0.199999999996591265594148); + u = u * t + (-0.333333333333311110369124); + + t = s + s * (t * u); + + if ((q & 1) != 0) t = 1.570796326794896557998982 - t; + if ((q & 2) != 0) t = -t; + + return t; +} + +__inline double xsin(double d) { + int q; + double u, s; + + q = (int)xrint(d * rtengine::RT_1_PI); + + d = mla(q, -PI4_A*4, d); + d = mla(q, -PI4_B*4, d); + d = mla(q, -PI4_C*4, d); + + s = d * d; + + if ((q & 1) != 0) d = -d; + + u = -7.97255955009037868891952e-18; + u = mla(u, s, 2.81009972710863200091251e-15); + u = mla(u, s, -7.64712219118158833288484e-13); + u = mla(u, s, 1.60590430605664501629054e-10); + u = mla(u, s, -2.50521083763502045810755e-08); + u = mla(u, s, 2.75573192239198747630416e-06); + u = mla(u, s, -0.000198412698412696162806809); + u = mla(u, s, 0.00833333333333332974823815); + u = mla(u, s, -0.166666666666666657414808); + + u = mla(s, u * d, d); + + return u; +} + +__inline double xcos(double d) { + int q; + double u, s; + + q = 1 + 2*(int)xrint(d * rtengine::RT_1_PI - 0.5); + + d = mla(q, -PI4_A*2, d); + d = mla(q, -PI4_B*2, d); + d = mla(q, -PI4_C*2, d); + + s = d * d; + + if ((q & 2) == 0) d = -d; + + u = -7.97255955009037868891952e-18; + u = mla(u, s, 2.81009972710863200091251e-15); + u = mla(u, s, -7.64712219118158833288484e-13); + u = mla(u, s, 1.60590430605664501629054e-10); + u = mla(u, s, -2.50521083763502045810755e-08); + u = mla(u, s, 2.75573192239198747630416e-06); + u = mla(u, s, -0.000198412698412696162806809); + u = mla(u, s, 0.00833333333333332974823815); + u = mla(u, s, -0.166666666666666657414808); + + u = mla(s, u * d, d); + + return u; +} + +__inline double2 xsincos(double d) { + int q; + double u, s, t; + double2 r; + + q = (int)xrint(d * (2 * rtengine::RT_1_PI)); + + s = d; + + s = mla(-q, PI4_A*2, s); + s = mla(-q, PI4_B*2, s); + s = mla(-q, PI4_C*2, s); + + t = s; + + s = s * s; + + u = 1.58938307283228937328511e-10; + u = mla(u, s, -2.50506943502539773349318e-08); + u = mla(u, s, 2.75573131776846360512547e-06); + u = mla(u, s, -0.000198412698278911770864914); + u = mla(u, s, 0.0083333333333191845961746); + u = mla(u, s, -0.166666666666666130709393); + u = u * s * t; + + r.x = t + u; + + u = -1.13615350239097429531523e-11; + u = mla(u, s, 2.08757471207040055479366e-09); + u = mla(u, s, -2.75573144028847567498567e-07); + u = mla(u, s, 2.48015872890001867311915e-05); + u = mla(u, s, -0.00138888888888714019282329); + u = mla(u, s, 0.0416666666666665519592062); + u = mla(u, s, -0.5); + + r.y = u * s + 1; + + if ((q & 1) != 0) { s = r.y; r.y = r.x; r.x = s; } + if ((q & 2) != 0) { r.x = -r.x; } + if (((q+1) & 2) != 0) { r.y = -r.y; } + + if (xisinf(d)) { r.x = r.y = rtengine::RT_NAN; } + + return r; +} + +__inline double xtan(double d) { + int q; + double u, s, x; + + q = (int)xrint(d * (2 * rtengine::RT_1_PI)); + + x = mla(q, -PI4_A*2, d); + x = mla(q, -PI4_B*2, x); + x = mla(q, -PI4_C*2, x); + + s = x * x; + + if ((q & 1) != 0) x = -x; + + u = 1.01419718511083373224408e-05; + u = mla(u, s, -2.59519791585924697698614e-05); + u = mla(u, s, 5.23388081915899855325186e-05); + u = mla(u, s, -3.05033014433946488225616e-05); + u = mla(u, s, 7.14707504084242744267497e-05); + u = mla(u, s, 8.09674518280159187045078e-05); + u = mla(u, s, 0.000244884931879331847054404); + u = mla(u, s, 0.000588505168743587154904506); + u = mla(u, s, 0.00145612788922812427978848); + u = mla(u, s, 0.00359208743836906619142924); + u = mla(u, s, 0.00886323944362401618113356); + u = mla(u, s, 0.0218694882853846389592078); + u = mla(u, s, 0.0539682539781298417636002); + u = mla(u, s, 0.133333333333125941821962); + u = mla(u, s, 0.333333333333334980164153); + + u = mla(s, u * x, x); + + if ((q & 1) != 0) u = 1.0 / u; + + if (xisinf(d)) u = rtengine::RT_NAN; + + return u; +} + +__inline double xlog(double d) { + double x, x2, t, m; + int e; + + e = ilogbp1(d * 0.7071); + m = ldexpk(d, -e); + + x = (m-1) / (m+1); + x2 = x * x; + + t = 0.148197055177935105296783; + t = mla(t, x2, 0.153108178020442575739679); + t = mla(t, x2, 0.181837339521549679055568); + t = mla(t, x2, 0.22222194152736701733275); + t = mla(t, x2, 0.285714288030134544449368); + t = mla(t, x2, 0.399999999989941956712869); + t = mla(t, x2, 0.666666666666685503450651); + t = mla(t, x2, 2); + + x = x * t + 0.693147180559945286226764 * e; + + if (xisinf(d)) x = rtengine::RT_INFINITY; + if (d < 0) x = rtengine::RT_NAN; + if (d == 0) x = -rtengine::RT_INFINITY; + + return x; +} + +__inline double xexp(double d) { + int q = (int)xrint(d * R_LN2); + double s, u; + + s = mla(q, -L2U, d); + s = mla(q, -L2L, s); + + u = 2.08860621107283687536341e-09; + u = mla(u, s, 2.51112930892876518610661e-08); + u = mla(u, s, 2.75573911234900471893338e-07); + u = mla(u, s, 2.75572362911928827629423e-06); + u = mla(u, s, 2.4801587159235472998791e-05); + u = mla(u, s, 0.000198412698960509205564975); + u = mla(u, s, 0.00138888888889774492207962); + u = mla(u, s, 0.00833333333331652721664984); + u = mla(u, s, 0.0416666666666665047591422); + u = mla(u, s, 0.166666666666666851703837); + u = mla(u, s, 0.5); + + u = s * s * u + s + 1; + u = ldexpk(u, q); + + if (xisminf(d)) u = 0; + + return u; +} + +__inline double2 logk(double d) { + double2 x, x2; + double m, t; + int e; + + e = ilogbp1(d * 0.7071); + m = ldexpk(d, -e); + + x = div_dd(add2_ss(-1, m), add2_ss(1, m)); + x2 = squ_d(x); + + t = 0.134601987501262130076155; + t = mla(t, x2.x, 0.132248509032032670243288); + t = mla(t, x2.x, 0.153883458318096079652524); + t = mla(t, x2.x, 0.181817427573705403298686); + t = mla(t, x2.x, 0.222222231326187414840781); + t = mla(t, x2.x, 0.285714285651261412873718); + t = mla(t, x2.x, 0.400000000000222439910458); + t = mla(t, x2.x, 0.666666666666666371239645); + + return add2_dd(mul_ds(dd(0.693147180559945286226764, 2.319046813846299558417771e-17), e), + add2_dd(scale_d(x, 2), mul_ds(mul_dd(x2, x), t))); +} + +__inline double expk(double2 d) { + int q = (int)rint((d.x + d.y) * R_LN2); + double2 s, t; + double u; + + s = add2_ds(d, q * -L2U); + s = add2_ds(s, q * -L2L); + + s = normalize_d(s); + + u = 2.51069683420950419527139e-08; + u = mla(u, s.x, 2.76286166770270649116855e-07); + u = mla(u, s.x, 2.75572496725023574143864e-06); + u = mla(u, s.x, 2.48014973989819794114153e-05); + u = mla(u, s.x, 0.000198412698809069797676111); + u = mla(u, s.x, 0.0013888888939977128960529); + u = mla(u, s.x, 0.00833333333332371417601081); + u = mla(u, s.x, 0.0416666666665409524128449); + u = mla(u, s.x, 0.166666666666666740681535); + u = mla(u, s.x, 0.500000000000000999200722); + + t = add_dd(s, mul_ds(squ_d(s), u)); + + t = add_sd(1, t); + return ldexpk(t.x + t.y, q); +} + +__inline double xpow(double x, double y) { + int yisint = (int)y == y; + int yisodd = (1 & (int)y) != 0 && yisint; + + double result = expk(mul_ds(logk(xfabs(x)), y)); + + result = xisnan(result) ? rtengine::RT_INFINITY : result; + result *= (x >= 0 ? 1 : (!yisint ? rtengine::RT_NAN : (yisodd ? -1 : 1))); + + double efx = mulsign(xfabs(x) - 1, y); + if (xisinf(y)) result = efx < 0 ? 0.0 : (efx == 0 ? 1.0 : rtengine::RT_INFINITY); + if (xisinf(x) || x == 0) result = (yisodd ? sign(x) : 1) * ((x == 0 ? -y : y) < 0 ? 0 : rtengine::RT_INFINITY); + if (xisnan(x) || xisnan(y)) result = rtengine::RT_NAN; + if (y == 0 || x == 1) result = 1; + + return result; +} + +__inline double2 expk2(double2 d) { + int q = (int)rint((d.x + d.y) * R_LN2); + double2 s, t; + double u; + + s = add2_ds(d, q * -L2U); + s = add2_ds(s, q * -L2L); + + s = normalize_d(s); + + u = 2.51069683420950419527139e-08; + u = mla(u, s.x, 2.76286166770270649116855e-07); + u = mla(u, s.x, 2.75572496725023574143864e-06); + u = mla(u, s.x, 2.48014973989819794114153e-05); + u = mla(u, s.x, 0.000198412698809069797676111); + u = mla(u, s.x, 0.0013888888939977128960529); + u = mla(u, s.x, 0.00833333333332371417601081); + u = mla(u, s.x, 0.0416666666665409524128449); + u = mla(u, s.x, 0.166666666666666740681535); + u = mla(u, s.x, 0.500000000000000999200722); + + t = add_dd(s, mul_ds(squ_d(s), u)); + + t = add_sd(1, t); + return dd(ldexpk(t.x, q), ldexpk(t.y, q)); +} + +__inline double xsinh(double x) { + double y = xfabs(x); + double2 d = expk2(dd(y, 0)); + d = add2_dd(d, div_dd(dd(-1, 0), d)); + y = (d.x + d.y) * 0.5; + + y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; + y = mulsign(y, x); + y = xisnan(x) ? rtengine::RT_NAN : y; + + return y; +} + +__inline double xcosh(double x) { + double2 d = expk2(dd(x, 0)); + d = add2_dd(d, div_dd(dd(1, 0), d)); + double y = (d.x + d.y) * 0.5; + + y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; + y = xisnan(x) ? rtengine::RT_NAN : y; + + return y; +} + +__inline double xtanh(double x) { + double y = xfabs(x); + double2 d = expk2(dd(y, 0)); + double2 e = div_dd(dd(1, 0), d); + d = div_dd(add2_dd(d, scale_d(e, -1)), add2_dd(d, e)); + y = d.x + d.y; + + y = xisinf(x) || xisnan(y) ? 1.0 : y; + y = mulsign(y, x); + y = xisnan(x) ? rtengine::RT_NAN : y; + + return y; +} + +__inline double2 logk2(double2 d) { + double2 x, x2, m; + double t; + int e; + + d = normalize_d(d); + e = ilogbp1(d.x * 0.7071); + m = scale_d(d, ldexpk(1, -e)); + + x = div_dd(add2_ds(m, -1), add2_ds(m, 1)); + x2 = squ_d(x); + + t = 0.134601987501262130076155; + t = mla(t, x2.x, 0.132248509032032670243288); + t = mla(t, x2.x, 0.153883458318096079652524); + t = mla(t, x2.x, 0.181817427573705403298686); + t = mla(t, x2.x, 0.222222231326187414840781); + t = mla(t, x2.x, 0.285714285651261412873718); + t = mla(t, x2.x, 0.400000000000222439910458); + t = mla(t, x2.x, 0.666666666666666371239645); + + return add2_dd(mul_ds(dd(0.693147180559945286226764, 2.319046813846299558417771e-17), e), + add2_dd(scale_d(x, 2), mul_ds(mul_dd(x2, x), t))); +} + +__inline double xasinh(double x) { + double y = xfabs(x); + double2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(y, y), 1)), y)); + y = d.x + d.y; + + y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; + y = mulsign(y, x); + y = xisnan(x) ? rtengine::RT_NAN : y; + + return y; +} + +__inline double xacosh(double x) { + double2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(x, x), -1)), x)); + double y = d.x + d.y; + + y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; + y = x == 1.0 ? 0.0 : y; + y = x < 1.0 ? rtengine::RT_NAN : y; + y = xisnan(x) ? rtengine::RT_NAN : y; + + return y; +} + +__inline double xatanh(double x) { + double y = xfabs(x); + double2 d = logk2(div_dd(add2_ss(1, y), add2_ss(1, -y))); + y = y > 1.0 ? rtengine::RT_NAN : (y == 1.0 ? rtengine::RT_INFINITY : (d.x + d.y) * 0.5); + + y = xisinf(x) || xisnan(y) ? rtengine::RT_NAN : y; + y = mulsign(y, x); + y = xisnan(x) ? rtengine::RT_NAN : y; + + return y; +} + +// + +__inline double xfma(double x, double y, double z) { + union { + double f; + long long int i; + } tmp; + + tmp.f = x; + tmp.i = (tmp.i + 0x4000000) & 0xfffffffff8000000LL; + double xh = tmp.f, xl = x - xh; + + tmp.f = y; + tmp.i = (tmp.i + 0x4000000) & 0xfffffffff8000000LL; + double yh = tmp.f, yl = y - yh; + + double h = x * y; + double l = xh * yh - h + xl * yh + xh * yl + xl * yl; + + double h2, l2, v; + + h2 = h + z; + v = h2 - h; + l2 = (h - (h2 - v)) + (z - v) + l; + + return h2 + l2; +} + +__inline double xsqrt(double d) { // max error : 0.5 ulp + double q = 1; + + if (d < 8.636168555094445E-78) { + d *= 1.157920892373162E77; + q = 2.9387358770557188E-39; + } + + // http://en.wikipedia.org/wiki/Fast_inverse_square_root + double x = longBitsToDouble(0x5fe6ec85e7de30da - (doubleToRawLongBits(d + 1e-320) >> 1)); + + x = x * (1.5 - 0.5 * d * x * x); + x = x * (1.5 - 0.5 * d * x * x); + x = x * (1.5 - 0.5 * d * x * x); + + // You can change xfma to fma if fma is correctly implemented + x = xfma(d * x, d * x, -d) * (x * -0.5) + d * x; + + return d == rtengine::RT_INFINITY ? rtengine::RT_INFINITY : x * q; +} + +__inline double xcbrt(double d) { // max error : 2 ulps + double x, y, q = 1.0; + int e, r; + + e = ilogbp1(d); + d = ldexpk(d, -e); + r = (e + 6144) % 3; + q = (r == 1) ? 1.2599210498948731647672106 : q; + q = (r == 2) ? 1.5874010519681994747517056 : q; + q = ldexpk(q, (e + 6144) / 3 - 2048); + + q = mulsign(q, d); + d = xfabs(d); + + x = -0.640245898480692909870982; + x = x * d + 2.96155103020039511818595; + x = x * d + -5.73353060922947843636166; + x = x * d + 6.03990368989458747961407; + x = x * d + -3.85841935510444988821632; + x = x * d + 2.2307275302496609725722; + + y = x * x; y = y * y; x -= (d * y - x) * (1.0 / 3.0); + y = d * x * x; + y = (y - (2.0 / 3.0) * y * (y * x - 1)) * q; + + return y; +} + +__inline double xexp2(double a) { + double u = expk(mul_ds(dd(0.69314718055994528623, 2.3190468138462995584e-17), a)); + if (xispinf(a)) u = rtengine::RT_INFINITY; + if (xisminf(a)) u = 0; + return u; +} + +__inline double xexp10(double a) { + double u = expk(mul_ds(dd(2.3025850929940459011, -2.1707562233822493508e-16), a)); + if (xispinf(a)) u = rtengine::RT_INFINITY; + if (xisminf(a)) u = 0; + return u; +} + +__inline double xexpm1(double a) { + double2 d = add2_ds(expk2(dd(a, 0)), -1.0); + double x = d.x + d.y; + if (xispinf(a)) x = rtengine::RT_INFINITY; + if (xisminf(a)) x = -1; + return x; +} + +__inline double xlog10(double a) { + double2 d = mul_dd(logk(a), dd(0.43429448190325176116, 6.6494347733425473126e-17)); + double x = d.x + d.y; + + if (xisinf(a)) x = rtengine::RT_INFINITY; + if (a < 0) x = rtengine::RT_NAN; + if (a == 0) x = -rtengine::RT_INFINITY; + + return x; +} + +__inline double xlog1p(double a) { + double2 d = logk2(add2_ss(a, 1)); + double x = d.x + d.y; + + if (xisinf(a)) x = rtengine::RT_INFINITY; + if (a < -1) x = rtengine::RT_NAN; + if (a == -1) x = -rtengine::RT_INFINITY; + + return x; +} + +/////////////////////////////////////////// + +#define PI4_Af 0.78515625f +#define PI4_Bf 0.00024127960205078125f +#define PI4_Cf 6.3329935073852539062e-07f +#define PI4_Df 4.9604681473525147339e-10f + +#define L2Uf 0.693145751953125f +#define L2Lf 1.428606765330187045e-06f + +#define R_LN2f 1.442695040888963407359924681001892137426645954152985934135449406931f + +__inline int32_t floatToRawIntBits(float d) { + union { + float f; + int32_t i; + } tmp; + tmp.f = d; + return tmp.i; +} + +__inline float intBitsToFloat(int32_t i) { + union { + float f; + int32_t i; + } tmp; + tmp.i = i; + return tmp.f; +} + +__inline float xfabsf(float x) { + return intBitsToFloat(0x7fffffffL & floatToRawIntBits(x)); +} + +__inline float mulsignf(float x, float y) { + return intBitsToFloat(floatToRawIntBits(x) ^ (floatToRawIntBits(y) & (1 << 31))); +} + +__inline float signf(float d) { return copysign(1, d); } +__inline float mlaf(float x, float y, float z) { return x * y + z; } + +__inline int xisnanf(float x) { return x != x; } +__inline int xisinff(float x) { return x == rtengine::RT_INFINITY_F || x == -rtengine::RT_INFINITY_F; } +__inline int xisminff(float x) { return x == -rtengine::RT_INFINITY_F; } +__inline int xispinff(float x) { return x == rtengine::RT_INFINITY_F; } + +__inline int ilogbp1f(float d) { + int m = d < 5.421010862427522E-20f; + d = m ? 1.8446744073709552E19f * d : d; + int q = (floatToRawIntBits(d) >> 23) & 0xff; + q = m ? q - (64 + 0x7e) : q - 0x7e; + return q; +} + +__inline float ldexpkf(float x, int q) { + float u; + int m; + m = q >> 31; + m = (((m + q) >> 6) - m) << 4; + q = q - (m << 2); + u = intBitsToFloat(((int32_t)(m + 0x7f)) << 23); + u = u * u; + x = x * u * u; + u = intBitsToFloat(((int32_t)(q + 0x7f)) << 23); + return x * u; +} + +__inline float xcbrtf(float d) { // max error : 2 ulps + float x, y, q = 1.0f; + int e, r; + + e = ilogbp1f(d); + d = ldexpkf(d, -e); + r = (e + 6144) % 3; + q = (r == 1) ? 1.2599210498948731647672106f : q; + q = (r == 2) ? 1.5874010519681994747517056f : q; + q = ldexpkf(q, (e + 6144) / 3 - 2048); + + q = mulsignf(q, d); + d = xfabsf(d); + + x = -0.601564466953277587890625f; + x = mlaf(x, d, 2.8208892345428466796875f); + x = mlaf(x, d, -5.532182216644287109375f); + x = mlaf(x, d, 5.898262500762939453125f); + x = mlaf(x, d, -3.8095417022705078125f); + x = mlaf(x, d, 2.2241256237030029296875f); + + y = d * x * x; + y = (y - (2.0f / 3.0f) * y * (y * x - 1.0f)) * q; + + return y; +} + +__inline float xsinf(float d) { + int q; + float u, s; + + q = rint(d * rtengine::RT_1_PI_F); + + d = mlaf(q, -PI4_Af*4, d); + d = mlaf(q, -PI4_Bf*4, d); + d = mlaf(q, -PI4_Cf*4, d); + d = mlaf(q, -PI4_Df*4, d); + + s = d * d; + + if ((q & 1) != 0) d = -d; + + u = 2.6083159809786593541503e-06f; + u = mlaf(u, s, -0.0001981069071916863322258f); + u = mlaf(u, s, 0.00833307858556509017944336f); + u = mlaf(u, s, -0.166666597127914428710938f); + + u = mlaf(s, u * d, d); + + return u; +} + +__inline float xcosf(float d) { +#ifdef __SSE2__ + // faster than scalar version + return xcosf(_mm_set_ss(d))[0]; +#else + int q; + float u, s; + + q = 1 + 2*rint(d * rtengine::RT_1_PI_F - 0.5f); + + d = mlaf(q, -PI4_Af*2, d); + d = mlaf(q, -PI4_Bf*2, d); + d = mlaf(q, -PI4_Cf*2, d); + d = mlaf(q, -PI4_Df*2, d); + + s = d * d; + + if ((q & 2) == 0) d = -d; + + u = 2.6083159809786593541503e-06f; + u = mlaf(u, s, -0.0001981069071916863322258f); + u = mlaf(u, s, 0.00833307858556509017944336f); + u = mlaf(u, s, -0.166666597127914428710938f); + + u = mlaf(s, u * d, d); + + return u; +#endif +} + +__inline float2 xsincosf(float d) { +#ifdef __SSE2__ + // faster than scalar version + vfloat2 res = xsincosf(_mm_set_ss(d)); + return {res.x[0], res.y[0]}; +#else + int q; + float u, s, t; + float2 r; + + q = rint(d * rtengine::RT_2_PI_F); + + s = d; + + s = mlaf(q, -PI4_Af*2, s); + s = mlaf(q, -PI4_Bf*2, s); + s = mlaf(q, -PI4_Cf*2, s); + s = mlaf(q, -PI4_Df*2, s); + + t = s; + + s = s * s; + + u = -0.000195169282960705459117889f; + u = mlaf(u, s, 0.00833215750753879547119141f); + u = mlaf(u, s, -0.166666537523269653320312f); + u = u * s * t; + + r.x = t + u; + + u = -2.71811842367242206819355e-07f; + u = mlaf(u, s, 2.47990446951007470488548e-05f); + u = mlaf(u, s, -0.00138888787478208541870117f); + u = mlaf(u, s, 0.0416666641831398010253906f); + u = mlaf(u, s, -0.5f); + + r.y = u * s + 1; + + if ((q & 1) != 0) { s = r.y; r.y = r.x; r.x = s; } + if ((q & 2) != 0) { r.x = -r.x; } + if (((q+1) & 2) != 0) { r.y = -r.y; } + + if (xisinff(d)) { r.x = r.y = rtengine::RT_NAN_F; } + + return r; +#endif +} + +__inline float xtanf(float d) { + int q; + float u, s, x; + + q = rint(d * (float)(2 * rtengine::RT_1_PI)); + + x = d; + + x = mlaf(q, -PI4_Af*2, x); + x = mlaf(q, -PI4_Bf*2, x); + x = mlaf(q, -PI4_Cf*2, x); + x = mlaf(q, -PI4_Df*2, x); + + s = x * x; + + if ((q & 1) != 0) x = -x; + + u = 0.00927245803177356719970703f; + u = mlaf(u, s, 0.00331984995864331722259521f); + u = mlaf(u, s, 0.0242998078465461730957031f); + u = mlaf(u, s, 0.0534495301544666290283203f); + u = mlaf(u, s, 0.133383005857467651367188f); + u = mlaf(u, s, 0.333331853151321411132812f); + + u = mlaf(s, u * x, x); + + if ((q & 1) != 0) u = 1.0f / u; + + if (xisinff(d)) u = rtengine::RT_NAN_F; + + return u; +} + +__inline float xatanf(float s) { + float t, u; + int q = 0; + + if (s < 0) { s = -s; q = 2; } + if (s > 1) { s = 1.0f / s; q |= 1; } + + t = s * s; + + u = 0.00282363896258175373077393f; + u = mlaf(u, t, -0.0159569028764963150024414f); + u = mlaf(u, t, 0.0425049886107444763183594f); + u = mlaf(u, t, -0.0748900920152664184570312f); + u = mlaf(u, t, 0.106347933411598205566406f); + u = mlaf(u, t, -0.142027363181114196777344f); + u = mlaf(u, t, 0.199926957488059997558594f); + u = mlaf(u, t, -0.333331018686294555664062f); + + t = s + s * (t * u); + + if ((q & 1) != 0) t = 1.570796326794896557998982f - t; + if ((q & 2) != 0) t = -t; + + return t; +} + +__inline float atan2kf(float y, float x) { + float s, t, u; + float q = 0.f; + + if (x < 0) { x = -x; q = -2.f; } + if (y > x) { t = x; x = y; y = -t; q += 1.f; } + + s = y / x; + t = s * s; + + u = 0.00282363896258175373077393f; + u = mlaf(u, t, -0.0159569028764963150024414f); + u = mlaf(u, t, 0.0425049886107444763183594f); + u = mlaf(u, t, -0.0748900920152664184570312f); + u = mlaf(u, t, 0.106347933411598205566406f); + u = mlaf(u, t, -0.142027363181114196777344f); + u = mlaf(u, t, 0.199926957488059997558594f); + u = mlaf(u, t, -0.333331018686294555664062f); + + t = u * t; + t = mlaf(t,s,s); + return mlaf(q,(float)(rtengine::RT_PI_F_2),t); +} + +__inline float xatan2f(float y, float x) { + float r = atan2kf(xfabsf(y), x); + + r = mulsignf(r, x); + if (xisinff(x) || x == 0) r = rtengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(rtengine::RT_PI_F*.5f)) : 0); + if (xisinff(y) ) r = rtengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(rtengine::RT_PI_F*.25f)) : 0); + if ( y == 0) r = (signf(x) == -1 ? rtengine::RT_PI_F : 0); + + return xisnanf(x) || xisnanf(y) ? rtengine::RT_NAN_F : mulsignf(r, y); +} + +__inline float xasinf(float d) { + return mulsignf(atan2kf(fabsf(d), sqrtf((1.0f+d)*(1.0f-d))), d); +} + +__inline float xacosf(float d) { + return mulsignf(atan2kf(sqrtf((1.0f+d)*(1.0f-d)), fabsf(d)), d) + (d < 0 ? (float)rtengine::RT_PI : 0.0f); +} + +__inline float xlogf(float d) { + float x, x2, t, m; + int e; + + e = ilogbp1f(d * 0.7071f); + m = ldexpkf(d, -e); + + x = (m-1.0f) / (m+1.0f); + x2 = x * x; + + t = 0.2371599674224853515625f; + t = mlaf(t, x2, 0.285279005765914916992188f); + t = mlaf(t, x2, 0.400005519390106201171875f); + t = mlaf(t, x2, 0.666666567325592041015625f); + t = mlaf(t, x2, 2.0f); + + x = x * t + 0.693147180559945286226764f * e; + + if (xisinff(d)) x = rtengine::RT_INFINITY_F; + if (d < 0) x = rtengine::RT_NAN_F; + if (d == 0) x = -rtengine::RT_INFINITY_F; + + return x; +} + +__inline float xexpf(float d) { + if(d<=-104.0f) return 0.0f; + + int q = rint(d * R_LN2f); + float s, u; + + s = mlaf(q, -L2Uf, d); + s = mlaf(q, -L2Lf, s); + + u = 0.00136324646882712841033936f; + u = mlaf(u, s, 0.00836596917361021041870117f); + u = mlaf(u, s, 0.0416710823774337768554688f); + u = mlaf(u, s, 0.166665524244308471679688f); + u = mlaf(u, s, 0.499999850988388061523438f); + + u = mlaf( s, mlaf(s,u,1.f),1.f); + return ldexpkf(u, q); + +} + +__inline float xmul2f(float d) { + union { + float floatval; + int intval; + } uflint; + uflint.floatval = d; + if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing + uflint.intval += 1 << 23; // add 1 to the exponent + } + return uflint.floatval; +} + +__inline float xdiv2f(float d) { + union { + float floatval; + int intval; + } uflint; + uflint.floatval = d; + if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing + uflint.intval -= 1 << 23; // sub 1 from the exponent + } + return uflint.floatval; +} + +__inline float xdivf( float d, int n){ + union { + float floatval; + int intval; + } uflint; + uflint.floatval = d; + if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing + uflint.intval -= n << 23; // add n to the exponent + } + return uflint.floatval; +} + +__inline float xlin2log(float x, float base) +{ + constexpr float one(1); + return xlogf(x * (base - one) + one) / xlogf(base); +} + +__inline void xlin2log(float *x, float factor, float base, int w) +{ + constexpr float one(1); + base = 1.f / xlogf(base); + for (int i = 0; i < w; ++i) { + x[i] = xlogf(x[i] * factor * (base - one) + one) * base; + } +} + +__inline float xlog2lin(float x, float base) +{ + constexpr float one(1); + return (pow_F(base, x) - one) / (base - one); +} + +#endif From 47d6ee44f8532b4a96736871fc53ebffd61e245c Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 1 Nov 2018 22:31:12 +0100 Subject: [PATCH 07/20] Removed accidently committed file --- rtengine/sleef.c.save-failed | 1288 ---------------------------------- 1 file changed, 1288 deletions(-) delete mode 100644 rtengine/sleef.c.save-failed diff --git a/rtengine/sleef.c.save-failed b/rtengine/sleef.c.save-failed deleted file mode 100644 index 0cde64be6..000000000 --- a/rtengine/sleef.c.save-failed +++ /dev/null @@ -1,1288 +0,0 @@ -//////////////////////////////////////////////////////////////// -// -// this code was taken from http://shibatch.sourceforge.net/ -// Many thanks to the author of original version: Naoki Shibata -// -// This version contains modifications made by Ingo Weyrich -// -//////////////////////////////////////////////////////////////// - -#ifndef _SLEEFC_ -#define _SLEEFC_ - -#include -#include -#include "rt_math.h" -#include "opthelper.h" - -#define PI4_A .7853981554508209228515625 -#define PI4_B .794662735614792836713604629039764404296875e-8 -#define PI4_C .306161699786838294306516483068750264552437361480769e-16 -#define M_4_PI 1.273239544735162542821171882678754627704620361328125 - -#define L2U .69314718055966295651160180568695068359375 -#define L2L .28235290563031577122588448175013436025525412068e-12 -#define R_LN2 1.442695040888963407359924681001892137426645954152985934135449406931 -#define pow_F(a,b) (xexpf(b*xlogf(a))) - -__inline int64_t doubleToRawLongBits(double d) { - union { - double f; - int64_t i; - } tmp; - tmp.f = d; - return tmp.i; -} - -__inline double longBitsToDouble(int64_t i) { - union { - double f; - int64_t i; - } tmp; - tmp.i = i; - return tmp.f; -} - -__inline double xfabs(double x) { - return longBitsToDouble(0x7fffffffffffffffLL & doubleToRawLongBits(x)); -} - -__inline double mulsign(double x, double y) { - return longBitsToDouble(doubleToRawLongBits(x) ^ (doubleToRawLongBits(y) & (1LL << 63))); -} - -__inline double sign(double d) { return mulsign(1, d); } -__inline double mla(double x, double y, double z) { return x * y + z; } -__inline double xrint(double x) { return x < 0 ? (int)(x - 0.5) : (int)(x + 0.5); } - -__inline int xisnan(double x) { return x != x; } -__inline int xisinf(double x) { return x == rtengine::RT_INFINITY || x == -rtengine::RT_INFINITY; } -__inline int xisminf(double x) { return x == -rtengine::RT_INFINITY; } -__inline int xispinf(double x) { return x == rtengine::RT_INFINITY; } - -__inline double ldexpk(double x, int q) { - double u; - int m; - m = q >> 31; - m = (((m + q) >> 9) - m) << 7; - q = q - (m << 2); - u = longBitsToDouble(((int64_t)(m + 0x3ff)) << 52); - double u2 = u*u; - u2 = u2 * u2; - x = x * u2; - u = longBitsToDouble(((int64_t)(q + 0x3ff)) << 52); - return x * u; -} - -__inline double xldexp(double x, int q) { return ldexpk(x, q); } - -__inline int ilogbp1(double d) { - int m = d < 4.9090934652977266E-91; - d = m ? 2.037035976334486E90 * d : d; - int q = (doubleToRawLongBits(d) >> 52) & 0x7ff; - q = m ? q - (300 + 0x03fe) : q - 0x03fe; - return q; -} - -__inline int xilogb(double d) { - int e = ilogbp1(xfabs(d)) - 1; - e = d == 0 ? (-2147483647 - 1) : e; - e = d == rtengine::RT_INFINITY || d == -rtengine::RT_INFINITY ? 2147483647 : e; - return e; -} - -__inline double upper(double d) { - return longBitsToDouble(doubleToRawLongBits(d) & 0xfffffffff8000000LL); -} - -typedef struct { - double x, y; -} double2; - -typedef struct { - float x, y; -} float2; - -__inline double2 dd(double h, double l) { - double2 ret; - ret.x = h; ret.y = l; - return ret; -} - -__inline double2 normalize_d(double2 t) { - double2 s; - - s.x = t.x + t.y; - s.y = t.x - s.x + t.y; - - return s; -} - -__inline double2 scale_d(double2 d, double s) { - double2 r; - - r.x = d.x * s; - r.y = d.y * s; - - return r; -} - -__inline double2 add2_ss(double x, double y) { - double2 r; - - r.x = x + y; - double v = r.x - x; - r.y = (x - (r.x - v)) + (y - v); - - return r; -} - -__inline double2 add_ds(double2 x, double y) { - // |x| >= |y| - - double2 r; - - assert(xisnan(x.x) || xisnan(y) || xfabs(x.x) >= xfabs(y)); - - r.x = x.x + y; - r.y = x.x - r.x + y + x.y; - - return r; -} - -__inline double2 add2_ds(double2 x, double y) { - // |x| >= |y| - - double2 r; - - r.x = x.x + y; - double v = r.x - x.x; - r.y = (x.x - (r.x - v)) + (y - v); - r.y += x.y; - - return r; -} - -__inline double2 add_sd(double x, double2 y) { - // |x| >= |y| - - double2 r; - - assert(xisnan(x) || xisnan(y.x) || xfabs(x) >= xfabs(y.x)); - - r.x = x + y.x; - r.y = x - r.x + y.x + y.y; - - return r; -} - -__inline double2 add_dd(double2 x, double2 y) { - // |x| >= |y| - - double2 r; - - assert(xisnan(x.x) || xisnan(y.x) || xfabs(x.x) >= xfabs(y.x)); - - r.x = x.x + y.x; - r.y = x.x - r.x + y.x + x.y + y.y; - - return r; -} - -__inline double2 add2_dd(double2 x, double2 y) { - double2 r; - - r.x = x.x + y.x; - double v = r.x - x.x; - r.y = (x.x - (r.x - v)) + (y.x - v); - r.y += x.y + y.y; - - return r; -} - -__inline double2 div_dd(double2 n, double2 d) { - double t = 1.0 / d.x; - double dh = upper(d.x), dl = d.x - dh; - double th = upper(t ), tl = t - th; - double nhh = upper(n.x), nhl = n.x - nhh; - - double2 q; - - q.x = n.x * t; - - double u = -q.x + nhh * th + nhh * tl + nhl * th + nhl * tl + - q.x * (1 - dh * th - dh * tl - dl * th - dl * tl); - - q.y = t * (n.y - q.x * d.y) + u; - - return q; -} - -__inline double2 mul_ss(double x, double y) { - double xh = upper(x), xl = x - xh; - double yh = upper(y), yl = y - yh; - double2 r; - - r.x = x * y; - r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl; - - return r; -} - -__inline double2 mul_ds(double2 x, double y) { - double xh = upper(x.x), xl = x.x - xh; - double yh = upper(y ), yl = y - yh; - double2 r; - - r.x = x.x * y; - r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl + x.y * y; - - return r; -} - -__inline double2 mul_dd(double2 x, double2 y) { - double xh = upper(x.x), xl = x.x - xh; - double yh = upper(y.x), yl = y.x - yh; - double2 r; - - r.x = x.x * y.x; - r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl + x.x * y.y + x.y * y.x; - - return r; -} - -__inline double2 squ_d(double2 x) { - double xh = upper(x.x), xl = x.x - xh; - double2 r; - - r.x = x.x * x.x; - r.y = xh * xh - r.x + (xh + xh) * xl + xl * xl + x.x * (x.y + x.y); - - return r; -} - -__inline double2 rec_s(double d) { - double t = 1.0 / d; - double dh = upper(d), dl = d - dh; - double th = upper(t), tl = t - th; - double2 q; - - q.x = t; - q.y = t * (1 - dh * th - dh * tl - dl * th - dl * tl); - - return q; -} - -__inline double2 sqrt_d(double2 d) { - double t = sqrt(d.x + d.y); - return scale_d(mul_dd(add2_dd(d, mul_ss(t, t)), rec_s(t)), 0.5); -} - -__inline double atan2k(double y, double x) { - double s, t, u; - int q = 0; - - if (x < 0) { x = -x; q = -2; } - if (y > x) { t = x; x = y; y = -t; q += 1; } - - s = y / x; - t = s * s; - - u = -1.88796008463073496563746e-05; - u = u * t + (0.000209850076645816976906797); - u = u * t + (-0.00110611831486672482563471); - u = u * t + (0.00370026744188713119232403); - u = u * t + (-0.00889896195887655491740809); - u = u * t + (0.016599329773529201970117); - u = u * t + (-0.0254517624932312641616861); - u = u * t + (0.0337852580001353069993897); - u = u * t + (-0.0407629191276836500001934); - u = u * t + (0.0466667150077840625632675); - u = u * t + (-0.0523674852303482457616113); - u = u * t + (0.0587666392926673580854313); - u = u * t + (-0.0666573579361080525984562); - u = u * t + (0.0769219538311769618355029); - u = u * t + (-0.090908995008245008229153); - u = u * t + (0.111111105648261418443745); - u = u * t + (-0.14285714266771329383765); - u = u * t + (0.199999999996591265594148); - u = u * t + (-0.333333333333311110369124); - - t = u * t * s + s; - t = q * (rtengine::RT_PI_2) + t; - - return t; -} - -__inline double xatan2(double y, double x) { - double r = atan2k(xfabs(y), x); - - r = mulsign(r, x); - if (xisinf(x) || x == 0) r = rtengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (rtengine::RT_PI_2)) : 0); - if (xisinf(y) ) r = rtengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (rtengine::RT_PI*1/4)) : 0); - if ( y == 0) r = (sign(x) == -1 ? rtengine::RT_PI : 0); - - return xisnan(x) || xisnan(y) ? rtengine::RT_NAN : mulsign(r, y); -} - -__inline double xasin(double d) { - return mulsign(atan2k(xfabs(d), sqrt((1+d)*(1-d))), d); -} - -__inline double xacos(double d) { - return mulsign(atan2k(sqrt((1+d)*(1-d)), xfabs(d)), d) + (d < 0 ? rtengine::RT_PI : 0); -} - -__inline double xatan(double s) { - double t, u; - int q = 0; - - if (s < 0) { s = -s; q = 2; } - if (s > 1) { s = 1.0 / s; q |= 1; } - - t = s * s; - - u = -1.88796008463073496563746e-05; - u = u * t + (0.000209850076645816976906797); - u = u * t + (-0.00110611831486672482563471); - u = u * t + (0.00370026744188713119232403); - u = u * t + (-0.00889896195887655491740809); - u = u * t + (0.016599329773529201970117); - u = u * t + (-0.0254517624932312641616861); - u = u * t + (0.0337852580001353069993897); - u = u * t + (-0.0407629191276836500001934); - u = u * t + (0.0466667150077840625632675); - u = u * t + (-0.0523674852303482457616113); - u = u * t + (0.0587666392926673580854313); - u = u * t + (-0.0666573579361080525984562); - u = u * t + (0.0769219538311769618355029); - u = u * t + (-0.090908995008245008229153); - u = u * t + (0.111111105648261418443745); - u = u * t + (-0.14285714266771329383765); - u = u * t + (0.199999999996591265594148); - u = u * t + (-0.333333333333311110369124); - - t = s + s * (t * u); - - if ((q & 1) != 0) t = 1.570796326794896557998982 - t; - if ((q & 2) != 0) t = -t; - - return t; -} - -__inline double xsin(double d) { - int q; - double u, s; - - q = (int)xrint(d * rtengine::RT_1_PI); - - d = mla(q, -PI4_A*4, d); - d = mla(q, -PI4_B*4, d); - d = mla(q, -PI4_C*4, d); - - s = d * d; - - if ((q & 1) != 0) d = -d; - - u = -7.97255955009037868891952e-18; - u = mla(u, s, 2.81009972710863200091251e-15); - u = mla(u, s, -7.64712219118158833288484e-13); - u = mla(u, s, 1.60590430605664501629054e-10); - u = mla(u, s, -2.50521083763502045810755e-08); - u = mla(u, s, 2.75573192239198747630416e-06); - u = mla(u, s, -0.000198412698412696162806809); - u = mla(u, s, 0.00833333333333332974823815); - u = mla(u, s, -0.166666666666666657414808); - - u = mla(s, u * d, d); - - return u; -} - -__inline double xcos(double d) { - int q; - double u, s; - - q = 1 + 2*(int)xrint(d * rtengine::RT_1_PI - 0.5); - - d = mla(q, -PI4_A*2, d); - d = mla(q, -PI4_B*2, d); - d = mla(q, -PI4_C*2, d); - - s = d * d; - - if ((q & 2) == 0) d = -d; - - u = -7.97255955009037868891952e-18; - u = mla(u, s, 2.81009972710863200091251e-15); - u = mla(u, s, -7.64712219118158833288484e-13); - u = mla(u, s, 1.60590430605664501629054e-10); - u = mla(u, s, -2.50521083763502045810755e-08); - u = mla(u, s, 2.75573192239198747630416e-06); - u = mla(u, s, -0.000198412698412696162806809); - u = mla(u, s, 0.00833333333333332974823815); - u = mla(u, s, -0.166666666666666657414808); - - u = mla(s, u * d, d); - - return u; -} - -__inline double2 xsincos(double d) { - int q; - double u, s, t; - double2 r; - - q = (int)xrint(d * (2 * rtengine::RT_1_PI)); - - s = d; - - s = mla(-q, PI4_A*2, s); - s = mla(-q, PI4_B*2, s); - s = mla(-q, PI4_C*2, s); - - t = s; - - s = s * s; - - u = 1.58938307283228937328511e-10; - u = mla(u, s, -2.50506943502539773349318e-08); - u = mla(u, s, 2.75573131776846360512547e-06); - u = mla(u, s, -0.000198412698278911770864914); - u = mla(u, s, 0.0083333333333191845961746); - u = mla(u, s, -0.166666666666666130709393); - u = u * s * t; - - r.x = t + u; - - u = -1.13615350239097429531523e-11; - u = mla(u, s, 2.08757471207040055479366e-09); - u = mla(u, s, -2.75573144028847567498567e-07); - u = mla(u, s, 2.48015872890001867311915e-05); - u = mla(u, s, -0.00138888888888714019282329); - u = mla(u, s, 0.0416666666666665519592062); - u = mla(u, s, -0.5); - - r.y = u * s + 1; - - if ((q & 1) != 0) { s = r.y; r.y = r.x; r.x = s; } - if ((q & 2) != 0) { r.x = -r.x; } - if (((q+1) & 2) != 0) { r.y = -r.y; } - - if (xisinf(d)) { r.x = r.y = rtengine::RT_NAN; } - - return r; -} - -__inline double xtan(double d) { - int q; - double u, s, x; - - q = (int)xrint(d * (2 * rtengine::RT_1_PI)); - - x = mla(q, -PI4_A*2, d); - x = mla(q, -PI4_B*2, x); - x = mla(q, -PI4_C*2, x); - - s = x * x; - - if ((q & 1) != 0) x = -x; - - u = 1.01419718511083373224408e-05; - u = mla(u, s, -2.59519791585924697698614e-05); - u = mla(u, s, 5.23388081915899855325186e-05); - u = mla(u, s, -3.05033014433946488225616e-05); - u = mla(u, s, 7.14707504084242744267497e-05); - u = mla(u, s, 8.09674518280159187045078e-05); - u = mla(u, s, 0.000244884931879331847054404); - u = mla(u, s, 0.000588505168743587154904506); - u = mla(u, s, 0.00145612788922812427978848); - u = mla(u, s, 0.00359208743836906619142924); - u = mla(u, s, 0.00886323944362401618113356); - u = mla(u, s, 0.0218694882853846389592078); - u = mla(u, s, 0.0539682539781298417636002); - u = mla(u, s, 0.133333333333125941821962); - u = mla(u, s, 0.333333333333334980164153); - - u = mla(s, u * x, x); - - if ((q & 1) != 0) u = 1.0 / u; - - if (xisinf(d)) u = rtengine::RT_NAN; - - return u; -} - -__inline double xlog(double d) { - double x, x2, t, m; - int e; - - e = ilogbp1(d * 0.7071); - m = ldexpk(d, -e); - - x = (m-1) / (m+1); - x2 = x * x; - - t = 0.148197055177935105296783; - t = mla(t, x2, 0.153108178020442575739679); - t = mla(t, x2, 0.181837339521549679055568); - t = mla(t, x2, 0.22222194152736701733275); - t = mla(t, x2, 0.285714288030134544449368); - t = mla(t, x2, 0.399999999989941956712869); - t = mla(t, x2, 0.666666666666685503450651); - t = mla(t, x2, 2); - - x = x * t + 0.693147180559945286226764 * e; - - if (xisinf(d)) x = rtengine::RT_INFINITY; - if (d < 0) x = rtengine::RT_NAN; - if (d == 0) x = -rtengine::RT_INFINITY; - - return x; -} - -__inline double xexp(double d) { - int q = (int)xrint(d * R_LN2); - double s, u; - - s = mla(q, -L2U, d); - s = mla(q, -L2L, s); - - u = 2.08860621107283687536341e-09; - u = mla(u, s, 2.51112930892876518610661e-08); - u = mla(u, s, 2.75573911234900471893338e-07); - u = mla(u, s, 2.75572362911928827629423e-06); - u = mla(u, s, 2.4801587159235472998791e-05); - u = mla(u, s, 0.000198412698960509205564975); - u = mla(u, s, 0.00138888888889774492207962); - u = mla(u, s, 0.00833333333331652721664984); - u = mla(u, s, 0.0416666666666665047591422); - u = mla(u, s, 0.166666666666666851703837); - u = mla(u, s, 0.5); - - u = s * s * u + s + 1; - u = ldexpk(u, q); - - if (xisminf(d)) u = 0; - - return u; -} - -__inline double2 logk(double d) { - double2 x, x2; - double m, t; - int e; - - e = ilogbp1(d * 0.7071); - m = ldexpk(d, -e); - - x = div_dd(add2_ss(-1, m), add2_ss(1, m)); - x2 = squ_d(x); - - t = 0.134601987501262130076155; - t = mla(t, x2.x, 0.132248509032032670243288); - t = mla(t, x2.x, 0.153883458318096079652524); - t = mla(t, x2.x, 0.181817427573705403298686); - t = mla(t, x2.x, 0.222222231326187414840781); - t = mla(t, x2.x, 0.285714285651261412873718); - t = mla(t, x2.x, 0.400000000000222439910458); - t = mla(t, x2.x, 0.666666666666666371239645); - - return add2_dd(mul_ds(dd(0.693147180559945286226764, 2.319046813846299558417771e-17), e), - add2_dd(scale_d(x, 2), mul_ds(mul_dd(x2, x), t))); -} - -__inline double expk(double2 d) { - int q = (int)rint((d.x + d.y) * R_LN2); - double2 s, t; - double u; - - s = add2_ds(d, q * -L2U); - s = add2_ds(s, q * -L2L); - - s = normalize_d(s); - - u = 2.51069683420950419527139e-08; - u = mla(u, s.x, 2.76286166770270649116855e-07); - u = mla(u, s.x, 2.75572496725023574143864e-06); - u = mla(u, s.x, 2.48014973989819794114153e-05); - u = mla(u, s.x, 0.000198412698809069797676111); - u = mla(u, s.x, 0.0013888888939977128960529); - u = mla(u, s.x, 0.00833333333332371417601081); - u = mla(u, s.x, 0.0416666666665409524128449); - u = mla(u, s.x, 0.166666666666666740681535); - u = mla(u, s.x, 0.500000000000000999200722); - - t = add_dd(s, mul_ds(squ_d(s), u)); - - t = add_sd(1, t); - return ldexpk(t.x + t.y, q); -} - -__inline double xpow(double x, double y) { - int yisint = (int)y == y; - int yisodd = (1 & (int)y) != 0 && yisint; - - double result = expk(mul_ds(logk(xfabs(x)), y)); - - result = xisnan(result) ? rtengine::RT_INFINITY : result; - result *= (x >= 0 ? 1 : (!yisint ? rtengine::RT_NAN : (yisodd ? -1 : 1))); - - double efx = mulsign(xfabs(x) - 1, y); - if (xisinf(y)) result = efx < 0 ? 0.0 : (efx == 0 ? 1.0 : rtengine::RT_INFINITY); - if (xisinf(x) || x == 0) result = (yisodd ? sign(x) : 1) * ((x == 0 ? -y : y) < 0 ? 0 : rtengine::RT_INFINITY); - if (xisnan(x) || xisnan(y)) result = rtengine::RT_NAN; - if (y == 0 || x == 1) result = 1; - - return result; -} - -__inline double2 expk2(double2 d) { - int q = (int)rint((d.x + d.y) * R_LN2); - double2 s, t; - double u; - - s = add2_ds(d, q * -L2U); - s = add2_ds(s, q * -L2L); - - s = normalize_d(s); - - u = 2.51069683420950419527139e-08; - u = mla(u, s.x, 2.76286166770270649116855e-07); - u = mla(u, s.x, 2.75572496725023574143864e-06); - u = mla(u, s.x, 2.48014973989819794114153e-05); - u = mla(u, s.x, 0.000198412698809069797676111); - u = mla(u, s.x, 0.0013888888939977128960529); - u = mla(u, s.x, 0.00833333333332371417601081); - u = mla(u, s.x, 0.0416666666665409524128449); - u = mla(u, s.x, 0.166666666666666740681535); - u = mla(u, s.x, 0.500000000000000999200722); - - t = add_dd(s, mul_ds(squ_d(s), u)); - - t = add_sd(1, t); - return dd(ldexpk(t.x, q), ldexpk(t.y, q)); -} - -__inline double xsinh(double x) { - double y = xfabs(x); - double2 d = expk2(dd(y, 0)); - d = add2_dd(d, div_dd(dd(-1, 0), d)); - y = (d.x + d.y) * 0.5; - - y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; - y = mulsign(y, x); - y = xisnan(x) ? rtengine::RT_NAN : y; - - return y; -} - -__inline double xcosh(double x) { - double2 d = expk2(dd(x, 0)); - d = add2_dd(d, div_dd(dd(1, 0), d)); - double y = (d.x + d.y) * 0.5; - - y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; - y = xisnan(x) ? rtengine::RT_NAN : y; - - return y; -} - -__inline double xtanh(double x) { - double y = xfabs(x); - double2 d = expk2(dd(y, 0)); - double2 e = div_dd(dd(1, 0), d); - d = div_dd(add2_dd(d, scale_d(e, -1)), add2_dd(d, e)); - y = d.x + d.y; - - y = xisinf(x) || xisnan(y) ? 1.0 : y; - y = mulsign(y, x); - y = xisnan(x) ? rtengine::RT_NAN : y; - - return y; -} - -__inline double2 logk2(double2 d) { - double2 x, x2, m; - double t; - int e; - - d = normalize_d(d); - e = ilogbp1(d.x * 0.7071); - m = scale_d(d, ldexpk(1, -e)); - - x = div_dd(add2_ds(m, -1), add2_ds(m, 1)); - x2 = squ_d(x); - - t = 0.134601987501262130076155; - t = mla(t, x2.x, 0.132248509032032670243288); - t = mla(t, x2.x, 0.153883458318096079652524); - t = mla(t, x2.x, 0.181817427573705403298686); - t = mla(t, x2.x, 0.222222231326187414840781); - t = mla(t, x2.x, 0.285714285651261412873718); - t = mla(t, x2.x, 0.400000000000222439910458); - t = mla(t, x2.x, 0.666666666666666371239645); - - return add2_dd(mul_ds(dd(0.693147180559945286226764, 2.319046813846299558417771e-17), e), - add2_dd(scale_d(x, 2), mul_ds(mul_dd(x2, x), t))); -} - -__inline double xasinh(double x) { - double y = xfabs(x); - double2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(y, y), 1)), y)); - y = d.x + d.y; - - y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; - y = mulsign(y, x); - y = xisnan(x) ? rtengine::RT_NAN : y; - - return y; -} - -__inline double xacosh(double x) { - double2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(x, x), -1)), x)); - double y = d.x + d.y; - - y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; - y = x == 1.0 ? 0.0 : y; - y = x < 1.0 ? rtengine::RT_NAN : y; - y = xisnan(x) ? rtengine::RT_NAN : y; - - return y; -} - -__inline double xatanh(double x) { - double y = xfabs(x); - double2 d = logk2(div_dd(add2_ss(1, y), add2_ss(1, -y))); - y = y > 1.0 ? rtengine::RT_NAN : (y == 1.0 ? rtengine::RT_INFINITY : (d.x + d.y) * 0.5); - - y = xisinf(x) || xisnan(y) ? rtengine::RT_NAN : y; - y = mulsign(y, x); - y = xisnan(x) ? rtengine::RT_NAN : y; - - return y; -} - -// - -__inline double xfma(double x, double y, double z) { - union { - double f; - long long int i; - } tmp; - - tmp.f = x; - tmp.i = (tmp.i + 0x4000000) & 0xfffffffff8000000LL; - double xh = tmp.f, xl = x - xh; - - tmp.f = y; - tmp.i = (tmp.i + 0x4000000) & 0xfffffffff8000000LL; - double yh = tmp.f, yl = y - yh; - - double h = x * y; - double l = xh * yh - h + xl * yh + xh * yl + xl * yl; - - double h2, l2, v; - - h2 = h + z; - v = h2 - h; - l2 = (h - (h2 - v)) + (z - v) + l; - - return h2 + l2; -} - -__inline double xsqrt(double d) { // max error : 0.5 ulp - double q = 1; - - if (d < 8.636168555094445E-78) { - d *= 1.157920892373162E77; - q = 2.9387358770557188E-39; - } - - // http://en.wikipedia.org/wiki/Fast_inverse_square_root - double x = longBitsToDouble(0x5fe6ec85e7de30da - (doubleToRawLongBits(d + 1e-320) >> 1)); - - x = x * (1.5 - 0.5 * d * x * x); - x = x * (1.5 - 0.5 * d * x * x); - x = x * (1.5 - 0.5 * d * x * x); - - // You can change xfma to fma if fma is correctly implemented - x = xfma(d * x, d * x, -d) * (x * -0.5) + d * x; - - return d == rtengine::RT_INFINITY ? rtengine::RT_INFINITY : x * q; -} - -__inline double xcbrt(double d) { // max error : 2 ulps - double x, y, q = 1.0; - int e, r; - - e = ilogbp1(d); - d = ldexpk(d, -e); - r = (e + 6144) % 3; - q = (r == 1) ? 1.2599210498948731647672106 : q; - q = (r == 2) ? 1.5874010519681994747517056 : q; - q = ldexpk(q, (e + 6144) / 3 - 2048); - - q = mulsign(q, d); - d = xfabs(d); - - x = -0.640245898480692909870982; - x = x * d + 2.96155103020039511818595; - x = x * d + -5.73353060922947843636166; - x = x * d + 6.03990368989458747961407; - x = x * d + -3.85841935510444988821632; - x = x * d + 2.2307275302496609725722; - - y = x * x; y = y * y; x -= (d * y - x) * (1.0 / 3.0); - y = d * x * x; - y = (y - (2.0 / 3.0) * y * (y * x - 1)) * q; - - return y; -} - -__inline double xexp2(double a) { - double u = expk(mul_ds(dd(0.69314718055994528623, 2.3190468138462995584e-17), a)); - if (xispinf(a)) u = rtengine::RT_INFINITY; - if (xisminf(a)) u = 0; - return u; -} - -__inline double xexp10(double a) { - double u = expk(mul_ds(dd(2.3025850929940459011, -2.1707562233822493508e-16), a)); - if (xispinf(a)) u = rtengine::RT_INFINITY; - if (xisminf(a)) u = 0; - return u; -} - -__inline double xexpm1(double a) { - double2 d = add2_ds(expk2(dd(a, 0)), -1.0); - double x = d.x + d.y; - if (xispinf(a)) x = rtengine::RT_INFINITY; - if (xisminf(a)) x = -1; - return x; -} - -__inline double xlog10(double a) { - double2 d = mul_dd(logk(a), dd(0.43429448190325176116, 6.6494347733425473126e-17)); - double x = d.x + d.y; - - if (xisinf(a)) x = rtengine::RT_INFINITY; - if (a < 0) x = rtengine::RT_NAN; - if (a == 0) x = -rtengine::RT_INFINITY; - - return x; -} - -__inline double xlog1p(double a) { - double2 d = logk2(add2_ss(a, 1)); - double x = d.x + d.y; - - if (xisinf(a)) x = rtengine::RT_INFINITY; - if (a < -1) x = rtengine::RT_NAN; - if (a == -1) x = -rtengine::RT_INFINITY; - - return x; -} - -/////////////////////////////////////////// - -#define PI4_Af 0.78515625f -#define PI4_Bf 0.00024127960205078125f -#define PI4_Cf 6.3329935073852539062e-07f -#define PI4_Df 4.9604681473525147339e-10f - -#define L2Uf 0.693145751953125f -#define L2Lf 1.428606765330187045e-06f - -#define R_LN2f 1.442695040888963407359924681001892137426645954152985934135449406931f - -__inline int32_t floatToRawIntBits(float d) { - union { - float f; - int32_t i; - } tmp; - tmp.f = d; - return tmp.i; -} - -__inline float intBitsToFloat(int32_t i) { - union { - float f; - int32_t i; - } tmp; - tmp.i = i; - return tmp.f; -} - -__inline float xfabsf(float x) { - return intBitsToFloat(0x7fffffffL & floatToRawIntBits(x)); -} - -__inline float mulsignf(float x, float y) { - return intBitsToFloat(floatToRawIntBits(x) ^ (floatToRawIntBits(y) & (1 << 31))); -} - -__inline float signf(float d) { return copysign(1, d); } -__inline float mlaf(float x, float y, float z) { return x * y + z; } - -__inline int xisnanf(float x) { return x != x; } -__inline int xisinff(float x) { return x == rtengine::RT_INFINITY_F || x == -rtengine::RT_INFINITY_F; } -__inline int xisminff(float x) { return x == -rtengine::RT_INFINITY_F; } -__inline int xispinff(float x) { return x == rtengine::RT_INFINITY_F; } - -__inline int ilogbp1f(float d) { - int m = d < 5.421010862427522E-20f; - d = m ? 1.8446744073709552E19f * d : d; - int q = (floatToRawIntBits(d) >> 23) & 0xff; - q = m ? q - (64 + 0x7e) : q - 0x7e; - return q; -} - -__inline float ldexpkf(float x, int q) { - float u; - int m; - m = q >> 31; - m = (((m + q) >> 6) - m) << 4; - q = q - (m << 2); - u = intBitsToFloat(((int32_t)(m + 0x7f)) << 23); - u = u * u; - x = x * u * u; - u = intBitsToFloat(((int32_t)(q + 0x7f)) << 23); - return x * u; -} - -__inline float xcbrtf(float d) { // max error : 2 ulps - float x, y, q = 1.0f; - int e, r; - - e = ilogbp1f(d); - d = ldexpkf(d, -e); - r = (e + 6144) % 3; - q = (r == 1) ? 1.2599210498948731647672106f : q; - q = (r == 2) ? 1.5874010519681994747517056f : q; - q = ldexpkf(q, (e + 6144) / 3 - 2048); - - q = mulsignf(q, d); - d = xfabsf(d); - - x = -0.601564466953277587890625f; - x = mlaf(x, d, 2.8208892345428466796875f); - x = mlaf(x, d, -5.532182216644287109375f); - x = mlaf(x, d, 5.898262500762939453125f); - x = mlaf(x, d, -3.8095417022705078125f); - x = mlaf(x, d, 2.2241256237030029296875f); - - y = d * x * x; - y = (y - (2.0f / 3.0f) * y * (y * x - 1.0f)) * q; - - return y; -} - -__inline float xsinf(float d) { - int q; - float u, s; - - q = rint(d * rtengine::RT_1_PI_F); - - d = mlaf(q, -PI4_Af*4, d); - d = mlaf(q, -PI4_Bf*4, d); - d = mlaf(q, -PI4_Cf*4, d); - d = mlaf(q, -PI4_Df*4, d); - - s = d * d; - - if ((q & 1) != 0) d = -d; - - u = 2.6083159809786593541503e-06f; - u = mlaf(u, s, -0.0001981069071916863322258f); - u = mlaf(u, s, 0.00833307858556509017944336f); - u = mlaf(u, s, -0.166666597127914428710938f); - - u = mlaf(s, u * d, d); - - return u; -} - -__inline float xcosf(float d) { -#ifdef __SSE2__ - // faster than scalar version - return xcosf(_mm_set_ss(d))[0]; -#else - int q; - float u, s; - - q = 1 + 2*rint(d * rtengine::RT_1_PI_F - 0.5f); - - d = mlaf(q, -PI4_Af*2, d); - d = mlaf(q, -PI4_Bf*2, d); - d = mlaf(q, -PI4_Cf*2, d); - d = mlaf(q, -PI4_Df*2, d); - - s = d * d; - - if ((q & 2) == 0) d = -d; - - u = 2.6083159809786593541503e-06f; - u = mlaf(u, s, -0.0001981069071916863322258f); - u = mlaf(u, s, 0.00833307858556509017944336f); - u = mlaf(u, s, -0.166666597127914428710938f); - - u = mlaf(s, u * d, d); - - return u; -#endif -} - -__inline float2 xsincosf(float d) { -#ifdef __SSE2__ - // faster than scalar version - vfloat2 res = xsincosf(_mm_set_ss(d)); - return {res.x[0], res.y[0]}; -#else - int q; - float u, s, t; - float2 r; - - q = rint(d * rtengine::RT_2_PI_F); - - s = d; - - s = mlaf(q, -PI4_Af*2, s); - s = mlaf(q, -PI4_Bf*2, s); - s = mlaf(q, -PI4_Cf*2, s); - s = mlaf(q, -PI4_Df*2, s); - - t = s; - - s = s * s; - - u = -0.000195169282960705459117889f; - u = mlaf(u, s, 0.00833215750753879547119141f); - u = mlaf(u, s, -0.166666537523269653320312f); - u = u * s * t; - - r.x = t + u; - - u = -2.71811842367242206819355e-07f; - u = mlaf(u, s, 2.47990446951007470488548e-05f); - u = mlaf(u, s, -0.00138888787478208541870117f); - u = mlaf(u, s, 0.0416666641831398010253906f); - u = mlaf(u, s, -0.5f); - - r.y = u * s + 1; - - if ((q & 1) != 0) { s = r.y; r.y = r.x; r.x = s; } - if ((q & 2) != 0) { r.x = -r.x; } - if (((q+1) & 2) != 0) { r.y = -r.y; } - - if (xisinff(d)) { r.x = r.y = rtengine::RT_NAN_F; } - - return r; -#endif -} - -__inline float xtanf(float d) { - int q; - float u, s, x; - - q = rint(d * (float)(2 * rtengine::RT_1_PI)); - - x = d; - - x = mlaf(q, -PI4_Af*2, x); - x = mlaf(q, -PI4_Bf*2, x); - x = mlaf(q, -PI4_Cf*2, x); - x = mlaf(q, -PI4_Df*2, x); - - s = x * x; - - if ((q & 1) != 0) x = -x; - - u = 0.00927245803177356719970703f; - u = mlaf(u, s, 0.00331984995864331722259521f); - u = mlaf(u, s, 0.0242998078465461730957031f); - u = mlaf(u, s, 0.0534495301544666290283203f); - u = mlaf(u, s, 0.133383005857467651367188f); - u = mlaf(u, s, 0.333331853151321411132812f); - - u = mlaf(s, u * x, x); - - if ((q & 1) != 0) u = 1.0f / u; - - if (xisinff(d)) u = rtengine::RT_NAN_F; - - return u; -} - -__inline float xatanf(float s) { - float t, u; - int q = 0; - - if (s < 0) { s = -s; q = 2; } - if (s > 1) { s = 1.0f / s; q |= 1; } - - t = s * s; - - u = 0.00282363896258175373077393f; - u = mlaf(u, t, -0.0159569028764963150024414f); - u = mlaf(u, t, 0.0425049886107444763183594f); - u = mlaf(u, t, -0.0748900920152664184570312f); - u = mlaf(u, t, 0.106347933411598205566406f); - u = mlaf(u, t, -0.142027363181114196777344f); - u = mlaf(u, t, 0.199926957488059997558594f); - u = mlaf(u, t, -0.333331018686294555664062f); - - t = s + s * (t * u); - - if ((q & 1) != 0) t = 1.570796326794896557998982f - t; - if ((q & 2) != 0) t = -t; - - return t; -} - -__inline float atan2kf(float y, float x) { - float s, t, u; - float q = 0.f; - - if (x < 0) { x = -x; q = -2.f; } - if (y > x) { t = x; x = y; y = -t; q += 1.f; } - - s = y / x; - t = s * s; - - u = 0.00282363896258175373077393f; - u = mlaf(u, t, -0.0159569028764963150024414f); - u = mlaf(u, t, 0.0425049886107444763183594f); - u = mlaf(u, t, -0.0748900920152664184570312f); - u = mlaf(u, t, 0.106347933411598205566406f); - u = mlaf(u, t, -0.142027363181114196777344f); - u = mlaf(u, t, 0.199926957488059997558594f); - u = mlaf(u, t, -0.333331018686294555664062f); - - t = u * t; - t = mlaf(t,s,s); - return mlaf(q,(float)(rtengine::RT_PI_F_2),t); -} - -__inline float xatan2f(float y, float x) { - float r = atan2kf(xfabsf(y), x); - - r = mulsignf(r, x); - if (xisinff(x) || x == 0) r = rtengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(rtengine::RT_PI_F*.5f)) : 0); - if (xisinff(y) ) r = rtengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(rtengine::RT_PI_F*.25f)) : 0); - if ( y == 0) r = (signf(x) == -1 ? rtengine::RT_PI_F : 0); - - return xisnanf(x) || xisnanf(y) ? rtengine::RT_NAN_F : mulsignf(r, y); -} - -__inline float xasinf(float d) { - return mulsignf(atan2kf(fabsf(d), sqrtf((1.0f+d)*(1.0f-d))), d); -} - -__inline float xacosf(float d) { - return mulsignf(atan2kf(sqrtf((1.0f+d)*(1.0f-d)), fabsf(d)), d) + (d < 0 ? (float)rtengine::RT_PI : 0.0f); -} - -__inline float xlogf(float d) { - float x, x2, t, m; - int e; - - e = ilogbp1f(d * 0.7071f); - m = ldexpkf(d, -e); - - x = (m-1.0f) / (m+1.0f); - x2 = x * x; - - t = 0.2371599674224853515625f; - t = mlaf(t, x2, 0.285279005765914916992188f); - t = mlaf(t, x2, 0.400005519390106201171875f); - t = mlaf(t, x2, 0.666666567325592041015625f); - t = mlaf(t, x2, 2.0f); - - x = x * t + 0.693147180559945286226764f * e; - - if (xisinff(d)) x = rtengine::RT_INFINITY_F; - if (d < 0) x = rtengine::RT_NAN_F; - if (d == 0) x = -rtengine::RT_INFINITY_F; - - return x; -} - -__inline float xexpf(float d) { - if(d<=-104.0f) return 0.0f; - - int q = rint(d * R_LN2f); - float s, u; - - s = mlaf(q, -L2Uf, d); - s = mlaf(q, -L2Lf, s); - - u = 0.00136324646882712841033936f; - u = mlaf(u, s, 0.00836596917361021041870117f); - u = mlaf(u, s, 0.0416710823774337768554688f); - u = mlaf(u, s, 0.166665524244308471679688f); - u = mlaf(u, s, 0.499999850988388061523438f); - - u = mlaf( s, mlaf(s,u,1.f),1.f); - return ldexpkf(u, q); - -} - -__inline float xmul2f(float d) { - union { - float floatval; - int intval; - } uflint; - uflint.floatval = d; - if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing - uflint.intval += 1 << 23; // add 1 to the exponent - } - return uflint.floatval; -} - -__inline float xdiv2f(float d) { - union { - float floatval; - int intval; - } uflint; - uflint.floatval = d; - if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing - uflint.intval -= 1 << 23; // sub 1 from the exponent - } - return uflint.floatval; -} - -__inline float xdivf( float d, int n){ - union { - float floatval; - int intval; - } uflint; - uflint.floatval = d; - if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing - uflint.intval -= n << 23; // add n to the exponent - } - return uflint.floatval; -} - -__inline float xlin2log(float x, float base) -{ - constexpr float one(1); - return xlogf(x * (base - one) + one) / xlogf(base); -} - -__inline void xlin2log(float *x, float factor, float base, int w) -{ - constexpr float one(1); - base = 1.f / xlogf(base); - for (int i = 0; i < w; ++i) { - x[i] = xlogf(x[i] * factor * (base - one) + one) * base; - } -} - -__inline float xlog2lin(float x, float base) -{ - constexpr float one(1); - return (pow_F(base, x) - one) / (base - one); -} - -#endif From cfb61f6fbfa17d4735bb495ddad9e1e9c7547bc4 Mon Sep 17 00:00:00 2001 From: George Hilliard Date: Thu, 1 Nov 2018 16:02:01 -0500 Subject: [PATCH 08/20] Notify GUI when batch starts Closes #4906 --- rtgui/batchqueue.cc | 2 ++ rtgui/batchqueuepanel.cc | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 6c42ef89f..6f09e25f1 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -597,6 +597,8 @@ void BatchQueue::startProcessing () // start batch processing rtengine::startBatchProcessing (next->job, this); queue_draw (); + + notifyListener(); } } } diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index a2358a3b5..57481ef1d 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -281,9 +281,6 @@ void BatchQueuePanel::startBatchProc () // callback in response to the *reported* state. queueShouldRun = true; - // Don't need an update callback from the queue to know it is started: - setGuiFromBatchState(true, batchQueue->getEntries().size()); - saveOptions(); batchQueue->startProcessing (); } From 424782e8d0546089121f4aa8274c6dd36347aeff Mon Sep 17 00:00:00 2001 From: George Hilliard Date: Thu, 1 Nov 2018 16:02:35 -0500 Subject: [PATCH 09/20] Consolidate updateTab() calls --- rtgui/batchqueuepanel.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index 57481ef1d..923b6f786 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -247,8 +247,6 @@ void BatchQueuePanel::updateTab (int qsize, int forceOrientation) void BatchQueuePanel::queueSizeChanged(int qsize, bool queueRunning, bool queueError, const Glib::ustring& queueErrorMessage) { - updateTab (qsize); - setGuiFromBatchState(queueRunning, qsize); if (!queueRunning && qsize == 0 && queueShouldRun) { @@ -284,8 +282,6 @@ void BatchQueuePanel::startBatchProc () saveOptions(); batchQueue->startProcessing (); } - - updateTab (batchQueue->getEntries().size()); } void BatchQueuePanel::stopBatchProc () @@ -294,8 +290,6 @@ void BatchQueuePanel::stopBatchProc () // background queue thread must check. It will notify queueSizeChanged() // when it stops. queueShouldRun = false; - - updateTab (batchQueue->getEntries().size()); } void BatchQueuePanel::setGuiFromBatchState(bool queueRunning, int qsize) @@ -313,6 +307,8 @@ void BatchQueuePanel::setGuiFromBatchState(bool queueRunning, int qsize) fdir->set_sensitive (!queueRunning); fformat->set_sensitive (!queueRunning); + + updateTab(qsize); } void BatchQueuePanel::addBatchQueueJobs(const std::vector& entries, bool head) From 4186c2b1394a33ffe58cc6cfec99de6e0420c816 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Fri, 2 Nov 2018 13:47:09 +0100 Subject: [PATCH 10/20] L*a*b* grid color toning: fixed scaling bug introduced in 74a467fb4e20aca7b9b9ba40eefa405f0d32e2c4 --- rtengine/improcfun.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 4dd745eb6..31c44efe4 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -5782,8 +5782,8 @@ void ImProcFunctions::lab2rgb (const LabImage &src, Imagefloat &dst, const Glib: */ void ImProcFunctions::colorToningLabGrid(LabImage *lab, int xstart, int xend, int ystart, int yend, bool MultiThread) { - const float factor = 3.f; - const float scaling = 3.f; + const float factor = ColorToningParams::LABGRID_CORR_MAX * 3.f; + const float scaling = ColorToningParams::LABGRID_CORR_SCALE; float a_scale = (params->colorToning.labgridAHigh - params->colorToning.labgridALow) / factor / scaling; float a_base = params->colorToning.labgridALow / scaling; float b_scale = (params->colorToning.labgridBHigh - params->colorToning.labgridBLow) / factor / scaling; From e611efd6b43b3d37d0e279e90c4a9781bfa95e15 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Fri, 2 Nov 2018 12:01:24 +0100 Subject: [PATCH 11/20] fixed segfault (out of range LUT access) in shadows/highlights Fixes #4922 --- rtengine/ipshadowshighlights.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rtengine/ipshadowshighlights.cc b/rtengine/ipshadowshighlights.cc index ff56c84ac..450aac221 100644 --- a/rtengine/ipshadowshighlights.cc +++ b/rtengine/ipshadowshighlights.cc @@ -160,7 +160,7 @@ void ImProcFunctions::shadowsHighlights(LabImage *lab) float orig = 1.f - blend; if (l >= 0.f && l < 32768.f) { if (lab_mode) { - lab->L[y][x] = f[l] * blend + l * orig; + lab->L[y][x] = intp(blend, f[l], l); if (!hl && l > 1.f) { // when pushing shadows, scale also the chromaticity float s = max(lab->L[y][x] / l * 0.5f, 1.f) * blend; @@ -173,7 +173,10 @@ void ImProcFunctions::shadowsHighlights(LabImage *lab) float rgb[3]; lab2rgb(l, lab->a[y][x], lab->b[y][x], rgb[0], rgb[1], rgb[2]); for (int i = 0; i < 3; ++i) { - rgb[i] = f[rgb[i]] * blend + rgb[i] * orig; + float c = rgb[i]; + if (!OOG(c)) { + rgb[i] = intp(blend, f[c], c); + } } rgb2lab(rgb[0], rgb[1], rgb[2], lab->L[y][x], lab->a[y][x], lab->b[y][x]); } From 86c661fdeb4c8307cdfaf4c90e45702ffea06261 Mon Sep 17 00:00:00 2001 From: George Hilliard Date: Fri, 2 Nov 2018 09:29:37 -0500 Subject: [PATCH 12/20] Fix startup ding by initializing variable Closes #4923. --- rtgui/batchqueuepanel.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index 923b6f786..8c6472c70 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -57,6 +57,8 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr) qAutoStart->set_tooltip_text (M("BATCHQUEUE_AUTOSTARTHINT")); qAutoStart->set_active (options.procQueueEnabled); + queueShouldRun = false; + batchQueueButtonBox->pack_start (*qStartStop, Gtk::PACK_SHRINK, 4); batchQueueButtonBox->pack_start (*qAutoStart, Gtk::PACK_SHRINK, 4); Gtk::Frame *bbox = Gtk::manage(new Gtk::Frame(M("MAIN_FRAME_BATCHQUEUE"))); From e199d1ea10fbf55833212cb020856962fb9d8066 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 2 Nov 2018 19:02:05 +0100 Subject: [PATCH 13/20] Colortoning lab regions: Move guid fill into main loop, #4914 --- rtengine/iplabregions.cc | 44 +++++++++++++++------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/rtengine/iplabregions.cc b/rtengine/iplabregions.cc index aec6efa6f..66ab52370 100644 --- a/rtengine/iplabregions.cc +++ b/rtengine/iplabregions.cc @@ -87,6 +87,7 @@ BENCHFUN abmask[i](lab->W, lab->H); Lmask[i](lab->W, lab->H); } + array2D guide(lab->W, lab->H); #ifdef _OPENMP #pragma omp parallel if (multiThread) @@ -99,7 +100,7 @@ BENCHFUN constexpr float c_factor = 327.68f / 48000.f; #endif #ifdef _OPENMP - #pragma omp for + #pragma omp for schedule(dynamic, 16) #endif for (int y = 0; y < lab->H; ++y) { #ifdef __SSE2__ @@ -108,53 +109,40 @@ BENCHFUN fastlin2log(cBuffer, c_factor, 10.f, lab->W); #endif for (int x = 0; x < lab->W; ++x) { - float l = lab->L[y][x]; + float l = lab->L[y][x] / 32768.f; + guide[y][x] = LIM01(l); #ifdef __SSE2__ // use precalculated values - float c1 = cBuffer[x]; + float c = cBuffer[x]; float h = hBuffer[x]; #else // magic constant c_factor: normally chromaticity is in [0; 42000] (see color.h), but here we use the constant to match how the chromaticity pipette works (see improcfun.cc lines 4705-4706 and color.cc line 1930 constexpr float c_factor = 327.68f / 48000.f; - float a = lab->a[y][x]; - float b = lab->b[y][x]; float c, h; - Color::Lab2Lch(a, b, c, h); - float c1 = xlin2log(c * c_factor, 10.f); + Color::Lab2Lch(lab->a[y][x], lab->b[y][x], c, h); + c = xlin2log(c * c_factor, 10.f); #endif - float h1 = Color::huelab_to_huehsv2(h); - h1 = h1 + 1.f/6.f; // offset the hue because we start from purple instead of red - if (h1 > 1.f) { - h1 -= 1.f; + h = Color::huelab_to_huehsv2(h); + h += 1.f/6.f; // offset the hue because we start from purple instead of red + if (h > 1.f) { + h -= 1.f; } - h1 = xlin2log(h1, 3.f); - float l1 = l / 32768.f; + h = xlin2log(h, 3.f); for (int i = begin_idx; i < end_idx; ++i) { auto &hm = hmask[i]; auto &cm = cmask[i]; auto &lm = lmask[i]; - float blend = LIM01((hm ? hm->getVal(h1) : 1.f) * (cm ? cm->getVal(c1) : 1.f) * (lm ? lm->getVal(l1) : 1.f)); + float blend = LIM01((hm ? hm->getVal(h) : 1.f) * (cm ? cm->getVal(c) : 1.f) * (lm ? lm->getVal(l) : 1.f)); Lmask[i][y][x] = abmask[i][y][x] = blend; } } } } - { - array2D guide(lab->W, lab->H, lab->L); -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int y = 0; y < lab->H; ++y) { - for (int x = 0; x < lab->W; ++x) { - guide[y][x] = LIM01(lab->L[y][x] / 32768.f); - } - } - for (int i = begin_idx; i < end_idx; ++i) { - rtengine::guidedFilter(guide, abmask[i], abmask[i], max(int(4 / scale + 0.5), 1), 0.001, multiThread); - rtengine::guidedFilter(guide, Lmask[i], Lmask[i], max(int(25 / scale + 0.5), 1), 0.0001, multiThread); - } + for (int i = begin_idx; i < end_idx; ++i) { + rtengine::guidedFilter(guide, abmask[i], abmask[i], max(int(4 / scale + 0.5), 1), 0.001, multiThread); + rtengine::guidedFilter(guide, Lmask[i], Lmask[i], max(int(25 / scale + 0.5), 1), 0.0001, multiThread); } if (show_mask_idx >= 0) { From 64af0e7602393c37bb3b079da0f6de161663e14f Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 2 Nov 2018 21:06:38 +0100 Subject: [PATCH 14/20] Colortoning lab regions: Disabled timing code and removed double declaration of c_factor, #4914 --- rtengine/iplabregions.cc | 74 +++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/rtengine/iplabregions.cc b/rtengine/iplabregions.cc index 66ab52370..5d49ff429 100644 --- a/rtengine/iplabregions.cc +++ b/rtengine/iplabregions.cc @@ -24,11 +24,12 @@ #include "improcfun.h" #include "guidedfilter.h" -#define BENCHMARK +//#define BENCHMARK #include "StopWatch.h" #include "sleef.c" namespace { + #ifdef __SSE2__ void fastlin2log(float *x, float factor, float base, int w) { @@ -46,6 +47,7 @@ void fastlin2log(float *x, float factor, float base, int w) } } #endif + } namespace rtengine { @@ -87,59 +89,59 @@ BENCHFUN abmask[i](lab->W, lab->H); Lmask[i](lab->W, lab->H); } + array2D guide(lab->W, lab->H); + // magic constant c_factor: normally chromaticity is in [0; 42000] (see color.h), but here we use the constant to match how the chromaticity pipette works (see improcfun.cc lines 4705-4706 and color.cc line 1930 + constexpr float c_factor = 327.68f / 48000.f; + #ifdef _OPENMP #pragma omp parallel if (multiThread) #endif { #ifdef __SSE2__ - float cBuffer[lab->W]; - float hBuffer[lab->W]; - // magic constant c_factor: normally chromaticity is in [0; 42000] (see color.h), but here we use the constant to match how the chromaticity pipette works (see improcfun.cc lines 4705-4706 and color.cc line 1930 - constexpr float c_factor = 327.68f / 48000.f; + float cBuffer[lab->W]; + float hBuffer[lab->W]; #endif #ifdef _OPENMP - #pragma omp for schedule(dynamic, 16) + #pragma omp for schedule(dynamic, 16) #endif - for (int y = 0; y < lab->H; ++y) { + for (int y = 0; y < lab->H; ++y) { #ifdef __SSE2__ - // vectorized precalculation - Color::Lab2Lch(lab->a[y], lab->b[y], cBuffer, hBuffer, lab->W); - fastlin2log(cBuffer, c_factor, 10.f, lab->W); + // vectorized precalculation + Color::Lab2Lch(lab->a[y], lab->b[y], cBuffer, hBuffer, lab->W); + fastlin2log(cBuffer, c_factor, 10.f, lab->W); #endif - for (int x = 0; x < lab->W; ++x) { - float l = lab->L[y][x] / 32768.f; - guide[y][x] = LIM01(l); + for (int x = 0; x < lab->W; ++x) { + const float l = lab->L[y][x] / 32768.f; + guide[y][x] = LIM01(l); #ifdef __SSE2__ - // use precalculated values - float c = cBuffer[x]; - float h = hBuffer[x]; + // use precalculated values + const float c = cBuffer[x]; + float h = hBuffer[x]; #else - // magic constant c_factor: normally chromaticity is in [0; 42000] (see color.h), but here we use the constant to match how the chromaticity pipette works (see improcfun.cc lines 4705-4706 and color.cc line 1930 - constexpr float c_factor = 327.68f / 48000.f; - float c, h; - Color::Lab2Lch(lab->a[y][x], lab->b[y][x], c, h); - c = xlin2log(c * c_factor, 10.f); + float c, h; + Color::Lab2Lch(lab->a[y][x], lab->b[y][x], c, h); + c = xlin2log(c * c_factor, 10.f); #endif - h = Color::huelab_to_huehsv2(h); - h += 1.f/6.f; // offset the hue because we start from purple instead of red - if (h > 1.f) { - h -= 1.f; - } - h = xlin2log(h, 3.f); + h = Color::huelab_to_huehsv2(h); + h += 1.f/6.f; // offset the hue because we start from purple instead of red + if (h > 1.f) { + h -= 1.f; + } + h = xlin2log(h, 3.f); - for (int i = begin_idx; i < end_idx; ++i) { - auto &hm = hmask[i]; - auto &cm = cmask[i]; - auto &lm = lmask[i]; - float blend = LIM01((hm ? hm->getVal(h) : 1.f) * (cm ? cm->getVal(c) : 1.f) * (lm ? lm->getVal(l) : 1.f)); - Lmask[i][y][x] = abmask[i][y][x] = blend; + for (int i = begin_idx; i < end_idx; ++i) { + auto &hm = hmask[i]; + auto &cm = cmask[i]; + auto &lm = lmask[i]; + float blend = LIM01((hm ? hm->getVal(h) : 1.f) * (cm ? cm->getVal(c) : 1.f) * (lm ? lm->getVal(l) : 1.f)); + Lmask[i][y][x] = abmask[i][y][x] = blend; + } } } } - } - + for (int i = begin_idx; i < end_idx; ++i) { rtengine::guidedFilter(guide, abmask[i], abmask[i], max(int(4 / scale + 0.5), 1), 0.001, multiThread); rtengine::guidedFilter(guide, Lmask[i], Lmask[i], max(int(25 / scale + 0.5), 1), 0.0001, multiThread); @@ -176,7 +178,7 @@ BENCHFUN abca[i] = abcoord(r.a); abcb[i] = abcoord(r.b); rs[i] = 1.f + r.saturation / 100.f; - rl[i] = 1.f + float(r.lightness) / 500.f; + rl[i] = 1.f + r.lightness / 500.f; } #ifdef _OPENMP From 240f1eac6501cba182bd2b0a06478f7fe78b9de3 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 2 Nov 2018 23:05:40 +0100 Subject: [PATCH 15/20] Colortoning lab regions: vectorized last loop, #4914 --- rtengine/iplabregions.cc | 68 +++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 18 deletions(-) diff --git a/rtengine/iplabregions.cc b/rtengine/iplabregions.cc index 5d49ff429..d5bbd6302 100644 --- a/rtengine/iplabregions.cc +++ b/rtengine/iplabregions.cc @@ -182,27 +182,59 @@ BENCHFUN } #ifdef _OPENMP - #pragma omp parallel for if (multiThread) + #pragma omp parallel if (multiThread) #endif - for (int y = 0; y < lab->H; ++y) { - for (int x = 0; x < lab->W; ++x) { - float l = lab->L[y][x]; - float a = lab->a[y][x]; - float b = lab->b[y][x]; + { +#ifdef __SSE2__ + vfloat c42000v = F2V(42000.f); + vfloat cm42000v = F2V(-42000.f); + vfloat c32768v = F2V(32768.f); +#endif +#ifdef _OPENMP + #pragma omp for +#endif + for (int y = 0; y < lab->H; ++y) { + int x = 0; +#ifdef __SSE2__ + for (; x < lab->W - 3; x += 4) { + vfloat lv = LVFU(lab->L[y][x]); + vfloat av = LVFU(lab->a[y][x]); + vfloat bv = LVFU(lab->b[y][x]); - for (int i = 0; i < n; ++i) { - float blend = abmask[i][y][x]; - float s = rs[i]; - float a_new = LIM(s * (a + abca[i]), -42000.f, 42000.f); - float b_new = LIM(s * (b + abcb[i]), -42000.f, 42000.f); - float l_new = LIM(l * rl[i], 0.f, 32768.f); - l = intp(Lmask[i][y][x], l_new, l); - a = intp(blend, a_new, a); - b = intp(blend, b_new, b); + for (int i = 0; i < n; ++i) { + vfloat blendv = LVFU(abmask[i][y][x]); + vfloat sv = F2V(rs[i]); + vfloat a_newv = LIMV(sv * (av + F2V(abca[i])), cm42000v, c42000v); + vfloat b_newv = LIMV(sv * (bv + F2V(abcb[i])), cm42000v, c42000v); + vfloat l_newv = LIMV(lv * F2V(rl[i]), ZEROV, c32768v); + lv = vintpf(LVFU(Lmask[i][y][x]), l_newv, lv); + av = vintpf(blendv, a_newv, av); + bv = vintpf(blendv, b_newv, bv); + } + STVFU(lab->L[y][x], lv); + STVFU(lab->a[y][x], av); + STVFU(lab->b[y][x], bv); + } +#endif + for (; x < lab->W; ++x) { + float l = lab->L[y][x]; + float a = lab->a[y][x]; + float b = lab->b[y][x]; + + for (int i = 0; i < n; ++i) { + float blend = abmask[i][y][x]; + float s = rs[i]; + float a_new = LIM(s * (a + abca[i]), -42000.f, 42000.f); + float b_new = LIM(s * (b + abcb[i]), -42000.f, 42000.f); + float l_new = LIM(l * rl[i], 0.f, 32768.f); + l = intp(Lmask[i][y][x], l_new, l); + a = intp(blend, a_new, a); + b = intp(blend, b_new, b); + } + lab->L[y][x] = l; + lab->a[y][x] = a; + lab->b[y][x] = b; } - lab->L[y][x] = l; - lab->a[y][x] = a; - lab->b[y][x] = b; } } } From 0c488eadaf90ade63b738740364c68f6f92575ef Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sat, 3 Nov 2018 02:36:30 +0100 Subject: [PATCH 16/20] DR Compression: updated defaults and renamed "Threshold" to "Detail" in the GUI Fixes #4912 --- rtdata/languages/default | 4 ++-- rtengine/procparams.cc | 4 ++-- rtgui/fattaltonemap.cc | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 03359ee09..ee4291522 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -725,7 +725,7 @@ HISTORY_MSG_485;Lens Correction HISTORY_MSG_486;Lens Correction - Camera HISTORY_MSG_487;Lens Correction - Lens HISTORY_MSG_488;Dynamic Range Compression -HISTORY_MSG_489;DRC - Threshold +HISTORY_MSG_489;DRC - Detail HISTORY_MSG_490;DRC - Amount HISTORY_MSG_491;White Balance HISTORY_MSG_492;RGB Curves @@ -2046,7 +2046,7 @@ TP_SOFTLIGHT_STRENGTH;Strength TP_TM_FATTAL_AMOUNT;Amount TP_TM_FATTAL_ANCHOR;Anchor TP_TM_FATTAL_LABEL;Dynamic Range Compression -TP_TM_FATTAL_THRESHOLD;Threshold +TP_TM_FATTAL_THRESHOLD;Detail TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 4585b767b..b82a7d440 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1532,8 +1532,8 @@ bool EPDParams::operator !=(const EPDParams& other) const FattalToneMappingParams::FattalToneMappingParams() : enabled(false), - threshold(0), - amount(30), + threshold(30), + amount(20), anchor(50) { } diff --git a/rtgui/fattaltonemap.cc b/rtgui/fattaltonemap.cc index 4bba72f2a..3a6a15a4d 100644 --- a/rtgui/fattaltonemap.cc +++ b/rtgui/fattaltonemap.cc @@ -31,7 +31,8 @@ FattalToneMapping::FattalToneMapping(): FoldableToolPanel(this, "fattal", M("TP_ EvTMFattalAnchor = m->newEvent(HDR, "HISTORY_MSG_TM_FATTAL_ANCHOR"); amount = Gtk::manage(new Adjuster (M("TP_TM_FATTAL_AMOUNT"), 1., 100., 1., 30.)); - threshold = Gtk::manage(new Adjuster (M("TP_TM_FATTAL_THRESHOLD"), -100., 100., 1., 0.0)); + threshold = Gtk::manage(new Adjuster (M("TP_TM_FATTAL_THRESHOLD"), -100., 300., 1., 0.0)); + threshold->setLogScale(10, 0); Gtk::Image *al = Gtk::manage(new RTImage("circle-black-small.png")); Gtk::Image *ar = Gtk::manage(new RTImage("circle-white-small.png")); anchor = Gtk::manage(new Adjuster(M("TP_TM_FATTAL_ANCHOR"), 1, 100, 1, 50, al, ar)); From 7474598ebcc9d935318643241b3c033845ab0469 Mon Sep 17 00:00:00 2001 From: Hombre Date: Sat, 3 Nov 2018 13:59:04 +0100 Subject: [PATCH 17/20] Fix a crash that can occure when creating the thumbnail (no issue) --- rtengine/rtthumbnail.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index c671cc0a4..f01e87ff7 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -2224,7 +2224,7 @@ bool Thumbnail::readAEHistogram (const Glib::ustring& fname) FILE* f = g_fopen (fname.c_str (), "rb"); if (!f) { - aeHistogram (0); + aeHistogram.reset(); } else { aeHistogram (65536 >> aeHistCompression); fread (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f); From 555b613f21651ae0164b201d90b76a6aaca4478e Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 3 Nov 2018 14:04:34 +0100 Subject: [PATCH 18/20] Updated undo/redo-small icons The icon's shape made it look off-center even though it was centered, so the icons were nudged a bit to the side. Closes #4927 --- rtdata/images/themed/png/dark/redo-small.png | Bin 448 -> 429 bytes rtdata/images/themed/png/dark/undo-small.png | Bin 422 -> 432 bytes rtdata/images/themed/png/light/redo-small.png | Bin 465 -> 431 bytes rtdata/images/themed/png/light/undo-small.png | Bin 435 -> 430 bytes rtdata/images/themed/svg/redo-small.svg | 31 +++++++----------- rtdata/images/themed/svg/undo-small.svg | 8 ++--- 6 files changed, 15 insertions(+), 24 deletions(-) diff --git a/rtdata/images/themed/png/dark/redo-small.png b/rtdata/images/themed/png/dark/redo-small.png index 84a5988efc9131f5c2d494f702d76f96872f1682..206200d6db0e9e2fb390270a9bb80e939eb80457 100644 GIT binary patch delta 177 zcmX@Wyq0+bD`UM@fKQ04dx6gxFgSPa+_7WF&YnGc^ytx3r%pixA>`@Pr!QQ%u;=>v zXa)ubzLFrnV1~_WQn^K0G<|1OyO_zwPvk8C$~b$vIEHXsPfk$aa*41uP+`c_cXX6} z#>B>Uud}JCsg0M1=brc_aV{>Y2GK%oE=|7%jd+a}Y|AWJT9-9R+AQTe63N1FbTVg* TbhY4opm_|Qu6{1-oD!Me1LfaD`UNGfKQ0)>C>m(3w+L;Idk^xSs)2#T)K1#$Ub-O98dvJ3J8FVBQuxW zXJBC9FA4GsZeUnmv$0LRM`$`%ezaX_W~a3;P%6mN#W95Ada^(Z6I%?Arh)S!?*i?P ziOUxmMYEpp2sceIFwIJtPj--y= l8Db4fmq>lQsj9)jz%)bf+m+U>UO?j+JYD@<);T3K0RSW2SxNu^ diff --git a/rtdata/images/themed/png/dark/undo-small.png b/rtdata/images/themed/png/dark/undo-small.png index 0908ba6d564b883363f3eafea6ec71ee56672bb6..9505829d49e7ff5c4e183a541473f9917546c235 100644 GIT binary patch delta 180 zcmZ3+yn%TGD`UM@fKQ0)nKNhH3w(g&>C>k#U%m`voIH8*{Q2`|&z=Q}02x3LAUJX2 zME?rmRt5$JzLFrn;LQx4nyfQKdGc1p*O|%HT;3}RlyUQPaSY+Oo-EM9#8$&2=vb(0 zD&So4(37pLOu@OMxv{bFt5Wj<7G~z{oolR`7wBj(H!DSKRADxE34g`1qGN%_Cr76+ b2S$eedpv73*{8V!jb!k2^>bP0l+XkKpC?R3 delta 170 zcmdnMyo`ARD`UNSfKQ04dx6gx7&w3a{O#Mf&z?OC6gYS89FRPH`ZSOWBp18b@-r|n z@RkJm1v6}RUn9(}mYb+Q!=jbp-NsCygoCGxV+hCfjH{oFo>FkkY-c?r7(pW(`jIZW)ztP7SL z*YfGAv7-v_Rh_MJ-bAR*lv#zopr08#o!4*&oF diff --git a/rtdata/images/themed/png/light/undo-small.png b/rtdata/images/themed/png/light/undo-small.png index 6d16726acea6587ba5b2d7d668f535bfab561d55..d6f1d01152f0b91b0585c98f079ef587e1c594af 100644 GIT binary patch delta 173 zcmdnYypDMT7h}D9fsd-HsqgffgpVnjVLPdv&E9dBiQ5*}5GR7ArP3 zHYQq4C~Rm{^bAm);CP|opcdDfh&hdlf@cI~ojJg2svgt5Ks11XA?GsR8m~8L+khrA Nc)I$ztaD0e0stzhG(-RZ diff --git a/rtdata/images/themed/svg/redo-small.svg b/rtdata/images/themed/svg/redo-small.svg index be05d9592..639aebb42 100644 --- a/rtdata/images/themed/svg/redo-small.svg +++ b/rtdata/images/themed/svg/redo-small.svg @@ -26,14 +26,14 @@ borderopacity="1.0" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:zoom="22.627417" - inkscape:cx="-2.333987" - inkscape:cy="3.4079617" + inkscape:zoom="50.5" + inkscape:cx="8" + inkscape:cy="8" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1920" - inkscape:window-height="1019" + inkscape:window-height="1017" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" @@ -63,7 +63,7 @@ image/svg+xml - + Maciej Dworak @@ -100,20 +100,11 @@ inkscape:groupmode="layer" inkscape:label="Layer 1" transform="translate(0,-8)"> - - - - + diff --git a/rtdata/images/themed/svg/undo-small.svg b/rtdata/images/themed/svg/undo-small.svg index 83b4663a0..f06c73392 100644 --- a/rtdata/images/themed/svg/undo-small.svg +++ b/rtdata/images/themed/svg/undo-small.svg @@ -26,14 +26,14 @@ borderopacity="1.0" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:zoom="51.375" + inkscape:zoom="50.625" inkscape:cx="8" inkscape:cy="8" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1920" - inkscape:window-height="1019" + inkscape:window-height="1017" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" @@ -45,7 +45,7 @@ inkscape:object-nodes="false" inkscape:snap-grids="true" inkscape:snap-bbox-midpoints="false" - inkscape:snap-global="false"> + inkscape:snap-global="true"> From cd4fa4277618d47504cc2139a28000b1641c1eb2 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 3 Nov 2018 14:14:16 +0100 Subject: [PATCH 19/20] Removed changed locale keys Related to #4912 0c488ea --- rtdata/languages/Catala | 2 -- rtdata/languages/Chinese (Simplified) | 2 -- rtdata/languages/Chinese (Traditional) | 2 -- rtdata/languages/Czech | 2 -- rtdata/languages/Dansk | 2 -- rtdata/languages/Deutsch | 2 -- rtdata/languages/English (UK) | 2 -- rtdata/languages/English (US) | 2 -- rtdata/languages/Espanol | 2 -- rtdata/languages/Euskara | 2 -- rtdata/languages/Francais | 2 -- rtdata/languages/Greek | 2 -- rtdata/languages/Hebrew | 2 -- rtdata/languages/Italiano | 2 -- rtdata/languages/Japanese | 2 -- rtdata/languages/Latvian | 2 -- rtdata/languages/Magyar | 2 -- rtdata/languages/Nederlands | 2 -- rtdata/languages/Norsk BM | 2 -- rtdata/languages/Polish | 2 -- rtdata/languages/Polish (Latin Characters) | 2 -- rtdata/languages/Portugues (Brasil) | 2 -- rtdata/languages/Russian | 2 -- rtdata/languages/Serbian (Cyrilic Characters) | 2 -- rtdata/languages/Serbian (Latin Characters) | 2 -- rtdata/languages/Slovak | 2 -- rtdata/languages/Suomi | 2 -- rtdata/languages/Swedish | 2 -- rtdata/languages/Turkish | 2 -- 29 files changed, 58 deletions(-) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index fa7141087..5484f536c 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -1310,7 +1310,6 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2087,7 +2086,6 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_WAVELET_1;Level 1 !TP_WAVELET_2;Level 2 !TP_WAVELET_3;Level 3 diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index ff45df98b..bacc0ea58 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -1387,7 +1387,6 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2064,7 +2063,6 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index 47a604554..127fea254 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -972,7 +972,6 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2026,7 +2025,6 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 4be6bdc58..a6b19baa7 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -2197,7 +2197,6 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !HISTORY_MSG_273;CT - Color Balance SMH !HISTORY_MSG_392;W - Residual - Color Balance !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_DUALDEMOSAIC_CONTRAST;AMaZE+VNG4 - Contrast threshold !HISTORY_MSG_ICM_OUTPUT_PRIMARIES;Output - Primaries @@ -2298,4 +2297,3 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index 7658914f7..9edb918c8 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -967,7 +967,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2024,7 +2023,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index fc3374db6..62f258cea 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -790,7 +790,6 @@ HISTORY_MSG_485;(Objektivkorrektur)\nProfil HISTORY_MSG_486;(Objektivkorrektur)\nProfil - Kamera HISTORY_MSG_487;(Objektivkorrektur)\nProfil - Objektiv HISTORY_MSG_488;(Dynamikkompression) -HISTORY_MSG_489;(Dynamikkompression)\nSchwelle HISTORY_MSG_490;(Dynamikkompression)\nIntensität HISTORY_MSG_491;(Weißabgleich) HISTORY_MSG_492;(RGB-Kurven) @@ -2109,7 +2108,6 @@ TP_SOFTLIGHT_STRENGTH;Intensität TP_TM_FATTAL_AMOUNT;Intensität TP_TM_FATTAL_ANCHOR;Helligkeitsverschiebung TP_TM_FATTAL_LABEL;Dynamikkompression -TP_TM_FATTAL_THRESHOLD;Schwelle TP_VIBRANCE_AVOIDCOLORSHIFT;Farbverschiebungen vermeiden TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Hautfarbtöne diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index 6be9b3308..1d31bdd3f 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -811,7 +811,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2017,7 +2016,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones !TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE1;Red/Purple diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index f8ec04d1f..4e3829269 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -720,7 +720,6 @@ !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2007,7 +2006,6 @@ !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 7b0645778..b80fef3d8 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -1694,7 +1694,6 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2158,7 +2157,6 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_WAVELET_1;Level 1 !TP_WAVELET_2;Level 2 !TP_WAVELET_3;Level 3 diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index 06bfc9ae5..61de1ab54 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -968,7 +968,6 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2025,7 +2024,6 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 19a8ce8d4..15d8affc3 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -2217,7 +2217,6 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !HISTORY_MSG_273;CT - Color Balance SMH !HISTORY_MSG_392;W - Residual - Color Balance !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors !HISTORY_MSG_DUALDEMOSAIC_CONTRAST;AMaZE+VNG4 - Contrast threshold @@ -2286,4 +2285,3 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index cf9aef8ae..0641c6a49 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -967,7 +967,6 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2024,7 +2023,6 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index e8814d80f..0e6d6ddd3 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -968,7 +968,6 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2025,7 +2024,6 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index 1c24cc52e..53fda9e49 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1569,7 +1569,6 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2099,7 +2098,6 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_WAVELET_1;Level 1 !TP_WAVELET_2;Level 2 !TP_WAVELET_3;Level 3 diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index bc5fa66e0..28d1b6cfd 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -751,7 +751,6 @@ HISTORY_MSG_485;レンズ補正 HISTORY_MSG_486;レンズ補正 - カメラ HISTORY_MSG_487;レンズ補正 - レンズ HISTORY_MSG_488;ダイナミックレンジ圧縮 -HISTORY_MSG_489;DRC - しきい値 HISTORY_MSG_490;DRC - 量 HISTORY_MSG_491;ホワイトバランス HISTORY_MSG_492;RGBカーブ @@ -2037,7 +2036,6 @@ TP_SOFTLIGHT_STRENGTH;強さ TP_TM_FATTAL_AMOUNT;量 TP_TM_FATTAL_ANCHOR;アンカー TP_TM_FATTAL_LABEL;ダイナミックレンジ圧縮 -TP_TM_FATTAL_THRESHOLD;しきい値 TP_VIBRANCE_AVOIDCOLORSHIFT;色ずれを回避 TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;肌色トーン diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index 2a3ca3759..e8b87c19b 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -968,7 +968,6 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2025,7 +2024,6 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index 9bd662821..354c32910 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -1240,7 +1240,6 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2079,7 +2078,6 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones !TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE1;Red/Purple diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index 15f7b959b..45f1c5e3f 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -2103,7 +2103,6 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2302,5 +2301,4 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_WAVELET_CB_TOOLTIP;For strong values product color-toning by combining it or not with levels decomposition 'toning'\nFor low values you can change the white balance of the background (sky, ...) without changing that of the front plane, generally more contrasted diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index 958ed12ad..a4a6fc523 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -967,7 +967,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2024,7 +2023,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 3e853bf20..eeb945ef2 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1651,7 +1651,6 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2105,7 +2104,6 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_WAVELET_1;Level 1 !TP_WAVELET_2;Level 2 !TP_WAVELET_3;Level 3 diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index f847eb6b9..ed27de93b 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -1651,7 +1651,6 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2105,7 +2104,6 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_WAVELET_1;Level 1 !TP_WAVELET_2;Level 2 !TP_WAVELET_3;Level 3 diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index d8e5ccc1f..28822efbd 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -717,7 +717,6 @@ HISTORY_MSG_485;Correção de Lente HISTORY_MSG_486;Correção de Lente - Câmera HISTORY_MSG_487;Correção de Lente - Lente HISTORY_MSG_488;Compressão de Amplitude Dinâmica(DRC) -HISTORY_MSG_489;DRC - Limite HISTORY_MSG_490;DRC - Montante HISTORY_MSG_491;Balanço de Branco HISTORY_MSG_492;Curvas RGB @@ -2000,7 +1999,6 @@ TP_SOFTLIGHT_STRENGTH;Intensidade TP_TM_FATTAL_AMOUNT;Montante TP_TM_FATTAL_ANCHOR;Âncora TP_TM_FATTAL_LABEL;Compressão de Amplitude Dinâmica(DRC) -TP_TM_FATTAL_THRESHOLD;Limite TP_VIBRANCE_AVOIDCOLORSHIFT;Evite mudança de cor TP_VIBRANCE_CURVEEDITOR_SKINTONES;MM TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Tons cor de pele diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index 176d86511..424be3cbf 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -1633,7 +1633,6 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors !HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction @@ -2105,7 +2104,6 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_WAVELET_1;Level 1 !TP_WAVELET_2;Level 2 !TP_WAVELET_3;Level 3 diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 4b570abb7..8ea1f8fdb 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1545,7 +1545,6 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2100,7 +2099,6 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_WAVELET_1;Level 1 !TP_WAVELET_2;Level 2 !TP_WAVELET_3;Level 3 diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index a5d5094c6..1bc4057be 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -1545,7 +1545,6 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2100,7 +2099,6 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_WAVELET_1;Level 1 !TP_WAVELET_2;Level 2 !TP_WAVELET_3;Level 3 diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index 7e7fcdf86..dc0351823 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -1030,7 +1030,6 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2034,7 +2033,6 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index 6e32cea61..adbd43d82 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -969,7 +969,6 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2025,7 +2024,6 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index 510d6696d..e491c3c8a 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1906,7 +1906,6 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2230,7 +2229,6 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_WAVELET_CBENAB;Toning and Color Balance !TP_WAVELET_CB_TOOLTIP;For strong values product color-toning by combining it or not with levels decomposition 'toning'\nFor low values you can change the white balance of the background (sky, ...) without changing that of the front plane, generally more contrasted !TP_WAVELET_CHRO_TOOLTIP;Sets the wavelet level which will be the threshold between saturated and pastel colors.\n1-x: saturated\nx-9: pastel\n\nIf the value exceeds the amount of wavelet levels you are using then it will be ignored. diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index 1ab598c2c..79fa108c0 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -968,7 +968,6 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_486;Lens Correction - Camera !HISTORY_MSG_487;Lens Correction - Lens !HISTORY_MSG_488;Dynamic Range Compression -!HISTORY_MSG_489;DRC - Threshold !HISTORY_MSG_490;DRC - Amount !HISTORY_MSG_491;White Balance !HISTORY_MSG_492;RGB Curves @@ -2024,7 +2023,6 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_TM_FATTAL_AMOUNT;Amount !TP_TM_FATTAL_ANCHOR;Anchor !TP_TM_FATTAL_LABEL;Dynamic Range Compression -!TP_TM_FATTAL_THRESHOLD;Threshold !TP_VIBRANCE_AVOIDCOLORSHIFT;Avoid color shift !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones From fb0d231cb2cb288ddb6ff0683839e2e86e8cf855 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 3 Nov 2018 14:26:39 +0100 Subject: [PATCH 20/20] use double precision gaussian blur if sigma >= 25, #4928 --- rtengine/gauss.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/gauss.cc b/rtengine/gauss.cc index ab080a3c4..b7de67851 100644 --- a/rtengine/gauss.cc +++ b/rtengine/gauss.cc @@ -1143,7 +1143,7 @@ template void gaussianBlurImpl(T** src, T** dst, const int W, const int { static constexpr auto GAUSS_SKIP = 0.25; static constexpr auto GAUSS_3X3_LIMIT = 0.6; - static constexpr auto GAUSS_DOUBLE = 70.0; + static constexpr auto GAUSS_DOUBLE = 25.0; if(buffer) { // special variant for very large sigma, currently only used by retinex algorithm