125 return C_(
"modulename",
"Raw settings");
152 void *new_params,
const int new_version)
155 typedef struct dt_iop_rawprepare_params_v1_t
161 uint16_t raw_black_level_separate[4];
162 uint16_t raw_white_point;
163 } dt_iop_rawprepare_params_v1_t;
165 if(old_version == 1 && new_version == 2)
167 dt_iop_rawprepare_params_v1_t *o = (dt_iop_rawprepare_params_v1_t *)old_params;
168 dt_iop_rawprepare_params_v2_t *
n = (dt_iop_rawprepare_params_v2_t *)new_params;
169 memcpy(
n, o,
sizeof *o);
180 "touch with great care!"),
182 _(
"linear, raw, scene-referred"),
184 _(
"linear, raw, scene-referred"));
196 .raw_black_level_separate[0] = 0,
197 .raw_black_level_separate[1] = 0,
198 .raw_black_level_separate[2] = 0,
199 .raw_black_level_separate[3] = 0,
200 .raw_white_point = UINT16_MAX },
208 const double scale = roi_in->
scale;
209 return (
int)roundf((
double)
value * scale);
238 const uint32_t crop_x = compute_proper_crop(piece, roi_in,
d->
x);
239 const uint32_t crop_y = compute_proper_crop(piece, roi_in,
d->
y);
244 "[rawprepare] pipe %p (%s) thread %lu piece %p dsc %p roi_in=(%d,%d) scale=%f d->x,y=(%d,%d) -> crop=(%u,%u) filters=0x%x -> 0x%x\n",
249 (
unsigned long)pthread_self(), (
void *)piece, (
void *)dsc,
250 roi_in->
x, roi_in->
y, roi_in->
scale,
d->x,
d->y, crop_x, crop_y,
263 for(
int i = 0;
i < 6; ++
i)
265 for(
int j = 0; j < 6; ++j)
285static void _rawprepare_offset(
const int32_t crop_x,
const int32_t crop_y,
const double scale,
double *dx,
288 *dx = (
double)crop_x * scale;
289 *dy = (
double)crop_y * scale;
297 roi_out->
x = roi_out->
y = 0;
299 const double x =
g->x +
g->width;
300 const double y =
g->y +
g->height;
301 const double scale = roi_in->
scale;
302 roi_out->
width = (int)round((
double)roi_out->
width -
x * scale);
303 roi_out->
height = (int)round((
double)roi_out->
height - y * scale);
307 float *
const restrict points,
size_t points_count)
314 if (
d->x == 0 &&
d->y == 0)
return 1;
316 double x = 0.0, y = 0.0;
319 for(
size_t i = 0;
i < points_count * 2;
i += 2)
330 float *
const restrict points,
size_t points_count)
337 if (
d->x == 0 &&
d->y == 0)
return 1;
339 double x = 0.0, y = 0.0;
342 for(
size_t i = 0;
i < points_count * 2;
i += 2)
387 const double x =
d->x +
d->width;
388 const double y =
d->y +
d->height;
389 const double scale = roi_in->
scale;
390 roi_in->
width = (int)round((
double)roi_in->
width +
x * scale);
391 roi_in->
height = (int)round((
double)roi_in->
height + y * scale);
414 const int row,
const int col,
415 const int32_t
x,
const int32_t y)
417 return ((((
row + roi_out->
y + y) & 1) << 1) + ((col + roi_out->
x +
x) & 1));
438 const int csx = compute_proper_crop(piece, roi_in,
p->
x);
439 const int csy = compute_proper_crop(piece, roi_in,
p->
y);
443 const uint16_t *
const restrict in = (
const uint16_t *
const restrict)input;
445 int max_RGB[4] = { 0 };
449 for(
int j = 0; j < roi_out->
width; j++)
451 const size_t channel = BL(roi_out,
i, j,
p->
x,
p->y);
452 const size_t pin = roi_in->
width * (
i + csy) + j + csx;
453 const int pixel = in[pin];
454 max_RGB[channel] =
MAX(max_RGB[channel], pixel);
468 const void *
const ivoid,
void *
const ovoid)
475 const int input_width = roi_in->
width;
476 const int roi_x = roi_out->
x;
477 const int roi_y = roi_out->
y;
478 const int cfa_x = roi_x +
d->x;
479 const int cfa_y = roi_y +
d->y;
483 const int csx = compute_proper_crop(piece, roi_in,
d->
x);
484 const int csy = compute_proper_crop(piece, roi_in,
d->
y);
490 const uint16_t *
const in = (
const uint16_t *
const)ivoid;
491 float *
const out = (
float *
const)
ovoid;
492 const int x_phase = cfa_x & 1;
494 for(
int k = 0;
k < 4;
k++) inv_div[
k] = 1.0f /
d->div[
k];
496 for(
int j = 0; j <
height; j++)
500 const size_t pin = (size_t)input_width * (j + csy) + csx;
501 const size_t pout = (size_t)j *
width;
502 const int row_phase = ((j + cfa_y) & 1) << 1;
503 const int id0 = row_phase + x_phase;
504 const int id1 = row_phase + (x_phase ^ 1);
505 const float sub0 =
d->sub[id0];
506 const float sub1 =
d->sub[id1];
507 const float inv0 = inv_div[id0];
508 const float inv1 = inv_div[id1];
513 out[pout +
i + 0] = ((float)in[pin +
i + 0] - sub0) * inv0;
514 out[pout +
i + 1] = ((float)in[pin +
i + 1] - sub1) * inv1;
519 const int id = row_phase + ((x_phase +
i) & 1);
520 out[pout +
i] = ((float)in[pin +
i] -
d->sub[
id]) * inv_div[id];
529 const float *
const in = (
const float *
const)ivoid;
530 float *
const out = (
float *
const)
ovoid;
531 const int x_phase = cfa_x & 1;
533 for(
int k = 0;
k < 4;
k++) inv_div[
k] = 1.0f /
d->div[
k];
536 for(
int j = 0; j <
height; j++)
540 const size_t pin = (size_t)input_width * (j + csy) + csx;
541 const size_t pout = (size_t)j *
width;
542 const int row_phase = ((j + cfa_y) & 1) << 1;
543 const int id0 = row_phase + x_phase;
544 const int id1 = row_phase + (x_phase ^ 1);
545 const float sub0 =
d->sub[id0];
546 const float sub1 =
d->sub[id1];
547 const float inv0 = inv_div[id0];
548 const float inv1 = inv_div[id1];
553 out[pout +
i + 0] = (in[pin +
i + 0] - sub0) * inv0;
554 out[pout +
i + 1] = (in[pin +
i + 1] - sub1) * inv1;
559 const int id = row_phase + ((x_phase +
i) & 1);
560 out[pout +
i] = (in[pin +
i] -
d->sub[id]) * inv_div[
id];
568 const float *
const in = (
const float *
const)ivoid;
569 float *
const out = (
float *
const)
ovoid;
571 const float sub =
d->sub[0];
572 const float div =
d->div[0];
576 for(
int j = 0; j <
height; j++)
580 for(
int c = 0; c <
ch; c++)
582 const size_t pin = (size_t)
ch * (input_width * (j + csy) + csx +
i) + c;
583 const size_t pout = (size_t)
ch * (j *
width +
i) + c;
585 out[pout] = (in[pin] - sub) / div;
594 const uint32_t map_w =
d->gainmaps[0]->map_points_h;
595 const uint32_t map_h =
d->gainmaps[0]->map_points_v;
596 const float im_to_rel_x = 1.0f / piece->
buf_in.
width;
598 const float rel_to_map_x = 1.0f /
d->gainmaps[0]->map_spacing_h;
599 const float rel_to_map_y = 1.0f /
d->gainmaps[0]->map_spacing_v;
600 const float map_origin_h =
d->gainmaps[0]->map_origin_h;
601 const float map_origin_v =
d->gainmaps[0]->map_origin_v;
602 float *
const out = (
float *
const)
ovoid;
604 for(
int j = 0; j <
height; j++)
606 const float y_map = CLAMP(((roi_y + csy + j) * im_to_rel_y - map_origin_v) * rel_to_map_y, 0, map_h);
607 const uint32_t y_i0 =
MIN(y_map, map_h - 1);
608 const uint32_t y_i1 =
MIN(y_i0 + 1, map_h - 1);
609 const float y_frac = y_map - y_i0;
610 const float * restrict map_row0[4];
611 const float * restrict map_row1[4];
612 for(
int f = 0;
f < 4;
f++)
614 map_row0[
f] = &
d->gainmaps[
f]->map_gain[y_i0 * map_w];
615 map_row1[
f] = &
d->gainmaps[
f]->map_gain[y_i1 * map_w];
619 const int id = BL(roi_out, j,
i,
d->
x,
d->y);
620 const float x_map = CLAMP(((roi_x + csx +
i) * im_to_rel_x - map_origin_h) * rel_to_map_x, 0, map_w);
621 const uint32_t x_i0 =
MIN(x_map, map_w - 1);
622 const uint32_t x_i1 =
MIN(x_i0 + 1, map_w - 1);
623 const float x_frac = x_map - x_i0;
624 const float gain_top = (1.0f - x_frac) * map_row0[
id][x_i0] + x_frac * map_row0[
id][x_i1];
625 const float gain_bottom = (1.0f - x_frac) * map_row1[
id][x_i0] + x_frac * map_row1[
id][x_i1];
626 out[j *
width +
i] *= (1.0f - y_frac) * gain_top + y_frac * gain_bottom;
637 cl_mem dev_in, cl_mem dev_out)
647 const int devid = pipe->
devid;
648 cl_mem dev_sub = NULL;
649 cl_mem dev_div = NULL;
650 cl_mem dev_gainmap[4] = {0};
654 gboolean gainmap_args =
FALSE;
659 if(
d->apply_gainmaps)
671 if(
d->apply_gainmaps)
686 const int csx = compute_proper_crop(piece, roi_in,
d->
x), csy = compute_proper_crop(piece, roi_in,
d->
y);
710 const int map_size[2] = {
d->gainmaps[0]->map_points_h,
d->gainmaps[0]->map_points_v };
712 const float rel_to_map[2] = { 1.0 /
d->gainmaps[0]->map_spacing_h, 1.0 /
d->gainmaps[0]->map_spacing_v };
713 const float map_origin[2] = {
d->gainmaps[0]->map_origin_h,
d->gainmaps[0]->map_origin_v };
715 for(
int i = 0;
i < 4;
i++)
718 if(dev_gainmap[
i] == NULL)
goto error;
720 map_size[0], map_size[1],
sizeof(
float));
721 if(err != CL_SUCCESS)
goto error;
734 if(err != CL_SUCCESS)
goto error;
772 if(imgid <= 0)
return FALSE;
781 if(test)
return FALSE;
807 for(
int i = 0;
i < 4;
i++)
813 g->plane != 0 ||
g->planes != 1 ||
g->map_planes != 1 ||
814 g->row_pitch != 2 ||
g->col_pitch != 2 ||
815 g->map_points_v < 2 ||
g->map_points_h < 2 ||
816 g->top > 1 ||
g->left > 1 ||
826 uint32_t filter = ((
g->top & 1) << 1) + (
g->left & 1);
827 gainmaps[filter] =
g;
831 if(gainmaps[0] == NULL || gainmaps[1] == NULL || gainmaps[2] == NULL || gainmaps[3] == NULL)
835 for(
int i = 1;
i < 4;
i++)
837 if(gainmaps[
i]->map_points_h != gainmaps[0]->map_points_h ||
838 gainmaps[
i]->map_points_v != gainmaps[0]->map_points_v ||
839 gainmaps[
i]->map_spacing_h != gainmaps[0]->map_spacing_h ||
840 gainmaps[
i]->map_spacing_v != gainmaps[0]->map_spacing_v ||
841 gainmaps[
i]->map_origin_h != gainmaps[0]->map_origin_h ||
842 gainmaps[
i]->map_origin_v != gainmaps[0]->map_origin_v)
847 memcpy(gainmaps_out, gainmaps,
sizeof(gainmaps));
867 for(
int i = 0;
i < 4;
i++)
869 g_free(
d->gainmaps[
i]);
870 d->gainmaps[
i] = NULL;
890 for(
int i = 0; owned &&
i < 4;
i++)
896 d->gainmaps[
i] = g_malloc(sz);
903 memcpy(
d->gainmaps[
i], src[
i], sz);
920 d->height =
p->height;
924 const float white = (float)
p->raw_white_point;
926 for(
int i = 0;
i < 4;
i++)
928 d->sub[
i] = (float)
p->raw_black_level_separate[
i];
929 d->div[
i] = (white -
d->sub[
i]);
934 const float normalizer
936 const float white = (float)
p->raw_white_point / normalizer;
938 for(
int i = 0;
i < 4;
i++)
940 black +=
p->raw_black_level_separate[
i] / normalizer;
944 for(
int i = 0;
i < 4;
i++)
947 d->div[
i] = (white - black);
952 for(uint8_t
i = 0;
i < 4;
i++)
954 black += (float)
p->raw_black_level_separate[
i];
956 d->rawprepare.raw_black_level = (uint16_t)(black / 4.0f);
957 d->rawprepare.raw_white_point =
p->raw_white_point;
977 dt_iop_fmt_log(self,
"commit: class=%s needs_rawprepare=%d normalized=%d cl_ok=%d -> enabled=%d",
999 if(
g->x == 0 &&
g->y == 0)
return 1;
1001 double x = 0.0, y = 0.0;
1003 for(
size_t i = 0;
i < points_count * 2;
i += 2)
1015 if(
g->x == 0 &&
g->y == 0)
return 1;
1017 double x = 0.0, y = 0.0;
1019 for(
size_t i = 0;
i < points_count * 2;
i += 2)
1047 record->
data = data;
1075 const gboolean
state = active && current_state;
1076 dt_iop_fmt_log(self,
"force_enable: class=%s supported=%d current=%d -> %d",
1078 active, current_state,
state);
1111 const int program = 2;
1141 for(
int i = 0;
i < 4;
i++)
1142 av +=
p->raw_black_level_separate[
i];
1144 for(
int i = 0;
i < 4;
i++)
1149 for(
int i = 1;
i < 4;
i++)
1150 gtk_widget_set_visible(
g->black_level_separate[
i], !is_monochrome);
1167 if(w ==
g->black_level_separate[0])
1169 const int val =
p->raw_black_level_separate[0];
1170 for(
int i = 1;
i < 4;
i++)
1177 = { N_(
"black level 0"),
1178 N_(
"black level 1"),
1179 N_(
"black level 2"),
1180 N_(
"black level 3") };
1188 for(
int i = 0;
i < 4;
i++)
1190 gchar *par = g_strdup_printf(
"raw_black_level_separate[%i]",
i);
1194 gtk_widget_set_tooltip_text(
g->black_level_separate[
i], _(
black_label[
i]));
1201 gtk_widget_set_tooltip_text(
g->white_point, _(
"white point"));
1205 gtk_widget_set_tooltip_text(
g->flat_field, _(
"flat field correction to compensate for lens shading"));
1207 gtk_box_pack_start(GTK_BOX(self->
gui->
widget),
1211 gtk_widget_set_tooltip_text(
g->x, _(
"crop from left border"));
1215 gtk_widget_set_tooltip_text(
g->y, _(
"crop from top"));
1219 gtk_widget_set_tooltip_text(
g->width, _(
"crop from right border"));
1223 gtk_widget_set_tooltip_text(
g->height, _(
"crop from bottom"));
1230 GtkWidget *label_non_raw =
dt_ui_label_new(_(
"raw black/white point correction\nonly works for the sensors that need it."));
1232 gtk_stack_add_named(GTK_STACK(self->
gui->
widget), label_non_raw,
"non_raw");
1233 gtk_stack_add_named(GTK_STACK(self->
gui->
widget), box_raw,
"raw");
static void error(char *msg)
void dt_bauhaus_slider_set_soft_max(GtkWidget *widget, float val)
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)
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
const dt_colormatrix_t dt_aligned_pixel_t out
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_is_hdr(const dt_image_t *img)
void dt_image_print_debug_info(const dt_image_t *img, const char *context)
gboolean dt_image_needs_rawprepare(const dt_image_t *img)
#define dt_database_start_transaction()
#define dt_database_release_transaction()
int supported(struct dt_imageio_module_storage_t *storage, struct dt_imageio_module_format_t *format)
Where things are on the image, answered without a pipeline.
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_MONOCHROME_BAYER
void dt_image_cache_write_release(dt_image_t *img, dt_image_cache_write_mode_t mode)
dt_image_t * dt_image_cache_get(const int32_t imgid, char mode)
void dt_image_cache_read_release(const dt_image_t *img)
void dt_iop_copy_image_roi(float *const __restrict__ out, const float *const __restrict__ in, const size_t ch, const dt_iop_roi_t *const __restrict__ roi_in, const dt_iop_roi_t *const __restrict__ roi_out, const int zero_pad)
uint32_t dt_rawspeed_crop_dcraw_filters(uint32_t filters, uint32_t crop_x, uint32_t crop_y)
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)
#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_TILING_FULL_ROI
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)
static float kernel(const float *x, const float *y)
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.
static void dt_free_gpointer(gpointer ptr)
g_free() one pointer, with the signature GDestroyNotify wants.
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
#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)
void * dt_opencl_alloc_device(const int devid, const int width, const int height, const int bpp)
int dt_opencl_create_kernel(const int prog, const char *name)
void * dt_opencl_copy_host_to_device_constant(const int devid, const size_t size, void *host)
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)
void dt_opencl_release_mem_object(cl_mem mem)
int dt_opencl_write_host_to_device(const int devid, void *host, void *device, const int width, const int height, const int bpp)
#define __OMP_PARALLEL_FOR__(...)
#define __OMP_PARALLEL_FOR_SIMD__(...)
@ DT_DEV_PIXELPIPE_THUMBNAIL
@ DT_DEV_PIXELPIPE_EXPORT
@ DT_DEV_PIXELPIPE_PREVIEW
static int _rawprepare_geometry_transform(const void *data, const dt_geometry_record_t *const record, dt_geometry_chain_t *chain, float *points, size_t points_count)
void distort_mask(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const float *const in, float *const out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out)
const char ** description(struct dt_iop_module_t *self)
void modify_roi_out(dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_roi_t *roi_out, const dt_iop_roi_t *const roi_in)
int distort_backtransform(dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, float *const restrict points, size_t points_count)
__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 ivoid, void *const ovoid)
static gboolean _own_gainmaps(const int32_t imgid, dt_iop_rawprepare_data_t *d)
int distort_transform(dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, float *const restrict points, size_t points_count)
static void _rawprepare_offset(const int32_t crop_x, const int32_t crop_y, const double scale, double *dx, double *dy)
The translation the trim applies, at scale.
void gui_update(dt_iop_module_t *self)
Refresh GUI controls from current params and configuration.
static void _free_owned_gainmaps(dt_iop_rawprepare_data_t *d)
dt_iop_rawprepare_flat_field_t
void modify_roi_in(dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *const roi_out, dt_iop_roi_t *roi_in)
static gboolean enable(const dt_image_t *image)
static const dt_geometry_vtable_t _rawprepare_geometry_vtable
int process_cl(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 void _rawprepare_geometry_map_size(const void *data, const dt_iop_roi_t *const in, dt_iop_roi_t *out)
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)
gboolean geometry_record(dt_iop_module_t *self, const void *params, dt_geometry_record_t *record)
void cleanup_global(dt_iop_module_so_t *self)
void gui_init(dt_iop_module_t *self)
void gui_changed(dt_iop_module_t *self, GtkWidget *w, void *previous)
void reload_defaults(dt_iop_module_t *self)
void cleanup_pipe(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
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)
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 *input)
RawSpeed tends to under-evaluate the white point of RAW images, which leads to RGB values > 1 after n...
static void _rawprepare_map_size(const dt_iop_rawprepare_geometry_t *const g, const dt_iop_roi_t *const roi_in, dt_iop_roi_t *roi_out)
Input rect -> output rect, shrunk by the total margin at the input's own scale.
void init_presets(dt_iop_module_so_t *self)
gboolean check_gain_maps(const int32_t imgid)
static gboolean _validate_gain_maps(const dt_image_t *const image, dt_dng_gain_map_t **gainmaps_out)
void commit_params(dt_iop_module_t *self, dt_iop_params_t *params, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
gboolean force_enable(struct dt_iop_module_t *self, const gboolean current_state)
void init_pipe(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
static void _update_output_cfa_descriptor(const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *const roi_in, dt_iop_buffer_dsc_t *dsc)
static gboolean image_set_rawcrops(const int32_t imgid, int dx, int dy)
static int _rawprepare_geometry_backtransform(const void *data, const dt_geometry_record_t *const record, dt_geometry_chain_t *chain, float *points, size_t points_count)
static int image_is_normalized(const dt_image_t *const image)
const gchar * black_label[]
void init_global(dt_iop_module_so_t *self)
int legacy_params(dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)
#define DT_DEBUG_CONTROL_SIGNAL_RAISE(ctlsig, signal,...)
struct dt_control_signal_t * dt_control_signal_get_global(void)
@ DT_SIGNAL_METADATA_UPDATE
float dt_aligned_pixel_simd_t __attribute__((vector_size(16), aligned(16)))
Apply one channel's tone curve to each of the three colour channels, or pass the channel through unto...
static const dt_aligned_pixel_simd_t value
const float uint32_t state[4]
unsigned __int64 uint64_t
dt_iop_buffer_dsc_t dsc_out
dt_iop_buffer_dsc_t dsc_in
struct dt_iop_module_t *void * data
dt_dev_pixelpipe_type_t type
struct dt_develop_t * dev
One module instance's contribution, as data.
const dt_geometry_vtable_t * vtable
void(* free_data)(void *data)
A module's geometry, evaluated. Pure functions of the record's own data.
void(* map_size)(const void *data, const dt_iop_roi_t *const in, dt_iop_roi_t *out)
Full-resolution input rect -> output rect. Mirrors modify_roi_out() at scale 1.
uint16_t raw_black_level_separate[4]
struct dt_iop_buffer_dsc_t::@55 rawprepare
dt_iop_buffer_type_t datatype
dt_aligned_pixel_t processed_maximum
dt_iop_global_data_t * data
int32_t hide_enable_button
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
struct dt_iop_rawprepare_data_t::@45 rawprepare
dt_dng_gain_map_t * gainmaps[4]
int kernel_rawprepare_1f_gainmap
int kernel_rawprepare_1f_unnormalized
int kernel_rawprepare_1f_unnormalized_gainmap
GtkWidget * black_level_separate[4]
uint16_t raw_black_level_separate[4]
dt_iop_rawprepare_flat_field_t flat_field
Region of interest passed through the pixelpipe.
#define __DT_CLONE_TARGETS__
typedef double((*spd)(unsigned long int wavelength, double TempK))