119 { 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,
120 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,
121 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,
122 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f },
123 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f },
124 { 0 }, 0, 0,
FALSE };
127 gboolean is_scene_referred)
131 switch(module->blend_colorspace(module, NULL, NULL))
256 const int32_t blend_csp =
params->blend_cst;
257 const uint32_t blendif =
params->blendif;
258 const float *blendif_parameters =
params->blendif_parameters;
259 const float *boost_factors =
params->blendif_boost_factors;
262 if(blendif & (1 <<
i))
270 parameters[j + 0] = (blendif_parameters[
i * 4 + 0] - offset) * exp2f(boost_factors[
i]);
271 parameters[j + 1] = (blendif_parameters[
i * 4 + 1] - offset) * exp2f(boost_factors[
i]);
272 parameters[j + 2] = (blendif_parameters[
i * 4 + 2] - offset) * exp2f(boost_factors[
i]);
273 parameters[j + 3] = (blendif_parameters[
i * 4 + 3] - offset) * exp2f(boost_factors[
i]);
275 parameters[j + 4] = 1.0f / fmaxf(0.001f, parameters[j + 1] - parameters[j + 0]);
276 parameters[j + 5] = 1.0f / fmaxf(0.001f, parameters[j + 3] - parameters[j + 2]);
278 if(blendif_parameters[
i * 4 + 0] <= 0.0f && blendif_parameters[
i * 4 + 1] <= 0.0f)
280 parameters[j + 0] = -INFINITY;
281 parameters[j + 1] = -INFINITY;
283 if(blendif_parameters[
i * 4 + 2] >= 1.0f && blendif_parameters[
i * 4 + 3] >= 1.0f)
285 parameters[j + 2] = INFINITY;
286 parameters[j + 3] = INFINITY;
291 parameters[j + 0] = -INFINITY;
292 parameters[j + 1] = -INFINITY;
293 parameters[j + 2] = INFINITY;
294 parameters[j + 3] = INFINITY;
295 parameters[j + 4] = 0.0f;
296 parameters[j + 5] = 0.0f;
303 gboolean *top_enabled,
304 gboolean *raster_used,
305 gboolean *drawn_used,
306 gboolean *parametric_used)
314 const uint32_t mask_mode =
params->mask_mode;
320 gboolean raster = raster_mode
321 && (
params->raster_mask_id > 0
322 ||
params->raster_mask_source[0] !=
'\0'
325 gboolean drawn =
FALSE;
332 gboolean parametric =
FALSE;
335 const float threshold_epsilon = 1e-6f;
339 uint32_t active_channels = 0;
342 const uint32_t bit = 1u <<
ch;
343 if(!(channel_mask & bit) || !(
params->blendif & bit))
continue;
344 const float *channel = &
params->blendif_parameters[
ch * 4];
345 if(fabsf(channel[0]) > threshold_epsilon
346 || fabsf(channel[1]) > threshold_epsilon
347 || fabsf(channel[2] - 1.0f) > threshold_epsilon
348 || fabsf(channel[3] - 1.0f) > threshold_epsilon)
349 active_channels |= bit;
351 parametric = active_channels != 0;
355 if(!
IS_NULL_PTR(raster_used)) *raster_used = raster;
357 if(!
IS_NULL_PTR(parametric_used)) *parametric_used = parametric;
368 { 0.9555766f, -0.0230393f, 0.0631636f, 0.0f },
369 { -0.0282895f, 1.0099416f, 0.0210077f, 0.0f },
370 { 0.0122982f, -0.0204830f, 1.3299098f, 0.0f },
379 for(
size_t y = 0; y < 3; y++)
381 for(
size_t x = 0;
x < 3;
x++)
384 for(
size_t i = 0;
i < 3;
i++)
397 return 0.005f * (detail ? powf(level, 2.0f) : 1.0f - powf(fabs(level), 0.5f ));
405 if(level == 0.0f)
return;
408 const gboolean detail = (level > 0.0f);
413 float *warp_mask = NULL;
414 float *rawdetail_mask = NULL;
420 const int iwidth =
p->rawdetail_mask_roi.width;
421 const int iheight =
p->rawdetail_mask_roi.height;
422 const int owidth = roi_out->
width;
423 const int oheight = roi_out->
height;
424 if(info) fprintf(stderr,
"[_refine_with_detail_mask] in module %s %ix%i --> %ix%i\n", self->
op, iwidth, iheight, owidth, oheight);
426 const int bufsize =
MAX(iwidth * iheight, owidth * oheight);
439 const gboolean warp_mask_aliases_lum = (warp_mask == lum);
440 if(!warp_mask_aliases_lum)
448 const int msize = owidth * oheight;
450 for(
int idx =0; idx < msize; idx++)
452 mask[idx] = mask[idx] * warp_mask[idx];
455 if(warp_mask_aliases_lum) lum = NULL;
464 dt_control_alert(_(
"Module failed"), _(
"detail mask blending error"), item);
472 const gboolean mask_feather =
params->feathering_radius > 0.1f &&
piece->dsc_in.channels >= 3;
473 const gboolean mask_blur =
params->blur_radius > 0.1f;
474 const gboolean mask_tone_curve = fabsf(
params->contrast) >= 0.01f || fabsf(
params->brightness) >= 0.01f;
479 const float opacity = fminf(fmaxf(
params->opacity / 100.0f, 0.0f), 1.0f);
486 if(mask_blur && mask_feather_before)
503 if(mask_tone_curve && opacity > 1e-4f)
513 const size_t xoffs,
const size_t yoffs,
514 const size_t owidth,
const size_t oheight)
516 const size_t ioffset = yoffs * iwidth + xoffs;
517 float *
const restrict output =
524 for(
size_t y = 0; y < oheight; y++)
526 const size_t iindex = y * iwidth + ioffset;
527 const size_t oindex = y * owidth;
528 memcpy(output + oindex, input + iindex,
sizeof(
float) * owidth);
545 if(source && !strcmp(source->
op,
params->raster_mask_source)
551 for(GList *iter = g_list_first(self->
dev->
iop); iter; iter = g_list_next(iter))
554 if(!strcmp(candidate->
op,
params->raster_mask_source)
566 float *
const restrict mask,
568 const size_t oheight,
569 int *
const raster_error)
571 int local_raster_error = 0;
573 float *raster_mask = raster_source
575 self, &local_raster_error)
580 if(
params->raster_mask_invert)
583 for(
size_t i = 0;
i < owidth * oheight;
i++)
584 mask[
i] = 1.0f - raster_mask[
i];
595 const float value =
params->raster_mask_invert ? 0.0f : 1.0f;
599 if(!
IS_NULL_PTR(raster_error)) *raster_error = local_raster_error;
607 float *
const restrict mask,
609 const size_t oheight)
643 const float *
const restrict other_mask,
644 const size_t buffsize)
647 for(
size_t i = 0;
i < buffsize;
i++)
648 mask[
i] *= other_mask[
i];
653 const size_t height,
const int ch,
const float guide_weight,
654 const float feathering_radius,
const float scale)
656 const float sqrt_eps = 1.f;
657 int w = (int)(2 * feathering_radius * scale + 0.5f);
660 float *
const restrict mask_bak =
664 memcpy(mask_bak, mask,
sizeof(
float) *
width *
height);
665 if(
guided_filter(guide, mask_bak, mask,
width,
height,
ch, w, sqrt_eps, guide_weight, 0.f, 1.f) != 0)
676 const float contrast,
const float brightness,
679 const float mask_epsilon = 16 * FLT_EPSILON;
680 const float e = expf(3.f * contrast);
682 for(
size_t k = 0;
k < buffsize;
k++)
684 float x = mask[
k] / opacity;
686 if (1.f - brightness <= 0.f)
687 x = mask[
k] <= mask_epsilon ? -1.f : 1.f;
688 else if (1.f + brightness <= 0.f)
689 x = mask[
k] >= 1.f - mask_epsilon ? 1.f : -1.f;
690 else if (brightness > 0.f)
692 x = (
x + brightness) / (1.f - brightness);
697 x = (
x + brightness) / (1.f + brightness);
701 ((
x * e / (1.f + (e - 1.f) * fabsf(
x))) / 2.f + 0.5f) * opacity, 0.f, 1.f);
730 gboolean top_enabled =
FALSE;
731 gboolean raster_used =
FALSE;
732 gboolean drawn_used =
FALSE;
733 gboolean parametric_used =
FALSE;
735 if(!top_enabled)
return 0;
739 const gboolean preview_mask_mode = top_enabled;
741 const size_t ch =
piece->dsc_in.channels;
742 const int xoffs = roi_out->
x - roi_in->
x;
743 const int yoffs = roi_out->
y - roi_in->
y;
744 const int iwidth = roi_in->
width;
745 const int iheight = roi_in->
height;
746 const int owidth = roi_out->
width;
747 const int oheight = roi_out->
height;
748 const size_t buffsize = (size_t)owidth * oheight;
750 const float oscale = roi_out->
scale;
751 const gboolean rois_equal = iwidth == owidth || iheight == oheight || xoffs == 0 || yoffs == 0;
760 if(oscale !=
iscale || xoffs < 0 || yoffs < 0
761 || ((xoffs > 0 || yoffs > 0) && (owidth + xoffs > iwidth || oheight + yoffs > iheight)))
764 dt_control_alert(_(
"Module failed"), _(
"skipped blending: roi's do not match"), item);
772 && preview_mask_mode)
785 const float opacity = fminf(fmaxf(
d->opacity / 100.0f, 0.0f), 1.0f);
791 dt_control_alert(_(
"Not enough memory"), _(
"could not allocate buffer for blending"),
795 int raster_error = 0;
796 float *
const restrict mask = _mask;
797 const gboolean use_masks = raster_used || drawn_used || parametric_used;
798 const gboolean raster_only = raster_used && !drawn_used && !parametric_used;
813 if(!raster_used && !drawn_used)
831 dt_control_alert(_(
"Not enough memory"), _(
"could not allocate buffer for blending"),
862 (
const float *
const restrict)
ovoid, mask);
866 (
const float *
const restrict)
ovoid, mask);
870 (
const float *
const restrict)
ovoid, mask);
874 (
const float *
const restrict)
ovoid, mask);
881 for(
size_t index = 0; index < post_operations_size; ++index)
887 float *restrict guide = (
float *restrict)ivoid;
890 ch * owidth,
ch * oheight);
897 d->feathering_radius, roi_out->
scale) != 0)
911 guide_weight,
d->feathering_radius, roi_out->
scale) != 0)
919 const float sigma =
d->blur_radius * roi_out->
scale;
920 const float mmax[] = { 1.0f };
921 const float mmin[] = { 0.0f };
943 mask, request_mask_display);
947 mask, request_mask_display);
951 mask, request_mask_display);
955 mask, request_mask_display);
972 void *cache_data = NULL;
974 mask_hash,
sizeof(
float) * buffsize,
975 "raster mask",
pipe->
type,
TRUE, &cache_data, &mask_entry);
988 memcpy(cache_data, _mask,
sizeof(
float) * buffsize);
999 piece->module->multi_priority),
1001 piece->module->multi_priority,
piece->module->iop_order,
1003 piece->roi_out.height, -1,
sizeof(
float) * buffsize,
1007 "[raster masks] %s mask id 0 for module %s (%s) for pipe %s"
1008 " with cache hash %" PRIu64
"\n",
1009 created ?
"published" :
"reused cached",
1010 piece->module->op,
piece->module->multi_name,
1016 "[raster masks] discarding unpublished mask id 0 for module %s (%s) for pipe %s\n",
1017 piece->module->op,
piece->module->multi_name,
1022 return raster_error;
1028 const float level,
const int devid)
1031 if(level == 0.0f)
return;
1034 const int detail = (level > 0.0f);
1037 float *rawdetail_mask = NULL;
1046 const int iwidth =
p->rawdetail_mask_roi.width;
1047 const int iheight =
p->rawdetail_mask_roi.height;
1048 const int owidth = roi_out->
width;
1049 const int oheight = roi_out->
height;
1050 if(info) fprintf(stderr,
"[_refine_with_detail_mask_cl] in module %s %ix%i --> %ix%i\n", self->
op, iwidth, iheight, owidth, oheight);
1063 if(err != CL_SUCCESS)
goto error;
1074 if(err != CL_SUCCESS)
goto error;
1087 if(err != CL_SUCCESS)
goto error;
1093 cl_mem dev_blurmat = NULL;
1106 if(err != CL_SUCCESS)
goto error;
1123 if(err != CL_SUCCESS)
goto error;
1128 if(err != CL_SUCCESS)
goto error;
1134 tmp = blur =
out = NULL;
1140 const gboolean warp_mask_aliases_lum = (warp_mask == lum);
1141 if(!warp_mask_aliases_lum)
1147 const int msize = owidth * oheight;
1149 for(
int idx = 0; idx < msize; idx++)
1151 mask[idx] = mask[idx] * warp_mask[idx];
1154 if(warp_mask_aliases_lum) lum = NULL;
1163 dt_control_alert(_(
"Module failed"), _(
"detail mask CL blending problem"), item);
1184 gboolean top_enabled =
FALSE;
1185 gboolean raster_used =
FALSE;
1186 gboolean drawn_used =
FALSE;
1187 gboolean parametric_used =
FALSE;
1189 if(!top_enabled)
return 0;
1190 const unsigned int mask_mode =
d->mask_mode;
1194 const gboolean preview_mask_mode = top_enabled;
1196 const int ch =
piece->dsc_in.channels;
1197 const int xoffs = roi_out->
x - roi_in->
x;
1198 const int yoffs = roi_out->
y - roi_in->
y;
1199 const int iwidth = roi_in->
width;
1200 const int iheight = roi_in->
height;
1201 const int owidth = roi_out->
width;
1202 const int oheight = roi_out->
height;
1203 const size_t buffsize = (size_t)owidth * oheight;
1205 const float oscale = roi_out->
scale;
1206 const gboolean rois_equal = iwidth == owidth || iheight == oheight || xoffs == 0 || yoffs == 0;
1215 if(oscale !=
iscale || xoffs < 0 || yoffs < 0
1216 || ((xoffs > 0 || yoffs > 0) && (owidth + xoffs > iwidth || oheight + yoffs > iheight)))
1219 dt_control_alert(_(
"Module failed"), _(
"skipped blending: roi's do not match"), item);
1230 && preview_mask_mode)
1243 const float opacity = fminf(fmaxf(
d->opacity / 100.0f, 0.0f), 1.0f);
1244 const gboolean use_masks = raster_used || drawn_used || parametric_used;
1245 const gboolean raster_only = raster_used && !drawn_used && !parametric_used;
1251 dt_control_alert(_(
"Not enough memory"), _(
"could not allocate buffer for blending"),
1255 float *
const mask = _mask;
1288 const int offs[2] = { xoffs, yoffs };
1292 cl_mem dev_blendif_params = NULL;
1293 cl_mem dev_boost_factors = NULL;
1294 cl_mem dev_mask_1 = NULL;
1295 cl_mem dev_mask_2 = NULL;
1296 cl_mem dev_tmp = NULL;
1297 cl_mem dev_guide = NULL;
1299 cl_mem dev_profile_info = NULL;
1300 cl_mem dev_profile_lut = NULL;
1302 cl_float *profile_lut_cl = NULL;
1304 cl_mem dev_work_profile_info = NULL;
1305 cl_mem dev_work_profile_lut = NULL;
1307 cl_float *work_profile_lut_cl = NULL;
1309 size_t origin[] = { 0, 0, 0 };
1310 size_t region[] = { owidth, oheight, 1 };
1328 &profile_lut_cl, &dev_profile_info, &dev_profile_lut);
1329 if(err != CL_SUCCESS)
goto error;
1341 if(err != CL_SUCCESS)
goto error;
1343 else if(raster_only)
1345 int raster_error = 0;
1347 if(raster_error)
goto error;
1351 if(err != CL_SUCCESS)
goto error;
1355 if(!raster_used && !drawn_used)
1363 else if(raster_used)
1365 int raster_error = 0;
1367 if(raster_error)
goto error;
1395 if(err != CL_SUCCESS)
goto error;
1398 const unsigned blendif =
d->blendif;
1399 const unsigned int mask_combine =
d->mask_combine;
1416 if(err != CL_SUCCESS)
1418 fprintf(stderr,
"[dt_develop_blend_process_cl] error %i enqueue kernel\n", err);
1426 for(
size_t index = 0; index < post_operations_size; ++index)
1431 int w = (int)(2 *
d->feathering_radius * roi_out->
scale + 0.5f);
1433 const float sqrt_eps = 1.0f;
1436 cl_mem guide = dev_in;
1442 size_t origin_1[] = { xoffs, yoffs, 0 };
1443 size_t origin_2[] = { 0, 0, 0 };
1445 if(err != CL_SUCCESS)
goto error;
1447 if(
guided_filter_cl(devid, guide, dev_mask_1, dev_mask_2, owidth, oheight,
ch, w, sqrt_eps, guide_weight,
1459 int w = (int)(2 *
d->feathering_radius * roi_out->
scale + 0.5f);
1461 const float sqrt_eps = 1.0f;
1464 if(
guided_filter_cl(devid, dev_out, dev_mask_1, dev_mask_2, owidth, oheight,
ch, w, sqrt_eps, guide_weight,
1471 const float sigma =
d->blur_radius * roi_out->
scale;
1472 const float mmax[] = { 1.0f };
1473 const float mmin[] = { 0.0f };
1479 if(err != CL_SUCCESS)
goto error;
1484 const float e = expf(3.f *
d->contrast);
1485 const float brightness =
d->brightness;
1494 if(err != CL_SUCCESS)
goto error;
1509 if(err != CL_SUCCESS)
goto error;
1515 d->blendif_boost_factors);
1521 const int use_work_profile = !
IS_NULL_PTR(work_profile);
1524 &dev_work_profile_info, &dev_work_profile_lut);
1525 if(err != CL_SUCCESS)
goto error;
1544 if(err != CL_SUCCESS)
1546 fprintf(stderr,
"[dt_develop_blend_process_cl] error %i enqueue kernel\n", err);
1553 const unsigned int blend_mode =
d->blend_mode;
1554 const float blend_parameter = exp2f(
d->blend_parameter);
1566 if(err != CL_SUCCESS)
goto error;
1583 if(err != CL_SUCCESS)
goto error;
1588 void *cache_data = NULL;
1590 mask_hash,
sizeof(
float) * buffsize,
1591 "raster mask",
pipe->
type,
TRUE, &cache_data, &mask_entry);
1603 memcpy(cache_data, _mask,
sizeof(
float) * buffsize);
1615 piece->module->multi_priority),
1617 piece->module->multi_priority,
piece->module->iop_order,
1619 piece->roi_out.height, devid,
sizeof(
float) * buffsize,
1623 "[raster masks] %s mask id 0 for module %s (%s) for pipe %s"
1624 " with cache hash %" PRIu64
"\n",
1625 created ?
"published" :
"reused cached",
1626 piece->module->op,
piece->module->multi_name,
1632 "[raster masks] discarding unpublished mask id 0 for module %s (%s) for pipe %s\n",
1633 piece->module->op,
piece->module->multi_name,
1644 &dev_work_profile_lut);
1657 &dev_work_profile_lut);
1669 const int program = 3;
1682 const int program_rcd = 31;
1753 const char *data = (
const char *)
params;
1755 for(
size_t k = 0;
k < length;
k++)
1756 if(data[
k])
return FALSE;
1764 gboolean blend_reverse =
FALSE;
1765 switch(blend_mode) {
1771 blend_reverse =
TRUE;
1779 blend_reverse =
TRUE;
1789 const int old_version,
void *new_params,
const int new_version,
1806 *
n = default_display_blend_params;
1810 if(old_version == 1 && new_version == 11)
1813 typedef struct dt_develop_blend_params1_t
1818 } dt_develop_blend_params1_t;
1820 if(length !=
sizeof(dt_develop_blend_params1_t))
return 1;
1822 dt_develop_blend_params1_t *
o = (dt_develop_blend_params1_t *)old_params;
1825 *
n = default_display_blend_params;
1828 n->opacity =
o->opacity;
1829 n->mask_id =
o->mask_id;
1833 if(old_version == 2 && new_version == 11)
1836 typedef struct dt_develop_blend_params2_t
1847 float blendif_parameters[4 * 8];
1848 } dt_develop_blend_params2_t;
1850 if(length !=
sizeof(dt_develop_blend_params2_t))
return 1;
1852 dt_develop_blend_params2_t *
o = (dt_develop_blend_params2_t *)old_params;
1855 *
n = default_display_blend_params;
1861 n->opacity =
o->opacity;
1862 n->mask_id =
o->mask_id;
1863 n->blendif =
o->blendif & 0xff;
1866 for(
int i = 0;
i < (4 * 8);
i++)
n->blendif_parameters[
i] =
o->blendif_parameters[
i];
1871 if(old_version == 3 && new_version == 11)
1874 typedef struct dt_develop_blend_params3_t
1886 } dt_develop_blend_params3_t;
1888 if(length !=
sizeof(dt_develop_blend_params3_t))
return 1;
1890 dt_develop_blend_params3_t *
o = (dt_develop_blend_params3_t *)old_params;
1893 *
n = default_display_blend_params;
1899 n->opacity =
o->opacity;
1900 n->mask_id =
o->mask_id;
1907 if(old_version == 4 && new_version == 11)
1910 typedef struct dt_develop_blend_params4_t
1924 } dt_develop_blend_params4_t;
1926 if(length !=
sizeof(dt_develop_blend_params4_t))
return 1;
1928 dt_develop_blend_params4_t *
o = (dt_develop_blend_params4_t *)old_params;
1931 *
n = default_display_blend_params;
1937 n->opacity =
o->opacity;
1938 n->mask_id =
o->mask_id;
1939 n->blur_radius =
o->radius;
1946 if(old_version == 5 && new_version == 11)
1949 typedef struct dt_develop_blend_params5_t
1954 uint32_t blend_mode;
1958 uint32_t mask_combine;
1966 uint32_t reserved[4];
1969 } dt_develop_blend_params5_t;
1971 if(length !=
sizeof(dt_develop_blend_params5_t))
return 1;
1973 dt_develop_blend_params5_t *
o = (dt_develop_blend_params5_t *)old_params;
1976 *
n = default_display_blend_params;
1979 n->opacity =
o->opacity;
1980 n->mask_combine =
o->mask_combine;
1981 n->mask_id =
o->mask_id;
1982 n->blur_radius =
o->radius;
1994 if(old_version == 6 && new_version == 11)
1997 typedef struct dt_develop_blend_params6_t
2002 uint32_t blend_mode;
2006 uint32_t mask_combine;
2014 uint32_t reserved[4];
2017 } dt_develop_blend_params6_t;
2019 if(length !=
sizeof(dt_develop_blend_params6_t))
return 1;
2021 dt_develop_blend_params6_t *
o = (dt_develop_blend_params6_t *)old_params;
2024 *
n = default_display_blend_params;
2027 n->opacity =
o->opacity;
2028 n->mask_combine =
o->mask_combine;
2029 n->mask_id =
o->mask_id;
2030 n->blur_radius =
o->radius;
2031 n->blendif =
o->blendif;
2036 if(old_version == 7 && new_version == 11)
2039 typedef struct dt_develop_blend_params7_t
2044 uint32_t blend_mode;
2048 uint32_t mask_combine;
2056 uint32_t reserved[4];
2059 } dt_develop_blend_params7_t;
2061 if(length !=
sizeof(dt_develop_blend_params7_t))
return 1;
2063 dt_develop_blend_params7_t *
o = (dt_develop_blend_params7_t *)old_params;
2066 *
n = default_display_blend_params;
2069 n->opacity =
o->opacity;
2070 n->mask_combine =
o->mask_combine;
2071 n->mask_id =
o->mask_id;
2072 n->blur_radius =
o->radius;
2073 n->blendif =
o->blendif;
2078 if(old_version == 8 && new_version == 11)
2081 typedef struct dt_develop_blend_params8_t
2086 uint32_t blend_mode;
2090 uint32_t mask_combine;
2096 float feathering_radius;
2098 uint32_t feathering_guide;
2106 uint32_t reserved[4];
2109 } dt_develop_blend_params8_t;
2111 if(length !=
sizeof(dt_develop_blend_params8_t))
return 1;
2113 dt_develop_blend_params8_t *
o = (dt_develop_blend_params8_t *)old_params;
2116 *
n = default_display_blend_params;
2119 n->opacity =
o->opacity;
2120 n->mask_combine =
o->mask_combine;
2121 n->mask_id =
o->mask_id;
2122 n->blendif =
o->blendif;
2123 n->feathering_radius =
o->feathering_radius;
2124 n->feathering_guide =
o->feathering_guide;
2125 n->blur_radius =
o->blur_radius;
2126 n->contrast =
o->contrast;
2127 n->brightness =
o->brightness;
2132 if(old_version == 9 && new_version == 11)
2135 typedef struct dt_develop_blend_params9_t
2141 uint32_t blend_mode;
2145 uint32_t mask_combine;
2151 float feathering_radius;
2153 uint32_t feathering_guide;
2161 uint32_t reserved[4];
2165 int raster_mask_instance;
2167 gboolean raster_mask_invert;
2168 } dt_develop_blend_params9_t;
2170 if(length !=
sizeof(dt_develop_blend_params9_t))
return 1;
2172 dt_develop_blend_params9_t *
o = (dt_develop_blend_params9_t *)old_params;
2175 *
n = default_display_blend_params;
2178 n->opacity =
o->opacity;
2179 n->mask_combine =
o->mask_combine;
2180 n->mask_id =
o->mask_id;
2181 n->blendif =
o->blendif;
2182 n->feathering_radius =
o->feathering_radius;
2183 n->feathering_guide =
o->feathering_guide;
2184 n->blur_radius =
o->blur_radius;
2185 n->contrast =
o->contrast;
2186 n->brightness =
o->brightness;
2188 memcpy(
n->raster_mask_source,
o->raster_mask_source,
sizeof(
n->raster_mask_source));
2189 n->raster_mask_instance =
o->raster_mask_instance;
2190 n->raster_mask_id =
o->raster_mask_id;
2191 n->raster_mask_invert =
o->raster_mask_invert;
2195 if(old_version == 10 && new_version == 11)
2198 typedef struct dt_develop_blend_params10_t
2206 uint32_t blend_mode;
2208 float blend_parameter;
2212 uint32_t mask_combine;
2218 float feathering_radius;
2220 uint32_t feathering_guide;
2228 uint32_t reserved[4];
2233 int raster_mask_instance;
2235 gboolean raster_mask_invert;
2236 } dt_develop_blend_params10_t;
2238 if(length !=
sizeof(dt_develop_blend_params10_t))
return 1;
2240 dt_develop_blend_params10_t *
o = (dt_develop_blend_params10_t *)old_params;
2243 *
n = default_display_blend_params;
2245 n->blend_cst =
o->blend_cst;
2247 n->blend_parameter =
o->blend_parameter;
2248 n->opacity =
o->opacity;
2249 n->mask_combine =
o->mask_combine;
2250 n->mask_id =
o->mask_id;
2251 n->blendif =
o->blendif;
2252 n->feathering_radius =
o->feathering_radius;
2253 n->feathering_guide =
o->feathering_guide;
2254 n->blur_radius =
o->blur_radius;
2255 n->contrast =
o->contrast;
2256 n->brightness =
o->brightness;
2258 memcpy(&
n->details, &
o->reserved,
sizeof(
float));
2259 if(isnan(
n->details))
n->details = 0.0f;
2260 n->details = fminf(1.0f, fmaxf(-1.0f,
n->details));
2264 memcpy(
n->raster_mask_source,
o->raster_mask_source,
sizeof(
n->raster_mask_source));
2265 n->raster_mask_instance =
o->raster_mask_instance;
2266 n->raster_mask_id =
o->raster_mask_id;
2267 n->raster_mask_invert =
o->raster_mask_invert;
2275 const int old_version,
void *new_params,
const int new_version,
2279 dt_iop_module_t *
module = (dt_iop_module_t *)calloc(1, sizeof(dt_iop_module_t));
2286 if(module->params_size == 0)
2350 = { { NC_(
"blendoperation",
"normal"), 0 },
2363 = { { N_(
"None"), 0 },
2364 { N_(
"Uniform"), 1 },
2365 { N_(
"Parametric mask"), 2 },
2366 { N_(
"Drawn mask"), 3 },
2367 { N_(
"Drawn & parametric mask"), 4 },
2368 { N_(
"Reuse an existing mask"), 5 },
static void error(char *msg)
gboolean dt_develop_blend_colorspace_is_compatible(dt_iop_module_t *module, dt_develop_blend_colorspace_t cst)
Whether the given module may blend in the given color space.
static dt_develop_blend_colorspace_t _blend_default_module_blend_colorspace(dt_iop_module_t *module, gboolean is_scene_referred)
_develop_mask_post_processing
@ DEVELOP_MASK_POST_TONE_CURVE
@ DEVELOP_MASK_POST_FEATHER_IN
@ DEVELOP_MASK_POST_FEATHER_OUT
void dt_develop_blend_init_blend_parameters(dt_develop_blend_params_t *blend_params, dt_develop_blend_colorspace_t cst)
static void _develop_blend_combine_masks(float *const restrict mask, const float *const restrict other_mask, const size_t buffsize)
int dt_develop_blend_process_cl(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out)
static void _develop_blend_init_raster_mask(const dt_develop_blend_params_t *const params, dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, float *const restrict mask, const size_t owidth, const size_t oheight, int *const raster_error)
static void _refine_with_detail_mask_cl(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, float *mask, const float level, const int devid)
const dt_develop_name_value_t dt_develop_invert_mask_names[]
const dt_develop_name_value_t dt_develop_mask_mode_names[]
void dt_develop_blend_free_cl_global(void)
void dt_develop_blend_init_cl_global(void)
static size_t _develop_mask_get_post_operations(const dt_develop_blend_params_t *const params, const dt_dev_pixelpipe_iop_t *const piece, _develop_mask_post_processing operations[3])
static void _develop_blend_release_mask_entry(dt_pixel_cache_entry_t *mask_entry, const int created)
static float * _develop_blend_process_copy_region(const float *const restrict input, const size_t iwidth, const size_t xoffs, const size_t yoffs, const size_t owidth, const size_t oheight)
void tiling_callback_blendop(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)
static uint32_t _blend_legacy_blend_mode(uint32_t legacy_blend_mode)
void dt_develop_blendif_process_parameters(float *const restrict parameters, const dt_develop_blend_params_t *const params)
dt_iop_colorspace_type_t dt_develop_blend_colorspace(const dt_dev_pixelpipe_iop_t *const piece, dt_iop_colorspace_type_t cst)
int dt_develop_blendif_init_masking_profile(const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, dt_iop_order_iccprofile_info_t *blending_profile, dt_develop_blend_colorspace_t cst)
static dt_blendop_cl_global_t * _blendop_cl_global
int dt_develop_blend_legacy_params_from_so(dt_iop_module_so_t *module_so, const void *const old_params, const int old_version, void *new_params, const int new_version, const int length)
static void _refine_with_detail_mask(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, float *mask, const float level)
dt_develop_blend_colorspace_t dt_develop_blend_default_module_blend_colorspace(dt_iop_module_t *module)
int dt_develop_blend_version(void)
int dt_develop_blend_legacy_params(dt_iop_module_t *module, const void *const old_params, const int old_version, void *new_params, const int new_version, const int length)
static const dt_iop_module_t * _develop_blend_get_raster_source_module(const dt_develop_blend_params_t *const params, const dt_iop_module_t *const self)
void dt_develop_blend_get_mask_usage(const dt_iop_module_t *module, const dt_develop_blend_params_t *params, gboolean *top_enabled, gboolean *raster_used, gboolean *drawn_used, gboolean *parametric_used)
int dt_develop_blend_process(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid)
static void _blend_init_blendif_boost_parameters(dt_develop_blend_params_t *blend_params, dt_develop_blend_colorspace_t cst)
static const char * dt_pipe_type_to_str(dt_dev_pixelpipe_type_t pipe_type)
const dt_develop_name_value_t dt_develop_blend_colorspace_names[]
void dt_develop_blend_resolve_default_colorspace(dt_iop_module_t *module, dt_develop_blend_params_t *blend_params)
Replace DEVELOP_BLEND_CS_NONE, which stands for "whichever space this module blends in",...
gboolean dt_develop_blend_params_is_all_zero(const void *params, size_t length)
static dt_develop_blend_params_t _default_blendop_params
static void _develop_blend_process_mask_tone_curve(float *const restrict mask, const size_t buffsize, const float contrast, const float brightness, const float opacity)
dt_blendop_cl_global_t * dt_develop_blend_get_cl_global(void)
const dt_develop_name_value_t dt_develop_blend_mode_flag_names[]
static void _develop_blend_process_free_region(float *const restrict input)
static float _detail_mask_threshold(const float level, const gboolean detail)
static int _develop_blend_init_drawn_mask(const dt_develop_blend_params_t *const params, dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const struct dt_iop_roi_t *const roi_out, float *const restrict mask, const size_t owidth, const size_t oheight)
const dt_develop_name_value_t dt_develop_combine_masks_names[]
const dt_develop_name_value_t dt_develop_blend_mode_names[]
void dt_develop_blend_init_blendif_parameters(dt_develop_blend_params_t *blend_params, dt_develop_blend_colorspace_t cst)
static int _develop_blend_process_feather(const float *const guide, float *const mask, const size_t width, const size_t height, const int ch, const float guide_weight, const float feathering_radius, const float scale)
const dt_develop_name_value_t dt_develop_feathering_guide_names[]
static void _blend_process_cl_exchange(cl_mem *a, cl_mem *b)
void dt_develop_blendif_raw_blend(const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const float *const a, float *const b, const float *const mask, const dt_dev_pixelpipe_display_mask_t request_mask_display)
void dt_develop_blendif_rgb_jzczhz_blend(const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const float *const a, float *const b, const float *const mask, const dt_dev_pixelpipe_display_mask_t request_mask_display)
void dt_develop_blendif_rgb_hsl_make_mask(const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const float *const a, const float *const b, float *const mask)
@ DEVELOP_MASK_GUIDE_OUT_BEFORE_BLUR
@ DEVELOP_MASK_GUIDE_IN_AFTER_BLUR
@ DEVELOP_MASK_GUIDE_OUT_AFTER_BLUR
@ DEVELOP_MASK_GUIDE_IN_BEFORE_BLUR
dt_develop_blend_colorspace_t
@ DEVELOP_BLEND_CS_RGB_SCENE
@ DEVELOP_BLEND_CS_RGB_DISPLAY
@ DEVELOP_COMBINE_MASKS_POS
@ DEVELOP_COMBINE_NORM_INCL
@ DEVELOP_COMBINE_INV_INCL
@ DEVELOP_COMBINE_INV_EXCL
@ DEVELOP_COMBINE_NORM_EXCL
void dt_develop_blendif_rgb_jzczhz_make_mask(const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const float *const a, const float *const b, float *const mask)
void dt_develop_blendif_lab_blend(const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const float *const a, float *const b, const float *const mask, const dt_dev_pixelpipe_display_mask_t request_mask_display)
void dt_develop_blendif_raw_make_mask(const struct dt_dev_pixelpipe_iop_t *piece, const float *const a, const float *const b, float *const mask)
void dt_develop_blendif_rgb_hsl_blend(const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const float *const a, float *const b, const float *const mask, const dt_dev_pixelpipe_display_mask_t request_mask_display)
void dt_develop_blendif_lab_make_mask(const struct dt_dev_pixelpipe_iop_t *piece, const float *const a, const float *const b, float *const mask)
@ DEVELOP_BLENDIF_Lab_MASK
@ DEVELOP_BLENDIF_RGB_MASK
#define DEVELOP_BLENDIF_PARAMETER_ITEMS
@ DEVELOP_BLEND_CHROMATICITY
@ DEVELOP_BLEND_DIFFERENCE
@ DEVELOP_BLEND_LIGHTNESS
@ DEVELOP_BLEND_MODE_MASK
@ DEVELOP_BLEND_DIVIDE_INVERSE
@ DEVELOP_BLEND_MULTIPLY_REVERSE_OBSOLETE
@ DEVELOP_BLEND_HARDLIGHT
@ DEVELOP_BLEND_LAB_COLOR
@ DEVELOP_BLEND_DISABLED_OBSOLETE
@ DEVELOP_BLEND_HSV_COLOR
@ DEVELOP_BLEND_HARMONIC_MEAN
@ DEVELOP_BLEND_HSV_VALUE
@ DEVELOP_BLEND_LINEARLIGHT
@ DEVELOP_BLEND_VIVIDLIGHT
@ DEVELOP_BLEND_GEOMETRIC_MEAN
@ DEVELOP_BLEND_NORMAL_OBSOLETE
@ DEVELOP_BLEND_SOFTLIGHT
@ DEVELOP_BLEND_UNBOUNDED_OBSOLETE
@ DEVELOP_BLEND_COLORADJUST
@ DEVELOP_BLEND_INVERSE_OBSOLETE
@ DEVELOP_BLEND_LAB_LIGHTNESS
@ DEVELOP_BLEND_DIFFERENCE2
@ DEVELOP_BLEND_SUBTRACT_INVERSE
@ DEVELOP_MASK_PARAMETRIC
#define DEVELOP_BLEND_VERSION
void dt_ioppr_free_iccprofile_params_cl(dt_colorspaces_iccprofile_info_cl_t **_profile_info_cl, cl_float **_profile_lut_cl, cl_mem *_dev_profile_info, cl_mem *_dev_profile_lut)
free parameters build with the previous function.
cl_int dt_ioppr_build_iccprofile_params_cl(const dt_iop_order_iccprofile_info_t *const profile_info, const int devid, dt_colorspaces_iccprofile_info_cl_t **_profile_info_cl, cl_float **_profile_lut_cl, cl_mem *_dev_profile_info, cl_mem *_dev_profile_lut)
build the required parameters for a kernel that uses a profile info.
const dt_colormatrix_t dt_aligned_pixel_t out
static const dt_colormatrix_t M
void dt_control_alert(const char *title, const char *message, const char *item)
Tell the user something that must not go unseen: what it says stays true after a toast would have fad...
void dt_masks_blur_9x9_coeff(float *c, const float sigma)
void dt_masks_calc_detail_mask(float *const restrict src, float *const restrict out, float *const restrict tmp, const int width, const int height, const float threshold, const gboolean detail)
dt_ioppr_profile_stage_t dt_ioppr_get_module_profile_stage(const dt_iop_module_t *module)
dt_iop_order_iccprofile_info_t * dt_ioppr_get_pipe_work_profile_info(const struct dt_dev_pixelpipe_t *pipe)
dt_iop_order_iccprofile_info_t * dt_ioppr_get_pipe_current_profile_info(dt_iop_module_t *module, const struct dt_dev_pixelpipe_t *pipe)
__DT_CLONE_TARGETS__ dt_iop_order_iccprofile_info_t * dt_ioppr_get_iop_work_profile_info(struct dt_iop_module_t *module, GList *iop_list)
@ DT_IOPPR_PROFILE_STAGE_WORK
dt_dev_pixelpipe_display_mask_t
@ DT_DEV_PIXELPIPE_DISPLAY_CHANNEL
@ DT_DEV_PIXELPIPE_DISPLAY_ANY
@ DT_DEV_PIXELPIPE_DISPLAY_MASK
@ DT_DEV_PIXELPIPE_DISPLAY_NONE
void dt_gaussian_free(dt_gaussian_t *g)
void dt_gaussian_free_cl(dt_gaussian_cl_t *g)
cl_int dt_gaussian_blur_cl(dt_gaussian_cl_t *g, cl_mem dev_in, cl_mem dev_out)
__DT_CLONE_TARGETS__ void dt_gaussian_blur(dt_gaussian_t *g, const float *const in, float *const out)
dt_gaussian_cl_t * dt_gaussian_init_cl(const int devid, const int width, const int height, const int channels, const float *max, const float *min, const float sigma, const int order)
dt_gaussian_t * dt_gaussian_init(const int width, const int height, const int channels, const float *max, const float *min, const float sigma, const int order)
int guided_filter_cl(int devid, cl_mem guide, cl_mem in, cl_mem out, const int width, const int height, const int ch, const int w, const float sqrt_eps, const float guide_weight, const float min, const float max)
__DT_CLONE_TARGETS__ int guided_filter(const float *const guide, const float *const in, float *const out, const int width, const int height, const int ch, const int w, const float sqrt_eps, const float guide_weight, const float min, const float max)
char dt_dev_operation_t[20]
The string identifying an operation in the history stack ("exposure", "colorbalancergb",...
__DT_CLONE_TARGETS__ void dt_iop_image_mul_const(float *const buf, const float mul_value, const size_t width, const size_t height, const size_t ch)
__DT_CLONE_TARGETS__ void dt_iop_image_invert(float *const buf, const float max_value, const size_t width, const size_t height, const size_t ch)
__DT_CLONE_TARGETS__ void dt_iop_image_fill(float *const buf, const float fill_value, const size_t width, const size_t height, const size_t ch)
__DT_CLONE_TARGETS__ void dt_iop_image_scaled_copy(float *const restrict buf, const float *const restrict src, const float scale, const size_t width, const size_t height, const size_t ch)
gboolean dt_iop_is_raster_mask_used(dt_iop_module_t *module, int id)
void dt_iop_cleanup_module(dt_iop_module_t *module)
int dt_iop_load_module_by_so(dt_iop_module_t *module, dt_iop_module_so_t *so, dt_develop_t *dev)
@ IOP_FLAGS_SUPPORTS_BLENDING
static float kernel(const float *x, const float *y)
static const dt_dev_pixelpipe_t * pipe
static const dt_dev_pixelpipe_t const dt_dev_pixelpipe_iop_t * piece
static const dt_iop_drawlayer_params_t * params
#define DEVELOP_BLENDIF_SIZE
int32_t dt_get_debug_flags(void)
void dt_print(dt_debug_thread_t thread, const char *msg,...) __attribute__((format(printf
Print to stdout when thread is enabled, prefixed with seconds since startup.
float *const restrict const size_t k
float *const restrict const size_t const size_t ch
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
dt_masks_form_t * dt_masks_get_from_id_ext(GList *forms, int id)
dt_masks_form_t * dt_masks_get_from_id(dt_develop_t *dev, int id)
dt_masks_raster_result_t dt_masks_group_render_roi(dt_iop_module_t *module, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, dt_masks_form_t *form, const dt_iop_roi_t *roi, float *buffer)
The detail-mask pixel math: a Scharr-style detail estimate over a raw or scene-referred buffer,...
static float clamp_range_f(const float x, const float low, const float high)
float DT_ALIGNED_ARRAY dt_colormatrix_t[4][4]
#define DT_ALIGNED_ARRAY
Align an object on a cacheline boundary, so AVX2 can load it whole.
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
int dt_opencl_enqueue_kernel_2d(const int dev, const int kernel, const size_t *sizes)
void * dt_opencl_alloc_device_buffer(const int devid, const size_t size)
int dt_opencl_copy_device_to_host(const int devid, void *host, void *device, const int width, const int height, const int bpp)
void * dt_opencl_alloc_device(const int devid, const int width, const int height, const int bpp)
int dt_opencl_create_kernel(const int prog, const char *name)
void * dt_opencl_copy_host_to_device_constant(const int devid, const size_t size, void *host)
int dt_opencl_enqueue_copy_image(const int devid, cl_mem src, cl_mem dst, size_t *orig_src, size_t *orig_dst, size_t *region)
void dt_opencl_free_kernel(const int kernel)
int dt_opencl_set_kernel_arg(const int dev, const int kernel, const int num, const size_t size, const void *arg)
int dt_opencl_read_host_from_device(const int devid, void *host, void *device, const int width, const int height, const int bpp)
void dt_opencl_release_mem_object(cl_mem mem)
int dt_opencl_write_host_to_device(const int devid, void *host, void *device, const int width, const int height, const int bpp)
#define __OMP_PARALLEL_FOR__(...)
#define __OMP_FOR_SIMD__(...)
#define __OMP_PARALLEL_FOR_SIMD__(...)
uint64_t dt_dev_pixelpipe_raster_mask_hash(const dt_dev_pixelpipe_iop_t *piece, const int raster_mask_id)
@ DT_DEV_PIXELPIPE_THUMBNAIL
@ DT_DEV_PIXELPIPE_EXPORT
@ DT_DEV_PIXELPIPE_PREVIEW
void dt_dev_pixelpipe_cache_wrlock_entry(gboolean lock, dt_pixel_cache_entry_t *cache_entry)
Lock or release the write lock on the entry.
void dt_dev_pixelpipe_cache_ref_count_entry(gboolean lock, dt_pixel_cache_entry_t *cache_entry)
Take or release one reference on a cache line. A referenced line is never evicted,...
int dt_dev_pixelpipe_cache_get(const uint64_t hash, const size_t size, const char *name, const int id, const gboolean alloc, void **data, dt_pixel_cache_entry_t **entry)
Get a cache line from the cache.
void dt_dev_pixelpipe_cache_flag_auto_destroy(dt_pixel_cache_entry_t *cache_entry)
Flag a cache line as disposable (auto_destroy), for short-lived lines nothing will need again: the re...
#define dt_pixelpipe_cache_alloc_align_float_cache(pixels, id)
#define dt_pixelpipe_cache_free_align(mem)
#define dt_pixelpipe_cache_alloc_align_float(pixels, pipe)
float * dt_dev_retrieve_rawdetail_mask(const dt_dev_pixelpipe_t *pipe, const struct dt_iop_module_t *target_module)
float * dt_dev_get_raster_mask(dt_dev_pixelpipe_t *pipe, const struct dt_iop_module_t *raster_mask_source, const int raster_mask_id, const struct dt_iop_module_t *target_module, int *error)
Retrieve a provider mask from the global cache and transform it to a consumer.
float * dt_dev_distort_detail_mask(const dt_dev_pixelpipe_t *pipe, float *src, const struct dt_iop_module_t *target_module)
static const dt_aligned_pixel_simd_t value
unsigned __int64 uint64_t
int kernel_blendop_mask_RAW
int kernel_blendop_mask_rgb_jzczhz
int kernel_blendop_display_channel
int kernel_blendop_rgb_jzczhz
int kernel_blendop_mask_rgb_hsl
int kernel_blendop_rgb_hsl
int kernel_blendop_mask_tone_curve
int kernel_blendop_set_mask
int kernel_blendop_mask_Lab
The device-side view of a dt_iop_order_iccprofile_info_t: the scalar fields only.
dt_dev_pixelpipe_type_t type
gboolean store_all_raster_masks
GArray * raster_mask_hashes
struct dt_develop_t * dev
float blendif_parameters[4 *DEVELOP_BLENDIF_SIZE]
float blendif_boost_factors[DEVELOP_BLENDIF_SIZE]
struct dt_iop_module_t * gui_module
struct dt_dev_pixelpipe_t * pipe
char fullpath[DT_PATH_MAX]
struct dt_develop_t * dev
struct dt_iop_module_t::@23::@24 source
struct dt_iop_module_t::@23::@25 sink
struct dt_iop_module_t::@23 raster_mask
A profile reduced to the arithmetic the pixel loop can run: two matrices and six tone-curve LUTs,...
dt_colormatrix_t matrix_out_transposed
dt_colormatrix_t matrix_out
XYZ (D50) -> RGB, row-major; the inverse of matrix_in.
dt_colormatrix_t matrix_in
RGB -> XYZ (D50), row-major. matrix_in[1][*] is the luminance row. NaN in [0][0] marks the whole prof...
Region of interest passed through the pixelpipe.
uint64_t dt_supervisor_node_key(const int pipe_type, const char *op_name, const int multi_priority)
void dt_supervisor_cacheline_create(const uint64_t hash, const uint64_t node_hash, const uint64_t param_hash, const uint64_t input_hash, const char *op_name, const int multi_priority, const int iop_order, const int pipe_type, const int32_t imgid, const int roi_w, const int roi_h, const int devid, const size_t size, const char *name)
static gboolean dt_supervisor_active(void)
Telling the user something happened.