Issue 1680: "FtblockDN.cc RGB_denoise": this patch add a Performance tab to limit the number of core used for RGB denoising tool
This commit is contained in:
parent
d59fab9f17
commit
d6e42edcc6
@ -712,6 +712,8 @@ PREFERENCES_PROFILESAVECACHE;Verarbeitungsparameter im Zwischenspeicher speicher
|
||||
PREFERENCES_PROFILESAVEINPUT;Verarbeitungsparameter zusammen mit Datei speichern (Sidecar)
|
||||
PREFERENCES_PROPERTY;Eigenschaft
|
||||
PREFERENCES_PSPATH;Adobe Photoshop Installationsverzeichnis
|
||||
PREFERENCES_RGBDTL_LABEL;Max. Anzahl Threads für Rauschminderung
|
||||
PREFERENCES_RGBDTL_TOOLTIP;Die Rauschminderung benötigt mindestens 128MB RAM für ein 10 Megapixel-Bild oder 512MB für ein 40 Megapixel-Bild, und zusätzlich 128MB RAM pro Thread. Je mehr Threads parallel ablaufen, desto schneller ist die Berechnung. Bei Einstellung "0" werden so viele Threads wie möglich benutzt.
|
||||
PREFERENCES_SELECTFONT;Schriftart
|
||||
PREFERENCES_SELECTICCDIRDLG;Wähle ICC-Profile-Verzeichnis...
|
||||
PREFERENCES_SELECTLANG;Sprache
|
||||
@ -738,6 +740,7 @@ PREFERENCES_TAB_COLORMGR;Farbmanagement
|
||||
PREFERENCES_TAB_GENERAL;Allgemein
|
||||
PREFERENCES_TAB_IMPROC;Bildbearbeitung
|
||||
PREFERENCES_TAB_OUTPUT;Ausgabe
|
||||
PREFERENCES_TAB_PERFORMANCE;Performance
|
||||
PREFERENCES_TAB_SOUND;Systemklänge
|
||||
PREFERENCES_THUMBSIZE;Größe der Vorschau
|
||||
PREFERENCES_TP_LABEL;Werkzeugbereich:
|
||||
|
@ -778,6 +778,8 @@ PREFERENCES_PROFILESAVECACHE;Enregistrer la paramètres de traitement dans le Ca
|
||||
PREFERENCES_PROFILESAVEINPUT;Enregistrer la paramètres de traitement accolé au fichier d'entrée
|
||||
PREFERENCES_PROPERTY;Propriété
|
||||
PREFERENCES_PSPATH;Dossier d'installation d'Adobe Photoshop
|
||||
PREFERENCES_RGBDTL_LABEL;Nombre maximum d'unités de calcul pour la Réduction du bruit
|
||||
PREFERENCES_RGBDTL_TOOLTIP;La réduction du bruit nécessite un minimum d'à peu près 128Mo de RAM pour une image de 10MPix ou 512Mo pour une image de 40MPix, ainsi que 128Mo de RAM supplémentaire par unité de calcul. Plus il y aura d'unité de calcul travaillant en parallèle, plus ce sera rapide. Laissez la valeur à "0" pour utiliser automatiquement autant d'unité de calcul que possible.
|
||||
PREFERENCES_SELECTFONT;Police de caractère
|
||||
PREFERENCES_SELECTICCDIRDLG;Choix du dossier des profils ICC...
|
||||
PREFERENCES_SELECTLANG;Choix de la langue
|
||||
@ -804,6 +806,7 @@ PREFERENCES_TAB_COLORMGR;Gestion des couleurs
|
||||
PREFERENCES_TAB_GENERAL;Général
|
||||
PREFERENCES_TAB_IMPROC;Traitement de l'image
|
||||
PREFERENCES_TAB_OUTPUT;Options de sortie
|
||||
PREFERENCES_TAB_PERFORMANCE;Performance
|
||||
PREFERENCES_TAB_SOUND;Sons
|
||||
PREFERENCES_THUMBSIZE;Tailles des vignettes
|
||||
PREFERENCES_TP_LABEL;Panneau des outils:
|
||||
|
@ -774,6 +774,8 @@ PREFERENCES_PROFILESAVECACHE;Save processing profile to the cache
|
||||
PREFERENCES_PROFILESAVEINPUT;Save processing profile next to the input file
|
||||
PREFERENCES_PROPERTY;Property
|
||||
PREFERENCES_PSPATH;Adobe Photoshop installation directory
|
||||
PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction
|
||||
PREFERENCES_RGBDTL_TOOLTIP;Noise Reduction requires a baseline of about 128MB RAM for a 10MPix image or 512MB for a 40MPix image, and additionally 128MB RAM per thread. The more threads run in parallel, the faster the computation. Leave the setting at "0" to automatically use as many threads as possible.
|
||||
PREFERENCES_SELECTFONT;Select font
|
||||
PREFERENCES_SELECTICCDIRDLG;Select Color Profile Directory...
|
||||
PREFERENCES_SELECTLANG;Select language
|
||||
@ -800,6 +802,7 @@ PREFERENCES_TAB_COLORMGR;Color Management
|
||||
PREFERENCES_TAB_GENERAL;General
|
||||
PREFERENCES_TAB_IMPROC;Image Processing
|
||||
PREFERENCES_TAB_OUTPUT;Output Options
|
||||
PREFERENCES_TAB_PERFORMANCE;Performance
|
||||
PREFERENCES_TAB_SOUND;Sounds
|
||||
PREFERENCES_THUMBSIZE;Thumbnail Size
|
||||
PREFERENCES_TP_LABEL;Tool panel:
|
||||
|
@ -227,7 +227,7 @@ namespace rtengine {
|
||||
// Calculate number of tiles. If less than omp_get_max_threads(), then limit num_threads to number of tiles
|
||||
int numtiles = numtiles_W * numtiles_H;
|
||||
int numthreads = MIN(numtiles,omp_get_max_threads());
|
||||
//if(options.RgbDenoiseThreadLimit > 0) numthreads = MIN(numthreads,options.RgbDenoiseThreadLimit);
|
||||
if(options.rgbDenoiseThreadLimit > 0) numthreads = MIN(numthreads,options.rgbDenoiseThreadLimit);
|
||||
#pragma omp parallel num_threads(numthreads)
|
||||
#endif
|
||||
{
|
||||
|
@ -303,7 +303,9 @@ void Options::setDefaults () {
|
||||
histogramPosition = 2;
|
||||
histogramBar = true;
|
||||
histogramFullMode = false;
|
||||
|
||||
|
||||
rgbDenoiseThreadLimit = 0;
|
||||
|
||||
showProfileSelector = true;
|
||||
FileBrowserToolbarSingleRow = false;
|
||||
hideTPVScrollbar = false;
|
||||
@ -603,6 +605,10 @@ if (keyFile.has_group ("Clipping Indication")) {
|
||||
if (keyFile.has_key ("Clipping Indication", "BlinkClipped")) blinkClipped = keyFile.get_boolean ("Clipping Indication", "BlinkClipped");
|
||||
}
|
||||
|
||||
if (keyFile.has_group ("Performance")) {
|
||||
if (keyFile.has_key ("Performance", "RgbDenoiseThreadLimit")) rgbDenoiseThreadLimit = keyFile.get_integer ("Performance", "RgbDenoiseThreadLimit");
|
||||
}
|
||||
|
||||
if (keyFile.has_group ("GUI")) {
|
||||
if (keyFile.has_key ("GUI", "Font")) font = keyFile.get_string ("GUI", "Font");
|
||||
if (keyFile.has_key ("GUI", "WindowWidth")) windowWidth = keyFile.get_integer ("GUI", "WindowWidth");
|
||||
@ -820,6 +826,8 @@ int Options::saveToFile (Glib::ustring fname) {
|
||||
keyFile.set_integer ("Clipping Indication", "ShadowThreshold", shadowThreshold);
|
||||
keyFile.set_boolean ("Clipping Indication", "BlinkClipped", blinkClipped);
|
||||
|
||||
keyFile.set_integer ("Performance", "RgbDenoiseThreadLimit", rgbDenoiseThreadLimit);
|
||||
|
||||
keyFile.set_string ("Output", "Format", saveFormat.format);
|
||||
keyFile.set_integer ("Output", "JpegQuality", saveFormat.jpegQuality);
|
||||
keyFile.set_integer ("Output", "JpegSubSamp", saveFormat.jpegSubSamp);
|
||||
|
@ -194,6 +194,9 @@ class Options {
|
||||
bool UseIconNoText;
|
||||
int whiteBalanceSpotSize;
|
||||
|
||||
// Performance options
|
||||
int rgbDenoiseThreadLimit; // maximum number of threads for the denoising tool ; 0 = use the maximum available
|
||||
|
||||
bool menuGroupRank;
|
||||
bool menuGroupLabel;
|
||||
bool menuGroupFileOperations;
|
||||
|
@ -82,6 +82,7 @@ Preferences::Preferences (RTWindow *rtwindow):parent(rtwindow) {
|
||||
nb->append_page (*getFileBrowserPanel(), M("PREFERENCES_TAB_BROWSER"));
|
||||
nb->append_page (*getColorManagementPanel(),M("PREFERENCES_TAB_COLORMGR"));
|
||||
nb->append_page (*getBatchProcPanel(), M("PREFERENCES_BATCH_PROCESSING"));
|
||||
nb->append_page (*getPerformancePanel(), M("PREFERENCES_TAB_PERFORMANCE"));
|
||||
// Sounds only on Windows and Linux
|
||||
#if defined(WIN32) || defined(__linux__)
|
||||
nb->append_page (*getSoundPanel(), M("PREFERENCES_TAB_SOUND"));
|
||||
@ -395,6 +396,32 @@ Gtk::Widget* Preferences::getProcParamsPanel () {
|
||||
return mvbpp;
|
||||
}
|
||||
|
||||
Gtk::Widget* Preferences::getPerformancePanel () {
|
||||
Gtk::VBox* mainContainer = Gtk::manage( new Gtk::VBox () );
|
||||
mainContainer->set_spacing(4);
|
||||
|
||||
Gtk::HBox* threadLimitHB = Gtk::manage( new Gtk::HBox () );
|
||||
threadLimitHB->set_border_width(4);
|
||||
threadLimitHB->set_spacing(4);
|
||||
threadLimitHB->set_tooltip_text(M("PREFERENCES_RGBDTL_TOOLTIP"));
|
||||
Gtk::Label* RGBDTLl = Gtk::manage( new Gtk::Label (M("PREFERENCES_RGBDTL_LABEL") + ":", Gtk::ALIGN_LEFT));
|
||||
rgbDenoiseTreadLimitSB = Gtk::manage( new Gtk::SpinButton () );
|
||||
rgbDenoiseTreadLimitSB->set_digits (0);
|
||||
rgbDenoiseTreadLimitSB->set_increments (1, 5);
|
||||
rgbDenoiseTreadLimitSB->set_max_length(2); // Will this be sufficient? :)
|
||||
int maxThreadNumber = 10;
|
||||
#ifdef _OPENMP
|
||||
maxThreadNumber = omp_get_max_threads();
|
||||
#endif
|
||||
rgbDenoiseTreadLimitSB->set_range (0, maxThreadNumber);
|
||||
threadLimitHB->pack_start (*RGBDTLl, Gtk::PACK_SHRINK, 0);
|
||||
threadLimitHB->pack_end (*rgbDenoiseTreadLimitSB, Gtk::PACK_SHRINK, 0);
|
||||
|
||||
mainContainer->pack_start(*threadLimitHB, Gtk::PACK_SHRINK, 4);
|
||||
|
||||
return mainContainer;
|
||||
}
|
||||
|
||||
Gtk::Widget* Preferences::getColorManagementPanel () {
|
||||
|
||||
Gtk::VBox* mvbcm = Gtk::manage (new Gtk::VBox ());
|
||||
@ -1134,6 +1161,8 @@ void Preferences::storePreferences () {
|
||||
moptions.overwriteOutputFile = chOverwriteOutputFile->get_active ();
|
||||
moptions.UseIconNoText = ckbUseIconNoText->get_active();
|
||||
|
||||
moptions.rgbDenoiseThreadLimit = rgbDenoiseTreadLimitSB->get_value_as_int();
|
||||
|
||||
// Sounds only on Windows and Linux
|
||||
#if defined(WIN32) || defined(__linux__)
|
||||
moptions.sndEnable = ckbSndEnable->get_active ();
|
||||
@ -1250,6 +1279,8 @@ void Preferences::fillPreferences () {
|
||||
ckbHideTPVScrollbar->set_active(moptions.hideTPVScrollbar);
|
||||
ckbUseIconNoText->set_active(moptions.UseIconNoText);
|
||||
|
||||
rgbDenoiseTreadLimitSB->set_value(moptions.rgbDenoiseThreadLimit);
|
||||
|
||||
//darkFrameDir->set_filename( moptions.rtSettings.darkFramesPath );
|
||||
//updateDFinfos();
|
||||
darkFrameDir->set_current_folder( moptions.rtSettings.darkFramesPath );
|
||||
|
@ -111,6 +111,8 @@ class Preferences : public Gtk::Dialog {
|
||||
Gtk::Button* delExt;
|
||||
Gtk::CheckButton* overlayedFileNames;
|
||||
|
||||
Gtk::SpinButton* rgbDenoiseTreadLimitSB;
|
||||
|
||||
Gtk::CheckButton* ckbmenuGroupRank;
|
||||
Gtk::CheckButton* ckbmenuGroupLabel;
|
||||
Gtk::CheckButton* ckbmenuGroupFileOperations;
|
||||
@ -172,6 +174,7 @@ class Preferences : public Gtk::Dialog {
|
||||
Gtk::Widget* getFileBrowserPanel ();
|
||||
Gtk::Widget* getGeneralPanel ();
|
||||
Gtk::Widget* getBatchProcPanel ();
|
||||
Gtk::Widget* getPerformancePanel ();
|
||||
Gtk::Widget* getSoundPanel ();
|
||||
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user