![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <json-glib/json-glib.h>#include "system/macros.h"#include "system/mem_alloc.h"#include "common/logging.h"#include "common/paths.h"#include "common/noiseprofiles.h"#include "common/file_location.h"#include "control/user_message.h"
Include dependency graph for noiseprofiles.c:Go to the source code of this file.
Macros | |
| #define | DT_NOISE_PROFILE_VERSION 0 |
| #define | _ERROR(...) |
Functions | |
| void | dt_noiseprofile_set_path (const char *alternative) |
| static gboolean | dt_noiseprofile_verify (JsonParser *parser) |
| static JsonParser * | _noiseprofile_load (const char *alternative) |
| int | is_member (gchar **names, char *name) |
| static gint | _sort_by_iso (gconstpointer a, gconstpointer b) |
| static JsonParser * | _get_parser_locked (void) |
| void | dt_noiseprofile_cleanup (void) |
| GList * | dt_noiseprofile_get_matching (const dt_image_t *cimg) |
| void | dt_noiseprofile_free (gpointer data) |
| void | dt_noiseprofile_interpolate (const dt_noiseprofile_t *const p1, const dt_noiseprofile_t *const p2, dt_noiseprofile_t *out) |
Variables | |
| const dt_noiseprofile_t | dt_noiseprofile_generic = {N_("generic poissonian"), "", "", 0, {0.0001f, 0.0001f, 0.0001}, {0.0f, 0.0f, 0.0f}} |
| static GMutex | _noiseprofiles_parser_mutex |
| static JsonParser * | _noiseprofiles_parser = NULL |
| static gboolean | _noiseprofiles_tried = FALSE |
| static char * | _noiseprofiles_alternative = NULL |
| #define _ERROR | ( | ... | ) |
Definition at line 130 of file noiseprofiles.c.
| #define DT_NOISE_PROFILE_VERSION 0 |
Definition at line 37 of file noiseprofiles.c.
|
static |
Definition at line 259 of file noiseprofiles.c.
References _noiseprofile_load(), _noiseprofiles_alternative, _noiseprofiles_parser, _noiseprofiles_tried, and TRUE.
Referenced by dt_noiseprofile_get_matching().
|
static |
Definition at line 65 of file noiseprofiles.c.
References dt_concat_path_file(), dt_control_log(), DT_DEBUG_CONTROL, dt_loc_get_datadir(), dt_loc_get_user_config_dir(), dt_noiseprofile_verify(), DT_PATH_MAX, dt_print(), error(), and IS_NULL_PTR.
Referenced by _get_parser_locked().
|
static |
Definition at line 122 of file noiseprofiles.c.
References dt_noiseprofile_t::iso.
Referenced by dt_noiseprofile_get_matching().
drops the parsed profiles, if any.
Definition at line 269 of file noiseprofiles.c.
References _noiseprofiles_alternative, _noiseprofiles_parser, _noiseprofiles_parser_mutex, _noiseprofiles_tried, dt_free, and FALSE.
Referenced by dt_cleanup().
| void dt_noiseprofile_free | ( | gpointer | data | ) |
convenience function to free a list of noiseprofiles
Definition at line 425 of file noiseprofiles.c.
References dt_free, dt_free_align, dt_noiseprofile_t::maker, dt_noiseprofile_t::model, and dt_noiseprofile_t::name.
Referenced by _default_noise_profile(), _fetch_noise_profile(), dt_iop_denoiseprofile_get_auto_profile(), gui_cleanup(), and gui_update().
| GList * dt_noiseprofile_get_matching | ( | const dt_image_t * | cimg | ) |
read the noiseprofile file once on startup (kind of)
Definition at line 279 of file noiseprofiles.c.
References _get_parser_locked(), _noiseprofiles_parser_mutex, _sort_by_iso(), dt_noiseprofile_t::a, dt_noiseprofile_t::b, dt_image_t::camera_maker, dt_image_t::camera_model, dt_alloc_align(), FALSE, i, is_member(), IS_NULL_PTR, dt_noiseprofile_t::iso, k, dt_noiseprofile_t::maker, dt_noiseprofile_t::model, dt_noiseprofile_t::name, and TRUE.
Referenced by _default_noise_profile(), _fetch_noise_profile(), dt_iop_denoiseprofile_get_auto_profile(), and gui_update().
| void dt_noiseprofile_interpolate | ( | const dt_noiseprofile_t *const | p1, |
| const dt_noiseprofile_t *const | p2, | ||
| dt_noiseprofile_t * | out | ||
| ) |
Definition at line 434 of file noiseprofiles.c.
References dt_noiseprofile_t::a, dt_noiseprofile_t::b, dt_noiseprofile_t::iso, k, out, and t.
Referenced by _default_noise_profile(), _fetch_noise_profile(), dt_iop_denoiseprofile_get_auto_profile(), and gui_update().
| void dt_noiseprofile_set_path | ( | const char * | alternative | ) |
Point the module at an alternative noiseprofiles.json (–noiseprofiles). The file is parsed lazily, on the first dt_noiseprofile_get_matching() call – never at startup.
Definition at line 57 of file noiseprofiles.c.
References _noiseprofiles_alternative, and dt_free.
Referenced by dt_init().
|
static |
Definition at line 138 of file noiseprofiles.c.
References _ERROR, DT_DEBUG_CONTROL, DT_NOISE_PROFILE_VERSION, dt_print(), i, is_member(), IS_NULL_PTR, k, and TRUE.
Referenced by _noiseprofile_load().
| int is_member | ( | gchar ** | names, |
| char * | name | ||
| ) |
Definition at line 111 of file noiseprofiles.c.
Referenced by dt_noiseprofile_get_matching(), and dt_noiseprofile_verify().
|
static |
Definition at line 55 of file noiseprofiles.c.
Referenced by _get_parser_locked(), dt_noiseprofile_cleanup(), and dt_noiseprofile_set_path().
|
static |
Definition at line 53 of file noiseprofiles.c.
Referenced by _get_parser_locked(), and dt_noiseprofile_cleanup().
|
static |
Definition at line 40 of file noiseprofiles.c.
Referenced by dt_noiseprofile_cleanup(), and dt_noiseprofile_get_matching().
|
static |
Definition at line 54 of file noiseprofiles.c.
Referenced by _get_parser_locked(), and dt_noiseprofile_cleanup().
| const dt_noiseprofile_t dt_noiseprofile_generic = {N_("generic poissonian"), "", "", 0, {0.0001f, 0.0001f, 0.0001}, {0.0f, 0.0f, 0.0f}} |
Definition at line 39 of file noiseprofiles.c.
Referenced by _default_noise_profile(), _fetch_noise_profile(), dt_iop_denoiseprofile_get_auto_profile(), and gui_update().