![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <assert.h>#include <math.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <time.h>#include "bauhaus/bauhaus.h"#include "common/darktable.h"#include "develop/masks.h"#include "common/fast_guided_filter.h"#include "common/eigf.h"#include "common/interpolation.h"#include "common/luminance_mask.h"#include "common/opencl.h"#include "common/collection.h"#include "control/conf.h"#include "control/control.h"#include "develop/blend.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_math.h"#include "develop/imageop_gui.h"#include "develop/pixelpipe_cache.h"#include "dtgtk/drawingarea.h"#include "dtgtk/expander.h"#include "gui/color_picker_proxy.h"#include "gui/draw.h"#include "gui/gtk.h"#include "gui/presets.h"#include "iop/iop_api.h"#include "iop/choleski.h"#include "libs/colorpicker.h"
Include dependency graph for toneequal.c:Data Structures | |
| struct | dt_iop_toneequalizer_params_t |
| struct | dt_iop_toneequalizer_data_t |
| struct | dt_iop_toneequalizer_global_data_t |
| struct | dt_iop_toneequalizer_gui_data_t |
Macros | |
| #define | UI_SAMPLES 256 |
| #define | CONTRAST_FULCRUM exp2f(-4.0f) |
| #define | MIN_FLOAT exp2f(-16.0f) |
| #define | CHANNELS 9 |
| #define | PIXEL_CHAN 8 |
| #define | LUT_RESOLUTION 10000 |
| #define | DT_TONEEQ_USE_LUT TRUE |
| #define | TEMP_SAMPLES 2 * UI_SAMPLES |
Typedefs | |
| typedef enum dt_iop_toneequalizer_filter_t | dt_iop_toneequalizer_filter_t |
| typedef struct dt_iop_toneequalizer_params_t | dt_iop_toneequalizer_params_t |
| typedef struct dt_iop_toneequalizer_data_t | dt_iop_toneequalizer_data_t |
| typedef struct dt_iop_toneequalizer_global_data_t | dt_iop_toneequalizer_global_data_t |
| typedef struct dt_iop_toneequalizer_gui_data_t | dt_iop_toneequalizer_gui_data_t |
Enumerations | |
| enum | dt_iop_toneequalizer_filter_t { DT_TONEEQ_NONE = 0 , DT_TONEEQ_AVG_GUIDED , DT_TONEEQ_GUIDED , DT_TONEEQ_AVG_EIGF , DT_TONEEQ_EIGF } |
Functions | |
| const char * | name () |
| const char * | aliases () |
| const char ** | description (struct dt_iop_module_t *self) |
| int | default_group () |
| int | flags () |
| int | default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece) |
| void | input_format (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_buffer_dsc_t *dsc) |
| int | legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version) |
| static void | compress_shadows_highlight_preset_set_exposure_params (dt_iop_toneequalizer_params_t *p, const float step) |
| static void | dilate_shadows_highlight_preset_set_exposure_params (dt_iop_toneequalizer_params_t *p, const float step) |
| void | init_presets (dt_iop_module_so_t *self) |
| static gboolean | in_mask_editing (dt_iop_module_t *self) |
| static void | invalidate_luminance_cache (dt_iop_module_t *const self) |
| static | __attribute__ ((always_inline)) |
| static float | get_luminance_from_buffer (const float *const buffer, const size_t width, const size_t height, const size_t x, const size_t y) |
| static __DT_CLONE_TARGETS__ void | apply_toneequalizer (const float *const restrict in, const float *const restrict luminance, float *const restrict out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const size_t ch, const dt_iop_toneequalizer_data_t *const d) |
| static float | pixel_correction (const float exposure, const float *const restrict factors, const float sigma) |
| static int | compute_luminance_mask (const float *const restrict in, float *const restrict luminance, const size_t width, const size_t height, const size_t ch, const dt_iop_toneequalizer_data_t *const d) |
| static __DT_CLONE_TARGETS__ void | display_luminance_mask (const float *const restrict in, const float *const restrict luminance, float *const restrict out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const dt_dev_pixelpipe_t *pipe, const size_t ch) |
| int | process (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const restrict ivoid, void *const restrict ovoid) |
| void | modify_roi_in (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_out, dt_iop_roi_t *roi_in) |
| static void | compute_correction_lut (float *restrict lut, const float sigma, const float *const restrict factors) |
| static void | get_channels_gains (float factors[9], const dt_iop_toneequalizer_params_t *p) |
| static void | get_channels_factors (float factors[9], const dt_iop_toneequalizer_params_t *p) |
| static int | compute_channels_factors (const float factors[8], float out[9], const float sigma) |
| static int | compute_channels_gains (const float in[9], float out[9]) |
| static int | commit_channels_gains (const float factors[9], dt_iop_toneequalizer_params_t *p) |
| static void | gui_cache_init (struct dt_iop_module_t *self) |
| static uint64_t | _current_preview_luminance_hash (dt_iop_module_t *self, size_t *width, size_t *height) |
| static void | build_interpolation_matrix (float A[9 *8], const float sigma) |
| static __DT_CLONE_TARGETS__ void | compute_log_histogram_and_stats (const float *const restrict luminance, int histogram[256], const size_t num_elem, int *max_histogram, float *first_decile, float *last_decile) |
| static void | update_histogram (struct dt_iop_module_t *const self) |
| static __DT_CLONE_TARGETS__ void | compute_lut_correction (struct dt_iop_toneequalizer_gui_data_t *g, const float offset, const float scaling) |
| static gboolean | update_curve_lut (struct dt_iop_module_t *self) |
| void | init_global (dt_iop_module_so_t *module) |
| void | cleanup_global (dt_iop_module_so_t *module) |
| void | commit_params (struct dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | show_guiding_controls (struct dt_iop_module_t *self) |
| void | update_exposure_sliders (dt_iop_toneequalizer_gui_data_t *g, dt_iop_toneequalizer_params_t *p) |
| void | gui_update (struct dt_iop_module_t *self) |
| Refresh GUI controls from current params and configuration. | |
| void | gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous) |
| static void | smoothing_callback (GtkWidget *slider, gpointer user_data) |
| static void | show_luminance_mask_callback (GtkWidget *togglebutton, GdkEventButton *event, dt_iop_module_t *self) |
| static void | _switch_cursors (struct dt_iop_module_t *self) |
| int | mouse_moved (struct dt_iop_module_t *self, double x, double y, double pressure, int which) |
| int | mouse_leave (struct dt_iop_module_t *self) |
| static int | set_new_params_interactive (const float control_exposure, const float exposure_offset, const float blending_sigma, dt_iop_toneequalizer_gui_data_t *g, dt_iop_toneequalizer_params_t *p) |
| int | scrolled (struct dt_iop_module_t *self, double x, double y, int up, uint32_t state) |
| static gboolean | _init_drawing (dt_iop_module_t *const restrict self, GtkWidget *widget, dt_iop_toneequalizer_gui_data_t *const restrict g) |
| void | cairo_draw_hatches (cairo_t *cr, double center[2], double span[2], int instances, double line_width, double shade) |
| static void | get_shade_from_luminance (cairo_t *cr, const float luminance, const float alpha) |
| static void | draw_exposure_cursor (cairo_t *cr, const double pointerx, const double pointery, const double radius, const float luminance, const float zoom_scale, const int instances, const float alpha) |
| static void | match_color_to_background (cairo_t *cr, const float exposure, const float alpha) |
| void | gui_post_expose (struct dt_iop_module_t *self, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery) |
| void | gui_focus (struct dt_iop_module_t *self, gboolean in) |
| static void | init_nodes_x (dt_iop_toneequalizer_gui_data_t *g) |
| static void | init_nodes_y (dt_iop_toneequalizer_gui_data_t *g) |
| static gboolean | area_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data) |
| static gboolean | area_enter_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) |
| static gboolean | area_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) |
| static gboolean | area_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
| static gboolean | area_motion_notify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data) |
| static gboolean | area_button_release (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
| static gboolean | notebook_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
| static void | _develop_ui_pipe_started_callback (gpointer instance, gpointer user_data) |
| static void | _develop_history_resync_callback (gpointer instance, gpointer user_data) |
| static void | _develop_cacheline_ready_callback (gpointer instance, const guint64 hash, gpointer user_data) |
| static void | _develop_ui_pipe_finished_callback (gpointer instance, gpointer user_data) |
| void | gui_reset (struct dt_iop_module_t *self) |
| static gboolean | _sample_picker_luminance_mask (const float *const buffer, const size_t width, const size_t height, float *const picked, float *const picked_min, float *const picked_max) |
| void | color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| Update tone equalizer sliders from one picker sample. | |
| void | autoset (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *i) |
| void | gui_init (struct dt_iop_module_t *self) |
| void | gui_cleanup (struct dt_iop_module_t *self) |
Variables | |
| static const float centers_ops[8] | DT_ALIGNED_ARRAY |
| static const dt_colormatrix_t | gauss_kernel |
| #define CHANNELS 9 |
Build the exposures octaves : band-pass filters with gaussian windows spaced by 1 EV
| #define CONTRAST_FULCRUM exp2f(-4.0f) |
| #define DT_TONEEQ_USE_LUT TRUE |
| #define LUT_RESOLUTION 10000 |
| #define MIN_FLOAT exp2f(-16.0f) |
| #define PIXEL_CHAN 8 |
| #define TEMP_SAMPLES 2 * UI_SAMPLES |
| #define UI_SAMPLES 256 |
| typedef struct dt_iop_toneequalizer_data_t dt_iop_toneequalizer_data_t |
| typedef struct dt_iop_toneequalizer_gui_data_t dt_iop_toneequalizer_gui_data_t |
| typedef struct dt_iop_toneequalizer_params_t dt_iop_toneequalizer_params_t |
|
inlinestatic |
References darktable, dt_iop_module_t::dev, darktable_t::develop, dt_control_log(), dt_dev_add_history_item, dt_ioppr_get_iop_order(), dt_iop_module_t::enabled, FALSE, darktable_t::gui, dt_develop_t::gui_attached, dt_iop_module_t::iop_order, dt_develop_t::iop_order_list, dt_iop_module_t::off, dt_gui_gtk_t::reset, and TRUE.
|
static |
References dt_iop_module_t::dev, dt_dev_distort_get_iop_pipe(), dt_hash(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_dev_pixelpipe_iop_t::enabled, dt_dev_pixelpipe_iop_t::global_hash, height, dt_iop_roi_t::height, IS_NULL_PTR, dt_develop_t::preview_pipe, dt_dev_pixelpipe_iop_t::roi_in, width, and dt_iop_roi_t::width.
Referenced by _develop_cacheline_ready_callback(), and _develop_history_resync_callback().
|
static |
References _current_preview_luminance_hash(), _switch_cursors(), darktable, dt_iop_module_t::dev, dt_dev_pixelpipe_t::devid, dt_dev_pixelpipe_cache_peek(), dt_dev_pixelpipe_cache_ref_count_entry(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, g, dt_iop_module_t::gui_data, IS_NULL_PTR, darktable_t::pixelpipe_cache, dt_develop_t::preview_pipe, TRUE, and void().
Referenced by gui_cleanup(), and gui_init().
|
static |
References _current_preview_luminance_hash(), _switch_cursors(), darktable, dt_iop_module_t::dev, dt_dev_pixelpipe_t::devid, dt_dev_pixelpipe_cache_peek(), dt_dev_pixelpipe_cache_ref_count_entry(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, g, dt_iop_module_t::gui_data, IS_NULL_PTR, darktable_t::pixelpipe_cache, dt_develop_t::preview_pipe, TRUE, and void().
Referenced by gui_cleanup(), and gui_init().
|
static |
References _switch_cursors(), g, dt_iop_module_t::gui_data, and IS_NULL_PTR.
Referenced by gui_cleanup(), and gui_init().
|
static |
Post pipe events
References _switch_cursors(), darktable, dt_iop_module_t::enabled, dt_iop_module_t::expanded, g, darktable_t::gui, dt_iop_module_t::gui_data, IS_NULL_PTR, and dt_gui_gtk_t::reset.
Referenced by gui_cleanup(), and gui_init().
|
inlinestatic |
x axis
y axis
References darktable_t::bauhaus, CHANNELS, darktable, dt_gui_gtk_t::dpi, dt_cairo_image_surface_create(), dt_cairo_perceptual_gradient(), DT_PIXEL_APPLY_DPI, g, dt_bauhaus_t::graph_border, dt_bauhaus_t::graph_fg, darktable_t::gui, INNER_PADDING, k, dt_bauhaus_t::pango_font_desc, dt_bauhaus_t::quad_width, set_color(), TRUE, and value.
Referenced by area_draw(), and gui_post_expose().
|
static |
References dt_colorpicker_sample_t::box, dt_develop_t::color_picker, darktable, darktable_t::develop, DT_LIB_COLORPICKER_SIZE_BOX, FALSE, get_luminance_from_buffer(), height, IS_NULL_PTR, MAX, MIN, dt_colorpicker_sample_t::point, dt_develop_t::primary_sample, row, dt_colorpicker_sample_t::size, value, width, and x.
Referenced by color_picker_apply().
|
static |
References darktable_t::control, darktable, dt_iop_module_t::dev, dt_control_change_cursor(), dt_control_hinter_message(), dt_control_queue_redraw_center(), dt_control_set_cursor(), dt_iop_color_picker_is_visible(), dt_ui_main_window(), dt_iop_module_t::expanded, g, darktable_t::gui, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, in_mask_editing(), IS_NULL_PTR, dt_develop_t::pipe, dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::processing, and dt_gui_gtk_t::ui.
Referenced by _develop_cacheline_ready_callback(), _develop_history_resync_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_started_callback(), color_picker_apply(), gui_focus(), and mouse_moved().
| const char * aliases | ( | ) |
|
inlinestatic |
References __OMP_PARALLEL_FOR__, __OMP_SIMD__, ch, d, dt_omploop_sfence, fast_clamp(), dt_iop_roi_t::height, i, k, luminance, out, PIXEL_CHAN, sigma, and dt_iop_roi_t::width.
|
static |
References d, darktable, dt_iop_module_t::default_params, darktable_t::develop, dt_dev_add_history_item, dt_iop_color_picker_reset(), dt_iop_request_focus(), dt_iop_module_t::enabled, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, TRUE, update_exposure_sliders(), and dt_iop_module_t::widget.
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, dt_dev_add_history_item, dt_iop_request_focus(), dt_iop_module_t::enabled, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, TRUE, and update_exposure_sliders().
Referenced by gui_init().
|
static |
References _init_drawing(), darktable_t::bauhaus, CHANNELS, dt_bauhaus_t::color_fill, darktable, dt_draw_grid(), DT_PIXEL_APPLY_DPI, dtgtk_cairo_paint_gamut_check(), dt_iop_module_t::enabled, FALSE, g, dt_bauhaus_t::graph_bg, dt_bauhaus_t::graph_border, dt_bauhaus_t::graph_fg, dt_iop_module_t::gui_data, init_nodes_x(), init_nodes_y(), dt_bauhaus_t::inset_histogram, IS_NULL_PTR, k, M_PI, set_color(), TRUE, UI_SAMPLES, update_curve_lut(), and update_histogram().
Referenced by gui_init().
|
static |
References darktable, dt_iop_module_t::enabled, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, dt_dev_add_history_item, dt_iop_module_t::enabled, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, TRUE, and update_exposure_sliders().
Referenced by gui_init().
|
static |
References CHANNELS, darktable, dt_iop_module_t::enabled, g, darktable_t::gui, dt_iop_module_t::gui_data, i, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, set_new_params_interactive(), and TRUE.
Referenced by gui_init().
| void autoset | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| const struct dt_dev_pixelpipe_iop_t * | piece, | ||
| const void * | i | ||
| ) |
References __OMP_PARALLEL_FOR__, dt_iop_buffer_dsc_t::channels, CONTRAST_FULCRUM, dt_dev_pixelpipe_iop_t::dsc_in, dt_pixelpipe_cache_alloc_align_float, dt_pixelpipe_cache_free_align, height, dt_iop_roi_t::height, i, IS_NULL_PTR, k, luminance, p, dt_iop_module_t::params, dt_dev_pixelpipe_iop_t::roi_out, value, width, and dt_iop_roi_t::width.
|
inlinestatic |
References __OMP_SIMD__, A, CHANNELS, i, PIXEL_CHAN, and sigma.
Referenced by commit_params(), and update_curve_lut().
| void cairo_draw_hatches | ( | cairo_t * | cr, |
| double | center[2], | ||
| double | span[2], | ||
| int | instances, | ||
| double | line_width, | ||
| double | shade | ||
| ) |
References delta, double(), and i.
Referenced by draw_exposure_cursor().
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
References dt_iop_module_so_t::data, and dt_free.
| void cleanup_pipe | ( | struct 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_free_align.
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Update tone equalizer sliders from one picker sample.
Tone equalizer exposes picker-enabled bauhaus sliders for exposure and contrast compensation. The sample is taken from the module input cache, so the picked luminance is measured before tone equalizer applies its own mask remapping. This keeps the call chain identical to filmicrgb: picker activation comes from the slider quad, sampling arrives through the shared picker proxy, and the callback commits the resulting parameter directly back into the GUI slider.
Blend and mask pickers dispatch through the same hook, therefore only the two tone equalizer slider widgets are handled here and every other picker falls through untouched.
| self | Current module instance. |
| picker | Active picker widget dispatched by the picker proxy. |
| pipe | Preview pipe that was sampled. |
| piece | Live pipe piece matching the sampled cacheline. |
References _sample_picker_luminance_mask(), _switch_cursors(), CONTRAST_FULCRUM, darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_center(), DT_DEBUG_DEV, dt_dev_add_history_item, dt_dev_pixelpipe_cache_rdlock_entry(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_pixel_cache_entry_get_data(), dt_print(), DT_TONEEQ_EIGF, DT_TONEEQ_GUIDED, FALSE, g, dt_dev_pixelpipe_iop_t::global_hash, darktable_t::gui, dt_iop_module_t::gui_data, invalidate_luminance_cache(), IS_NULL_PTR, mix(), p, dt_iop_module_t::params, darktable_t::pixelpipe_cache, dt_gui_gtk_t::reset, and TRUE.
|
static |
References p.
Referenced by set_new_params_interactive().
| void commit_params | ( | struct dt_iop_module_t * | self, |
| dt_iop_params_t * | p1, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References A, build_interpolation_matrix(), CHANNELS, compute_correction_lut(), d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, DT_ALIGNED_ARRAY, dt_simd_memcpy(), FALSE, g, get_channels_factors(), dt_develop_t::gui_attached, dt_iop_module_t::gui_data, IS_NULL_PTR, p, PIXEL_CHAN, pseudo_solve(), and update_curve_lut().
|
static |
References p.
Referenced by init_presets().
|
static |
References __OMP_PARALLEL_FOR_SIMD__, CHANNELS, i, out, PIXEL_CHAN, pixel_correction(), and sigma.
Referenced by set_new_params_interactive().
|
static |
References CHANNELS, i, out, and PIXEL_CHAN.
Referenced by set_new_params_interactive().
|
static |
References fast_clamp(), i, lut, LUT_RESOLUTION, PIXEL_CHAN, and sigma.
Referenced by commit_params().
|
inlinestatic |
References __OMP_PARALLEL_FOR__, i, k, luminance, TEMP_SAMPLES, and UI_SAMPLES.
Referenced by update_histogram().
|
inlinestatic |
|
inlinestatic |
References __OMP_FOR_SIMD__, g, k, pixel_correction(), scaling, sigma, UI_SAMPLES, and x.
Referenced by update_curve_lut().
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References IOP_CS_RGB.
| int default_group | ( | ) |
References IOP_GROUP_TONES.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
|
static |
References p.
Referenced by init_presets().
|
inlinestatic |
|
static |
References cairo_draw_hatches(), DT_PIXEL_APPLY_DPI, get_shade_from_luminance(), luminance, and M_PI.
Referenced by gui_post_expose().
| int flags | ( | ) |
References IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
|
static |
References __OMP_SIMD__, CHANNELS, get_channels_gains(), and p.
Referenced by commit_params(), set_new_params_interactive(), smoothing_callback(), and update_curve_lut().
|
static |
Referenced by get_channels_factors().
|
static |
References DT_ALIGNED_PIXEL, for_each_channel, gauss_kernel, height, i, luminance, MAX, MIN, width, and x.
Referenced by _sample_picker_luminance_mask(), gui_post_expose(), mouse_moved(), and scrolled().
|
static |
References luminance.
Referenced by draw_exposure_cursor(), gui_post_expose(), and match_color_to_background().
|
static |
References dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, g, dt_iop_module_t::gui_data, IS_NULL_PTR, and TRUE.
Referenced by gui_init().
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
References _develop_cacheline_ready_callback(), _develop_history_resync_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_started_callback(), darktable, dt_conf_set_int(), DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_dev_pixelpipe_cache_ref_count_entry(), DT_REQUEST_COLORPICK_OFF, FALSE, g, dt_iop_module_t::gui_data, IOP_GUI_FREE, darktable_t::pixelpipe_cache, dt_iop_module_t::request_color_pick, and darktable_t::signals.
| void gui_focus | ( | struct dt_iop_module_t * | self, |
| gboolean | in | ||
| ) |
References _switch_cursors(), darktable_t::collection, darktable_t::control, darktable, dt_iop_module_t::dev, dt_dev_pixelpipe_t::devid, dt_collection_hint_message(), dt_control_hinter_message(), dt_dev_distort_get_iop_pipe(), dt_dev_pixelpipe_cache_peek(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_dev_pixelpipe_update_history_main, dt_dev_pixelpipe_update_history_preview, dt_hash(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_iop_module_t::enabled, dt_dev_pixelpipe_iop_t::enabled, FALSE, g, dt_dev_pixelpipe_iop_t::global_hash, dt_iop_module_t::gui_data, dt_iop_roi_t::height, IS_NULL_PTR, darktable_t::pixelpipe_cache, dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::processing, dt_dev_pixelpipe_iop_t::roi_in, TRUE, and dt_iop_roi_t::width.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
References _develop_cacheline_ready_callback(), _develop_history_resync_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_started_callback(), area_button_press(), area_button_release(), area_draw(), area_enter_notify(), area_leave_notify(), area_motion_notify(), darktable_t::bauhaus, darktable, dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_remove_at(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_max(), dt_bauhaus_slider_set_soft_range(), dt_bauhaus_widget_set_label(), DT_COLOR_PICKER_AREA, dt_color_picker_new(), dt_conf_get_int(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_gui_add_class(), DT_GUI_MODULE, dt_iop_togglebutton_new(), DT_SIGNAL_CACHELINE_READY, DT_SIGNAL_DEVELOP_HISTORY_CHANGE, DT_SIGNAL_DEVELOP_UI_PIPE_FINISHED, DT_SIGNAL_HISTORY_RESYNC, DT_TONEEQ_LAST, dt_ui_label_new(), dt_ui_notebook_new(), dt_ui_notebook_page(), dtgtk_cairo_paint_showmask(), dtgtk_drawing_area_new_with_aspect_ratio(), DTGTK_TOGGLEBUTTON, dtgtk_togglebutton_set_paint(), FALSE, g, darktable_t::gui, gui_cache_init(), IOP_GUI_ALLOC, notebook_button_press(), dt_gui_gtk_t::scroll_mask, show_luminance_mask_callback(), darktable_t::signals, smoothing_callback(), TRUE, and dt_iop_module_t::widget.
| void gui_post_expose | ( | struct dt_iop_module_t * | self, |
| cairo_t * | cr, | ||
| int32_t | width, | ||
| int32_t | height, | ||
| int32_t | pointerx, | ||
| int32_t | pointery | ||
| ) |
References _init_drawing(), darktable_t::bauhaus, CHANNELS, darktable, dt_iop_module_t::dev, dt_gui_gtk_t::dpi, draw_exposure_cursor(), DT_ALIGNED_ARRAY, dt_dev_get_overlay_scale(), dt_dev_pixelpipe_cache_rdlock_entry(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_dev_rescale_roi(), dt_iop_color_picker_is_visible(), DT_PIXEL_APPLY_DPI, dt_pixel_cache_entry_get_data(), dt_simd_memcpy(), dt_iop_module_t::enabled, dt_iop_module_t::expanded, FALSE, g, get_luminance_from_buffer(), get_shade_from_luminance(), darktable_t::gui, dt_iop_module_t::gui_data, height, i, in_mask_editing(), IS_NULL_PTR, M_PI, match_color_to_background(), dt_bauhaus_t::pango_font_desc, dt_develop_t::pipe, PIXEL_CHAN, pixel_correction(), darktable_t::pixelpipe_cache, dt_dev_pixelpipe_t::processing, sigma, TRUE, dt_iop_module_t::widget, and width.
| void gui_reset | ( | struct dt_iop_module_t * | self | ) |
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
gui callbacks, these are needed.
References dt_bauhaus_slider_set(), g, dt_iop_module_t::gui_data, invalidate_luminance_cache(), p, dt_iop_module_t::params, and show_guiding_controls().
|
static |
Helper functions
References dt_iop_module_t::dev, dt_masks_get_visible_form(), and dt_develop_t::form_gui.
Referenced by _switch_cursors(), and gui_post_expose().
| void init_global | ( | dt_iop_module_so_t * | module | ) |
|
inlinestatic |
References CHANNELS, g, i, IS_NULL_PTR, and TRUE.
Referenced by area_draw().
|
inlinestatic |
References CHANNELS, g, i, IS_NULL_PTR, and TRUE.
Referenced by area_draw().
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
| void init_presets | ( | dt_iop_module_so_t * | self | ) |
References compress_shadows_highlight_preset_set_exposure_params(), DEVELOP_BLEND_CS_RGB_SCENE, dilate_shadows_highlight_preset_set_exposure_params(), dt_gui_presets_add_generic(), DT_TONEEQ_EIGF, DT_TONEEQ_GUIDED, DT_TONEEQ_NONE, DT_TONEEQ_NORM_2, DT_TONEEQ_NORM_POWER, dt_iop_module_so_t::op, and p.
| void input_format | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece, | ||
| dt_iop_buffer_dsc_t * | dsc | ||
| ) |
|
static |
References darktable, dt_dev_pixelpipe_cache_ref_count_entry(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, g, dt_iop_module_t::gui_data, IS_NULL_PTR, and darktable_t::pixelpipe_cache.
Referenced by color_picker_apply(), gui_changed(), and gui_update().
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
References contrast_boost, d, dt_iop_module_t::default_params, exposure_boost, n, and noise.
|
static |
References get_shade_from_luminance().
Referenced by gui_post_expose().
| void modify_roi_in | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| const dt_iop_roi_t * | roi_out, | ||
| dt_iop_roi_t * | roi_in | ||
| ) |
| int mouse_leave | ( | struct dt_iop_module_t * | self | ) |
| int mouse_moved | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which | ||
| ) |
References _switch_cursors(), darktable, dt_iop_module_t::dev, dt_dev_coordinates_image_norm_to_preview_abs(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_pixelpipe_cache_rdlock_entry(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_iop_color_picker_is_visible(), dt_pixel_cache_entry_get_data(), FALSE, g, get_luminance_from_buffer(), dt_iop_module_t::gui_data, IS_NULL_PTR, dt_develop_t::pipe, darktable_t::pixelpipe_cache, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_dev_pixelpipe_t::processing, dt_develop_t::roi, TRUE, and x.
| const char * name | ( | ) |
|
static |
References darktable, dt_iop_color_picker_reset(), dt_iop_request_focus(), darktable_t::gui, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
inlinestatic |
References __OMP_SIMD__, fast_clamp(), i, PIXEL_CHAN, and sigma.
Referenced by compute_channels_factors(), compute_lut_correction(), and gui_post_expose().
| int process | ( | struct dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const restrict | ivoid, | ||
| void *const restrict | ovoid | ||
| ) |
References ovoid, dt_dev_pixelpipe_iop_t::roi_in, and dt_dev_pixelpipe_iop_t::roi_out.
| int scrolled | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| int | up, | ||
| uint32_t | state | ||
| ) |
References darktable, dt_iop_module_t::dev, darktable_t::develop, dt_dev_add_history_item, dt_dev_pixelpipe_cache_rdlock_entry(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_iop_color_picker_is_visible(), dt_modifier_is(), dt_pixel_cache_entry_get_data(), dt_iop_module_t::enabled, dt_iop_module_t::expanded, FALSE, g, get_luminance_from_buffer(), darktable_t::gui, dt_iop_module_t::gui_data, IS_NULL_PTR, dt_iop_module_t::off, p, dt_iop_module_t::params, dt_develop_t::pipe, darktable_t::pixelpipe_cache, dt_dev_pixelpipe_t::processing, dt_gui_gtk_t::reset, set_new_params_interactive(), state, TRUE, and update_exposure_sliders().
|
inlinestatic |
References CHANNELS, commit_channels_gains(), compute_channels_factors(), compute_channels_gains(), DT_ALIGNED_ARRAY, dt_control_log(), dt_simd_memcpy(), g, get_channels_factors(), i, p, PIXEL_CHAN, and pseudo_solve().
Referenced by area_motion_notify(), and scrolled().
| void show_guiding_controls | ( | struct dt_iop_module_t * | self | ) |
References DT_TONEEQ_AVG_EIGF, DT_TONEEQ_AVG_GUIDED, DT_TONEEQ_EIGF, DT_TONEEQ_GUIDED, DT_TONEEQ_NONE, FALSE, g, dt_iop_module_t::gui_data, p, and TRUE.
Referenced by gui_changed(), and gui_update().
|
static |
References darktable, dt_iop_module_t::dev, DT_DEV_PIXELPIPE_DISPLAY_NONE, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, dt_dev_pixelpipe_update_history_main, dt_iop_color_picker_reset(), dt_iop_request_focus(), dt_iop_set_cache_bypass(), g, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::off, dt_iop_module_t::request_mask_display, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
References CHANNELS, darktable, darktable_t::develop, DT_ALIGNED_ARRAY, dt_bauhaus_slider_get(), dt_control_log(), dt_dev_add_history_item, dt_iop_color_picker_reset(), g, get_channels_factors(), darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, TRUE, and update_curve_lut().
Referenced by gui_init().
|
inlinestatic |
References build_interpolation_matrix(), CHANNELS, compute_lut_correction(), DT_ALIGNED_ARRAY, dt_simd_memcpy(), FALSE, g, get_channels_factors(), dt_iop_module_t::gui_data, IS_NULL_PTR, p, dt_iop_module_t::params, PIXEL_CHAN, pseudo_solve(), and TRUE.
Referenced by area_draw(), commit_params(), and smoothing_callback().
| void update_exposure_sliders | ( | dt_iop_toneequalizer_gui_data_t * | g, |
| dt_iop_toneequalizer_params_t * | p | ||
| ) |
References darktable, dt_bauhaus_slider_set(), g, darktable_t::gui, p, and dt_gui_gtk_t::reset.
Referenced by area_button_press(), area_button_release(), area_leave_notify(), and scrolled().
|
inlinestatic |
References compute_log_histogram_and_stats(), darktable, dt_dev_pixelpipe_cache_rdlock_entry(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_pixel_cache_entry_get_data(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, g, dt_iop_module_t::gui_data, height, IS_NULL_PTR, darktable_t::pixelpipe_cache, TRUE, UI_SAMPLES, and width.
Referenced by area_draw().
|
static |
Referenced by commit_params(), gui_post_expose(), set_new_params_interactive(), smoothing_callback(), and update_curve_lut().
|
static |
Referenced by get_luminance_from_buffer().