Commit 5d9c9538 authored by David Bremner's avatar David Bremner

Merge tag 'release-2.4.2' into upstream

darktable 2.4.2 released
parents 04563554 6305f836
......@@ -33,7 +33,7 @@ notifications:
language: generic
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull darktable/darktable; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then travis_retry travis_wait 10 docker pull darktable/darktable; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew tap Homebrew/bundle && cd .ci && brew bundle --verbose; fi
env:
......
......@@ -77,6 +77,8 @@ option(BUILD_RS_IDENTIFY "Build the darktable-rs-identify debug aid" ON)
option(BUILD_SSE2_CODEPATHS "(EXPERIMENTAL OPTION, DO NOT DISABLE) Building SSE2-optimized codepaths" ON)
option(VALIDATE_APPDATA_FILE "Use appstream-util (if found) to validate the .appdata file" OFF)
option(BUILD_TESTS "Build tests in src/tests/, runnable from the build/ directory" OFF)
option(BUILD_BATTERY_INDICATOR "Add an icon to the top toolbar showing the state of a laptop battery" OFF)
option(BUILD_MSYS2_INSTALL "Build an MSYS2 version of the install, aka for Windows platform, but without dependency installs" OFF)
if(USE_OPENCL)
option(TESTBUILD_OPENCL_PROGRAMS "Test-compile opencl programs (needs llvm and clang 3.9+)" ON)
......@@ -167,6 +169,9 @@ if(WIN32)
set(BUILD_CMSTEST OFF)
set(BUILD_PRINT OFF)
set(TESTBUILD_OPENCL_PROGRAMS OFF)
if(BUILD_MSYS2_INSTALL)
add_definitions(-DMSYS2_INSTALL)
endif()
endif(WIN32)
......
we’re proud to announce the first bugfix release for the 2.4 series of darktable, 2.4.1!
we’re proud to announce the second bugfix release for the 2.4 series of darktable, 2.4.2!
the github release is here: [https://github.com/darktable-org/darktable/releases/tag/release-2.4.1](https://github.com/darktable-org/darktable/releases/tag/release-2.4.1).
the github release is here: [https://github.com/darktable-org/darktable/releases/tag/release-2.4.2](https://github.com/darktable-org/darktable/releases/tag/release-2.4.2).
as always, please don't use the autogenerated tarball provided by github, but only our tar.xz. the checksums are:
```
$ sha256sum darktable-2.4.1.tar.xz
??? darktable-2.4.1.tar.xz
$ sha256sum darktable-2.4.1.dmg
??? darktable-2.4.1.dmg
$ sha256sum darktable-2.4.1-win64.exe
??? darktable-2.4.1-win64.exe
$ sha256sum darktable-2.4.2.tar.xz
??? darktable-2.4.2.tar.xz
$ sha256sum darktable-2.4.2.dmg
??? darktable-2.4.2.dmg
$ sha256sum darktable-2.4.2-win64.exe
??? darktable-2.4.2-win64.exe
$ sha256sum darktable-2.4.2-win64.zip
??? darktable-2.4.2-win64.zip
```
when updating from the currently stable 2.2.x series, please bear in mind that your edits will be preserved during this process, but it will not be possible to downgrade from 2.4 to 2.2.x any more.
#### Important note: to make sure that darktable can keep on supporting the raw file format for your camera, *please* read [this post](https://discuss.pixls.us/t/raw-samples-wanted/5420?u=lebedevri) on how/what raw samples you can contribute to ensure that we have the *full* raw sample set for your camera under CC0 license!
and the changelog as compared to 2.4.0 can be found below.
and the changelog as compared to 2.4.1 can be found below.
## New Features
- Allow to select the GUI language in the preferences
- Add a filter rule to the collect module to find locally copied images
- Add favourite toggle to darkroom modules' right click popup
- Allow blending/masking in the hot pixels module
- Add keyboard shortcuts to zoom and pan an image in darkroom. Panning uses the arrow keys, zooming defaults to `ctrl-` and `ctrl+`. Use `alt` and `ctrl` to change the step size of panning.
- Some minor speedups in the grain module
- Handling stdout on Windows: do not redirect stdout for simple command line arguments (`--help` and `--version`)
- On Windows, show the location of the log file in the help message
- Enable searching in the more modules list – click into the list to give focus to it, then start typing. The default GTK shortcut `ctrl-f` doesn't work as it's used for filmstrip already
- Add a debug print when compiling OpenCL kernels
- Add presets to location search in map mode
- Add timestamps to the output of `-d` command line switches
- Add a compression level slider to the TIFF export module
- Add native binary NetPNM loading, without using GraphicsMagick
- Add a battery indicator for people running darktable on a laptop. This is not very portable code and disabled by default
- Allow to use /? to show the help message on Windows
## Bugfixes
- Use the configured overwrite color profile when exporting from Lua – this broke GIMP integration
- Support presets with `<` in their name
- Fix export to non-existing path with `\` as the path separator on Windows
- Don't insist on the db being locked when it doesn't even exist
- Don't touch the mix slider when resetting the curve in color zones
- Fix a bug in the exposure module that would only allow corrections of up to 10 stops
- Fix custom shortcuts with `shift` modifier
- Properly ellipsize text in the recently used collections list
- Fix exported galeries with filenames containing a `'`
- Fix finding mipmaps cache folder in `purge_from_cache.sh` script
- Fix a crash in the recently used collections list due to a broken config file
- Set the sqlite threading mode to Serialized
- Fix old export presets using OpenEXR
- Fix building with clang on Windows
## Changed Dependencies
- iso-codes version 3.66 or newer is suggested for a nicer list of translations in the preferences.
## Camera support, compared to 2.4.0
- Turn off smooth scrolling for X11/Quartz. That might help with oversensitive scrolling
- Fix reading and writing of TIFFs with non-ASCII filenames on Windows
- Ellipsize background job labels when too long
- Hard code D50 white point when exporting to OpenEXR
- Add tootips to the haze removal module
- Fix a crash when changing lenses while tethering
- Fix incorrect Atom CPU detection on Windows
- Revised performance configuration
- Don't overlay the colorbalance sliders on the left for a cleaner look
- Honor local copy in copy export format
- Make trashing of files on Windows silent
- Fix string termination override on memmove
- Fix a use after free and some memleaks
- Fix a crash in PDF export
- Fix the min color picker
- Don't hardcode '/' in OpenCL paths on Windows
## Camera support, compared to 2.4.1
#### Warning: support for Nikon NEF 'lossy after split' raws was unintentionally broken due to the lack of such samples. Please see [this post](https://discuss.pixls.us/t/nikon-a-specific-raw-sample-wanted/5483?u=lebedevri) for more details. If you have affected raws, please contribute samples!
### Base Support
- Panasonic DC-G9 (4:3)
- Paralenz Dive Camera (chdk)
- Pentax KP
- Sjcam SJ6 LEGEND (chdk-b, chdk-c)
### White Balance Presets
- Leaf Credo 40
- Nikon D3400
- Olympus E-M1MarkII
- Panasonic DC-G9
- Sony ILCE-7RM3
- Canon PowerShot G1 X Mark III
- Panasonic DMC-FZ2000 (3:2)
- Panasonic DMC-FZ2500 (3:2)
- Panasonic DMC-ZS100 (3:2)
- Sony DSC-RX0
- Sony DSC-RX10M4
### Noise Profiles
- Canon EOS 750D
- Canon EOS Kiss X8i
- Canon EOS Rebel T6i
- Canon EOS 77D
- Canon EOS 9000D
- Canon EOS M100
- Canon EOS M6
- Sony DSC-RX100M4
- YI TECHNOLOGY M1
- Canon EOS 200D
- Canon EOS Kiss X9
- Canon EOS Rebel SL2
- Canon EOS 760D
- Canon EOS 8000D
- Canon EOS Rebel T6s
- Canon PowerShot G1 X Mark II
- Canon PowerShot G9 X
- Fujifilm X100F
- Nikon D850
- Panasonic DC-G9
- Panasonic DMC-GF6
- Panasonic DMC-LX10
- Panasonic DMC-LX15
- Panasonic DMC-LX9
- Panasonic DMC-TZ70
- Panasonic DMC-TZ71
- Panasonic DMC-ZS50
## Translations
- Czech
- Dutch
- French
- German
- Hebrew
- Hungarian
- Italian
- Slovenian
......@@ -29,7 +29,7 @@ endmacro()
function(InstallDependencyFiles)
if (WIN32)
if (WIN32 AND NOT BUILD_MSYS2_INSTALL)
# Dependency files (files which needs to be installed alongside the darktable binaries)
# Please note these are ONLY the files which are not geing detected by fixup_bundle()
# must be in the bin directory
......@@ -116,7 +116,7 @@ if (WIN32)
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION bin COMPONENT DTApplication)
# TODO: Add auxilliary files for openssl?
# TODO: Add auxiliary files for openssl?
# Add pixbuf loader libraries
# FILE(GLOB_RECURSE GDK_PIXBUF "${MINGW_PATH}/../lib/gdk-pixbuf-2.0/2.10.0/loaders/*.dll" )
......@@ -160,8 +160,8 @@ if (WIN32)
# Add GraphicsMagick libraries
install(DIRECTORY
"${MINGW_PATH}/../lib/GraphicsMagick-1.3.27/modules-Q8/coders"
DESTINATION lib/GraphicsMagick-1.3.27/modules-Q8/
"${MINGW_PATH}/../lib/GraphicsMagick-1.3.28/modules-Q8/coders"
DESTINATION lib/GraphicsMagick-1.3.28/modules-Q8/
COMPONENT DTApplication
FILES_MATCHING PATTERN "*"
PATTERN "*.a" EXCLUDE
......@@ -198,6 +198,6 @@ if (WIN32)
endforeach()
endif(ISO_CODES_FOUND)
endif(WIN32)
endif(WIN32 AND NOT BUILD_MSYS2_INSTALL)
endfunction()
......@@ -1315,6 +1315,13 @@
<shortdescription/>
<longdescription/>
</dtconfig>
<dtconfig>
<name>plugins/imageio/format/tiff/compresslevel</name>
<type>int</type>
<default>5</default>
<shortdescription/>
<longdescription/>
</dtconfig>
<dtconfig>
<name>plugins/imageio/format/png/bpp</name>
<type>int</type>
......@@ -1736,4 +1743,11 @@
<shortdescription>the multiplier that is applied to any slider precise value change</shortdescription>
<longdescription>any slider value change will be multiplied by this number, when changing slider while holding CTRL modifier</longdescription>
</dtconfig>
<dtconfig>
<name>performance_configuration_version_completed</name>
<type>int</type>
<default>0</default>
<shortdescription>version of the last completed performance configuration</shortdescription>
<longdescription>what was the last performance configuration which has been completed</longdescription>
</dtconfig>
</dtconfiglist>
This diff is collapsed.
......@@ -278,7 +278,7 @@ TYPEDEF_HIDES_STRUCT = NO
# For small to medium size projects (<1000 input files) the default value is
# probably good enough. For larger projects a too small cache size can cause
# doxygen to be busy swapping symbols to and from disk most of the time
# causing a significant performance penality.
# causing a significant performance penalty.
# If the system has enough physical memory increasing the cache will improve the
# performance by keeping more symbols in memory. Note that the value works on
# a logarithmic scale so increasing the size by one will roughly double the
......
IF(WIN32)
IF(WIN32 AND NOT BUILD_MSYS2_INSTALL)
set(plugin_dest_dir lib/darktable/plugins)
set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/darktable.exe") # paths to executables
......@@ -59,4 +59,4 @@ IF(WIN32)
endif()
ENDIF(WIN32)
ENDIF(WIN32 AND NOT BUILD_MSYS2_INSTALL)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: darktable 1.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-11 07:57+0100\n"
"PO-Revision-Date: 2018-01-21 16:21+0100\n"
"PO-Revision-Date: 2018-02-10 00:55+0100\n"
"Last-Translator: Maurizio Paglia <mpaglia0@gmail.com>\n"
"Language-Team: Italian <>\n"
"Language: it_IT\n"
......@@ -1134,7 +1134,7 @@ msgstr "non copiato localmente"
#: ../src/common/collection.c:1249
#, c-format
msgid "%d image of %d (#%d) in current collection is selected"
msgstr "selezionata l'immagine %d di %d (#%d) nella collezione attuale"
msgstr "selezionata %d immagine di %d (#%d) nella collezione attuale"
#: ../src/common/collection.c:1255
#, c-format
......@@ -10421,7 +10421,7 @@ msgid ""
"doubleclick to detach"
msgstr ""
"Etichette allegate,\n"
"doppio click per toglierle"
"doppio click per rimuoverle"
#: ../src/libs/tagging.c:510
msgid "attach"
......@@ -10433,11 +10433,11 @@ msgstr "Allega etichetta alle immagini selezionate"
#: ../src/libs/tagging.c:516
msgid "detach"
msgstr "Togli"
msgstr "Rimuovi"
#: ../src/libs/tagging.c:518
msgid "detach tag from all selected images"
msgstr "Togli etichetta dalle immagini selezionate"
msgstr "Rimuovi etichetta dalle immagini selezionate"
#: ../src/libs/tagging.c:530
msgid "enter tag name"
......@@ -10522,7 +10522,7 @@ msgstr "Attiva etichetta viola delle immagini selezionate"
#: ../src/libs/tools/colorlabels.c:76
msgid "clear all labels of selected images"
msgstr "Toglie tutte le etichette dalle immagini selezionate"
msgstr "Rimuove tutte le etichette dalle immagini selezionate"
#. setup color label accelerators
#: ../src/libs/tools/colorlabels.c:107 ../src/libs/tools/filmstrip.c:192
......
This diff is collapsed.
......@@ -39,6 +39,7 @@ FILE(GLOB SOURCE_FILES
"common/imageio_png.c"
"common/imageio_module.c"
"common/imageio_pfm.c"
"common/imageio_pnm.c"
"common/imageio_rgbe.c"
"common/imageio_tiff.c"
"common/imageio_gm.c"
......
......@@ -582,7 +582,7 @@ void dt_bauhaus_init()
gtk_widget_add_events(darktable.bauhaus->popup_area, GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
| GDK_KEY_PRESS_MASK | GDK_LEAVE_NOTIFY_MASK
| GDK_SCROLL_MASK | GDK_SMOOTH_SCROLL_MASK);
| darktable.gui->scroll_mask);
g_signal_connect(G_OBJECT(darktable.bauhaus->popup_window), "show", G_CALLBACK(dt_bauhaus_window_show), (gpointer)NULL);
g_signal_connect(G_OBJECT(darktable.bauhaus->popup_area), "draw", G_CALLBACK(dt_bauhaus_popup_draw),
......@@ -644,14 +644,14 @@ static void dt_bauhaus_widget_init(dt_bauhaus_widget_t *w, dt_iop_module_t *self
// no quad icon and no toggle button:
w->quad_paint = 0;
w->quad_paint_data = NULL;
w->quad_toggle = 0;
w->combo_populate = NULL;
gtk_widget_set_size_request(GTK_WIDGET(w), -1, get_line_height());
gtk_widget_add_events(GTK_WIDGET(w), GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
| GDK_LEAVE_NOTIFY_MASK | GDK_SCROLL_MASK
| GDK_SMOOTH_SCROLL_MASK);
| GDK_LEAVE_NOTIFY_MASK | darktable.gui->scroll_mask);
g_signal_connect(G_OBJECT(w), "draw", G_CALLBACK(dt_bauhaus_draw), NULL);
......@@ -845,11 +845,12 @@ const char* dt_bauhaus_widget_get_label(GtkWidget *widget)
return w->label;
}
void dt_bauhaus_widget_set_quad_paint(GtkWidget *widget, dt_bauhaus_quad_paint_f f, int paint_flags)
void dt_bauhaus_widget_set_quad_paint(GtkWidget *widget, dt_bauhaus_quad_paint_f f, int paint_flags, void *paint_data)
{
dt_bauhaus_widget_t *w = DT_BAUHAUS_WIDGET(widget);
w->quad_paint = f;
w->quad_paint_flags = paint_flags;
w->quad_paint_data = paint_data;
}
// make this quad a toggle button:
......@@ -1235,9 +1236,10 @@ static void dt_bauhaus_draw_quad(dt_bauhaus_widget_t *w, cairo_t *cr)
{
cairo_save(cr);
set_grid_color(cr, gtk_widget_is_sensitive(GTK_WIDGET(w)));
w->quad_paint(cr, width - height - 1, -1, height + 2, get_label_font_size() + 2, w->quad_paint_flags);
w->quad_paint(cr, width - height - 1, -1, height + 2, get_label_font_size() + 2, w->quad_paint_flags,
w->quad_paint_data);
set_indicator_color(cr, gtk_widget_is_sensitive(GTK_WIDGET(w)));
w->quad_paint(cr, width - height, 0, height, get_label_font_size(), w->quad_paint_flags);
w->quad_paint(cr, width - height, 0, height, get_label_font_size(), w->quad_paint_flags, w->quad_paint_data);
cairo_restore(cr);
}
else
......
......@@ -119,7 +119,7 @@ typedef union dt_bauhaus_data_t
typedef struct dt_bauhaus_widget_t DtBauhausWidget;
typedef struct dt_bauhaus_widget_class_t DtBauhausWidgetClass;
typedef void (*dt_bauhaus_quad_paint_f)(cairo_t *cr, gint x, gint y, gint w, gint h, gint flags);
typedef void (*dt_bauhaus_quad_paint_f)(cairo_t *cr, gint x, gint y, gint w, gint h, gint flags, void *data);
// our new widget and its private members, inheriting from drawing area:
typedef struct dt_bauhaus_widget_t
......@@ -136,6 +136,8 @@ typedef struct dt_bauhaus_widget_t
dt_bauhaus_quad_paint_f quad_paint;
// minimal modifiers for paint function.
int quad_paint_flags;
// data for the paint callback
void *quad_paint_data;
// quad is a toggle button?
int quad_toggle;
......@@ -229,7 +231,7 @@ void dt_bauhaus_cleanup();
void dt_bauhaus_widget_set_label(GtkWidget *w, const char *section, const char *label);
const char* dt_bauhaus_widget_get_label(GtkWidget *w);
// attach a custom painted quad to the space at the right side (overwriting the default icon if any):
void dt_bauhaus_widget_set_quad_paint(GtkWidget *w, dt_bauhaus_quad_paint_f f, int paint_flags);
void dt_bauhaus_widget_set_quad_paint(GtkWidget *w, dt_bauhaus_quad_paint_f f, int paint_flags, void *paint_data);
// make this quad a toggle button:
void dt_bauhaus_widget_set_quad_toggle(GtkWidget *w, int toggle);
......
......@@ -91,7 +91,7 @@ static int strinc(char *label, size_t buffer_size)
else if(c == label)
{
if(label_len + 1 >= buffer_size) return 0;
memmove(c + 1, c, label_len);
memmove(c + 1, c, label_len + 1);
*c = carry_over;
}
c--;
......
......@@ -532,7 +532,7 @@ static void print_patches(dt_lut_t *self, FILE *fd, GList *patch_names)
continue;
}
float source_Lab[3], reference_Lab[3];
float source_Lab[3] = { 0.0 }, reference_Lab[3] = { 0.0 };
get_Lab_from_box(source_patch, source_Lab);
get_Lab_from_box(reference_patch, reference_Lab);
......@@ -677,7 +677,7 @@ static void add_patches_to_array(dt_lut_t *self, GList *patch_names, int *N, int
continue;
}
float source_Lab[3], reference_Lab[3];
float source_Lab[3] = { 0.0 }, reference_Lab[3] = { 0.0 };
get_Lab_from_box(source_patch, source_Lab);
get_Lab_from_box(reference_patch, reference_Lab);
......@@ -1323,7 +1323,7 @@ static void update_table(dt_lut_t *self)
box_t *box = (box_t *)g_hash_table_lookup(self->chart->box_table, name);
if(box)
{
float Lab[3] = { 0 };
float Lab[3] = { 0.0 };
char *s_Lab_in, *s_RGB_in, *s_deltaE_1976, *s_deltaE_2000;
float deltaE_1976 = 0.0, deltaE_2000 = 0.0;
......@@ -1332,7 +1332,7 @@ static void update_table(dt_lut_t *self)
box_t *patch = (box_t *)g_hash_table_lookup(self->picked_source_patches, name);
if(patch)
{
float in_Lab[3];
float in_Lab[3] = { 0.0 };
get_Lab_from_box(patch, in_Lab);
s_RGB_in = g_strdup_printf("%d; %d; %d", (int)(patch->rgb[0] * 255 + 0.5),
(int)(patch->rgb[1] * 255 + 0.5), (int)(patch->rgb[2] * 255 + 0.5));
......
This diff is collapsed.
......@@ -162,15 +162,15 @@ void dt_printers_abort_discovery(void)
void dt_printers_discovery(void (*cb)(dt_printer_info_t *pr, void *user_data), void *user_data)
{
dt_prtctl_t *prtctl = g_malloc0(sizeof(dt_prtctl_t));
prtctl->cb = cb;
prtctl->user_data = user_data;
// asynchronously checks for available printers
dt_job_t *job = dt_control_job_create(&_detect_printers_callback, "detect connected printers");
if(job)
{
dt_prtctl_t *prtctl = g_malloc0(sizeof(dt_prtctl_t));
prtctl->cb = cb;
prtctl->user_data = user_data;
dt_control_job_set_params(job, prtctl, g_free);
dt_control_add_job(darktable.control, DT_JOB_QUEUE_SYSTEM_BG, job);
}
......
......@@ -114,13 +114,17 @@ static int usage(const char *argv0)
printf(" --cachedir <user cache directory>\n");
printf(" --conf <key>=<value>\n");
printf(" --configdir <user config directory>\n");
printf(" -d {all,cache,camctl,camsupport,control,dev,fswatch, input,lighttable,\n");
printf(" lua, masks,memory,nan,opencl, perf,pwstorage,print,sql}\n");
printf(" -d {all,cache,camctl,camsupport,control,dev,fswatch,input,lighttable,\n");
printf(" lua, masks,memory,nan,opencl,perf,pwstorage,print,sql}\n");
printf(" --datadir <data directory>\n");
#ifdef HAVE_OPENCL
printf(" --disable-opencl\n");
#endif
printf(" -h, --help\n");
printf(" -h, --help");
#ifdef _WIN32
printf(", /?");
#endif
printf("\n");
printf(" --library <library file>\n");
printf(" --localedir <locale directory>\n");
#ifdef USE_LUA
......@@ -457,13 +461,15 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load
GSList *config_override = NULL;
for(int k = 1; k < argc; k++)
{
#ifdef _WIN32
if(!strcmp(argv[k], "/?"))
{
return usage(argv[0]);
}
#endif
if(argv[k][0] == '-')
{
if(!strcmp(argv[k], "--help"))
{
return usage(argv[0]);
}
if(!strcmp(argv[k], "-h"))
if(!strcmp(argv[k], "--help") || !strcmp(argv[k], "-h"))
{
return usage(argv[0]);
}
......@@ -764,6 +770,27 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load
gtk_init(&argc, &argv);
}
// execute a performance check and configuration if needed
int last_configure_version = dt_conf_get_int("performance_configuration_version_completed");
if(last_configure_version < DT_CURRENT_PERFORMANCE_CONFIGURE_VERSION)
{
// ask the user whether he/she would like
// dt to make changes in the settings
gboolean run_configure = dt_gui_show_standalone_yes_no_dialog(
_("darktable - run performance configuration?"),
_("we have an updated performance configuration logic - executing that might improve the performance of "
"darktable.\nthis will potentially overwrite some of your existing settings - especially in case you "
"have manually modified them to custom values.\nwould you like to execute this update of the "
"performance configuration?\n"),
_("no"), _("yes"));
if(run_configure)
dt_configure_performance();
else
// make sure to set this, otherwise the user will be nagged until he eventually agrees
dt_conf_set_int("performance_configuration_version_completed", DT_CURRENT_PERFORMANCE_CONFIGURE_VERSION);
}
// detect cpu features and decide which codepaths to enable
dt_codepaths_init();
......@@ -1091,6 +1118,7 @@ void dt_print(dt_debug_thread_t thread, const char *msg, ...)
{
if(darktable.unmuted & thread)
{
printf("%f ", dt_get_wtime() - darktable.start_wtime);
va_list ap;
va_start(ap, msg);
vprintf(msg, ap);
......@@ -1155,30 +1183,48 @@ void dt_show_times(const dt_times_t *start, const char *prefix, const char *suff
}
}
void dt_configure_defaults()
void dt_configure_performance()
{
const int atom_cores = dt_get_num_atom_cores();
const int threads = dt_get_num_threads();
const size_t mem = dt_get_total_memory();
const int bits = (sizeof(void *) == 4) ? 32 : 64;
fprintf(stderr, "[defaults] found a %d-bit system with %zu kb ram and %d cores (%d atom based)\n", bits,
mem, threads, atom_cores);
if(mem >= (8u << 20) && threads > 4)
gchar *demosaic_quality = dt_conf_get_string("plugins/darkroom/demosaic/quality");
fprintf(stderr, "[defaults] found a %d-bit system with %zu kb ram and %d cores (%d atom based)\n", bits, mem,
threads, atom_cores);
if(mem >= (8u << 20) && threads > 4 && bits == 64 && atom_cores == 0)
{
// CONFIG 1: at least 8GB RAM, and more than 4 CPU cores, no atom, 64 bit
// But respect if user has set higher values manually earlier
fprintf(stderr, "[defaults] setting very high quality defaults\n");
dt_conf_set_int("worker_threads", 8);
// if no less than 8Gb, half the total size
dt_conf_set_int("host_memory_limit", mem >> 11);
dt_conf_set_int("worker_threads", MAX(8, dt_conf_get_int("worker_threads")));
// if machine has at least 8GB RAM, use half of the total memory size
dt_conf_set_int("host_memory_limit", MAX(mem >> 11, dt_conf_get_int("host_memory_limit")));
dt_conf_set_int("singlebuffer_limit", MAX(16, dt_conf_get_int("singlebuffer_limit")));
if(demosaic_quality == NULL || !strcmp(demosaic_quality, "always bilinear (fast)"))
dt_conf_set_string("plugins/darkroom/demosaic/quality", "at most PPG (reasonable)");
dt_conf_set_bool("plugins/lighttable/low_quality_thumbnails", FALSE);
}
else if(mem > (2u << 20) && threads > 4)
else if(mem > (2u << 20) && threads >= 4 && bits == 64 && atom_cores == 0)
{
// CONFIG 2: at least 2GB RAM, and at least 4 CPU cores, no atom, 64 bit
// But respect if user has set higher values manually earlier
fprintf(stderr, "[defaults] setting high quality defaults\n");
dt_conf_set_int("worker_threads", 8);
dt_conf_set_int("worker_threads", MAX(8, dt_conf_get_int("worker_threads")));
dt_conf_set_int("host_memory_limit", MAX(1500, dt_conf_get_int("host_memory_limit")));
dt_conf_set_int("singlebuffer_limit", MAX(16, dt_conf_get_int("singlebuffer_limit")));
if(demosaic_quality == NULL ||!strcmp(demosaic_quality, "always bilinear (fast)"))
dt_conf_set_string("plugins/darkroom/demosaic/quality", "at most PPG (reasonable)");
dt_conf_set_bool("plugins/lighttable/low_quality_thumbnails", FALSE);
}
if(mem < (1u << 20) || threads <= 2 || bits < 64 || atom_cores > 0)
else if(mem < (1u << 20) || threads <= 2 || bits == 32 || atom_cores > 0)
{
// CONFIG 3: For less than 1GB RAM or 2 or less cores, or 32-bit or for atom processors
// use very low/conservative settings
fprintf(stderr, "[defaults] setting very conservative defaults\n");
dt_conf_set_int("worker_threads", 1);
dt_conf_set_int("host_memory_limit", 500);
......@@ -1186,6 +1232,24 @@ void dt_configure_defaults()
dt_conf_set_string("plugins/darkroom/demosaic/quality", "always bilinear (fast)");
dt_conf_set_bool("plugins/lighttable/low_quality_thumbnails", TRUE);
}
else
{
// CONFIG 4: for everything else use explicit defaults
fprintf(stderr, "[defaults] setting normal defaults\n");
dt_conf_set_int("worker_threads", 2);
dt_conf_set_int("host_memory_limit", 1500);
dt_conf_set_int("singlebuffer_limit", 16);
dt_conf_set_string("plugins/darkroom/demosaic/quality", "at most PPG (reasonable)");
dt_conf_set_bool("plugins/lighttable/low_quality_thumbnails", FALSE);
}
g_free(demosaic_quality);
// store the current performance configure version as the last completed
// that would prevent further execution of previous performance configuration run
// at subsequent startups
dt_conf_set_int("performance_configuration_version_completed", DT_CURRENT_PERFORMANCE_CONFIGURE_VERSION);
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -115,6 +115,7 @@ typedef enum dt_image_loader_t
LOADER_PFM = 7,
LOADER_GM = 8,
LOADER_RAWSPEED = 9,
LOADER_PNM = 10,
} dt_image_loader_t;
struct dt_cache_entry_t;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.