104 return _(
"color contrast");
109 return _(
"saturation");
117 _(
"non-linear, Lab, display-referred"),
118 _(
"non-linear, Lab"),
119 _(
"non-linear, Lab, display-referred"));
138 void *new_params,
const int new_version)
140 if(old_version == 1 && new_version == 2)
156static inline
void clamped_scaling(float *const restrict
out, const float *const restrict in,
161 out[c] =
CLAMPS(in[c] * slope[c] + offset[c], low[c], high[c]);
176 const float *
const restrict in =
DT_IS_ALIGNED((
const float *
const)ivoid);
178 const size_t npixels = (size_t)roi_out->
width * roi_out->
height;
188 for(
size_t k = 0;
k < (size_t)4 * npixels;
k += 4)
192 out[
k + c] = (in[
k + c] * slope[c]) + offset[c];
199 for(
size_t k = 0;
k < npixels;
k ++)
204 clamped_scaling(
out + 4*
k, in + 4*
k, slope, offset, lowlimit, highlimit);
217 d->a_steepness =
p->a_steepness;
218 d->a_offset =
p->a_offset;
219 d->b_steepness =
p->b_steepness;
220 d->b_offset =
p->b_offset;
221 d->unbound =
p->unbound;
249 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"));
252 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)
static const dt_aligned_pixel_simd_t const dt_adaptation_t const float p
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)
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 for_each_channel(_var,...)
#define DT_MODULE_INTROSPECTION(MODVER, PARAMSTYPE)
#define __OMP_DECLARE_SIMD__(...)
#define __DT_CLONE_TARGETS__
#define __OMP_PARALLEL_FOR__(...)
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
float dt_aligned_pixel_t[4]
struct _GtkWidget GtkWidget
struct dt_iop_module_t *void * data
dt_iop_gui_data_t * gui_data
Region of interest passed through the pixelpipe.