120 _(
"linear, RGB, display-referred"),
122 _(
"linear, RGB, display-referred"));
135 const float brightness = 1.0 / exp2f(-
d->brightness);
136 const float saturation =
d->saturation / 100.0;
138 const float *
const restrict in = (
const float *
const)ivoid;
139 float *
const restrict
out = (
float *
const)
ovoid;
141 const size_t npixels = (size_t)roi_out->
width * roi_out->
height;
144 for(
size_t k = 0;
k < 4 * npixels;
k += 4)
153 const float w = piece->
iwidth;
154 const float h = piece->
iheight;
155 const int mrad = sqrt(w * w + h * h) * 0.01;
156 const int rad = mrad * (fmin(100.0,
d->size + 1) / 100.0);
157 const int radius =
MIN(mrad, ceilf(rad * roi_in->
scale));
164 const float amt =
d->amount / 100.0f;
177 const float w = piece->
iwidth;
178 const float h = piece->
iheight;
179 const int mrad = sqrt(w * w + h * h) * 0.01f;
181 const int rad = mrad * (fmin(100.0f,
d->size + 1) / 100.0f);
182 const int radius =
MIN(mrad, ceilf(rad * roi_in->
scale));
187 const int wdh = ceilf(3.0f *
sigma);
206 d->saturation =
p->saturation;
207 d->brightness =
p->brightness;
208 d->amount =
p->amount;
229 gtk_widget_set_tooltip_text(
g->size, _(
"the size of blur"));
233 gtk_widget_set_tooltip_text(
g->saturation, _(
"the saturation of blur"));
237 gtk_widget_set_tooltip_text(
g->brightness, _(
"the brightness of blur"));
241 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)
static const dt_aligned_pixel_simd_t const dt_adaptation_t const float p
void rgb2hsl(const dt_aligned_pixel_t rgb, float *h, float *s, float *l)
void hsl2rgb(dt_aligned_pixel_t rgb, float h, float s, float l)
const dt_colormatrix_t dt_aligned_pixel_t out
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
#define dt_free_align(ptr)
static void * dt_calloc_align(size_t size)
#define DT_MODULE_INTROSPECTION(MODVER, PARAMSTYPE)
#define __DT_CLONE_TARGETS__
#define __OMP_PARALLEL_FOR__(...)
__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
#define IOP_GUI_ALLOC(module)
GtkWidget * dt_bauhaus_slider_from_params(dt_iop_module_t *self, const char *param)
float *const restrict const size_t k
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 _GtkWidget GtkWidget
struct dt_iop_module_t *void * data
Region of interest passed through the pixelpipe.