103 return _(
"color contrast");
108 return _(
"saturation");
116 _(
"non-linear, Lab, display-referred"),
117 _(
"non-linear, Lab"),
118 _(
"non-linear, Lab, display-referred"));
137 void *new_params,
const int new_version)
139 if(old_version == 1 && new_version == 2)
155static inline
void clamped_scaling(float *const restrict
out, const float *const restrict in,
160 out[c] =
CLAMPS(in[c] * slope[c] + offset[c], low[c], high[c]);
175 const float *
const restrict in =
DT_IS_ALIGNED((
const float *
const)ivoid);
177 const size_t npixels = (size_t)roi_out->
width * roi_out->
height;
187 for(
size_t k = 0;
k < (size_t)4 * npixels;
k += 4)
191 out[
k + c] = (in[
k + c] * slope[c]) + offset[c];
198 for(
size_t k = 0;
k < npixels;
k ++)
203 clamped_scaling(
out + 4*
k, in + 4*
k, slope, offset, lowlimit, highlimit);
216 d->a_steepness =
p->a_steepness;
217 d->a_offset =
p->a_offset;
218 d->b_steepness =
p->b_steepness;
219 d->b_offset =
p->b_offset;
220 d->unbound =
p->unbound;
248 gtk_widget_set_tooltip_text(
g->a_scale, _(
"steepness of the a* curve in Lab\nlower values desaturate greens and magenta while higher saturate them"));
251 gtk_widget_set_tooltip_text(
g->b_scale, _(
"steepness of the b* curve in Lab\nlower values desaturate blues and yellows while higher saturate them"));
void dt_bauhaus_slider_set(GtkWidget *widget, float pos)
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
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 commit_params(struct dt_iop_module_t *self, dt_iop_params_t *params, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
void gui_update(dt_iop_module_t *self)
void init_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
void gui_init(dt_iop_module_t *self)
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 legacy_params(dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
const dt_colormatrix_t dt_aligned_pixel_t out
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)
static dt_iop_gui_data_t * dt_iop_gui_data(const struct dt_iop_module_t *m)
The module's GUI data blob, NULL-safe for headless callers: IOP process() implementations read it for...
#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_DECLARE_SIMD__(...)
#define __OMP_PARALLEL_FOR__(...)
DT_ALIGNED_PIXEL float dt_aligned_pixel_t[4]
#define for_each_channel(_var,...)
struct dt_iop_module_t *void * data
Region of interest passed through the pixelpipe.
#define __DT_CLONE_TARGETS__