![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"
#include "common/colorspaces_inline_conversions.h"
#include "common/darktable.h"
#include "common/math.h"
#include "common/opencl.h"
#include "control/control.h"
#include "develop/develop.h"
#include "develop/imageop_math.h"
#include "develop/imageop_gui.h"
#include "dtgtk/button.h"
#include "gui/gtk.h"
#include "gui/presets.h"
#include "gui/color_picker_proxy.h"
#include "iop/iop_api.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
Data Structures | |
struct | dt_iop_profilegamma_params_t |
struct | dt_iop_profilegamma_gui_data_t |
struct | dt_iop_profilegamma_data_t |
struct | dt_iop_profilegamma_global_data_t |
Typedefs | |
typedef enum dt_iop_profilegamma_mode_t | dt_iop_profilegamma_mode_t |
typedef struct dt_iop_profilegamma_params_t | dt_iop_profilegamma_params_t |
typedef struct dt_iop_profilegamma_gui_data_t | dt_iop_profilegamma_gui_data_t |
typedef struct dt_iop_profilegamma_data_t | dt_iop_profilegamma_data_t |
typedef struct dt_iop_profilegamma_global_data_t | dt_iop_profilegamma_global_data_t |
Enumerations | |
enum | dt_iop_profilegamma_mode_t { PROFILEGAMMA_LOG = 0 , PROFILEGAMMA_GAMMA = 1 } |
typedef struct dt_iop_profilegamma_data_t dt_iop_profilegamma_data_t |
typedef struct dt_iop_profilegamma_gui_data_t dt_iop_profilegamma_gui_data_t |
typedef enum dt_iop_profilegamma_mode_t dt_iop_profilegamma_mode_t |
typedef struct dt_iop_profilegamma_params_t dt_iop_profilegamma_params_t |
|
static |
|
static |
|
static |
|
static |
References darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::gui_data, Log2Thres(), dt_iop_module_t::params, dt_iop_module_t::picked_color, dt_iop_module_t::picked_color_max, dt_iop_module_t::picked_color_min, dt_gui_gtk_t::reset, and TRUE.
Referenced by color_picker_apply().
void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
void cleanup_pipe | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References dt_dev_pixelpipe_iop_t::data.
void color_picker_apply | ( | dt_iop_module_t * | self, |
GtkWidget * | picker, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
void commit_params | ( | dt_iop_module_t * | self, |
dt_iop_params_t * | p1, | ||
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References dt_dev_pixelpipe_iop_t::data, dt_iop_estimate_exp(), dt_iop_profilegamma_data_t::dynamic_range, dt_iop_profilegamma_data_t::gamma, dt_iop_profilegamma_data_t::grey_point, linear, dt_iop_profilegamma_data_t::linear, dt_iop_profilegamma_data_t::mode, dt_iop_profilegamma_data_t::security_factor, dt_iop_profilegamma_data_t::shadows_range, dt_iop_profilegamma_data_t::table, and dt_iop_profilegamma_data_t::unbounded_coeffs.
int default_colorspace | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References IOP_CS_RGB.
int default_group | ( | ) |
References IOP_GROUP_TECHNICAL.
const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
int flags | ( | ) |
void gui_changed | ( | dt_iop_module_t * | self, |
GtkWidget * | w, | ||
void * | previous | ||
) |
References darktable, dt_bauhaus_slider_set(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, PROFILEGAMMA_LOG, and dt_gui_gtk_t::reset.
Referenced by gui_update().
void gui_init | ( | dt_iop_module_t * | self | ) |
References darktable_t::bauhaus, darktable, dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_new(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_max(), dt_bauhaus_slider_set_soft_range(), DT_BAUHAUS_SPACE, dt_bauhaus_widget_set_label(), DT_COLOR_PICKER_AREA, dt_color_picker_new(), DT_GUI_MODULE, dt_ui_section_label_new(), FALSE, IOP_GUI_ALLOC, TRUE, and dt_iop_module_t::widget.
void gui_reset | ( | dt_iop_module_t * | self | ) |
References dt_iop_color_picker_reset(), and TRUE.
void gui_update | ( | dt_iop_module_t * | self | ) |
References dt_iop_color_picker_reset(), gui_changed(), dt_iop_module_t::gui_data, and TRUE.
void init_global | ( | dt_iop_module_so_t * | module | ) |
void init_pipe | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References dt_dev_pixelpipe_iop_t::data, and dt_dev_pixelpipe_iop_t::data_size.
void init_presets | ( | dt_iop_module_so_t * | self | ) |
int legacy_params | ( | dt_iop_module_t * | self, |
const void *const | old_params, | ||
const int | old_version, | ||
void * | new_params, | ||
const int | new_version | ||
) |
const char * name | ( | ) |
void process | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_iop_t * | piece, | ||
const void *const | ivoid, | ||
void *const | ovoid, | ||
const dt_iop_roi_t *const | roi_in, | ||
const dt_iop_roi_t *const | roi_out | ||
) |
The log2(x) -> -INF when x -> 0 thus very low values (noise) will get even lower, resulting in noise negative amplification, which leads to pepper noise in shadows. To avoid that, we need to clip values that are noise for sure. Using 16 bits RAW data, the black value (known by rawspeed for every manufacturer) could be used as a threshold. However, at this point of the pixelpipe, the RAW levels have already been corrected and everything can happen with black levels in the exposure module. So we define the threshold as the first non-null 16 bit integer
References dt_dev_pixelpipe_iop_t::colors, dt_dev_pixelpipe_iop_t::data, DT_DEV_PIXELPIPE_DISPLAY_MASK, dt_iop_alpha_copy(), dt_iop_eval_exp(), dt_iop_profilegamma_data_t::dynamic_range, fastlog2(), dt_iop_profilegamma_data_t::grey_point, dt_iop_roi_t::height, dt_iop_profilegamma_data_t::mode, dt_dev_pixelpipe_iop_t::pipe, PROFILEGAMMA_GAMMA, PROFILEGAMMA_LOG, dt_iop_profilegamma_data_t::shadows_range, dt_iop_profilegamma_data_t::table, dt_iop_profilegamma_data_t::unbounded_coeffs, and dt_iop_roi_t::width.