101 _(
"non-linear, Lab, display-referred"),
102 _(
"non-linear, Lab"),
103 _(
"non-linear, Lab, display-referred"));
130 float *restrict blurlightness;
138 const float *
const restrict in =
DT_IS_ALIGNED((
float *)ivoid);
140 const size_t npixels = (size_t)roi_out->
width * roi_out->
height;
143 const int rad = 256.0f * (fmin(100.0f, data->
size + 1.0f) / 100.0f);
144 const float _r = ceilf(rad * roi_in->
scale);
145 const int radius =
MIN(256.0f, _r);
147 const float scale = 1.0f / exp2f(-1.0f * (fmin(100.0f, data->
strength + 1.0f) / 100.0f));
152 for(
size_t k = 0;
k < npixels;
k++)
154 const float L = in[4*
k] * scale;
159 const int range = 2 * radius + 1;
160 const int hr = range / 2;
170 for(
size_t k = 0;
k < npixels;
k++)
172 out[4*
k+0] = 100.0f - (((100.0f - in[4*
k]) * (100.0f - blurlightness[
k])) / 100.0f);
173 out[4*
k+1] = in[4*
k+1];
174 out[4*
k+2] = in[4*
k+2];
175 out[4*
k+3] = in[4*
k+3];
192 const int rad = 256.0f * (fmin(100.0f,
d->size + 1.0f) / 100.0f);
193 const float _r = ceilf(rad * roi_in->
scale);
194 const int radius =
MIN(256.0f, _r);
196 tiling->factor = 2.0f + 0.25f + 0.05f;
200 tiling->overlap = 5 * radius;
212 d->strength =
p->strength;
214 d->threshold =
p->threshold;
235 gtk_widget_set_tooltip_text(
g->size, _(
"the size of bloom"));
239 gtk_widget_set_tooltip_text(
g->threshold, _(
"the threshold of light"));
243 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)
static const dt_aligned_pixel_simd_t const dt_adaptation_t const float p
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_pixelpipe_cache_free_align(mem)
#define __DT_CLONE_TARGETS__
#define __OMP_PARALLEL_FOR__(...)
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
#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
struct _GtkWidget GtkWidget
dt_iop_buffer_dsc_t dsc_in
struct dt_iop_module_t *void * data
Region of interest passed through the pixelpipe.