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 = ¶ms->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;
470 const gboolean mask_feather = params->feathering_radius > 0.1f && piece->
dsc_in.
channels >= 3;
471 const gboolean mask_blur = params->blur_radius > 0.1f;
472 const gboolean mask_tone_curve = fabsf(params->contrast) >= 0.01f || fabsf(params->brightness) >= 0.01f;
477 const float opacity = fminf(fmaxf(params->opacity / 100.0f, 0.0f), 1.0f);
484 if(mask_blur && mask_feather_before)
501 if(mask_tone_curve && opacity > 1e-4f)
511 const size_t xoffs,
const size_t yoffs,
512 const size_t owidth,
const size_t oheight)
514 const size_t ioffset = yoffs * iwidth + xoffs;
515 float *
const restrict output =
522 for(
size_t y = 0; y < oheight; y++)
524 const size_t iindex = y * iwidth + ioffset;
525 const size_t oindex = y * owidth;
526 memcpy(output + oindex, input + iindex,
sizeof(
float) * owidth);
543 if(source && !strcmp(source->
op, params->raster_mask_source)
547 if(
IS_NULL_PTR(self->
dev) || params->raster_mask_source[0] ==
'\0')
return NULL;
549 for(GList *iter = g_list_first(self->
dev->
iop); iter; iter = g_list_next(iter))
552 if(!strcmp(candidate->
op, params->raster_mask_source)
564 float *
const restrict mask,
566 const size_t oheight,
567 int *
const raster_error)
569 int local_raster_error = 0;
571 float *raster_mask = raster_source
573 self, &local_raster_error)
578 if(params->raster_mask_invert)
581 for(
size_t i = 0;
i < owidth * oheight;
i++)
582 mask[
i] = 1.0f - raster_mask[
i];
593 const float value = params->raster_mask_invert ? 0.0f : 1.0f;
597 if(!
IS_NULL_PTR(raster_error)) *raster_error = local_raster_error;
605 float *
const restrict mask,
607 const size_t oheight)
641 const float *
const restrict other_mask,
642 const size_t buffsize)
645 for(
size_t i = 0;
i < buffsize;
i++)
646 mask[
i] *= other_mask[
i];
651 const size_t height,
const int ch,
const float guide_weight,
652 const float feathering_radius,
const float scale)
654 const float sqrt_eps = 1.f;
655 int w = (int)(2 * feathering_radius * scale + 0.5f);
658 float *
const restrict mask_bak =
662 memcpy(mask_bak, mask,
sizeof(
float) *
width *
height);
663 if(
guided_filter(guide, mask_bak, mask,
width,
height,
ch, w, sqrt_eps, guide_weight, 0.f, 1.f) != 0)
674 const float contrast,
const float brightness,
677 const float mask_epsilon = 16 * FLT_EPSILON;
678 const float e = expf(3.f * contrast);
680 for(
size_t k = 0;
k < buffsize;
k++)
682 float x = mask[
k] / opacity;
684 if (1.f - brightness <= 0.f)
685 x = mask[
k] <= mask_epsilon ? -1.f : 1.f;
686 else if (1.f + brightness <= 0.f)
687 x = mask[
k] >= 1.f - mask_epsilon ? 1.f : -1.f;
688 else if (brightness > 0.f)
690 x = (
x + brightness) / (1.f - brightness);
695 x = (
x + brightness) / (1.f + brightness);
699 ((
x * e / (1.f + (e - 1.f) * fabsf(
x))) / 2.f + 0.5f) * opacity, 0.f, 1.f);
715 gboolean top_enabled =
FALSE;
716 gboolean raster_used =
FALSE;
717 gboolean drawn_used =
FALSE;
718 gboolean parametric_used =
FALSE;
720 if(!top_enabled)
return 0;
724 const gboolean preview_mask_mode = top_enabled;
727 const int xoffs = roi_out->
x - roi_in->
x;
728 const int yoffs = roi_out->
y - roi_in->
y;
729 const int iwidth = roi_in->
width;
730 const int iheight = roi_in->
height;
731 const int owidth = roi_out->
width;
732 const int oheight = roi_out->
height;
733 const size_t buffsize = (size_t)owidth * oheight;
735 const float oscale = roi_out->
scale;
736 const gboolean rois_equal = iwidth == owidth || iheight == oheight || xoffs == 0 || yoffs == 0;
745 if(oscale !=
iscale || xoffs < 0 || yoffs < 0
746 || ((xoffs > 0 || yoffs > 0) && (owidth + xoffs > iwidth || oheight + yoffs > iheight)))
755 && preview_mask_mode)
768 const float opacity = fminf(fmaxf(
d->opacity / 100.0f, 0.0f), 1.0f);
777 int raster_error = 0;
778 float *
const restrict mask = _mask;
779 const gboolean use_masks = raster_used || drawn_used || parametric_used;
780 const gboolean raster_only = raster_used && !drawn_used && !parametric_used;
795 if(!raster_used && !drawn_used)
843 (
const float *
const restrict)
ovoid, mask);
847 (
const float *
const restrict)
ovoid, mask);
851 (
const float *
const restrict)
ovoid, mask);
855 (
const float *
const restrict)
ovoid, mask);
862 for(
size_t index = 0; index < post_operations_size; ++index)
868 float *restrict guide = (
float *restrict)ivoid;
871 ch * owidth,
ch * oheight);
878 d->feathering_radius, roi_out->
scale) != 0)
892 guide_weight,
d->feathering_radius, roi_out->
scale) != 0)
900 const float sigma =
d->blur_radius * roi_out->
scale;
901 const float mmax[] = { 1.0f };
902 const float mmin[] = { 0.0f };
924 mask, request_mask_display);
928 mask, request_mask_display);
932 mask, request_mask_display);
936 mask, request_mask_display);
953 void *cache_data = NULL;
955 mask_hash,
sizeof(
float) * buffsize,
956 "raster mask", pipe->
type,
TRUE, &cache_data, &mask_entry);
976 memcpy(cache_data, _mask,
sizeof(
float) * buffsize);
987 piece->module->multi_priority),
989 piece->module->multi_priority, piece->module->iop_order,
995 "[raster masks] %s mask id 0 for module %s (%s) for pipe %s"
996 " with cache hash %" PRIu64
"\n",
997 created ?
"published" :
"reused cached",
998 piece->module->op, piece->module->multi_name,
1004 "[raster masks] discarding unpublished mask id 0 for module %s (%s) for pipe %s\n",
1005 piece->module->op, piece->module->multi_name,
1010 return raster_error;
1016 const float level,
const int devid)
1019 if(level == 0.0f)
return;
1022 const int detail = (level > 0.0f);
1025 float *rawdetail_mask = NULL;
1034 const int iwidth =
p->rawdetail_mask_roi.width;
1035 const int iheight =
p->rawdetail_mask_roi.height;
1036 const int owidth = roi_out->
width;
1037 const int oheight = roi_out->
height;
1038 if(info) fprintf(stderr,
"[_refine_with_detail_mask_cl] in module %s %ix%i --> %ix%i\n", self->
op, iwidth, iheight, owidth, oheight);
1051 if(err != CL_SUCCESS)
goto error;
1062 if(err != CL_SUCCESS)
goto error;
1075 if(err != CL_SUCCESS)
goto error;
1081 cl_mem dev_blurmat = NULL;
1094 if(err != CL_SUCCESS)
goto error;
1111 if(err != CL_SUCCESS)
goto error;
1116 if(err != CL_SUCCESS)
goto error;
1122 tmp = blur =
out = NULL;
1128 const gboolean warp_mask_aliases_lum = (warp_mask == lum);
1129 if(!warp_mask_aliases_lum)
1135 const int msize = owidth * oheight;
1137 for(
int idx = 0; idx < msize; idx++)
1139 mask[idx] = mask[idx] * warp_mask[idx];
1142 if(warp_mask_aliases_lum) lum = NULL;
1170 gboolean top_enabled =
FALSE;
1171 gboolean raster_used =
FALSE;
1172 gboolean drawn_used =
FALSE;
1173 gboolean parametric_used =
FALSE;
1175 if(!top_enabled)
return 0;
1176 const unsigned int mask_mode =
d->mask_mode;
1180 const gboolean preview_mask_mode = top_enabled;
1183 const int xoffs = roi_out->
x - roi_in->
x;
1184 const int yoffs = roi_out->
y - roi_in->
y;
1185 const int iwidth = roi_in->
width;
1186 const int iheight = roi_in->
height;
1187 const int owidth = roi_out->
width;
1188 const int oheight = roi_out->
height;
1189 const size_t buffsize = (size_t)owidth * oheight;
1191 const float oscale = roi_out->
scale;
1192 const gboolean rois_equal = iwidth == owidth || iheight == oheight || xoffs == 0 || yoffs == 0;
1201 if(oscale !=
iscale || xoffs < 0 || yoffs < 0
1202 || ((xoffs > 0 || yoffs > 0) && (owidth + xoffs > iwidth || oheight + yoffs > iheight)))
1214 && preview_mask_mode)
1227 const float opacity = fminf(fmaxf(
d->opacity / 100.0f, 0.0f), 1.0f);
1228 const gboolean use_masks = raster_used || drawn_used || parametric_used;
1229 const gboolean raster_only = raster_used && !drawn_used && !parametric_used;
1238 float *
const mask = _mask;
1270 const int devid = pipe->
devid;
1271 const int offs[2] = { xoffs, yoffs };
1275 cl_mem dev_blendif_params = NULL;
1276 cl_mem dev_boost_factors = NULL;
1277 cl_mem dev_mask_1 = NULL;
1278 cl_mem dev_mask_2 = NULL;
1279 cl_mem dev_tmp = NULL;
1280 cl_mem dev_guide = NULL;
1282 cl_mem dev_profile_info = NULL;
1283 cl_mem dev_profile_lut = NULL;
1285 cl_float *profile_lut_cl = NULL;
1287 cl_mem dev_work_profile_info = NULL;
1288 cl_mem dev_work_profile_lut = NULL;
1290 cl_float *work_profile_lut_cl = NULL;
1292 size_t origin[] = { 0, 0, 0 };
1293 size_t region[] = { owidth, oheight, 1 };
1311 &profile_lut_cl, &dev_profile_info, &dev_profile_lut);
1312 if(err != CL_SUCCESS)
goto error;
1324 if(err != CL_SUCCESS)
goto error;
1326 else if(raster_only)
1328 int raster_error = 0;
1330 if(raster_error)
goto error;
1334 if(err != CL_SUCCESS)
goto error;
1338 if(!raster_used && !drawn_used)
1346 else if(raster_used)
1348 int raster_error = 0;
1350 if(raster_error)
goto error;
1378 if(err != CL_SUCCESS)
goto error;
1381 const unsigned blendif =
d->blendif;
1382 const unsigned int mask_combine =
d->mask_combine;
1399 if(err != CL_SUCCESS)
1401 fprintf(stderr,
"[dt_develop_blend_process_cl] error %i enqueue kernel\n", err);
1409 for(
size_t index = 0; index < post_operations_size; ++index)
1414 int w = (int)(2 *
d->feathering_radius * roi_out->
scale + 0.5f);
1416 const float sqrt_eps = 1.0f;
1419 cl_mem guide = dev_in;
1425 size_t origin_1[] = { xoffs, yoffs, 0 };
1426 size_t origin_2[] = { 0, 0, 0 };
1428 if(err != CL_SUCCESS)
goto error;
1430 if(
guided_filter_cl(devid, guide, dev_mask_1, dev_mask_2, owidth, oheight,
ch, w, sqrt_eps, guide_weight,
1442 int w = (int)(2 *
d->feathering_radius * roi_out->
scale + 0.5f);
1444 const float sqrt_eps = 1.0f;
1447 if(
guided_filter_cl(devid, dev_out, dev_mask_1, dev_mask_2, owidth, oheight,
ch, w, sqrt_eps, guide_weight,
1454 const float sigma =
d->blur_radius * roi_out->
scale;
1455 const float mmax[] = { 1.0f };
1456 const float mmin[] = { 0.0f };
1462 if(err != CL_SUCCESS)
goto error;
1467 const float e = expf(3.f *
d->contrast);
1468 const float brightness =
d->brightness;
1477 if(err != CL_SUCCESS)
goto error;
1492 if(err != CL_SUCCESS)
goto error;
1498 d->blendif_boost_factors);
1504 const int use_work_profile = !
IS_NULL_PTR(work_profile);
1507 &dev_work_profile_info, &dev_work_profile_lut);
1508 if(err != CL_SUCCESS)
goto error;
1527 if(err != CL_SUCCESS)
1529 fprintf(stderr,
"[dt_develop_blend_process_cl] error %i enqueue kernel\n", err);
1536 const unsigned int blend_mode =
d->blend_mode;
1537 const float blend_parameter = exp2f(
d->blend_parameter);
1549 if(err != CL_SUCCESS)
goto error;
1566 if(err != CL_SUCCESS)
goto error;
1571 void *cache_data = NULL;
1573 mask_hash,
sizeof(
float) * buffsize,
1574 "raster mask", pipe->
type,
TRUE, &cache_data, &mask_entry);
1593 memcpy(cache_data, _mask,
sizeof(
float) * buffsize);
1605 piece->module->multi_priority),
1607 piece->module->multi_priority, piece->module->iop_order,
1613 "[raster masks] %s mask id 0 for module %s (%s) for pipe %s"
1614 " with cache hash %" PRIu64
"\n",
1615 created ?
"published" :
"reused cached",
1616 piece->module->op, piece->module->multi_name,
1622 "[raster masks] discarding unpublished mask id 0 for module %s (%s) for pipe %s\n",
1623 piece->module->op, piece->module->multi_name,
1634 &dev_work_profile_lut);
1647 &dev_work_profile_lut);
1659 const int program = 3;
1672 const int program_rcd = 31;
1743 const char *data = (
const char *)params;
1745 for(
size_t k = 0;
k < length;
k++)
1746 if(data[
k])
return FALSE;
1754 gboolean blend_reverse =
FALSE;
1755 switch(blend_mode) {
1761 blend_reverse =
TRUE;
1769 blend_reverse =
TRUE;
1779 const int old_version,
void *new_params,
const int new_version,
1796 *
n = default_display_blend_params;
1800 if(old_version == 1 && new_version == 11)
1803 typedef struct dt_develop_blend_params1_t
1808 } dt_develop_blend_params1_t;
1810 if(length !=
sizeof(dt_develop_blend_params1_t))
return 1;
1812 dt_develop_blend_params1_t *o = (dt_develop_blend_params1_t *)old_params;
1815 *
n = default_display_blend_params;
1818 n->opacity = o->opacity;
1819 n->mask_id = o->mask_id;
1823 if(old_version == 2 && new_version == 11)
1826 typedef struct dt_develop_blend_params2_t
1837 float blendif_parameters[4 * 8];
1838 } dt_develop_blend_params2_t;
1840 if(length !=
sizeof(dt_develop_blend_params2_t))
return 1;
1842 dt_develop_blend_params2_t *o = (dt_develop_blend_params2_t *)old_params;
1845 *
n = default_display_blend_params;
1851 n->opacity = o->opacity;
1852 n->mask_id = o->mask_id;
1853 n->blendif = o->blendif & 0xff;
1856 for(
int i = 0;
i < (4 * 8);
i++)
n->blendif_parameters[
i] = o->blendif_parameters[
i];
1861 if(old_version == 3 && new_version == 11)
1864 typedef struct dt_develop_blend_params3_t
1876 } dt_develop_blend_params3_t;
1878 if(length !=
sizeof(dt_develop_blend_params3_t))
return 1;
1880 dt_develop_blend_params3_t *o = (dt_develop_blend_params3_t *)old_params;
1883 *
n = default_display_blend_params;
1889 n->opacity = o->opacity;
1890 n->mask_id = o->mask_id;
1897 if(old_version == 4 && new_version == 11)
1900 typedef struct dt_develop_blend_params4_t
1914 } dt_develop_blend_params4_t;
1916 if(length !=
sizeof(dt_develop_blend_params4_t))
return 1;
1918 dt_develop_blend_params4_t *o = (dt_develop_blend_params4_t *)old_params;
1921 *
n = default_display_blend_params;
1927 n->opacity = o->opacity;
1928 n->mask_id = o->mask_id;
1929 n->blur_radius = o->radius;
1936 if(old_version == 5 && new_version == 11)
1939 typedef struct dt_develop_blend_params5_t
1944 uint32_t blend_mode;
1948 uint32_t mask_combine;
1956 uint32_t reserved[4];
1959 } dt_develop_blend_params5_t;
1961 if(length !=
sizeof(dt_develop_blend_params5_t))
return 1;
1963 dt_develop_blend_params5_t *o = (dt_develop_blend_params5_t *)old_params;
1966 *
n = default_display_blend_params;
1969 n->opacity = o->opacity;
1970 n->mask_combine = o->mask_combine;
1971 n->mask_id = o->mask_id;
1972 n->blur_radius = o->radius;
1984 if(old_version == 6 && new_version == 11)
1987 typedef struct dt_develop_blend_params6_t
1992 uint32_t blend_mode;
1996 uint32_t mask_combine;
2004 uint32_t reserved[4];
2007 } dt_develop_blend_params6_t;
2009 if(length !=
sizeof(dt_develop_blend_params6_t))
return 1;
2011 dt_develop_blend_params6_t *o = (dt_develop_blend_params6_t *)old_params;
2014 *
n = default_display_blend_params;
2017 n->opacity = o->opacity;
2018 n->mask_combine = o->mask_combine;
2019 n->mask_id = o->mask_id;
2020 n->blur_radius = o->radius;
2021 n->blendif = o->blendif;
2026 if(old_version == 7 && new_version == 11)
2029 typedef struct dt_develop_blend_params7_t
2034 uint32_t blend_mode;
2038 uint32_t mask_combine;
2046 uint32_t reserved[4];
2049 } dt_develop_blend_params7_t;
2051 if(length !=
sizeof(dt_develop_blend_params7_t))
return 1;
2053 dt_develop_blend_params7_t *o = (dt_develop_blend_params7_t *)old_params;
2056 *
n = default_display_blend_params;
2059 n->opacity = o->opacity;
2060 n->mask_combine = o->mask_combine;
2061 n->mask_id = o->mask_id;
2062 n->blur_radius = o->radius;
2063 n->blendif = o->blendif;
2068 if(old_version == 8 && new_version == 11)
2071 typedef struct dt_develop_blend_params8_t
2076 uint32_t blend_mode;
2080 uint32_t mask_combine;
2086 float feathering_radius;
2088 uint32_t feathering_guide;
2096 uint32_t reserved[4];
2099 } dt_develop_blend_params8_t;
2101 if(length !=
sizeof(dt_develop_blend_params8_t))
return 1;
2103 dt_develop_blend_params8_t *o = (dt_develop_blend_params8_t *)old_params;
2106 *
n = default_display_blend_params;
2109 n->opacity = o->opacity;
2110 n->mask_combine = o->mask_combine;
2111 n->mask_id = o->mask_id;
2112 n->blendif = o->blendif;
2113 n->feathering_radius = o->feathering_radius;
2114 n->feathering_guide = o->feathering_guide;
2115 n->blur_radius = o->blur_radius;
2116 n->contrast = o->contrast;
2117 n->brightness = o->brightness;
2122 if(old_version == 9 && new_version == 11)
2125 typedef struct dt_develop_blend_params9_t
2131 uint32_t blend_mode;
2135 uint32_t mask_combine;
2141 float feathering_radius;
2143 uint32_t feathering_guide;
2151 uint32_t reserved[4];
2155 int raster_mask_instance;
2157 gboolean raster_mask_invert;
2158 } dt_develop_blend_params9_t;
2160 if(length !=
sizeof(dt_develop_blend_params9_t))
return 1;
2162 dt_develop_blend_params9_t *o = (dt_develop_blend_params9_t *)old_params;
2165 *
n = default_display_blend_params;
2168 n->opacity = o->opacity;
2169 n->mask_combine = o->mask_combine;
2170 n->mask_id = o->mask_id;
2171 n->blendif = o->blendif;
2172 n->feathering_radius = o->feathering_radius;
2173 n->feathering_guide = o->feathering_guide;
2174 n->blur_radius = o->blur_radius;
2175 n->contrast = o->contrast;
2176 n->brightness = o->brightness;
2178 memcpy(
n->raster_mask_source, o->raster_mask_source,
sizeof(
n->raster_mask_source));
2179 n->raster_mask_instance = o->raster_mask_instance;
2180 n->raster_mask_id = o->raster_mask_id;
2181 n->raster_mask_invert = o->raster_mask_invert;
2185 if(old_version == 10 && new_version == 11)
2188 typedef struct dt_develop_blend_params10_t
2196 uint32_t blend_mode;
2198 float blend_parameter;
2202 uint32_t mask_combine;
2208 float feathering_radius;
2210 uint32_t feathering_guide;
2218 uint32_t reserved[4];
2223 int raster_mask_instance;
2225 gboolean raster_mask_invert;
2226 } dt_develop_blend_params10_t;
2228 if(length !=
sizeof(dt_develop_blend_params10_t))
return 1;
2230 dt_develop_blend_params10_t *o = (dt_develop_blend_params10_t *)old_params;
2233 *
n = default_display_blend_params;
2235 n->blend_cst = o->blend_cst;
2237 n->blend_parameter = o->blend_parameter;
2238 n->opacity = o->opacity;
2239 n->mask_combine = o->mask_combine;
2240 n->mask_id = o->mask_id;
2241 n->blendif = o->blendif;
2242 n->feathering_radius = o->feathering_radius;
2243 n->feathering_guide = o->feathering_guide;
2244 n->blur_radius = o->blur_radius;
2245 n->contrast = o->contrast;
2246 n->brightness = o->brightness;
2248 memcpy(&
n->details, &o->reserved,
sizeof(
float));
2249 if(isnan(
n->details))
n->details = 0.0f;
2250 n->details = fminf(1.0f, fmaxf(-1.0f,
n->details));
2254 memcpy(
n->raster_mask_source, o->raster_mask_source,
sizeof(
n->raster_mask_source));
2255 n->raster_mask_instance = o->raster_mask_instance;
2256 n->raster_mask_id = o->raster_mask_id;
2257 n->raster_mask_invert = o->raster_mask_invert;
2265 const int old_version,
void *new_params,
const int new_version,
2269 dt_iop_module_t *
module = (dt_iop_module_t *)calloc(1, sizeof(dt_iop_module_t));
2276 if(module->params_size == 0)
2340 = { { NC_(
"blendoperation",
"normal"), 0 },
2353 = { { N_(
"None"), 0 },
2354 { N_(
"Uniform"), 1 },
2355 { N_(
"Parametric mask"), 2 },
2356 { N_(
"Drawn mask"), 3 },
2357 { N_(
"Drawn & parametric mask"), 4 },
2358 { 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 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_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)
#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_raster_result_t dt_masks_group_render_roi(dt_iop_module_t *module, 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)
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)
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__(...)
void dt_pipeline_message(const char *format,...)
Everything the pixel pipeline says to whoever is watching: messages for the user, and the busy banner...
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)
Increase/Decrease the reference count on the cache line as to prevent LRU item removal....
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.
int dt_dev_pixelpipe_cache_remove(const gboolean force, dt_pixel_cache_entry_t *cache_entry)
Arbitrarily remove the cache entry matching hash. Entries having a reference count > 0 (inter-thread ...
#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_iop_buffer_dsc_t dsc_in
dt_dev_pixelpipe_type_t type
gboolean store_all_raster_masks
GArray * raster_mask_hashes
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
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)