99 _(
"non-linear, Lab, display-referred"),
100 _(
"non-linear, Lab"),
101 _(
"non-linear, Lab, display-referred"));
128 float *restrict blurlightness;
136 const float *
const restrict in =
DT_IS_ALIGNED((
float *)ivoid);
138 const size_t npixels = (size_t)roi_out->
width * roi_out->
height;
141 const int rad = 256.0f * (fmin(100.0f, data->
size + 1.0f) / 100.0f);
142 const float _r = ceilf(rad * roi_in->
scale);
143 const int radius =
MIN(256.0f, _r);
145 const float scale = 1.0f / exp2f(-1.0f * (fmin(100.0f, data->
strength + 1.0f) / 100.0f));
150 for(
size_t k = 0;
k < npixels;
k++)
152 const float L = in[4*
k] * scale;
157 const int range = 2 * radius + 1;
158 const int hr = range / 2;
168 for(
size_t k = 0;
k < npixels;
k++)
170 out[4*
k+0] = 100.0f - (((100.0f - in[4*
k]) * (100.0f - blurlightness[
k])) / 100.0f);
171 out[4*
k+1] = in[4*
k+1];
172 out[4*
k+2] = in[4*
k+2];
173 out[4*
k+3] = in[4*
k+3];
190 const int rad = 256.0f * (fmin(100.0f,
d->size + 1.0f) / 100.0f);
191 const float _r = ceilf(rad * roi_in->
scale);
192 const int radius =
MIN(256.0f, _r);
194 tiling->factor = 2.0f + 0.25f + 0.05f;
198 tiling->overlap = 5 * radius;
210 d->strength =
p->strength;
212 d->threshold =
p->threshold;
233 gtk_widget_set_tooltip_text(
g->size, _(
"the size of bloom"));
237 gtk_widget_set_tooltip_text(
g->threshold, _(
"the threshold of light"));
241 gtk_widget_set_tooltip_text(
g->strength, _(
"the strength of bloom"));
void dt_bauhaus_slider_set_format(GtkWidget *widget, const char *format)
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)
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))
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
const dt_colormatrix_t dt_aligned_pixel_t out
int dt_iop_alloc_image_buffers(struct dt_iop_module_t *const module, const struct dt_iop_roi_t *const roi_in, const struct dt_iop_roi_t *const roi_out,...)
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)
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_IS_ALIGNED(x)
Promise the compiler that x is already cacheline-aligned, and return it.
#define DT_MODULE_INTROSPECTION(MODVER, PARAMSTYPE)
DT_MODULE() for a module whose params struct is introspected.
#define __OMP_PARALLEL_FOR__(...)
#define dt_pixelpipe_cache_free_align(mem)
dt_iop_buffer_dsc_t dsc_in
struct dt_iop_module_t *void * data
Region of interest passed through the pixelpipe.
#define __DT_CLONE_TARGETS__