![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "develop/masks_gui.h"#include <assert.h>#include <math.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <time.h>#include "widgets/bauhaus.h"#include "system/macros.h"#include "system/openmp.h"#include "system/target_clones.h"#include "system/mem_alloc.h"#include "system/simd.h"#include "common/hash.h"#include "common/logging.h"#include "common/module_versioning.h"#include "caches/pixelpipe_cache_alloc.h"#include "develop/masks.h"#include "pixel/fast_guided_filter.h"#include "pixel/eigf.h"#include "pixel/luminance_mask.h"#include "common/collection.h"#include "common/conf.h"#include "control/control.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "caches/pixelpipe_cache.h"#include "gui/color_picker_proxy.h"#include "widgets/draw.h"#include "gui/application.h"#include "gui/presets.h"#include "iop/iop_api.h"#include "math/choleski.h"#include "libs/colorpicker.h"#include "widgets/label.h"#include "widgets/notebook.h"#include "widgets/scroll_wrap.h"#include "widgets/widget_style.h"#include "gui/screen_metrics.h"#include "control/signal.h"#include "widgets/togglebutton.h"
Include dependency graph for toneequal.c:Go to the source code of this file.
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 |
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 } |
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
Definition at line 168 of file toneequal.c.
| #define CONTRAST_FULCRUM exp2f(-4.0f) |
Definition at line 160 of file toneequal.c.
| #define DT_TONEEQ_USE_LUT TRUE |
Definition at line 782 of file toneequal.c.
| #define LUT_RESOLUTION 10000 |
Definition at line 170 of file toneequal.c.
| #define MIN_FLOAT exp2f(-16.0f) |
Definition at line 161 of file toneequal.c.
| #define PIXEL_CHAN 8 |
Definition at line 169 of file toneequal.c.
| #define TEMP_SAMPLES 2 * UI_SAMPLES |
| #define UI_SAMPLES 256 |
Definition at line 159 of file toneequal.c.
| Enumerator | |
|---|---|
| DT_TONEEQ_NONE | |
| DT_TONEEQ_AVG_GUIDED | |
| DT_TONEEQ_GUIDED | |
| DT_TONEEQ_AVG_EIGF | |
| DT_TONEEQ_EIGF | |
Definition at line 186 of file toneequal.c.
|
inlinestatic |
Definition at line 628 of file toneequal.c.
References dt_iop_module_t::dev, dt_control_log(), dt_dev_add_history_item, dt_gui_freeze_begin, dt_gui_freeze_end, dt_ioppr_get_iop_order(), dt_iop_module_t::enabled, enabled, FALSE, dt_iop_module_t::gui, dt_develop_t::gui_attached, dt_iop_module_t::iop_order, dt_develop_t::iop_order_list, L, dt_iop_module_gui_t::off, and TRUE.
|
static |
Definition at line 1389 of file toneequal.c.
References dt_iop_module_t::dev, dt_dev_distort_get_iop_pipe(), dt_hash(), DT_PIXELPIPE_CACHE_HASH_INVALID, height, IS_NULL_PTR, L, piece, dt_develop_t::preview_pipe, and width.
Referenced by _develop_cacheline_ready_callback(), _develop_history_resync_callback(), and gui_focus().
|
static |
Definition at line 3171 of file toneequal.c.
References _current_preview_luminance_hash(), _switch_cursors(), dt_iop_module_t::dev, dt_dev_pixelpipe_cache_ref_count_entry(), dt_dev_pixelpipe_cache_ref_entry_by_hash(), dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, g, hash, IS_NULL_PTR, L, luminance_entry_fits(), dt_develop_t::preview_pipe, TRUE, and void().
Referenced by gui_cleanup(), and gui_init().
Definition at line 3084 of file toneequal.c.
References _current_preview_luminance_hash(), _switch_cursors(), dt_iop_module_t::dev, dt_dev_pixelpipe_cache_ref_count_entry(), dt_dev_pixelpipe_cache_ref_entry_by_hash(), dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, g, IS_NULL_PTR, L, luminance_entry_fits(), dt_develop_t::preview_pipe, TRUE, and void().
Referenced by gui_cleanup(), and gui_init().
Definition at line 3231 of file toneequal.c.
References _switch_cursors(), dt_iop_gui_data(), g, and IS_NULL_PTR.
Referenced by gui_cleanup(), and gui_init().
Post pipe events
Definition at line 3065 of file toneequal.c.
References _switch_cursors(), dt_gui_freeze_begin, dt_gui_freeze_end, dt_iop_gui_data(), dt_iop_module_t::enabled, dt_iop_module_gui_t::expanded, g, dt_iop_module_t::gui, IS_NULL_PTR, and L.
Referenced by gui_cleanup(), and gui_init().
|
inlinestatic |
x axis
y axis
Definition at line 2548 of file toneequal.c.
References CHANNELS, dt_bauhaus_get_global(), dt_cairo_image_surface_create(), dt_cairo_perceptual_gradient(), dt_gui_set_pango_resolution(), DT_PIXEL_APPLY_DPI, g, INNER_PADDING, k, L, dt_bauhaus_t::quad_width, set_color(), TRUE, and value.
Referenced by area_draw(), and gui_post_expose().
|
static |
Definition at line 3253 of file toneequal.c.
References dt_colorpicker_sample_t::box, dt_develop_t::color_picker, DT_LIB_COLORPICKER_SIZE_BOX, FALSE, get_luminance_from_buffer(), height, IS_NULL_PTR, L, 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 |
Definition at line 1870 of file toneequal.c.
References dt_iop_module_t::dev, dt_control_get_global(), dt_control_hinter_message(), dt_control_queue_cursor_by_name(), dt_control_queue_redraw_center(), dt_control_set_cursor_visible, dt_iop_color_picker_is_visible(), dt_iop_gui_data(), dt_iop_module_t::enabled, dt_iop_module_gui_t::expanded, FALSE, g, dt_iop_module_t::gui, dt_develop_t::gui_attached, in_mask_editing(), IS_NULL_PTR, L, dt_develop_t::pipe, dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::processing, and TRUE.
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 | ( | ) |
Definition at line 349 of file toneequal.c.
References L.
|
inlinestatic |
Definition at line 818 of file toneequal.c.
References __OMP_PARALLEL_FOR__, __OMP_SIMD__, ch, d, dt_omploop_sfence, fast_clamp(), dt_iop_roi_t::height, i, k, L, luminance, out, PIXEL_CHAN, sigma, and dt_iop_roi_t::width.
|
static |
Definition at line 2920 of file toneequal.c.
References d, dt_iop_module_t::default_params, dt_iop_module_t::dev, dt_dev_add_history_item, dt_gui_widgets_suppressed(), dt_iop_color_picker_reset(), dt_iop_gui_data(), dt_iop_request_focus(), dt_iop_module_t::enabled, FALSE, g, dt_iop_module_t::gui, L, p, dt_iop_module_t::params, TRUE, update_exposure_sliders(), and dt_iop_module_gui_t::widget.
Referenced by gui_init().
|
static |
Definition at line 3018 of file toneequal.c.
References dt_iop_module_t::dev, dt_dev_add_history_item, dt_gui_widgets_suppressed(), dt_iop_gui_data(), dt_iop_request_focus(), dt_iop_module_t::enabled, FALSE, g, p, dt_iop_module_t::params, TRUE, and update_exposure_sliders().
Referenced by gui_init().
Definition at line 2701 of file toneequal.c.
References _init_drawing(), CHANNELS, dt_bauhaus_get_global(), dt_draw_grid(), dt_iop_gui_data(), DT_PIXEL_APPLY_DPI, dtgtk_cairo_paint_gamut_check(), dt_iop_module_t::enabled, FALSE, g, init_nodes_x(), init_nodes_y(), IS_NULL_PTR, k, L, M_PI, set_color(), TRUE, UI_SAMPLES, update_curve_lut(), and update_histogram().
Referenced by gui_init().
|
static |
Definition at line 2875 of file toneequal.c.
References dt_gui_widgets_suppressed(), dt_iop_gui_data(), dt_iop_module_t::enabled, FALSE, g, L, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 2893 of file toneequal.c.
References dt_iop_module_t::dev, dt_dev_add_history_item, dt_gui_widgets_suppressed(), dt_iop_gui_data(), dt_iop_module_t::enabled, FALSE, g, L, p, dt_iop_module_t::params, TRUE, and update_exposure_sliders().
Referenced by gui_init().
|
static |
Definition at line 2974 of file toneequal.c.
References CHANNELS, dt_gui_widgets_suppressed(), dt_iop_gui_data(), dt_iop_module_t::enabled, g, i, L, p, dt_iop_module_t::params, 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 | ||
| ) |
Definition at line 3463 of file toneequal.c.
References __OMP_PARALLEL_FOR__, CONTRAST_FULCRUM, dt_pixelpipe_cache_alloc_align_float, dt_pixelpipe_cache_free_align, height, dt_iop_roi_t::height, i, IS_NULL_PTR, k, L, luminance, p, dt_iop_module_t::params, piece, pipe, value, width, and dt_iop_roi_t::width.
Definition at line 1407 of file toneequal.c.
References __OMP_SIMD__, A, CHANNELS, i, L, 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 | ||
| ) |
Definition at line 2190 of file toneequal.c.
References delta, double(), i, and L.
Referenced by draw_exposure_cursor().
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 1642 of file toneequal.c.
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 1714 of file toneequal.c.
References dt_free_align, L, and piece.
| 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. |
Definition at line 3329 of file toneequal.c.
References _sample_picker_luminance_mask(), _switch_cursors(), CONTRAST_FULCRUM, dt_iop_module_t::dev, 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_gui_freeze_begin, dt_gui_freeze_end, dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_pixel_cache_entry_get_data(), dt_print(), DT_TONEEQ_EIGF, DT_TONEEQ_GUIDED, FALSE, g, invalidate_luminance_cache(), IS_NULL_PTR, L, mix(), p, dt_iop_module_t::params, piece, pipe, and TRUE.
|
static |
Definition at line 1327 of file toneequal.c.
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 | ||
| ) |
Definition at line 1648 of file toneequal.c.
References A, build_interpolation_matrix(), CHANNELS, compute_correction_lut(), d, dt_iop_module_t::dev, DT_ALIGNED_ARRAY, dt_iop_gui_data(), dt_simd_memcpy(), FALSE, g, get_channels_factors(), dt_develop_t::gui_attached, IS_NULL_PTR, L, p, piece, PIXEL_CHAN, pseudo_solve(), and update_curve_lut().
|
static |
|
static |
Definition at line 1291 of file toneequal.c.
References __OMP_PARALLEL_FOR_SIMD__, CHANNELS, i, L, out, PIXEL_CHAN, pixel_correction(), and sigma.
Referenced by set_new_params_interactive().
Definition at line 1313 of file toneequal.c.
References CHANNELS, i, L, out, and PIXEL_CHAN.
Referenced by set_new_params_interactive().
|
static |
Definition at line 1242 of file toneequal.c.
References fast_clamp(), i, L, lut, LUT_RESOLUTION, PIXEL_CHAN, and sigma.
Referenced by commit_params().
|
inlinestatic |
Definition at line 1422 of file toneequal.c.
References __OMP_PARALLEL_FOR__, i, k, L, luminance, TEMP_SAMPLES, and UI_SAMPLES.
Referenced by update_histogram().
|
inlinestatic |
Definition at line 870 of file toneequal.c.
References ch, CONTRAST_FULCRUM, d, 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, fast_eigf_surface_blur(), fast_surface_blur(), height, L, luminance, and width.
|
inlinestatic |
Definition at line 1560 of file toneequal.c.
References __OMP_FOR_SIMD__, g, k, L, 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 | ||
| ) |
Definition at line 374 of file toneequal.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 364 of file toneequal.c.
References IOP_GROUP_TONES.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 355 of file toneequal.c.
References dt_iop_set_description(), and L.
|
static |
|
inlinestatic |
Definition at line 945 of file toneequal.c.
References __OMP_PARALLEL_FOR__, ch, DT_DEV_PIXELPIPE_DISPLAY_MASK, dt_omploop_sfence, dt_simd_set1(), dt_iop_roi_t::height, i, L, luminance, dt_dev_pixelpipe_t::mask_display, out, pipe, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
|
static |
Definition at line 2222 of file toneequal.c.
References cairo_draw_hatches(), DT_PIXEL_APPLY_DPI, get_shade_from_luminance(), L, luminance, and M_PI.
Referenced by gui_post_expose().
| int flags | ( | ) |
Definition at line 369 of file toneequal.c.
References IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
|
static |
Definition at line 1277 of file toneequal.c.
References __OMP_SIMD__, CHANNELS, get_channels_gains(), L, and p.
Referenced by commit_params(), set_new_params_interactive(), smoothing_callback(), and update_curve_lut().
|
static |
Definition at line 1260 of file toneequal.c.
References CHANNELS, L, and p.
Referenced by get_channels_factors().
|
inlinestatic |
Sample the luminance mask at a NORMALIZED image position.
The mask is the pipeline buffer this module computed, so its dimensions are the ROI the pipe planned for this run and nothing else – the preview size when darkroom renders scaled, the full sensor resolution when darkroom/render_size asks for 1:1. The cursor is therefore carried normalized and resolved here against the buffer actually attached.
Definition at line 721 of file toneequal.c.
References get_luminance_from_buffer(), height, IS_NULL_PTR, L, MIN, width, and x.
Referenced by gui_post_expose(), mouse_moved(), and scrolled().
|
static |
Definition at line 666 of file toneequal.c.
References DT_ALIGNED_PIXEL, for_each_channel, gauss_kernel, height, i, L, luminance, MAX, MIN, width, and x.
Referenced by _sample_picker_luminance_mask(), and get_luminance_at_norm().
|
static |
Definition at line 2213 of file toneequal.c.
Referenced by draw_exposure_cursor(), gui_post_expose(), and match_color_to_background().
|
static |
Definition at line 1348 of file toneequal.c.
References dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, g, IS_NULL_PTR, L, and TRUE.
Referenced by gui_init().
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
Definition at line 1791 of file toneequal.c.
References dt_bauhaus_widget_set_quad_active(), dt_iop_gui_data(), FALSE, g, invalidate_luminance_cache(), and show_guiding_controls().
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
Definition at line 3673 of file toneequal.c.
References _develop_cacheline_ready_callback(), _develop_history_resync_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_started_callback(), dt_conf_set_int(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_dev_pixelpipe_cache_ref_count_entry(), dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, DT_REQUEST_COLORPICK_OFF, FALSE, g, IOP_GUI_FREE, IS_NULL_PTR, L, and dt_iop_module_t::request_color_pick.
| void gui_focus | ( | struct dt_iop_module_t * | self, |
| gboolean | in | ||
| ) |
Definition at line 2446 of file toneequal.c.
References _current_preview_luminance_hash(), _switch_cursors(), dt_iop_module_t::dev, dt_collection_get_global(), dt_collection_hint_message(), dt_control_get_global(), dt_control_hinter_message(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_dev_pixelpipe_cache_ref_entry_by_hash(), dt_dev_pixelpipe_update_history_main, dt_dev_pixelpipe_update_history_preview, dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_iop_module_t::enabled, FALSE, g, IS_NULL_PTR, L, luminance_entry_fits(), dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::processing, and TRUE.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
Definition at line 3498 of file toneequal.c.
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(), dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_remove_at(), dt_bauhaus_get_global(), 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_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_gui_add_class(), DT_GUI_BOX_SPACING, 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(), dt_ui_notebook_set_picker_owner(), dt_ui_resizable_drawing_area(), dt_widget_scroll_mask(), dtgtk_cairo_paint_showmask(), DTGTK_TOGGLEBUTTON, dtgtk_togglebutton_set_paint(), FALSE, g, dt_iop_module_t::gui, gui_cache_init(), IOP_GUI_ALLOC, L, notebook_button_press(), show_luminance_mask_callback(), smoothing_callback(), TRUE, and dt_iop_module_gui_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 | ||
| ) |
Definition at line 2261 of file toneequal.c.
References _init_drawing(), CHANNELS, dt_iop_module_t::dev, draw_exposure_cursor(), DT_ALIGNED_ARRAY, dt_bauhaus_get_global(), dt_dev_get_overlay_scale(), dt_dev_pixelpipe_cache_rdlock_entry(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_dev_rescale_roi(), dt_dev_roi_request_preview_height(), dt_dev_roi_request_preview_width(), dt_gui_set_pango_resolution(), dt_iop_color_picker_is_visible(), dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXEL_APPLY_DPI, dt_pixel_cache_entry_get_data(), dt_simd_memcpy(), dt_iop_module_t::enabled, dt_iop_module_gui_t::expanded, FALSE, g, get_luminance_at_norm(), get_shade_from_luminance(), dt_iop_module_t::gui, height, i, in_mask_editing(), IS_NULL_PTR, L, M_PI, match_color_to_background(), dt_develop_t::pipe, PIXEL_CHAN, pixel_correction(), dt_dev_pixelpipe_t::processing, sigma, TRUE, dt_iop_module_gui_t::widget, and width.
| void gui_reset | ( | struct dt_iop_module_t * | self | ) |
Definition at line 3240 of file toneequal.c.
References dt_iop_module_t::dev, dt_bauhaus_widget_set_quad_active(), dt_dev_add_history_item, dt_iop_gui_data(), dt_iop_request_focus(), FALSE, g, dt_iop_module_t::gui, IS_NULL_PTR, L, TRUE, and dt_iop_module_gui_t::widget.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
gui callbacks, these are needed.
Definition at line 1778 of file toneequal.c.
References dt_bauhaus_slider_set(), dt_iop_gui_data(), g, invalidate_luminance_cache(), L, p, dt_iop_module_t::params, and show_guiding_controls().
|
static |
Helper functions
Definition at line 593 of file toneequal.c.
References dt_iop_module_t::dev, dt_masks_get_visible_form(), and dt_develop_t::form_gui.
Referenced by _switch_cursors(), gui_post_expose(), and scrolled().
| void init_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 1633 of file toneequal.c.
References L.
|
inlinestatic |
Definition at line 2674 of file toneequal.c.
References CHANNELS, g, i, IS_NULL_PTR, and TRUE.
Referenced by area_draw().
|
inlinestatic |
Definition at line 2688 of file toneequal.c.
References CHANNELS, g, i, IS_NULL_PTR, L, 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 | ||
| ) |
Definition at line 1707 of file toneequal.c.
References dt_calloc_align(), and piece.
| void init_presets | ( | dt_iop_module_so_t * | self | ) |
Definition at line 467 of file toneequal.c.
References compress_shadows_highlight_preset_set_exposure_params(), 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, L, 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 | ||
| ) |
Definition at line 379 of file toneequal.c.
References dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::datatype, default_input_format(), piece, pipe, and TYPE_FLOAT.
|
static |
Definition at line 599 of file toneequal.c.
References dt_dev_pixelpipe_cache_ref_count_entry(), dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, g, IS_NULL_PTR, and L.
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 | ||
| ) |
Definition at line 387 of file toneequal.c.
References contrast_boost, d, dt_iop_module_t::default_params, exposure_boost, L, n, and noise.
|
inlinestatic |
Tell whether a cache entry can hold a width x height luminance mask.
The GUI resolves its luminance cacheline by hash alone, and a hash carries no size: the pixelpipe cache hands back whatever entry answers to it. The dimensions come from a separate read of the pipe piece, so the two can describe different runs whenever the pipe replans in between – and toneequal's ROI genuinely changes size when finalscale enables or disables itself, which is a plain zoom away. Attaching only what fits is what keeps every sampler in bounds; the dimensions alone are never enough to trust a buffer.
Definition at line 745 of file toneequal.c.
References dt_pixel_cache_entry_get_size(), FALSE, height, IS_NULL_PTR, L, and width.
Referenced by _develop_cacheline_ready_callback(), _develop_history_resync_callback(), and gui_focus().
|
static |
Definition at line 2246 of file toneequal.c.
References get_shade_from_luminance(), and L.
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 | ||
| ) |
Definition at line 1185 of file toneequal.c.
References d, dt_dev_pixelpipe_t::iheight, dt_dev_pixelpipe_t::iwidth, L, max_size, piece, and dt_iop_roi_t::scale.
| int mouse_leave | ( | struct dt_iop_module_t * | self | ) |
Definition at line 2016 of file toneequal.c.
References dt_control_queue_cursor_by_name(), dt_control_queue_redraw_center(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, and L.
| int mouse_moved | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which | ||
| ) |
Definition at line 1927 of file toneequal.c.
References _switch_cursors(), dt_iop_module_t::dev, 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_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_pixel_cache_entry_get_data(), FALSE, g, get_luminance_at_norm(), IS_NULL_PTR, L, dt_develop_t::pipe, dt_dev_pixelpipe_t::processing, TRUE, and x.
| const char * name | ( | ) |
Definition at line 344 of file toneequal.c.
References L.
|
static |
Definition at line 3046 of file toneequal.c.
References dt_gui_widgets_suppressed(), dt_iop_color_picker_reset(), dt_iop_request_focus(), and TRUE.
Referenced by gui_init().
|
inlinestatic |
Definition at line 853 of file toneequal.c.
References __OMP_SIMD__, fast_clamp(), i, L, 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 | ||
| ) |
| int scrolled | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| int | up, | ||
| uint32_t | state | ||
| ) |
Definition at line 2087 of file toneequal.c.
References dt_iop_module_t::dev, dt_dev_add_history_item, dt_dev_pixelpipe_cache_rdlock_entry(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_gui_widgets_suppressed(), dt_iop_color_picker_is_visible(), dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_modifier_is(), dt_pixel_cache_entry_get_data(), DT_PRIMARY_MASK, dt_iop_module_t::enabled, dt_iop_module_gui_t::expanded, FALSE, g, get_luminance_at_norm(), dt_iop_module_t::gui, in_mask_editing(), IS_NULL_PTR, L, dt_iop_module_gui_t::off, p, dt_iop_module_t::params, dt_develop_t::pipe, dt_dev_pixelpipe_t::processing, set_new_params_interactive(), state, TRUE, and update_exposure_sliders().
|
inlinestatic |
Definition at line 2034 of file toneequal.c.
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, L, p, PIXEL_CHAN, and pseudo_solve().
Referenced by area_motion_notify(), and scrolled().
| void show_guiding_controls | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1720 of file toneequal.c.
References dt_iop_gui_data(), DT_TONEEQ_AVG_EIGF, DT_TONEEQ_AVG_GUIDED, DT_TONEEQ_EIGF, DT_TONEEQ_GUIDED, DT_TONEEQ_NONE, FALSE, g, L, p, and TRUE.
Referenced by gui_changed(), and gui_update().
|
static |
Definition at line 1839 of file toneequal.c.
References dt_iop_module_t::dev, DT_DEV_PIXELPIPE_DISPLAY_NONE, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, dt_dev_pixelpipe_update_history_main, dt_gui_widgets_suppressed(), dt_iop_color_picker_reset(), dt_iop_gui_data(), dt_iop_request_focus(), dt_iop_set_cache_bypass(), g, dt_iop_module_t::gui, L, dt_iop_module_gui_t::off, dt_iop_module_t::request_mask_display, and TRUE.
Referenced by gui_init().
Definition at line 1814 of file toneequal.c.
References CHANNELS, dt_iop_module_t::dev, DT_ALIGNED_ARRAY, dt_bauhaus_slider_get(), dt_control_log(), dt_dev_add_history_item, dt_gui_widgets_suppressed(), dt_iop_color_picker_reset(), dt_iop_gui_data(), g, get_channels_factors(), L, p, dt_iop_module_t::params, TRUE, and update_curve_lut().
Referenced by gui_init().
|
inlinestatic |
Definition at line 1582 of file toneequal.c.
References build_interpolation_matrix(), CHANNELS, compute_lut_correction(), DT_ALIGNED_ARRAY, dt_iop_gui_data(), dt_simd_memcpy(), FALSE, g, get_channels_factors(), IS_NULL_PTR, L, 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 | ||
| ) |
Definition at line 1762 of file toneequal.c.
References dt_bauhaus_slider_set(), dt_gui_freeze_begin, dt_gui_freeze_end, g, and p.
Referenced by area_button_press(), area_button_release(), area_leave_notify(), and scrolled().
|
inlinestatic |
Definition at line 1492 of file toneequal.c.
References compute_log_histogram_and_stats(), dt_dev_pixelpipe_cache_rdlock_entry(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_iop_gui_data(), 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, height, IS_NULL_PTR, L, TRUE, UI_SAMPLES, and width.
Referenced by area_draw().
|
static |
Definition at line 173 of file toneequal.c.
Referenced by commit_params(), gui_post_expose(), set_new_params_interactive(), smoothing_callback(), and update_curve_lut().
|
static |
Definition at line 661 of file toneequal.c.
Referenced by get_luminance_from_buffer().