![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/extra_optimizations.h"
#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 "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 "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"
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, dt_dev_pixelpipe_iop_t *piece) |
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 | hash_set_get (uint64_t *hash_in, uint64_t *hash_out, dt_pthread_mutex_t *lock) |
static void | invalidate_luminance_cache (dt_iop_module_t *const self) |
static int | sanity_check (dt_iop_module_t *self) |
static __DT_CLONE_TARGETS__ 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__ float | gaussian_denom (const float sigma) |
static __DT_CLONE_TARGETS__ float | gaussian_func (const float radius, const float denominator) |
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 __DT_CLONE_TARGETS__ float | pixel_correction (const float exposure, const float *const restrict factors, const float sigma) |
static __DT_CLONE_TARGETS__ void | 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, dt_dev_pixelpipe_iop_t *piece, const size_t ch) |
static __DT_CLONE_TARGETS__ void | toneeq_process (struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const restrict ivoid, void *const restrict ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out) |
void | process (struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const restrict ivoid, void *const restrict ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out) |
void | modify_roi_in (struct dt_iop_module_t *self, 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 __DT_CLONE_TARGETS__ int | compute_channels_factors (const float factors[8], float out[9], const float sigma) |
static __DT_CLONE_TARGETS__ 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 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) |
void | gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous) |
static void | smoothing_callback (GtkWidget *slider, gpointer user_data) |
static void | auto_adjust_exposure_boost (GtkWidget *quad, gpointer user_data) |
static void | auto_adjust_contrast_boost (GtkWidget *quad, 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_preview_pipe_finished_callback (gpointer instance, gpointer user_data) |
static void | _develop_ui_pipe_finished_callback (gpointer instance, gpointer user_data) |
void | gui_reset (struct dt_iop_module_t *self) |
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 |
|
static |
References dt_iop_module_t::gui_data, and switch_cursors().
Referenced by gui_cleanup(), and gui_init().
|
static |
References dt_iop_module_t::gui_data, and switch_cursors().
Referenced by gui_cleanup(), and gui_init().
|
static |
Post pipe events
References darktable, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_module_t::enabled, dt_iop_module_t::expanded, darktable_t::gui, dt_iop_module_t::gui_data, dt_gui_gtk_t::reset, and switch_cursors().
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_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXEL_APPLY_DPI, dt_bauhaus_t::graph_border, dt_bauhaus_t::graph_fg, darktable_t::gui, INNER_PADDING, dt_bauhaus_t::pango_font_desc, dt_bauhaus_t::quad_width, set_color(), and TRUE.
Referenced by area_draw(), and gui_post_expose().
const char * aliases | ( | ) |
|
inlinestatic |
References fast_clamp(), gaussian_denom(), gaussian_func(), dt_iop_roi_t::height, PIXEL_CHAN, dt_iop_toneequalizer_data_t::smoothing, and dt_iop_roi_t::width.
Referenced by toneeq_process().
|
static |
References dt_iop_toneequalizer_params_t::blacks, darktable, dt_iop_toneequalizer_params_t::deep_blacks, 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, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_toneequalizer_params_t::highlights, dt_iop_toneequalizer_params_t::midtones, dt_iop_toneequalizer_params_t::noise, dt_iop_module_t::params, dt_gui_gtk_t::reset, dt_iop_toneequalizer_params_t::shadows, dt_iop_toneequalizer_params_t::speculars, TRUE, dt_iop_toneequalizer_params_t::ultra_deep_blacks, update_exposure_sliders(), dt_iop_toneequalizer_params_t::whites, and dt_iop_module_t::widget.
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, dt_dev_add_history_item, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_request_focus(), dt_iop_module_t::enabled, FALSE, darktable_t::gui, dt_iop_module_t::gui_data, 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_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXEL_APPLY_DPI, dtgtk_cairo_paint_gamut_check(), dt_iop_module_t::enabled, FALSE, 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, M_PI, set_color(), TRUE, UI_SAMPLES, update_curve_lut(), and update_histogram().
Referenced by gui_init().
|
static |
References darktable, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_module_t::enabled, FALSE, 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_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_module_t::enabled, FALSE, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_gui_gtk_t::reset, TRUE, and update_exposure_sliders().
Referenced by gui_init().
|
static |
|
static |
References CONTRAST_FULCRUM, darktable, dt_iop_module_t::dev, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_log(), dt_dev_add_history_item, dt_iop_color_picker_reset(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_request_focus(), DT_TONEEQ_EIGF, DT_TONEEQ_GUIDED, dt_iop_module_t::enabled, darktable_t::gui, dt_iop_module_t::gui_data, invalidate_luminance_cache(), mix(), dt_iop_module_t::params, dt_develop_t::pipe, dt_dev_pixelpipe_t::processing, dt_gui_gtk_t::reset, TRUE, and update_histogram().
Referenced by gui_init().
|
static |
References CONTRAST_FULCRUM, darktable, dt_iop_module_t::dev, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_log(), dt_dev_add_history_item, dt_iop_color_picker_reset(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_request_focus(), dt_iop_module_t::enabled, darktable_t::gui, dt_iop_module_t::gui_data, invalidate_luminance_cache(), mix(), dt_iop_module_t::params, dt_develop_t::pipe, dt_dev_pixelpipe_t::processing, dt_gui_gtk_t::reset, TRUE, and update_histogram().
Referenced by gui_init().
|
inlinestatic |
References A, CHANNELS, gaussian_denom(), gaussian_func(), and PIXEL_CHAN.
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 double().
Referenced by draw_exposure_cursor().
void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
References dt_iop_module_so_t::data.
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.
|
static |
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, dt_iop_toneequalizer_data_t::blending, build_interpolation_matrix(), CHANNELS, compute_correction_lut(), dt_iop_toneequalizer_data_t::contrast_boost, dt_dev_pixelpipe_iop_t::data, dt_iop_toneequalizer_data_t::details, dt_iop_module_t::dev, DT_ALIGNED_ARRAY, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_simd_memcpy(), dt_iop_toneequalizer_data_t::exposure_boost, FALSE, dt_iop_toneequalizer_data_t::feathering, get_channels_factors(), dt_develop_t::gui_attached, dt_iop_module_t::gui_data, dt_iop_toneequalizer_data_t::iterations, dt_iop_toneequalizer_data_t::method, PIXEL_CHAN, pseudo_solve(), dt_iop_toneequalizer_data_t::quantization, dt_iop_toneequalizer_data_t::smoothing, and update_curve_lut().
|
static |
Referenced by init_presets().
|
static |
References CHANNELS, PIXEL_CHAN, and pixel_correction().
Referenced by set_new_params_interactive().
|
static |
References CHANNELS, and PIXEL_CHAN.
Referenced by set_new_params_interactive().
|
static |
References fast_clamp(), gaussian_denom(), gaussian_func(), LUT_RESOLUTION, and PIXEL_CHAN.
Referenced by commit_params().
|
inlinestatic |
References TEMP_SAMPLES, and UI_SAMPLES.
Referenced by update_histogram().
|
inlinestatic |
References dt_iop_toneequalizer_data_t::contrast_boost, CONTRAST_FULCRUM, dt_iop_toneequalizer_data_t::details, DT_GF_BLENDING_GEOMEAN, DT_GF_BLENDING_LINEAR, DT_TONEEQ_AVG_EIGF, DT_TONEEQ_AVG_GUIDED, DT_TONEEQ_EIGF, DT_TONEEQ_GUIDED, DT_TONEEQ_NONE, dt_iop_toneequalizer_data_t::exposure_boost, fast_eigf_surface_blur(), fast_surface_blur(), dt_iop_toneequalizer_data_t::feathering, height, dt_iop_toneequalizer_data_t::iterations, luminance_mask(), dt_iop_toneequalizer_data_t::method, dt_iop_toneequalizer_data_t::quantization, dt_iop_toneequalizer_data_t::radius, dt_iop_toneequalizer_data_t::scale, and width.
Referenced by toneeq_process().
|
inlinestatic |
References pixel_correction(), and UI_SAMPLES.
Referenced by update_curve_lut().
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_TONES.
const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
|
static |
Referenced by init_presets().
|
inlinestatic |
References DT_DEV_PIXELPIPE_DISPLAY_MASK, for_four_channels, dt_iop_roi_t::height, dt_dev_pixelpipe_iop_t::pipe, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by toneeq_process().
|
static |
References cairo_draw_hatches(), DT_PIXEL_APPLY_DPI, get_shade_from_luminance(), and M_PI.
Referenced by gui_post_expose().
int flags | ( | ) |
References IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
|
static |
|
static |
|
static |
References CHANNELS, and get_channels_gains().
Referenced by commit_params(), set_new_params_interactive(), smoothing_callback(), and update_curve_lut().
|
static |
References CHANNELS.
Referenced by get_channels_factors().
|
static |
References DT_ALIGNED_PIXEL, for_each_channel, gauss_kernel, height, MAX, MIN, and width.
Referenced by gui_post_expose(), mouse_moved(), and scrolled().
|
static |
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(), FALSE, dt_iop_module_t::gui_data, 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_preview_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_started_callback(), darktable, dt_conf_set_int(), DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_free_align, DT_REQUEST_COLORPICK_OFF, dt_iop_module_t::gui_data, IOP_GUI_FREE, dt_iop_module_t::request_color_pick, and darktable_t::signals.
void gui_focus | ( | struct dt_iop_module_t * | self, |
gboolean | in | ||
) |
References darktable_t::collection, darktable_t::control, darktable, dt_iop_module_t::dev, dt_collection_hint_message(), dt_control_hinter_message(), dt_dev_invalidate, dt_dev_refresh_ui_images, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), FALSE, dt_iop_module_t::gui_data, and switch_cursors().
void gui_init | ( | struct dt_iop_module_t * | self | ) |
References _develop_preview_pipe_finished_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(), auto_adjust_contrast_boost(), auto_adjust_exposure_boost(), 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_bauhaus_widget_set_quad_paint(), dt_bauhaus_widget_set_quad_toggle(), dt_conf_get_int(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_gui_add_class(), DT_GUI_MODULE, dt_iop_togglebutton_new(), DT_SIGNAL_DEVELOP_HISTORY_CHANGE, DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED, DT_SIGNAL_DEVELOP_UI_PIPE_FINISHED, DT_TONEEQ_LAST, dt_ui_label_new(), dt_ui_notebook_new(), dt_ui_notebook_page(), dtgtk_cairo_paint_showmask(), dtgtk_cairo_paint_wand(), dtgtk_drawing_area_new_with_aspect_ratio(), DTGTK_TOGGLEBUTTON, dtgtk_togglebutton_set_paint(), FALSE, 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(), dt_dev_pixelpipe_t::backbuf_height, dt_dev_pixelpipe_t::backbuf_width, darktable_t::bauhaus, CHANNELS, darktable, dt_iop_module_t::dev, dt_gui_gtk_t::dpi, draw_exposure_cursor(), dt_control_get_dev_closeup(), dt_control_get_dev_zoom(), dt_control_get_dev_zoom_x(), dt_control_get_dev_zoom_y(), dt_dev_get_zoom_scale(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXEL_APPLY_DPI, dt_iop_module_t::enabled, get_luminance_from_buffer(), get_shade_from_luminance(), darktable_t::gui, dt_iop_module_t::gui_data, height, in_mask_editing(), M_PI, match_color_to_background(), dt_bauhaus_t::pango_font_desc, dt_develop_t::pipe, pixel_correction(), dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::processing, sanity_check(), 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 | ) |
|
static |
References dt_pthread_mutex_lock(), and dt_pthread_mutex_unlock().
Referenced by toneeq_process().
|
static |
Helper functions
References dt_iop_module_t::dev, dt_develop_t::form_gui, and dt_develop_t::form_visible.
Referenced by gui_post_expose(), scrolled(), and switch_cursors().
void init_global | ( | dt_iop_module_so_t * | module | ) |
|
inlinestatic |
References CHANNELS, and TRUE.
Referenced by area_draw().
|
inlinestatic |
References CHANNELS, 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 | ) |
|
static |
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 dt_iop_toneequalizer_params_t::blacks, dt_iop_toneequalizer_params_t::blending, dt_iop_toneequalizer_params_t::contrast_boost, dt_iop_toneequalizer_params_t::deep_blacks, dt_iop_module_t::default_params, dt_iop_toneequalizer_params_t::details, dt_iop_toneequalizer_params_t::exposure_boost, dt_iop_toneequalizer_params_t::feathering, dt_iop_toneequalizer_params_t::highlights, dt_iop_toneequalizer_params_t::iterations, dt_iop_toneequalizer_params_t::method, dt_iop_toneequalizer_params_t::midtones, dt_iop_toneequalizer_params_t::noise, dt_iop_toneequalizer_params_t::quantization, dt_iop_toneequalizer_params_t::shadows, dt_iop_toneequalizer_params_t::smoothing, dt_iop_toneequalizer_params_t::speculars, dt_iop_toneequalizer_params_t::ultra_deep_blacks, and dt_iop_toneequalizer_params_t::whites.
|
static |
References get_shade_from_luminance().
Referenced by gui_post_expose().
void modify_roi_in | ( | struct dt_iop_module_t * | self, |
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 dt_dev_pixelpipe_t::backbuf_height, dt_dev_pixelpipe_t::backbuf_width, dt_iop_module_t::dev, dt_dev_get_pointer_zoom_pos(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), FALSE, get_luminance_from_buffer(), dt_iop_module_t::gui_data, dt_develop_t::pipe, dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::processing, sanity_check(), switch_cursors(), and TRUE.
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 fast_clamp(), gaussian_denom(), gaussian_func(), and PIXEL_CHAN.
Referenced by compute_channels_factors(), compute_lut_correction(), and gui_post_expose().
void process | ( | struct dt_iop_module_t * | self, |
dt_dev_pixelpipe_iop_t * | piece, | ||
const void *const restrict | ivoid, | ||
void *const restrict | ovoid, | ||
const dt_iop_roi_t *const | roi_in, | ||
const dt_iop_roi_t *const | roi_out | ||
) |
References toneeq_process().
|
static |
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, and dt_gui_gtk_t::reset.
Referenced by gui_post_expose(), mouse_moved(), scrolled(), switch_cursors(), and toneeq_process().
int scrolled | ( | struct dt_iop_module_t * | self, |
double | x, | ||
double | y, | ||
int | up, | ||
uint32_t | state | ||
) |
References dt_develop_t::darkroom_skip_mouse_events, darktable, dt_iop_module_t::dev, darktable_t::develop, dt_dev_add_history_item, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_modifier_is(), dt_iop_module_t::enabled, FALSE, get_luminance_from_buffer(), darktable_t::gui, dt_iop_module_t::gui_data, in_mask_editing(), dt_iop_module_t::off, dt_iop_module_t::params, dt_develop_t::pipe, dt_dev_pixelpipe_t::processing, dt_gui_gtk_t::reset, sanity_check(), set_new_params_interactive(), 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(), gaussian_denom(), gaussian_func(), get_channels_factors(), 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, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_changed(), and gui_update().
|
static |
References darktable, DT_DEV_PIXELPIPE_DISPLAY_NONE, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, dt_iop_color_picker_reset(), dt_iop_refresh_center(), dt_iop_request_focus(), dt_iop_set_cache_bypass(), 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().
|
static |
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(), get_channels_factors(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_gui_gtk_t::reset, TRUE, and update_curve_lut().
Referenced by gui_init().
|
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_DEV_PIXELPIPE_DIRTY, dt_iop_color_picker_is_visible(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_ui_main_window(), dt_iop_module_t::expanded, darktable_t::gui, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, in_mask_editing(), dt_develop_t::pipe, dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::processing, sanity_check(), dt_dev_pixelpipe_t::status, and dt_gui_gtk_t::ui.
Referenced by _develop_preview_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_started_callback(), gui_focus(), and mouse_moved().
|
static |
References apply_toneequalizer(), dt_dev_pixelpipe_iop_t::colors, compute_luminance_mask(), dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, display_luminance_mask(), dt_alloc_sse_ps(), dt_check_sse_aligned(), dt_control_log(), DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, DT_DEV_PIXELPIPE_FULL, DT_DEV_PIXELPIPE_PREVIEW, dt_free_align, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_simd_memcpy(), FALSE, dt_dev_pixelpipe_iop_t::global_hash, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, dt_iop_module_t::gui_lock, hash_set_get(), height, dt_iop_roi_t::height, dt_iop_module_t::iop_order, dt_dev_pixelpipe_iop_t::pipe, position(), sanity_check(), TRUE, width, and dt_iop_roi_t::width.
Referenced by process().
|
inlinestatic |
References build_interpolation_matrix(), CHANNELS, compute_lut_correction(), DT_ALIGNED_ARRAY, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_simd_memcpy(), FALSE, get_channels_factors(), dt_iop_module_t::gui_data, 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(), darktable_t::gui, and dt_gui_gtk_t::reset.
Referenced by area_button_press(), area_button_release(), area_leave_notify(), and scrolled().
|
inlinestatic |
|
static |
Referenced by commit_params(), set_new_params_interactive(), smoothing_callback(), and update_curve_lut().
|
static |
Referenced by get_luminance_from_buffer().