Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
toneequal.c File Reference
#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:

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
 

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
 

Macro Definition Documentation

◆ CHANNELS

#define CHANNELS   9

Build the exposures octaves : band-pass filters with gaussian windows spaced by 1 EV

Definition at line 155 of file toneequal.c.

◆ CONTRAST_FULCRUM

#define CONTRAST_FULCRUM   exp2f(-4.0f)

Definition at line 147 of file toneequal.c.

◆ DT_TONEEQ_USE_LUT

#define DT_TONEEQ_USE_LUT   TRUE

Definition at line 720 of file toneequal.c.

◆ LUT_RESOLUTION

#define LUT_RESOLUTION   10000

Definition at line 157 of file toneequal.c.

◆ MIN_FLOAT

#define MIN_FLOAT   exp2f(-16.0f)

Definition at line 148 of file toneequal.c.

◆ PIXEL_CHAN

#define PIXEL_CHAN   8

Definition at line 156 of file toneequal.c.

◆ TEMP_SAMPLES

#define TEMP_SAMPLES   2 * UI_SAMPLES

◆ UI_SAMPLES

#define UI_SAMPLES   256

Definition at line 146 of file toneequal.c.

Typedef Documentation

◆ dt_iop_toneequalizer_data_t

◆ dt_iop_toneequalizer_filter_t

◆ dt_iop_toneequalizer_global_data_t

◆ dt_iop_toneequalizer_gui_data_t

◆ dt_iop_toneequalizer_params_t

Enumeration Type Documentation

◆ dt_iop_toneequalizer_filter_t

Enumerator
DT_TONEEQ_NONE 
DT_TONEEQ_AVG_GUIDED 
DT_TONEEQ_GUIDED 
DT_TONEEQ_AVG_EIGF 
DT_TONEEQ_EIGF 

Definition at line 173 of file toneequal.c.

Function Documentation

◆ __attribute__()

◆ _current_preview_luminance_hash()

◆ _develop_cacheline_ready_callback()

◆ _develop_history_resync_callback()

◆ _develop_ui_pipe_finished_callback()

static void _develop_ui_pipe_finished_callback ( gpointer  instance,
gpointer  user_data 
)
static

Definition at line 3156 of file toneequal.c.

References _switch_cursors(), g, dt_iop_module_t::gui_data, and IS_NULL_PTR.

Referenced by gui_cleanup(), and gui_init().

◆ _develop_ui_pipe_started_callback()

static void _develop_ui_pipe_started_callback ( gpointer  instance,
gpointer  user_data 
)
static

◆ _init_drawing()

◆ _sample_picker_luminance_mask()

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 
)
static

◆ _switch_cursors()

◆ aliases()

const char * aliases ( )

Definition at line 329 of file toneequal.c.

◆ apply_toneequalizer()

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 
)
inlinestatic

◆ area_button_press()

◆ area_button_release()

static gboolean area_button_release ( GtkWidget widget,
GdkEventButton *  event,
gpointer  user_data 
)
static

◆ area_draw()

◆ area_enter_notify()

static gboolean area_enter_notify ( GtkWidget widget,
GdkEventCrossing *  event,
gpointer  user_data 
)
static

◆ area_leave_notify()

static gboolean area_leave_notify ( GtkWidget widget,
GdkEventCrossing *  event,
gpointer  user_data 
)
static

◆ area_motion_notify()

static gboolean area_motion_notify ( GtkWidget widget,
GdkEventMotion *  event,
gpointer  user_data 
)
static

◆ autoset()

◆ build_interpolation_matrix()

static void build_interpolation_matrix ( float  A[9 *8],
const float  sigma 
)
inlinestatic

Definition at line 1338 of file toneequal.c.

References __OMP_SIMD__, A, CHANNELS, i, PIXEL_CHAN, and sigma.

Referenced by commit_params(), and update_curve_lut().

◆ cairo_draw_hatches()

void cairo_draw_hatches ( cairo_t *  cr,
double  center[2],
double  span[2],
int  instances,
double  line_width,
double  shade 
)

Definition at line 2134 of file toneequal.c.

References delta, double(), and i.

Referenced by draw_exposure_cursor().

◆ cleanup_global()

void cleanup_global ( dt_iop_module_so_t module)

Definition at line 1573 of file toneequal.c.

References dt_iop_module_so_t::data, and dt_free.

◆ cleanup_pipe()

void cleanup_pipe ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

Definition at line 1645 of file toneequal.c.

References dt_dev_pixelpipe_iop_t::data, and dt_free_align.

◆ color_picker_apply()

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.

Parameters
selfCurrent module instance.
pickerActive picker widget dispatched by the picker proxy.
pipePreview pipe that was sampled.
pieceLive pipe piece matching the sampled cacheline.

Definition at line 3254 of file toneequal.c.

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_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, 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.

◆ commit_channels_gains()

static int commit_channels_gains ( const float  factors[9],
dt_iop_toneequalizer_params_t p 
)
static

Definition at line 1258 of file toneequal.c.

References p.

Referenced by set_new_params_interactive().

◆ commit_params()

◆ compress_shadows_highlight_preset_set_exposure_params()

static void compress_shadows_highlight_preset_set_exposure_params ( dt_iop_toneequalizer_params_t p,
const float  step 
)
static

Definition at line 415 of file toneequal.c.

References p.

Referenced by init_presets().

◆ compute_channels_factors()

static int compute_channels_factors ( const float  factors[8],
float  out[9],
const float  sigma 
)
static

Definition at line 1222 of file toneequal.c.

References __OMP_PARALLEL_FOR_SIMD__, CHANNELS, i, out, PIXEL_CHAN, pixel_correction(), and sigma.

Referenced by set_new_params_interactive().

◆ compute_channels_gains()

static int compute_channels_gains ( const float  in[9],
float  out[9] 
)
static

Definition at line 1244 of file toneequal.c.

References CHANNELS, i, out, and PIXEL_CHAN.

Referenced by set_new_params_interactive().

◆ compute_correction_lut()

static void compute_correction_lut ( float *restrict  lut,
const float  sigma,
const float *const restrict  factors 
)
static

Definition at line 1173 of file toneequal.c.

References fast_clamp(), i, lut, LUT_RESOLUTION, PIXEL_CHAN, and sigma.

Referenced by commit_params().

◆ compute_log_histogram_and_stats()

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 
)
inlinestatic

Definition at line 1353 of file toneequal.c.

References __OMP_PARALLEL_FOR__, i, k, luminance, TEMP_SAMPLES, and UI_SAMPLES.

Referenced by update_histogram().

◆ compute_luminance_mask()

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 
)
inlinestatic

◆ compute_lut_correction()

static __DT_CLONE_TARGETS__ void compute_lut_correction ( struct dt_iop_toneequalizer_gui_data_t g,
const float  offset,
const float  scaling 
)
inlinestatic

Definition at line 1491 of file toneequal.c.

References __OMP_FOR_SIMD__, g, k, pixel_correction(), scaling, sigma, UI_SAMPLES, and x.

Referenced by update_curve_lut().

◆ default_colorspace()

int default_colorspace ( dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
const dt_dev_pixelpipe_iop_t piece 
)

Definition at line 354 of file toneequal.c.

References IOP_CS_RGB.

◆ default_group()

int default_group ( )

Definition at line 344 of file toneequal.c.

References IOP_GROUP_TONES.

◆ description()

const char ** description ( struct dt_iop_module_t self)

Definition at line 335 of file toneequal.c.

References dt_iop_set_description().

◆ dilate_shadows_highlight_preset_set_exposure_params()

static void dilate_shadows_highlight_preset_set_exposure_params ( dt_iop_toneequalizer_params_t p,
const float  step 
)
static

Definition at line 432 of file toneequal.c.

References p.

Referenced by init_presets().

◆ display_luminance_mask()

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 
)
inlinestatic

◆ draw_exposure_cursor()

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

◆ flags()

int flags ( )

Definition at line 349 of file toneequal.c.

References IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.

◆ get_channels_factors()

static void get_channels_factors ( float  factors[9],
const dt_iop_toneequalizer_params_t p 
)
static

◆ get_channels_gains()

static void get_channels_gains ( float  factors[9],
const dt_iop_toneequalizer_params_t p 
)
static

Definition at line 1191 of file toneequal.c.

References CHANNELS, and p.

Referenced by get_channels_factors().

◆ get_luminance_from_buffer()

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

◆ get_shade_from_luminance()

static void get_shade_from_luminance ( cairo_t *  cr,
const float  luminance,
const float  alpha 
)
static
Todo:
: fetch screen gamma from ICC display profile

Definition at line 2157 of file toneequal.c.

References luminance.

Referenced by draw_exposure_cursor(), gui_post_expose(), and match_color_to_background().

◆ gui_cache_init()

static void gui_cache_init ( struct dt_iop_module_t self)
static

◆ gui_changed()

void gui_changed ( dt_iop_module_t self,
GtkWidget w,
void previous 
)

◆ gui_cleanup()

◆ gui_focus()

◆ gui_init()

◆ gui_post_expose()

◆ gui_reset()

◆ gui_update()

void gui_update ( struct dt_iop_module_t self)

Refresh GUI controls from current params and configuration.

gui callbacks, these are needed.

Todo:
check why needed
Todo:
by hand

Definition at line 1709 of file toneequal.c.

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().

◆ in_mask_editing()

static gboolean in_mask_editing ( dt_iop_module_t self)
static

Helper functions

Definition at line 573 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(), and gui_post_expose().

◆ init_global()

void init_global ( dt_iop_module_so_t module)

Definition at line 1564 of file toneequal.c.

◆ init_nodes_x()

static void init_nodes_x ( dt_iop_toneequalizer_gui_data_t g)
inlinestatic

Definition at line 2605 of file toneequal.c.

References CHANNELS, g, i, IS_NULL_PTR, and TRUE.

Referenced by area_draw().

◆ init_nodes_y()

static void init_nodes_y ( dt_iop_toneequalizer_gui_data_t g)
inlinestatic

Definition at line 2619 of file toneequal.c.

References CHANNELS, g, i, IS_NULL_PTR, and TRUE.

Referenced by area_draw().

◆ init_pipe()

void init_pipe ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

◆ init_presets()

◆ input_format()

◆ invalidate_luminance_cache()

◆ legacy_params()

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 367 of file toneequal.c.

References contrast_boost, d, dt_iop_module_t::default_params, exposure_boost, n, and noise.

◆ match_color_to_background()

static void match_color_to_background ( cairo_t *  cr,
const float  exposure,
const float  alpha 
)
static
Todo:
: put that as a preference in anselrc

Definition at line 2190 of file toneequal.c.

References get_shade_from_luminance().

Referenced by gui_post_expose().

◆ modify_roi_in()

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 
)

◆ mouse_leave()

int mouse_leave ( struct dt_iop_module_t self)

◆ mouse_moved()

◆ name()

const char * name ( )

Definition at line 324 of file toneequal.c.

◆ notebook_button_press()

static gboolean notebook_button_press ( GtkWidget widget,
GdkEventButton *  event,
gpointer  user_data 
)
static

◆ pixel_correction()

static float pixel_correction ( const float  exposure,
const float *const restrict  factors,
const float  sigma 
)
inlinestatic

◆ process()

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 
)

◆ scrolled()

◆ set_new_params_interactive()

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 
)
inlinestatic

◆ show_guiding_controls()

void show_guiding_controls ( struct dt_iop_module_t self)

◆ show_luminance_mask_callback()

◆ smoothing_callback()

◆ update_curve_lut()

◆ update_exposure_sliders()

◆ update_histogram()

Variable Documentation

◆ DT_ALIGNED_ARRAY

const float centers_params [ 9 ] DT_ALIGNED_ARRAY
static
Initial value:
= {-56.0f / 7.0f,
-48.0f / 7.0f,
-40.0f / 7.0f,
-32.0f / 7.0f,
-24.0f / 7.0f,
-16.0f / 7.0f,
-8.0f / 7.0f,
0.0f / 7.0f}

Definition at line 160 of file toneequal.c.

Referenced by commit_params(), gui_post_expose(), set_new_params_interactive(), smoothing_callback(), and update_curve_lut().

◆ gauss_kernel

const dt_colormatrix_t gauss_kernel
static
Initial value:
=
{ { 0.076555024f, 0.124401914f, 0.076555024f },
{ 0.124401914f, 0.196172249f, 0.124401914f },
{ 0.076555024f, 0.124401914f, 0.076555024f } }

Definition at line 641 of file toneequal.c.

Referenced by get_luminance_from_buffer().