118 _(
"linear, RGB, display-referred"),
120 _(
"linear, RGB, display-referred"));
133 const float brightness = 1.0 / exp2f(-
d->brightness);
134 const float saturation =
d->saturation / 100.0;
136 const float *
const restrict in = (
const float *
const)ivoid;
137 float *
const restrict
out = (
float *
const)
ovoid;
139 const size_t npixels = (size_t)roi_out->
width * roi_out->
height;
142 for(
size_t k = 0;
k < 4 * npixels;
k += 4)
151 const float w = piece->
iwidth;
152 const float h = piece->
iheight;
153 const int mrad = sqrt(w * w + h * h) * 0.01;
154 const int rad = mrad * (fmin(100.0,
d->size + 1) / 100.0);
155 const int radius =
MIN(mrad, ceilf(rad * roi_in->
scale));
162 const float amt =
d->amount / 100.0f;
175 const float w = piece->
iwidth;
176 const float h = piece->
iheight;
177 const int mrad = sqrt(w * w + h * h) * 0.01f;
179 const int rad = mrad * (fmin(100.0f,
d->size + 1) / 100.0f);
180 const int radius =
MIN(mrad, ceilf(rad * roi_in->
scale));
185 const int wdh = ceilf(3.0f *
sigma);
204 d->saturation =
p->saturation;
205 d->brightness =
p->brightness;
206 d->amount =
p->amount;
227 gtk_widget_set_tooltip_text(
g->size, _(
"the size of blur"));
231 gtk_widget_set_tooltip_text(
g->saturation, _(
"the saturation of blur"));
235 gtk_widget_set_tooltip_text(
g->brightness, _(
"the brightness of blur"));
239 gtk_widget_set_tooltip_text(
g->amount, _(
"the mix of effect"));
void dt_bauhaus_slider_set_format(GtkWidget *widget, const char *format)
int dt_box_mean(float *const buf, const size_t height, const size_t width, const int ch, const int radius, const unsigned iterations)
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
void rgb2hsl(const dt_aligned_pixel_t rgb, float *h, float *s, float *l)
Convert RGB to HSL. Common helper used by iop modules.
void hsl2rgb(dt_aligned_pixel_t rgb, float h, float s, float l)
Convert HSL back to RGB. Common helper used by iop modules.
The colour-profile module's API: which profiles exist, and how to apply one.
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
const dt_colormatrix_t dt_aligned_pixel_t out
__DT_CLONE_TARGETS__ void dt_iop_image_linear_blend(float *const restrict buf, const float lambda, const float *const restrict other, const size_t width, const size_t height, const size_t ch)
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_INCLUDE_IN_STYLES
@ IOP_FLAGS_SUPPORTS_BLENDING
GtkWidget * dt_bauhaus_slider_from_params(dt_iop_module_t *self, const char *param)
#define IOP_GUI_ALLOC(module)
float *const restrict const size_t k
#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_MODULE_INTROSPECTION(MODVER, PARAMSTYPE)
DT_MODULE() for a module whose params struct is introspected.
#define __OMP_PARALLEL_FOR__(...)
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)
const char ** description(struct dt_iop_module_t *self)
__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)
void init_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
void gui_init(struct dt_iop_module_t *self)
void tiling_callback(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling)
int default_colorspace(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const 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)
struct dt_iop_module_t *void * data
Region of interest passed through the pixelpipe.
#define __DT_CLONE_TARGETS__