94#define exposure2white(x) exp2f(-(x))
95#define white2exposure(x) -dt_log2f(fmaxf(1e-20f, x))
114#define DEFLICKER_BINS_COUNT (UINT16_MAX + 1)
167 return _(
"exp_osure");
173 _(
"redo the exposure of the shot as if you were still in-camera\n"
174 "using a color-safe brightening similar to increasing ISO setting"),
175 _(
"corrective and creative"),
176 _(
"linear, RGB, scene-referred"),
178 _(
"linear, RGB, scene-referred"));
209 void *new_params,
const int new_version)
211 if(old_version == 2 && new_version == 6)
213 typedef struct dt_iop_exposure_params_v2_t
215 float black, exposure, gain;
216 } dt_iop_exposure_params_v2_t;
218 dt_iop_exposure_params_v2_t *o = (dt_iop_exposure_params_v2_t *)old_params;
225 n->exposure = o->exposure;
226 n->compensate_exposure_bias =
FALSE;
229 if(old_version == 3 && new_version == 6)
231 typedef struct dt_iop_exposure_params_v3_t
233 float black, exposure;
235 float deflicker_percentile, deflicker_target_level;
236 } dt_iop_exposure_params_v3_t;
238 dt_iop_exposure_params_v3_t *o = (dt_iop_exposure_params_v3_t *)old_params;
246 n->exposure = o->exposure;
247 n->deflicker_percentile = o->deflicker_percentile;
248 n->deflicker_target_level = o->deflicker_target_level;
249 n->compensate_exposure_bias =
FALSE;
252 if(old_version == 4 && new_version == 6)
254 typedef enum dt_iop_exposure_deflicker_histogram_source_t {
255 DEFLICKER_HISTOGRAM_SOURCE_THUMBNAIL,
256 DEFLICKER_HISTOGRAM_SOURCE_SOURCEFILE
257 } dt_iop_exposure_deflicker_histogram_source_t;
259 typedef struct dt_iop_exposure_params_v4_t
264 float deflicker_percentile, deflicker_target_level;
265 dt_iop_exposure_deflicker_histogram_source_t deflicker_histogram_source;
266 } dt_iop_exposure_params_v4_t;
268 dt_iop_exposure_params_v4_t *o = (dt_iop_exposure_params_v4_t *)old_params;
276 n->exposure = o->exposure;
277 n->deflicker_percentile = o->deflicker_percentile;
278 n->deflicker_target_level = o->deflicker_target_level;
281 n->compensate_exposure_bias =
FALSE;
284 if(old_version == 5 && new_version == 6)
286 typedef struct dt_iop_exposure_params_v5_t
291 float deflicker_percentile, deflicker_target_level;
292 } dt_iop_exposure_params_v5_t;
294 dt_iop_exposure_params_v5_t *o = (dt_iop_exposure_params_v5_t *)old_params;
302 n->exposure = o->exposure;
303 n->deflicker_percentile = o->deflicker_percentile;
304 n->deflicker_target_level = o->deflicker_target_level;
305 n->compensate_exposure_bias =
FALSE;
318 .deflicker_percentile = 50.0f,
319 .deflicker_target_level = -4.0f,
320 .compensate_exposure_bias = FALSE},
329 .black = -0.000244140625f,
331 .deflicker_percentile = 50.0f,
332 .deflicker_target_level = -4.0f,
333 .compensate_exposure_bias = TRUE},
370 histogram_params.
roi = &histogram_roi;
375 histogram_stats->
ch = 1u;
382static double _raw_to_ev(uint32_t raw, uint32_t black_level, uint32_t white_level)
384 const uint32_t raw_max = white_level - black_level;
388 const int64_t raw_val =
MAX((int64_t)raw - (int64_t)black_level, 1);
390 const double raw_ev = -log2(raw_max) + log2(raw_val);
397 const uint32_t *
const histogram,
406 const size_t total = (size_t)histogram_stats->
ch * histogram_stats->
pixels;
409 = CLAMP(((
double)total * (
double)
p->deflicker_percentile / (
double)100.0), 0.0, (
double)total);
416 for(uint32_t
k = 0;
k < histogram_stats->
ch;
k++)
417 n += histogram[4 *
i +
k];
430 *correction =
p->deflicker_target_level - ev;
440 float exposure =
d->params.exposure;
452 uint32_t *histogram = NULL;
463 g->deflicker_computed_exposure = exposure;
469 d->scale = 1.0 / (white -
d->black);
480 const int devid = pipe->
devid;
492 if(err != CL_SUCCESS)
goto error;
510 const float *
const restrict in = (
float*)
i;
511 float *
const restrict
out = (
float*)o;
512 const float black =
d->black;
513 const float scale =
d->scale;
514 const size_t npixels = (size_t)roi_out->
width * roi_out->
height;
515 const gboolean use_stream = (
ch == 4);
519 const dt_aligned_pixel_simd_t black_v =
dt_simd_set1(black);
520 const dt_aligned_pixel_simd_t scale_v =
dt_simd_set1(scale);
522 for(
size_t k = 0;
k < npixels;
k++)
524 const size_t p = 4 *
k;
525 const dt_aligned_pixel_simd_t in_v = dt_load_simd_aligned(in +
p);
526 dt_store_simd_nontemporal(
out +
p, (in_v - black_v) * scale_v);
532 for(
size_t k = 0;
k <
ch * npixels;
k++)
534 out[
k] = (in[
k] - black) * scale;
541 dt_iop_alpha_copy(
i, o, roi_out->
width, roi_out->
height);
556 return CLAMP(bias, -5.0f, 5.0f);
570 const float *
const restrict in = (
float*)
i;
571 float average_luminance = 0.f;
572 const float norm = 1.f / (float)(roi_out->
width * roi_out->
height);
575 for(
size_t k = 0;
k < roi_out->
width * roi_out->
height * 4;
k += 4)
580 input_profile->unbounded_coeffs_in, input_profile->
lutsize,
582 average_luminance +=
XYZ[1] * norm;
586 const float target_lightness =
dt_conf_get_float(
"darkroom/modules/exposure/lightness");
590 const float target_luminance =
XYZ[1];
591 const float white =
p->black + fmaxf(average_luminance -
p->black, 1e-6f) / target_luminance;
594 p->exposure = exposure;
596 if(
p->compensate_exposure_bias)
607 d->params.black =
p->black;
608 d->params.exposure =
p->exposure;
609 d->params.deflicker_percentile =
p->deflicker_percentile;
610 d->params.deflicker_target_level =
p->deflicker_target_level;
613 if(
p->compensate_exposure_bias)
625 dt_iop_fmt_log(self,
"commit: class=%s needs_rawprepare=%d channels=%i datatype=%i mode=%d -> deflicker=%d",
629 p->mode,
d->deflicker);
661 gtk_widget_set_sensitive(GTK_WIDGET(
g->mode),
FALSE);
665 gtk_widget_set_sensitive(GTK_WIDGET(
g->mode),
TRUE);
670 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
g->compensate_exposure_bias),
p->compensate_exposure_bias);
672 gchar *label = g_strdup_printf(_(
"compensate camera exposure (%+.1f EV)"),
_get_exposure_bias(self));
673 gtk_button_set_label(GTK_BUTTON(
g->compensate_exposure_bias), label);
674 gtk_label_set_ellipsize(GTK_LABEL(gtk_bin_get_child(GTK_BIN(
g->compensate_exposure_bias))), PANGO_ELLIPSIZE_MIDDLE);
677 g->spot_RGB[0] = 0.f;
678 g->spot_RGB[1] = 0.f;
679 g->spot_RGB[2] = 0.f;
680 g->spot_RGB[3] = 0.f;
685 const float lightness =
dt_conf_get_float(
"darkroom/modules/exposure/lightness");
692 gtk_label_set_text(
g->deflicker_used_EC,
"");
694 g->deflicker_computed_exposure = NAN;
701 gtk_stack_set_visible_child_name(GTK_STACK(
g->mode_stack),
"deflicker");
706 gtk_stack_set_visible_child_name(GTK_STACK(
g->mode_stack),
"manual");
715 const int program = 2;
734 if(
p->exposure == exposure)
return;
736 p->exposure = exposure;
751 if(
p->black == black)
return;
800 input_profile->unbounded_coeffs_in, input_profile->
lutsize,
813 gtk_label_set_text(GTK_LABEL(
g->Lch_origin),
814 g_strdup_printf(_(
"L : \t%.1f %%"),
Lch[0]));
815 gtk_widget_queue_draw(
g->origin_spot);
823 float expo =
p->exposure;
826 if(
p->compensate_exposure_bias)
833 for(
int c = 0; c < 3; c++)
834 XYZ_out[c] =
XYZ[c] * white;
839 Lab_out[1] = Lab_out[2] = 0.f;
858 dt_LCH_2_Lab(Lch_target, Lab_target);
864 float white =
XYZ[1] / XYZ_target[1];
868 if(
p->compensate_exposure_bias)
882 dt_print(
DT_DEBUG_DEV,
"[picker/exposure] apply picker=%p pipe=%p\n", (
void *)picker, (
void *)pipe);
911 gtk_widget_set_sensitive(GTK_WIDGET(
g->mode),
FALSE);
914 gtk_stack_set_visible_child_name(GTK_STACK(
g->mode_stack),
"deflicker");
919 gtk_stack_set_visible_child_name(GTK_STACK(
g->mode_stack),
"manual");
923 else if(w ==
g->exposure)
926 if(
p->black >= white)
929 else if(w ==
g->black)
932 if(
p->black >= white)
945 if(!isnan(
g->deflicker_computed_exposure))
947 gchar *str = g_strdup_printf(_(
"%.2f EV"),
g->deflicker_computed_exposure);
950 gtk_label_set_text(
g->deflicker_used_EC, str);
966 GtkAllocation allocation;
967 gtk_widget_get_allocation(widget, &allocation);
968 int width = allocation.width,
height = allocation.height;
970 cairo_t *cr = cairo_create(cst);
989 cairo_set_source_rgb(cr,
RGB[0],
RGB[1],
RGB[2]);
996 cairo_set_source_surface(crf, cst, 0, 0);
998 cairo_surface_destroy(cst);
1009 GtkAllocation allocation;
1010 gtk_widget_get_allocation(widget, &allocation);
1011 int width = allocation.width;
1012 int height = allocation.height;
1014 cairo_t *cr = cairo_create(cst);
1021 cairo_set_source_rgb(cr,
g->spot_RGB[0],
g->spot_RGB[1],
g->spot_RGB[2]);
1028 cairo_set_source_surface(crf, cst, 0, 0);
1030 cairo_surface_destroy(cst);
1042 const float lightness_range = lightness_max - lightness_min;
1047 const float x = lightness_min + stop * lightness_range;
1060 gtk_widget_queue_draw(
g->lightness_spot);
1061 gtk_widget_queue_draw(
g->target_spot);
1099 g->deflicker_histogram = NULL;
1111 g->mode_stack = GTK_STACK(gtk_stack_new());
1112 gtk_stack_set_homogeneous(GTK_STACK(
g->mode_stack),
FALSE);
1113 gtk_box_pack_start(GTK_BOX(self->
gui->
widget), GTK_WIDGET(
g->mode_stack),
TRUE,
TRUE, 0);
1116 gtk_stack_add_named(GTK_STACK(
g->mode_stack), vbox_manual,
"manual");
1119 gtk_widget_set_tooltip_text(
g->compensate_exposure_bias, _(
"automatically remove the camera exposure bias\n"
1120 "this is useful if you exposed the image to the right."));
1124 gtk_widget_set_tooltip_text(
g->exposure, _(
"adjust the exposure correction"));
1130 gtk_widget_set_tooltip_text(
g->black, _(
"adjust the black level to unclip negative RGB values.\n"
1131 "you should never use it to add more density in blacks!\n"
1132 "if poorly set, it will clip near-black colors out of gamut\n"
1133 "by pushing RGB values into negatives."));
1138 gtk_stack_add_named(GTK_STACK(
g->mode_stack), vbox_deflicker,
"deflicker");
1142 gtk_widget_set_tooltip_text(
g->deflicker_percentile,
1144 _(
"where in the histogram to meter for deflicking. E.g. 50% is median"));
1148 gtk_widget_set_tooltip_text(
g->deflicker_target_level,
1149 _(
"where to place the exposure level for processed pics, EV below overexposure."));
1151 GtkBox *hbox1 = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL,
DT_GUI_BOX_SPACING));
1154 gtk_widget_set_tooltip_text(GTK_WIDGET(
g->deflicker_used_EC), _(
"what exposure correction has actually been used"));
1155 gtk_box_pack_start(GTK_BOX(hbox1), GTK_WIDGET(
g->deflicker_used_EC),
FALSE,
FALSE, 0);
1158 g->deflicker_computed_exposure = NAN;
1165 "plugins/darkroom/exposure/mapping",
1166 _(
"spot exposure mapping"),
1167 GTK_BOX(self->
gui->
widget), GTK_PACK_END);
1170 _(
"\"correction\" automatically adjust exposure\n"
1171 "such that the input lightness is mapped to the target.\n"
1172 "\"measure\" simply shows how an input color is mapped by the exposure compensation\n"
1173 "and can be used to define a target."),
1177 gtk_box_pack_start(GTK_BOX(
g->cs.container), GTK_WIDGET(
g->spot_mode),
TRUE,
TRUE, 0);
1185 g->origin_spot = GTK_WIDGET(gtk_drawing_area_new());
1188 gtk_widget_set_tooltip_text(GTK_WIDGET(
g->origin_spot),
1189 _(
"the input color that should be mapped to the target"));
1192 gtk_box_pack_start(GTK_BOX(vvbox),
g->origin_spot,
TRUE,
TRUE, 0);
1194 g->Lch_origin = gtk_label_new(_(
"L : \tN/A"));
1195 gtk_widget_set_tooltip_text(GTK_WIDGET(
g->Lch_origin),
1196 _(
"these LCh coordinates are computed from CIE Lab 1976 coordinates"));
1197 gtk_box_pack_start(GTK_BOX(vvbox), GTK_WIDGET(
g->Lch_origin),
FALSE,
FALSE, 0);
1205 g->target_spot = GTK_WIDGET(gtk_drawing_area_new());
1208 gtk_widget_set_tooltip_text(GTK_WIDGET(
g->target_spot),
1209 _(
"the desired target exposure after mapping"));
1212 gtk_box_pack_start(GTK_BOX(vvbox),
g->target_spot,
TRUE,
TRUE, 0);
1218 gtk_box_pack_start(GTK_BOX(vvbox), GTK_WIDGET(
g->lightness_spot),
TRUE,
TRUE, 0);
1223 gtk_box_pack_start(GTK_BOX(
g->cs.container), GTK_WIDGET(hhbox),
FALSE,
FALSE, 0);
1225 g_signal_connect(G_OBJECT(self->
gui->
widget),
"draw", G_CALLBACK(
_draw), self);
static void error(char *msg)
void dt_bauhaus_slider_set_soft_range(GtkWidget *widget, float soft_min, float soft_max)
void dt_bauhaus_slider_set_digits(GtkWidget *widget, int val)
void dt_bauhaus_slider_set_default(GtkWidget *widget, float def)
void dt_bauhaus_slider_set_stop(GtkWidget *widget, float stop, float r, float g, float b)
float dt_bauhaus_slider_get(GtkWidget *widget)
int dt_bauhaus_combobox_get(GtkWidget *widget)
float dt_bauhaus_slider_get_hard_min(GtkWidget *widget)
void dt_bauhaus_slider_set(GtkWidget *widget, float pos)
void dt_bauhaus_combobox_set(GtkWidget *widget, const int pos)
void dt_bauhaus_widget_set_label(GtkWidget *widget, const char *label)
GtkWidget * dt_bauhaus_slider_new_with_range(dt_bauhaus_t *bh, dt_gui_module_t *self, float min, float max, float step, float defval, int digits)
void dt_bauhaus_slider_set_format(GtkWidget *widget, const char *format)
float dt_bauhaus_slider_get_hard_max(GtkWidget *widget)
#define DT_BAUHAUS_COMBOBOX_NEW_FULL(bauhaus, widget, action, label, tip, pos, callback, data,...)
#define DT_BAUHAUS_SLIDER_MAX_STOPS
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
return vector dt_simd_set1(valid ?(scaling+NORM_MIN) :NORM_MIN)
void dt_gui_new_collapsible_section(dt_gui_collapsible_section_t *cs, const char *confname, const char *label, GtkBox *parent, GtkPackType pack)
Create a collapsible section and pack it into the parent box.
void dt_gui_update_collapsible_section(dt_gui_collapsible_section_t *cs)
void dt_iop_color_picker_reset(dt_iop_module_t *module, gboolean keep)
gboolean dt_iop_color_picker_is_active_module(const dt_iop_module_t *module)
Tell whether one module currently owns the active darkroom picker.
GtkWidget * dt_color_picker_new(dt_iop_module_t *module, dt_iop_color_picker_kind_t kind, GtkWidget *w)
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
dt_XYZ_to_sRGB(XYZ, result)
static dt_aligned_pixel_t XYZ
static dt_aligned_pixel_t Lab
const dt_colormatrix_t dt_aligned_pixel_t out
static dt_aligned_pixel_t RGB
static dt_aligned_pixel_t Lch
void dt_conf_set_float(const char *name, float val)
float dt_conf_get_float(const char *name)
Float for name, clamped to its declared bounds.
void dt_histogram_worker(dt_dev_histogram_collection_params_t *const histogram_params, dt_dev_histogram_stats_t *histogram_stats, const void *const pixel, uint32_t **histogram, const dt_worker Worker, const dt_iop_order_iccprofile_info_t *const profile_info)
void dt_histogram_helper_cs_RAW_uint16(const dt_dev_histogram_collection_params_t *const histogram_params, const void *pixel, uint32_t *histogram, int j, const dt_iop_order_iccprofile_info_t *const profile_info)
dt_image_pipe_class_t dt_image_pipe_class(const dt_image_t *img)
const char * dt_image_pipe_class_name(const dt_image_pipe_class_t klass)
gboolean dt_image_needs_rawprepare(const dt_image_t *img)
void dt_control_log(const char *msg,...)
struct dt_bauhaus_t * dt_bauhaus_get_global(void)
#define dt_dev_add_history_item(dev, module, enable, redraw)
dt_iop_order_iccprofile_info_t * dt_ioppr_get_pipe_current_profile_info(dt_iop_module_t *module, const struct dt_dev_pixelpipe_t *pipe)
gboolean dt_dev_pixelpipe_has_preview_output(const dt_develop_t *dev, const dt_dev_pixelpipe_t *pipe, const dt_iop_roi_t *roi)
@ DT_DEV_PIXELPIPE_DISPLAY_MASK
static float _get_exposure_bias(const struct dt_iop_module_t *self)
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)
static gboolean _draw(GtkWidget *widget, cairo_t *cr, dt_iop_module_t *self)
const char ** description(struct dt_iop_module_t *self)
static void _spot_settings_changed_callback(GtkWidget *slider, dt_iop_module_t *self)
static gboolean _origin_color_draw(GtkWidget *widget, cairo_t *crf, gpointer user_data)
#define DEFLICKER_BINS_COUNT
static double _raw_to_ev(uint32_t raw, uint32_t black_level, uint32_t white_level)
#define exposure2white(x)
static void _auto_set_exposure(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe)
void init_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
static void _exposure_set_black(struct dt_iop_module_t *self, const float black)
void output_format(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_buffer_dsc_t *dsc)
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.
static void _exposure_set_white(struct dt_iop_module_t *self, const float white)
void gui_init(struct dt_iop_module_t *self)
void gui_changed(dt_iop_module_t *self, GtkWidget *w, void *previous)
static void _autoexp_disable(dt_iop_module_t *self)
#define white2exposure(x)
void cleanup_global(dt_iop_module_so_t *module)
static void _compute_correction(dt_iop_module_t *self, dt_iop_params_t *p1, const dt_dev_pixelpipe_iop_t *piece, const uint32_t *const histogram, const dt_dev_histogram_stats_t *const histogram_stats, float *correction)
int default_colorspace(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
static void _process_common_setup(dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
void gui_cleanup(struct dt_iop_module_t *self)
void init_presets(dt_iop_module_so_t *self)
static void _deflicker_prepare_histogram(dt_iop_module_t *self, uint32_t **histogram, dt_dev_histogram_stats_t *histogram_stats)
__DT_CLONE_TARGETS__ int process(struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o)
static void _paint_hue(dt_iop_module_t *self)
void cleanup_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
void init_global(dt_iop_module_so_t *module)
@ EXPOSURE_MODE_DEFLICKER
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)
int process_cl(struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out)
static gboolean _target_color_draw(GtkWidget *widget, cairo_t *crf, gpointer user_data)
void color_picker_apply(dt_iop_module_t *self, GtkWidget *picker, 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)
void dt_gui_presets_update_ldr(const char *name, dt_dev_operation_t op, const int32_t version, const int ldrflag)
void dt_gui_presets_add_generic(const char *name, dt_dev_operation_t op, const int32_t version, const void *params, const int32_t params_size, const int32_t enabled)
dt_image_t * dt_image_cache_get(const int32_t imgid, char mode)
void dt_image_cache_read_release(const dt_image_t *img)
const char ** dt_iop_set_description(dt_iop_module_t *module, const char *main_text, const char *purpose, const char *input, const char *process, const char *output)
void dt_iop_gui_leave_critical_section(dt_iop_module_t *const module)
Release what dt_iop_gui_enter_critical_section() took. Also a no-op headless.
#define dt_iop_fmt_log(module, fmt,...)
Debug helper to trace a module's input-format-driven decisions on the -d pipe channel (DT_DEBUG_PIPE)...
@ IOP_FLAGS_SUPPORTS_BLENDING
void dt_iop_gui_enter_critical_section(dt_iop_module_t *const module)
Take the module's GUI lock, serialising access to its dt_iop_gui_data_t.
GtkWidget * dt_bauhaus_toggle_from_params(dt_iop_module_t *self, const char *param)
GtkWidget * dt_bauhaus_slider_from_params(dt_iop_module_t *self, const char *param)
GtkWidget * dt_bauhaus_combobox_from_params(dt_iop_module_t *self, const char *param)
static dt_iop_gui_data_t * dt_iop_gui_data(const struct dt_iop_module_t *m)
The module's GUI data blob, NULL-safe for headless callers: IOP process() implementations read it for...
#define IOP_GUI_ALLOC(module)
GtkWidget * dt_ui_section_label_new(const gchar *str)
GtkWidget * dt_ui_label_new(const gchar *str)
void dt_print(dt_debug_thread_t thread, const char *msg,...) __attribute__((format(printf
Print to stdout when thread is enabled, prefixed with seconds since startup.
float *const restrict const size_t k
float *const restrict const size_t const size_t ch
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
#define dt_free_align(ptr)
Release memory from dt_alloc_align() and set ptr to NULL.
static void * dt_calloc_align(size_t size)
dt_alloc_align() followed by a zero fill.
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
#define dt_mipmap_cache_get(B, C, D, E, F)
#define dt_mipmap_cache_release(B)
#define DT_MODULE_INTROSPECTION(MODVER, PARAMSTYPE)
DT_MODULE() for a module whose params struct is introspected.
int dt_opencl_enqueue_kernel_2d(const int dev, const int kernel, const size_t *sizes)
int dt_opencl_create_kernel(const int prog, const char *name)
void dt_opencl_free_kernel(const int kernel)
int dt_opencl_set_kernel_arg(const int dev, const int kernel, const int num, const size_t size, const void *arg)
#define dt_omploop_sfence()
#define __OMP_PARALLEL_FOR__(...)
#define __OMP_PARALLEL_FOR_SIMD__(...)
static cairo_surface_t * dt_cairo_image_surface_create(cairo_format_t format, int width, int height)
DT_ALIGNED_PIXEL float dt_aligned_pixel_t[4]
const struct dt_histogram_roi_t * roi
dt_iop_buffer_dsc_t dsc_out
dt_iop_buffer_dsc_t dsc_in
struct dt_iop_module_t *void * data
struct dt_dev_pixelpipe_t * pipe
char filename[DT_MAX_FILENAME_LEN]
struct dt_iop_buffer_dsc_t::@55 rawprepare
dt_iop_buffer_type_t datatype
dt_aligned_pixel_t processed_maximum
dt_iop_exposure_params_t params
GtkWidget * compensate_exposure_bias
GtkWidget * deflicker_percentile
dt_gui_collapsible_section_t cs
dt_dev_histogram_stats_t deflicker_histogram_stats
uint32_t * deflicker_histogram
dt_aligned_pixel_t spot_RGB
GtkWidget * deflicker_target_level
GtkWidget * lightness_spot
float deflicker_computed_exposure
GtkLabel * deflicker_used_EC
float deflicker_target_level
dt_iop_exposure_mode_t mode
float deflicker_percentile
gboolean compensate_exposure_bias
dt_iop_global_data_t * data
dt_iop_params_t * default_params
struct dt_iop_module_gui_t * gui
struct dt_develop_t * dev
dt_iop_global_data_t * global_data
dt_aligned_pixel_t picked_color_min
dt_aligned_pixel_t picked_color_max
dt_aligned_pixel_t picked_color
A profile reduced to the arithmetic the pixel loop can run: two matrices and six tone-curve LUTs,...
int nonlinearlut
Non-zero when the profile has tone curves at all; tested as a boolean everywhere, but it is really th...
int lutsize
Entry count of each of the six LUTs. Always 65536 in practice: both callers of dt_ioppr_init_profile_...
float * lut_in[3]
Per-channel encoded -> linear tone curve, lutsize entries each, sampled over [0,1]....
dt_colormatrix_t matrix_in_transposed
Region of interest passed through the pixelpipe.
#define __DT_CLONE_TARGETS__
Telling the user something happened.