73#include <gdk/gdkkeysyms.h>
83#define DT_IOP_BORDERS_ASPECT_COUNT 12
84#define DT_IOP_BORDERS_ASPECT_IMAGE_IDX 0
85#define DT_IOP_BORDERS_ASPECT_CONSTANT_IDX 11
86#define DT_IOP_BORDERS_ASPECT_IMAGE_VALUE 0.0f
87#define DT_IOP_BORDERS_ASPECT_CONSTANT_VALUE -1.0f
88#define DT_IOP_BORDERS_ASPECT_ORIENTATION_AUTO 0
89#define DT_IOP_BORDERS_ASPECT_ORIENTATION_PORTRAIT 1
90#define DT_IOP_BORDERS_ASPECT_ORIENTATION_LANDSCAPE 2
91#define DT_IOP_BORDERS_POSITION_H_COUNT 5
92#define DT_IOP_BORDERS_POSITION_V_COUNT 5
145 void *new_params,
const int new_version)
147 if(old_version == 1 && new_version == 3)
149 typedef struct dt_iop_borders_params_v1_t
154 } dt_iop_borders_params_v1_t;
156 dt_iop_borders_params_v1_t *o = (dt_iop_borders_params_v1_t *)old_params;
161 memcpy(
n->color, o->color,
sizeof(o->color));
162 n->aspect = (o->aspect < 1) ? 1 / o->aspect : o->aspect;
166 n->size = fabsf(o->size);
167 n->max_border_size =
FALSE;
171 if(old_version == 2 && new_version == 3)
173 typedef struct dt_iop_borders_params_v2_t
177 char aspect_text[20];
186 float frame_color[3];
187 } dt_iop_borders_params_v2_t;
189 dt_iop_borders_params_v2_t *o = (dt_iop_borders_params_v2_t *)old_params;
192 memcpy(
n, o,
sizeof(
struct dt_iop_borders_params_v2_t));
193 n->max_border_size =
FALSE;
218 _(
"linear or non-linear, RGB, display-referred"),
220 _(
"linear or non-linear, RGB, display-referred"));
245 float *
const restrict points,
size_t points_count)
251 const int border_size_t = border_tot_height *
d->pos_v;
252 const int border_size_l = border_tot_width *
d->pos_h;
255 if (border_size_l == 0 && border_size_t == 0)
return 1;
257 for(
size_t i = 0;
i < points_count * 2;
i += 2)
259 points[
i] += border_size_l;
260 points[
i + 1] += border_size_t;
266 float *
const restrict points,
size_t points_count)
272 const int border_size_t = border_tot_height *
d->pos_v;
273 const int border_size_l = border_tot_width *
d->pos_h;
276 if (border_size_l == 0 && border_size_t == 0)
return 1;
278 for(
size_t i = 0;
i < points_count * 2;
i += 2)
280 points[
i] -= border_size_l;
281 points[
i + 1] -= border_size_t;
288 const float *
const in,
float *
const out,
const dt_iop_roi_t *
const roi_in,
296 const int border_size_t = border_tot_height *
d->pos_v;
297 const int border_size_l = border_tot_width *
d->pos_h;
298 const int border_in_x =
MAX(border_size_l - roi_out->
x, 0);
299 const int border_in_y =
MAX(border_size_t - roi_out->
y, 0);
306 for(
int j = 0; j < roi_in->
height; j++)
308 float *outb =
out + (size_t)(j + border_in_y) * roi_out->
width + border_in_x;
309 const float *inb = in + (size_t)j * roi_in->
width;
310 memcpy(outb, inb,
sizeof(
float) * roi_in->
width);
323 const float size = fabsf(
d->size);
324 if(
size == 0)
return;
331 if(roi_in->
width > roi_in->
height || !
d->max_border_size)
346 float image_aspect = roi_in->
width / (float)(roi_in->
height);
384 roi_in->
x =
MAX(roi_out->
x - bw *
d->pos_h, 0);
385 roi_in->
y =
MAX(roi_out->
y - bh *
d->pos_v, 0);
387 roi_in->
width -=
MAX(bw *
d->pos_h - roi_out->
x, 0);
388 roi_in->
height -=
MAX(bh *
d->pos_v - roi_out->
y, 0);
426 for (
int i = 0;
i < npixels;
i++)
429 for (
int c = 0; c < 4; c++)
431 buf[4*
i+c] = color[c];
437static inline void copy_pixels(
float *
out,
const float *
const in,
const int npixels)
439 for (
int i = 0;
i < npixels;
i++)
442 for (
int c = 0; c < 4; c++)
444 out[4*
i+c] = in[4*
i+c];
462 else if (row < binfo->fl_top ||
row >= binfo->
fl_bot)
469 else if (row < binfo->image_top ||
row >= binfo->
image_bot)
513 const int border_size_t = border_tot_height *
d->pos_v;
514 const int border_size_b = border_tot_height - border_size_t;
515 const int border_size_l = border_tot_width *
d->pos_h;
516 const int border_size_r = border_tot_width - border_size_l;
517 const int border_in_x =
MAX(border_size_l - roi_out->
x, 0);
518 const int border_in_y =
MAX(border_size_t - roi_out->
y, 0);
521 const int border_min_size =
MIN(
MIN(border_size_t, border_size_b),
MIN(border_size_l, border_size_r));
522 const int frame_size = border_min_size *
d->frame_size;
524 const int b_in_x = CLAMP(border_in_x, 0, roi_out->
width - 1);
526 { .
bcolor = {
d->color[0],
d->color[1],
d->color[2], 1.0f },
527 .flcolor = {
d->frame_color[0],
d->frame_color[1],
d->frame_color[2], 1.0f },
528 .border_top = border_in_y,
529 .fl_top = border_in_y,
530 .image_top = border_in_y,
531 .border_left = b_in_x,
533 .image_left = b_in_x,
534 .image_right = b_in_x + roi_in->
width,
535 .fl_right = roi_out->
width,
536 .border_right = roi_out->
width,
537 .width = roi_out->
width,
538 .image_bot = border_in_y + roi_in->
height,
539 .fl_bot = roi_out->
height,
540 .border_bot = roi_out->
height,
541 .height = roi_out->
height,
542 .stride = roi_in->
width
546 const int image_lx = border_size_l - roi_out->
x;
547 const int image_ty = border_size_t - roi_out->
y;
548 const int frame_space = border_min_size - frame_size;
549 const int frame_offset = frame_space *
d->frame_offset;
550 const int frame_tl_in_x =
MAX(border_in_x - frame_offset, 0);
551 const int frame_tl_out_x =
MAX(frame_tl_in_x - frame_size, 0);
552 const int frame_tl_in_y =
MAX(border_in_y - frame_offset, 0);
553 const int frame_tl_out_y =
MAX(frame_tl_in_y - frame_size, 0);
555 binfo.
fl_top = frame_tl_in_y;
557 binfo.
fl_left = CLAMP(frame_tl_in_x, 0, roi_out->
width);
558 const int frame_in_width = floor((piece->
buf_in.
width * roi_in->
scale) + frame_offset * 2);
559 const int frame_in_height = floor((piece->
buf_in.
height * roi_in->
scale) + frame_offset * 2);
560 const int frame_out_width = frame_in_width + frame_size * 2;
561 const int frame_out_height = frame_in_height + frame_size * 2;
562 const int frame_br_in_x = CLAMP(image_lx - frame_offset + frame_in_width - 1, 0, roi_out->
width - 1);
563 const int frame_br_in_y = CLAMP(image_ty - frame_offset + frame_in_height - 1, 0, roi_out->
height - 1);
565 const int frame_br_out_x
566 = (
d->frame_offset == 1.0f && (border_min_size ==
MIN(border_size_l, border_size_r)))
568 : CLAMP(image_lx - frame_offset - frame_size + frame_out_width - 1, 0, roi_out->
width - 1);
569 const int frame_br_out_y
570 = (
d->frame_offset == 1.0f && (border_min_size ==
MIN(border_size_t, border_size_b)))
572 : CLAMP(image_ty - frame_offset - frame_size + frame_out_height - 1, 0, roi_out->
height - 1);
575 binfo.
fl_bot = frame_br_in_y + 1;
591 const int devid = pipe->
devid;
598 const int border_size_t = border_tot_height *
d->pos_v;
599 const int border_size_b = border_tot_height - border_size_t;
600 const int border_size_l = border_tot_width *
d->pos_h;
601 const int border_size_r = border_tot_width - border_size_l;
602 const int border_in_x =
MAX(border_size_l - roi_out->
x, 0);
603 const int border_in_y =
MAX(border_size_t - roi_out->
y, 0);
606 const float col[4] = {
d->color[0],
d->color[1],
d->color[2], 1.0f };
616 if(err != CL_SUCCESS)
goto error;
619 const int border_min_size =
MIN(
MIN(border_size_t, border_size_b),
MIN(border_size_l, border_size_r));
620 const int frame_size = border_min_size *
d->frame_size;
623 const float col_frame[4] = {
d->frame_color[0],
d->frame_color[1],
d->frame_color[2], 1.0f };
624 const int image_lx = border_size_l - roi_out->
x;
625 const int image_ty = border_size_t - roi_out->
y;
626 const int frame_space = border_min_size - frame_size;
627 const int frame_offset = frame_space *
d->frame_offset;
628 const int frame_tl_in_x =
MAX(border_in_x - frame_offset, 0);
629 const int frame_tl_out_x =
MAX(frame_tl_in_x - frame_size, 0);
630 const int frame_tl_in_y =
MAX(border_in_y - frame_offset, 0);
631 const int frame_tl_out_y =
MAX(frame_tl_in_y - frame_size, 0);
632 const int frame_in_width = floor((piece->
buf_in.
width * roi_in->
scale) + frame_offset * 2);
633 const int frame_in_height = floor((piece->
buf_in.
height * roi_in->
scale) + frame_offset * 2);
634 const int frame_out_width = frame_in_width + frame_size * 2;
635 const int frame_out_height = frame_in_height + frame_size * 2;
636 const int frame_br_in_x = CLAMP(image_lx - frame_offset + frame_in_width - 1, 0, roi_out->
width - 1);
637 const int frame_br_in_y = CLAMP(image_ty - frame_offset + frame_in_height - 1, 0, roi_out->
height - 1);
639 const int frame_br_out_x
640 = (
d->frame_offset == 1.0f && (border_min_size ==
MIN(border_size_l, border_size_r)))
642 : CLAMP(image_lx - frame_offset - frame_size + frame_out_width - 1, 0, roi_out->
width);
643 const int frame_br_out_y
644 = (
d->frame_offset == 1.0f && (border_min_size ==
MIN(border_size_t, border_size_b)))
646 : CLAMP(image_ty - frame_offset - frame_size + frame_out_height - 1, 0, roi_out->
height);
648 const int roi_frame_in_width = frame_br_in_x - frame_tl_in_x;
649 const int roi_frame_in_height = frame_br_in_y - frame_tl_in_y;
650 const int roi_frame_out_width = frame_br_out_x - frame_tl_out_x;
651 const int roi_frame_out_height = frame_br_out_y - frame_tl_out_y;
660 if(err != CL_SUCCESS)
goto error;
669 if(err != CL_SUCCESS)
goto error;
672 size_t iorigin[] = { 0, 0, 0 };
673 size_t oorigin[] = { border_in_x, border_in_y, 0 };
674 size_t region[] = { roi_in->
width, roi_in->
height, 1 };
678 if(err != CL_SUCCESS)
goto error;
691 const int program = 2;
740 { 0.0f, 0.0f, 0.0f },
745 p.color[0] =
p.color[1] =
p.color[2] = 0.0f;
746 p.frame_color[0] =
p.frame_color[1] =
p.frame_color[2] = 1.0f;
764 if(fabsf(
p->frame_color[0] - self->
picked_color[0]) < 0.0001f
765 && fabsf(
p->frame_color[1] - self->
picked_color[1]) < 0.0001f
766 && fabsf(
p->frame_color[2] - self->
picked_color[2]) < 0.0001f)
777 if(picker ==
g->frame_picker)
782 gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(
g->frame_colorpick), &c);
784 else if(picker ==
g->border_picker)
789 gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(
g->colorpick), &c);
803 g_strlcpy(
p->aspect_text, text,
sizeof(
p->aspect_text));
807 g_strlcpy(
p->aspect_text, text,
sizeof(
p->aspect_text));
808 p->aspect =
g->aspect_ratios[which];
825 g_strlcpy(
p->aspect_text, text,
sizeof(
p->aspect_text));
829 g_strlcpy(
p->pos_h_text, text,
sizeof(
p->pos_h_text));
830 p->pos_h =
g->pos_h_ratios[which];
847 g_strlcpy(
p->aspect_text, text,
sizeof(
p->aspect_text));
851 g_strlcpy(
p->pos_v_text, text,
sizeof(
p->pos_v_text));
852 p->pos_v =
g->pos_v_ratios[which];
865 if (w ==
g->aspect_slider)
869 else if(w ==
g->pos_h_slider)
873 else if(w ==
g->pos_v_slider)
888 gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(widget), &c);
890 p->color[1] = c.green;
891 p->color[2] = c.blue;
906 gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(widget), &c);
907 p->frame_color[0] = c.red;
908 p->frame_color[1] = c.green;
909 p->frame_color[2] = c.blue;
924 if(fabsf(
p->aspect -
g->aspect_ratios[
k]) < 0.01f)
938 if(fabsf(
p->pos_h -
g->pos_h_ratios[
k]) < 0.01f)
952 if(fabsf(
p->pos_v -
g->pos_v_ratios[
k]) < 0.01f)
964 GdkRGBA c = (GdkRGBA){.red =
p->color[0], .green =
p->color[1], .blue =
p->color[2], .alpha = 1.0 };
965 gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(
g->colorpick), &c);
968 GdkRGBA
fc = (GdkRGBA){
969 .red =
p->frame_color[0], .green =
p->frame_color[1], .blue =
p->frame_color[2], .alpha = 1.0
971 gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(
g->frame_colorpick), &
fc);
995 g->aspect_ratios[
i++] = 3.0f;
996 g->aspect_ratios[
i++] = 95.0f / 33.0f;
997 g->aspect_ratios[
i++] = 2.0f;
998 g->aspect_ratios[
i++] = 16.0f / 9.0f;
999 g->aspect_ratios[
i++] =
PHI;
1000 g->aspect_ratios[
i++] = 3.0f / 2.0f;
1001 g->aspect_ratios[
i++] = 297.0f / 210.0f;
1002 g->aspect_ratios[
i++] = sqrtf(2.0f);
1003 g->aspect_ratios[
i++] = 4.0f / 3.0f;
1004 g->aspect_ratios[
i++] = 1.0f;
1025 g->pos_h_ratios[
i++] = 0.5f;
1026 g->pos_h_ratios[
i++] = 1.0f / 3.0f;
1027 g->pos_h_ratios[
i++] = 3.0f / 8.0f;
1028 g->pos_h_ratios[
i++] = 5.0f / 8.0f;
1029 g->pos_h_ratios[
i++] = 2.0f / 3.0f;
1031 g->pos_v_ratios[
i++] = 0.5f;
1032 g->pos_v_ratios[
i++] = 1.0f / 3.0f;
1033 g->pos_v_ratios[
i++] = 3.0f / 8.0f;
1034 g->pos_v_ratios[
i++] = 5.0f / 8.0f;
1035 g->pos_v_ratios[
i++] = 2.0f / 3.0f;
1046 gtk_widget_set_tooltip_text(
g->size, _(
"size of the border in percent of the full image"));
1053 g_signal_connect(G_OBJECT(
g->aspect),
"value-changed", G_CALLBACK(
aspect_changed), self);
1054 gtk_widget_set_tooltip_text(
g->aspect, _(
"select the aspect ratio or right click and type your own (w:h)"));
1056 gtk_widget_set_tooltip_text(
g->aspect_slider, _(
"set the custom aspect ratio"));
1062 gtk_widget_set_tooltip_text(
g->aspect_orient, _(
"aspect ratio orientation of the image with border"));
1068 g_signal_connect(G_OBJECT(
g->pos_h),
"value-changed", G_CALLBACK(
position_h_changed), self);
1069 gtk_widget_set_tooltip_text(
g->pos_h, _(
"select the horizontal position ratio relative to top "
1070 "or right click and type your own (y:h)"));
1072 gtk_widget_set_tooltip_text(
g->pos_h_slider, _(
"custom horizontal position"));
1078 g_signal_connect(G_OBJECT(
g->pos_v),
"value-changed", G_CALLBACK(
position_v_changed), self);
1079 gtk_widget_set_tooltip_text(
g->pos_v, _(
"select the vertical position ratio relative to left "
1080 "or right click and type your own (x:w)"));
1082 gtk_widget_set_tooltip_text(
g->pos_v_slider, _(
"custom vertical position"));
1089 gtk_widget_set_tooltip_text(
g->frame_size, _(
"size of the frame line in percent of min border width"));
1094 gtk_widget_set_tooltip_text(
g->frame_offset, _(
"offset of the frame line beginning on picture side"));
1096 GdkRGBA color = (GdkRGBA){.red =
p->color[0], .green =
p->color[1], .blue =
p->color[2], .alpha = 1.0 };
1102 gtk_box_pack_start(GTK_BOX(box), label,
TRUE,
TRUE, 0);
1103 g->colorpick = gtk_color_button_new_with_rgba(&color);
1104 gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(
g->colorpick),
FALSE);
1105 gtk_color_button_set_title(GTK_COLOR_BUTTON(
g->colorpick), _(
"select border color"));
1107 gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(
g->colorpick),
FALSE,
TRUE, 0);
1109 gtk_widget_set_tooltip_text(GTK_WIDGET(
g->border_picker), _(
"pick border color from image"));
1114 gtk_box_pack_start(GTK_BOX(box), label,
TRUE,
TRUE, 0);
1115 g->frame_colorpick = gtk_color_button_new_with_rgba(&color);
1116 gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(
g->frame_colorpick),
FALSE);
1117 gtk_color_button_set_title(GTK_COLOR_BUTTON(
g->frame_colorpick), _(
"select frame line color"));
1119 gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(
g->frame_colorpick),
FALSE,
TRUE, 0);
1121 gtk_widget_set_tooltip_text(GTK_WIDGET(
g->frame_picker), _(
"pick frame line color from image"));
static void error(char *msg)
void dt_bauhaus_slider_set_digits(GtkWidget *widget, int val)
void dt_bauhaus_combobox_set_editable(GtkWidget *widget, int editable)
int dt_bauhaus_combobox_get(GtkWidget *widget)
int dt_bauhaus_combobox_length(GtkWidget *widget)
const char * dt_bauhaus_combobox_get_text(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_combobox_new(dt_bauhaus_t *bh, dt_gui_module_t *self)
void dt_bauhaus_slider_set_format(GtkWidget *widget, const char *format)
void dt_bauhaus_combobox_add(GtkWidget *widget, const char *text)
#define DT_IOP_BORDERS_ASPECT_COUNT
static void position_v_changed(GtkWidget *combo, 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)
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)
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)
static void gui_init_positions(struct dt_iop_module_t *self)
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 colorpick_color_set(GtkColorButton *widget, dt_iop_module_t *self)
#define DT_IOP_BORDERS_POSITION_H_COUNT
struct dt_iop_borders_params_t dt_iop_borders_data_t
void init_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
static void position_h_changed(GtkWidget *combo, dt_iop_module_t *self)
void gui_update(struct dt_iop_module_t *self)
static void gui_init_aspect(struct dt_iop_module_t *self)
static void aspect_changed(GtkWidget *combo, dt_iop_module_t *self)
void gui_init(struct dt_iop_module_t *self)
__DT_CLONE_TARGETS__ void copy_image_with_border(float *out, const float *const in, const struct border_positions_t *binfo)
#define DT_IOP_BORDERS_POSITION_V_COUNT
void gui_changed(dt_iop_module_t *self, GtkWidget *w, void *previous)
void cleanup_global(dt_iop_module_so_t *module)
static void set_pixels(float *buf, const dt_aligned_pixel_t color, const int npixels)
int default_colorspace(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
#define DT_IOP_BORDERS_ASPECT_ORIENTATION_AUTO
#define DT_IOP_BORDERS_ASPECT_CONSTANT_VALUE
static void copy_pixels(float *out, const float *const in, const int npixels)
void init_presets(dt_iop_module_so_t *self)
static void frame_colorpick_color_set(GtkColorButton *widget, dt_iop_module_t *self)
void init(dt_iop_module_t *self)
#define DT_IOP_BORDERS_ASPECT_ORIENTATION_LANDSCAPE
#define DT_IOP_BORDERS_ASPECT_ORIENTATION_PORTRAIT
#define DT_IOP_BORDERS_ASPECT_CONSTANT_IDX
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)
#define DT_IOP_BORDERS_ASPECT_IMAGE_IDX
#define DT_IOP_BORDERS_ASPECT_IMAGE_VALUE
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)
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)
void color_picker_apply(dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
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)
void modify_roi_out(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, dt_iop_roi_t *roi_out, const dt_iop_roi_t *roi_in)
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 const dt_aligned_pixel_simd_t const dt_adaptation_t const float p
void dt_iop_color_picker_reset(dt_iop_module_t *module, gboolean keep)
GtkWidget * dt_color_picker_new(dt_iop_module_t *module, dt_iop_color_picker_kind_t kind, GtkWidget *w)
const dt_colormatrix_t dt_aligned_pixel_t out
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
void dt_print(dt_debug_thread_t thread, const char *msg,...)
#define dt_free_align(ptr)
static void * dt_calloc_align(size_t size)
#define __OMP_SIMD__(...)
#define DT_MODULE_INTROSPECTION(MODVER, PARAMSTYPE)
#define __DT_CLONE_TARGETS__
#define __OMP_PARALLEL_FOR__(...)
#define __OMP_PARALLEL_FOR_SIMD__(...)
#define dt_dev_add_history_item(dev, module, enable, redraw)
#define DT_GUI_BOX_SPACING
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, const dt_develop_blend_colorspace_t blend_cst)
__DT_CLONE_TARGETS__ void dt_iop_image_fill(float *const buf, const float fill_value, const size_t width, const size_t height, const size_t ch)
void dt_iop_default_init(dt_iop_module_t *module)
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)
@ IOP_FLAGS_TILING_FULL_ROI
#define IOP_GUI_ALLOC(module)
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)
float *const restrict const size_t k
float dt_aligned_pixel_t[4]
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)
int dt_opencl_enqueue_copy_image(const int devid, cl_mem src, cl_mem dst, size_t *orig_src, size_t *orig_dst, size_t *region)
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)
GtkWidget * dtgtk_reset_label_new(const gchar *text, dt_iop_module_t *module, void *param, int param_size)
struct _GtkWidget GtkWidget
dt_aligned_pixel_t flcolor
dt_aligned_pixel_t bcolor
struct dt_gui_gtk_t * gui
struct dt_bauhaus_t * bauhaus
struct dt_develop_t * develop
struct dt_iop_module_t *void * data
GtkWidget * border_picker
GtkWidget * frame_colorpick
GtkWidget * aspect_slider
GtkWidget * aspect_orient
GModule *dt_dev_operation_t op
dt_iop_global_data_t * data
dt_iop_params_t * default_params
dt_iop_gui_data_t * gui_data
dt_iop_global_data_t * global_data
dt_aligned_pixel_t picked_color
Region of interest passed through the pixelpipe.