Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
rawoverexposed.c
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2016 Roman Lebedev.
4 Copyright (C) 2016-2017 Ulrich Pegelow.
5 Copyright (C) 2017, 2019 Heiko Bauke.
6 Copyright (C) 2018-2021, 2023, 2025-2026 Aurélien PIERRE.
7 Copyright (C) 2018 Edgardo Hoszowski.
8 Copyright (C) 2019 Andreas Schneider.
9 Copyright (C) 2019 Tobias Ellinghaus.
10 Copyright (C) 2020 Aldric Renaudin.
11 Copyright (C) 2020 Diederik Ter Rahe.
12 Copyright (C) 2020 Hubert Kowalski.
13 Copyright (C) 2020-2021 Pascal Obry.
14 Copyright (C) 2020-2021 Ralf Brown.
15 Copyright (C) 2022 Hanno Schwalm.
16 Copyright (C) 2022 jandren.
17 Copyright (C) 2022 Martin Bařinka.
18 Copyright (C) 2022 Philipp Lutz.
19 Copyright (C) 2024 Alynx Zhou.
20
21 darktable is free software: you can redistribute it and/or modify
22 it under the terms of the GNU General Public License as published by
23 the Free Software Foundation, either version 3 of the License, or
24 (at your option) any later version.
25
26 darktable is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 GNU General Public License for more details.
30
31 You should have received a copy of the GNU General Public License
32 along with darktable. If not, see <http://www.gnu.org/licenses/>.
33 */
34
35#ifdef HAVE_CONFIG_H
36#include "config.h"
37#endif
38#include "develop/imageop_gui.h"
39
40#include "system/macros.h"
41#include "system/openmp.h"
43#include "system/mem_alloc.h"
44#include "common/logging.h"
47#include "common/image.h" // for dt_image_t, ::DT_IMAGE_4BAYER
48#include "common/imagebuf.h" // for dt_iop_image_copy_by_size
49#include "caches/mipmap_cache.h" // for dt_mipmap_buffer_t, dt_mipmap_cach...
50#include "common/opencl.h"
52#include "develop/develop.h" // for dt_develop_t, dt_develop_t::(anony...
53#include "develop/imageop.h" // for dt_iop_module_t, dt_iop_roi_t, dt_...
54#include "develop/imageop_math.h" // for FC, FCxtrans
55#include "develop/pixelpipe.h" // for dt_dev_pixelpipe_type_t::DT_DEV_PI...
56#include "develop/tiling.h"
57#include "iop/iop_api.h" // for dt_iop_params_t
58#include <glib/gi18n.h> // for _
59#include <gtk/gtktypes.h> // for GtkWidget
60#include <stdint.h> // for uint16_t, uint8_t, uint32_t
61#include <stdlib.h> // for size_t, free, NULL, calloc, malloc
62#include <string.h> // for memcpy
63
64DT_MODULE(1)
65
70
71static const float dt_iop_rawoverexposed_colors[][4] __attribute__((aligned(64))) = {
72 { 1.0f, 0.0f, 0.0f, 1.0f }, // red
73 { 0.0f, 1.0f, 0.0f, 1.0f }, // green
74 { 0.0f, 0.0f, 1.0f, 1.0f }, // blue
75 { 0.0f, 0.0f, 0.0f, 1.0f } // black
76};
77
82
89
90const char *name()
91{
92 return _("raw overexposed");
93}
94
96{
98}
99
104
106{
107 return IOP_CS_RGB;
108}
109
112{
113 dt_develop_t *dev = self->dev;
115
116 // 4BAYER is not supported by this module yet anyway.
117 const int ch = (dev->image_storage.flags & DT_IMAGE_4BAYER) ? 4 : 3;
118
119 // the clipping is detected as (raw value > threshold)
121
122 for(int k = 0; k < ch; k++)
123 {
124 // here is our threshold
125 float chthr = threshold;
126
127 // "undo" rawprepare iop
129 chthr += piece->dsc_in.rawprepare.raw_black_level;
130
131 // and this is that threshold, but in raw input buffer values
132 d->threshold[k] = (unsigned int)chthr;
133 }
134}
135
138 const void *const ivoid, void *const ovoid)
139{
140 const dt_iop_roi_t *const roi_in = &piece->roi_in;
141 const dt_iop_roi_t *const roi_out = &piece->roi_out;
142 const dt_iop_rawoverexposed_data_t *const d = piece->data;
143
144 process_common_setup(self, piece);
145
146 dt_develop_t *dev = self->dev;
147 const dt_image_t *const image = &(dev->image_storage);
148 dt_dev_pixelpipe_t *const runtime_pipe = (dt_dev_pixelpipe_t *)pipe;
149
150 const int ch = piece->dsc_in.channels;
151 const double iop_order = self->iop_order;
152
154 const int colorscheme = dev->rawoverexposed.colorscheme;
155 const float *const color = dt_iop_rawoverexposed_colors[colorscheme];
156
157 dt_iop_image_copy_by_size(ovoid, ivoid, roi_out->width, roi_out->height, ch);
158
161 if(IS_NULL_PTR(buf.buf))
162 {
163 dt_control_log(_("failed to get raw buffer from image `%s'"), image->filename);
165 return 0;
166 }
167
168#if 0
169 const float in_scale = roi_in->scale;
170 dt_boundingbox_t pts = {(float)(roi_out->x) / in_scale, (float)(roi_out->y) / in_scale,
171 (float)(roi_out->x + roi_out->width) / in_scale, (float)(roi_out->y + roi_out->height) / in_scale};
172 printf("in %f %f %f %f\n", pts[0], pts[1], pts[2], pts[3]);
173 dt_dev_distort_backtransform_plus(dev->pipe, 0, priority, pts, 2);
174 printf("out %f %f %f %f\n\n", pts[0], pts[1], pts[2], pts[3]);
175#endif
176
177 const uint16_t *const raw = (const uint16_t *const)buf.buf;
178 float *const restrict out = DT_IS_ALIGNED((float *const)ovoid);
179
180 // NOT FROM THE PIPE !!!
181 const uint32_t filters = image->dsc.filters;
182 const uint8_t(*const xtrans)[6] = (const uint8_t(*const)[6])image->dsc.xtrans;
183
184 // acquire temp memory for distorted pixel coords
185 size_t coordbufsize;
186 float *const restrict coordbuf = dt_pixelpipe_cache_alloc_perthread_float(2*roi_out->width, &coordbufsize);
187 if(IS_NULL_PTR(coordbuf))
188 {
190 return 1;
191 }
192 __OMP_PARALLEL_FOR_SIMD__(firstprivate(dt_iop_rawoverexposed_colors))
193 for(int j = 0; j < roi_out->height; j++)
194 {
195 float *const restrict bufptr = dt_get_perthread(coordbuf, coordbufsize);
196
197 // here are all the pixels of this row
198 for(int i = 0; i < roi_out->width; i++)
199 {
200 bufptr[2 * i] = (float)(roi_out->x + i) / roi_in->scale;
201 bufptr[2 * i + 1] = (float)(roi_out->y + j) / roi_in->scale;
202 }
203
204 // where did they come from?
205 dt_dev_distort_backtransform_plus(runtime_pipe, iop_order,
206 DT_DEV_TRANSFORM_DIR_BACK_INCL, bufptr, roi_out->width);
207
208 for(int i = 0; i < roi_out->width; i++)
209 {
210 const size_t pout = (size_t)ch * (j * roi_out->width + i);
211
212 // not sure which float -> int to use here
213 const int i_raw = (int)bufptr[2 * i];
214 const int j_raw = (int)bufptr[2 * i + 1];
215
216 if(i_raw < 0 || j_raw < 0 || i_raw >= buf.width || j_raw >= buf.height) continue;
217
218 int c;
219 if(filters == 9u)
220 {
221 c = FCxtrans(j_raw, i_raw, NULL, xtrans);
222 }
223 else // if(filters)
224 {
225 c = FC(j_raw, i_raw, filters);
226 }
227
228 const size_t pin = (size_t)j_raw * buf.width + i_raw;
229 const float in = raw[pin];
230
231 // was the raw pixel clipped?
232 if(in < d->threshold[c]) continue;
233
234 switch(mode)
235 {
237 memcpy(out + pout, dt_iop_rawoverexposed_colors[c], sizeof(float) * 4);
238 break;
240 memcpy(out + pout, color, sizeof(float) * 4);
241 break;
243 out[pout + c] = 0.0;
244 break;
245 }
246 }
247 }
248
250
252
253 if(pipe->mask_display & DT_DEV_PIXELPIPE_DISPLAY_MASK) dt_iop_alpha_copy(ivoid, ovoid, roi_out->width, roi_out->height);
254 return 0;
255}
256
257#ifdef HAVE_OPENCL
258int process_cl(struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out)
259{
260 const dt_iop_roi_t *const roi_in = &piece->roi_in;
261 const dt_iop_roi_t *const roi_out = &piece->roi_out;
262 const dt_iop_rawoverexposed_data_t *const d = piece->data;
263 dt_develop_t *dev = self->dev;
265
266 cl_mem dev_raw = NULL;
267 float *coordbuf = NULL;
268 cl_mem dev_coord = NULL;
269 cl_mem dev_thresholds = NULL;
270 cl_mem dev_colors = NULL;
271 cl_mem dev_xtrans = NULL;
272
273 cl_int err = -999;
274
275 const dt_image_t *const image = &(dev->image_storage);
276
279 if(IS_NULL_PTR(buf.buf))
280 {
281 dt_control_log(_("failed to get raw buffer from image `%s'"), image->filename);
283 goto error;
284 }
285
286 const int devid = pipe->devid;
287
288 const int width = roi_out->width;
289 const int height = roi_out->height;
290
291 size_t origin[] = { 0, 0, 0 };
292 size_t region[] = { width, height, 1 };
293
294 process_common_setup(self, piece);
295
296 err = dt_opencl_enqueue_copy_image(devid, dev_in, dev_out, origin, origin, region);
297 if(err != CL_SUCCESS) goto error;
298
299 const int colorscheme = dev->rawoverexposed.colorscheme;
300 const float *const color = dt_iop_rawoverexposed_colors[colorscheme];
301
302 // NOT FROM THE PIPE !!!
303 const uint32_t filters = image->dsc.filters;
304
305 const int raw_width = buf.width;
306 const int raw_height = buf.height;
307
308 dev_raw = dt_opencl_copy_host_to_device(devid, buf.buf, raw_width, raw_height, sizeof(uint16_t));
309 if(IS_NULL_PTR(dev_raw)) goto error;
310
311 const size_t coordbufsize = (size_t)height * width * 2 * sizeof(float);
312
313 coordbuf = dt_pixelpipe_cache_alloc_align_cache(coordbufsize, pipe->type);
314 if(IS_NULL_PTR(coordbuf)) goto error;
316 for(int j = 0; j < height; j++)
317 {
318 float *bufptr = ((float *)coordbuf) + (size_t)2 * j * width;
319
320 // here are all the pixels of this row
321 for(int i = 0; i < roi_out->width; i++)
322 {
323 bufptr[2 * i] = (float)(roi_out->x + i) / roi_in->scale;
324 bufptr[2 * i + 1] = (float)(roi_out->y + j) / roi_in->scale;
325 }
326
327 // where did they come from?
329 }
330
331 dev_coord = dt_opencl_alloc_device_buffer(devid, coordbufsize);
332 if(IS_NULL_PTR(dev_coord)) goto error;
333
334 /* _blocking_ memory transfer: host coordbuf buffer -> opencl dev_coordbuf */
335 err = dt_opencl_write_buffer_to_device(devid, coordbuf, dev_coord, 0, coordbufsize, CL_TRUE);
336 if(err != CL_SUCCESS) goto error;
337
338 int kernel;
339 switch(dev->rawoverexposed.mode)
340 {
343
344 dev_colors = dt_opencl_alloc_device_buffer(devid, sizeof(dt_iop_rawoverexposed_colors));
345 if(IS_NULL_PTR(dev_colors)) goto error;
346
347 /* _blocking_ memory transfer: host coordbuf buffer -> opencl dev_colors */
348 err = dt_opencl_write_buffer_to_device(devid, (void *)dt_iop_rawoverexposed_colors, dev_colors, 0,
349 sizeof(dt_iop_rawoverexposed_colors), CL_TRUE);
350 if(err != CL_SUCCESS) goto error;
351
352 break;
355 break;
357 default:
359 break;
360 }
361
362 if(filters == 9u)
363 {
364 dev_xtrans
365 = dt_opencl_copy_host_to_device_constant(devid, sizeof(image->dsc.xtrans), (void *)image->dsc.xtrans);
366 if(IS_NULL_PTR(dev_xtrans)) goto error;
367 }
368
369 dev_thresholds = dt_opencl_copy_host_to_device_constant(devid, sizeof(unsigned int) * 4, (void *)d->threshold);
370 if(IS_NULL_PTR(dev_thresholds)) goto error;
371
372 size_t sizes[2] = { ROUNDUPDWD(width, devid), ROUNDUPDHT(height, devid) };
373 dt_opencl_set_kernel_arg(devid, kernel, 0, sizeof(cl_mem), &dev_in);
374 dt_opencl_set_kernel_arg(devid, kernel, 1, sizeof(cl_mem), &dev_out);
375 dt_opencl_set_kernel_arg(devid, kernel, 2, sizeof(cl_mem), &dev_coord);
376 dt_opencl_set_kernel_arg(devid, kernel, 3, sizeof(int), &width);
377 dt_opencl_set_kernel_arg(devid, kernel, 4, sizeof(int), &height);
378 dt_opencl_set_kernel_arg(devid, kernel, 5, sizeof(cl_mem), &dev_raw);
379 dt_opencl_set_kernel_arg(devid, kernel, 6, sizeof(int), &raw_width);
380 dt_opencl_set_kernel_arg(devid, kernel, 7, sizeof(int), &raw_height);
381 dt_opencl_set_kernel_arg(devid, kernel, 8, sizeof(uint32_t), &filters);
382 dt_opencl_set_kernel_arg(devid, kernel, 9, sizeof(cl_mem), &dev_xtrans);
383 dt_opencl_set_kernel_arg(devid, kernel, 10, sizeof(cl_mem), &dev_thresholds);
384
386 dt_opencl_set_kernel_arg(devid, kernel, 11, sizeof(cl_mem), &dev_colors);
388 dt_opencl_set_kernel_arg(devid, kernel, 11, 4 * sizeof(float), color);
389
390 err = dt_opencl_enqueue_kernel_2d(devid, kernel, sizes);
391 if(err != CL_SUCCESS) goto error;
392
395 dt_opencl_release_mem_object(dev_thresholds);
400
401 return TRUE;
402
403error:
406 dt_opencl_release_mem_object(dev_thresholds);
411 dt_print(DT_DEBUG_OPENCL, "[opencl_rawoverexposed] couldn't enqueue kernel! %d\n", err);
412 return FALSE;
413}
414#endif
415
416void 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)
417{
418 dt_develop_t *dev = self->dev;
419 const dt_image_t *const image = &(dev->image_storage);
420
421 // the module needs access to the full raw image which adds to the memory footprint
422 // on OpenCL devices. We take account in tiling->overhead.
423
425 int raw_width = 0;
426 int raw_height = 0;
427
429
430 if(buf.buf)
431 {
432 raw_width = buf.width;
433 raw_height = buf.height;
434 }
435
437
438 tiling->factor = 2.5f; // in + out + coordinates
439 tiling->maxbuf = 1.0f;
440 tiling->overhead = (size_t)raw_width * raw_height * sizeof(uint16_t);
441 tiling->overlap = 0;
442 tiling->xalign = 1;
443 tiling->yalign = 1;
444 return;
445}
446
449{
450 dt_develop_t *dev = self->dev;
451
452 if(pipe->type != DT_DEV_PIXELPIPE_FULL || !dev->rawoverexposed.enabled || !dev->gui_attached) piece->enabled = 0;
453
454 const dt_image_t *const image = &(dev->image_storage);
455
456 if(image->flags & DT_IMAGE_4BAYER) piece->enabled = 0;
457
458 if(image->dsc.datatype != TYPE_UINT16 || !image->dsc.filters) piece->enabled = 0;
459}
460
462{
463 const int program = 2; // basic.cl from programs.conf
464 module->data = malloc(sizeof(dt_iop_rawoverexposed_global_data_t));
465 dt_iop_rawoverexposed_global_data_t *gd = module->data;
466 gd->kernel_rawoverexposed_mark_cfa = dt_opencl_create_kernel(program, "rawoverexposed_mark_cfa");
467 gd->kernel_rawoverexposed_mark_solid = dt_opencl_create_kernel(program, "rawoverexposed_mark_solid");
468 gd->kernel_rawoverexposed_falsecolor = dt_opencl_create_kernel(program, "rawoverexposed_falsecolor");
469}
470
471
480
486
488{
489 dt_free_align(piece->data);
490 piece->data = NULL;
491}
492
494{
495 module->params = calloc(1, sizeof(dt_iop_rawoverexposed_t));
496 module->default_params = calloc(1, sizeof(dt_iop_rawoverexposed_t));
497 module->hide_enable_button = 1;
498 module->default_enabled = 1;
499 module->params_size = sizeof(dt_iop_rawoverexposed_t);
500
501 // This module permanently bypasses the cache because it takes input from GUI
502 // and doesn't leave internal parameters to compute an integrity hash on.
504}
505
506// clang-format off
507// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
508// vim: shiftwidth=2 expandtab tabstop=2 cindent
509// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
510// clang-format on
static void error(char *msg)
Definition ashift_lsd.c:202
#define TRUE
Definition ashift_lsd.c:162
#define FALSE
Definition ashift_lsd.c:158
@ IOP_CS_RGB
const float threshold
const dt_colormatrix_t dt_aligned_pixel_t out
void dt_control_log(const char *msg,...)
Definition control.c:824
static int FCxtrans(const int row, const int col, global const unsigned char(*const xtrans)[6])
static int FC(const int row, const int col, const unsigned int filters)
void dt_iop_params_t
Definition dev_history.h:43
int dt_dev_distort_backtransform_plus(const dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count)
Definition develop.c:1826
@ DT_DEV_PIXELPIPE_DISPLAY_MASK
Definition develop.h:123
@ DT_DEV_TRANSFORM_DIR_BACK_INCL
Definition develop.h:110
dt_dev_rawoverexposed_mode_t
Definition develop.h:92
@ DT_DEV_RAWOVEREXPOSED_MODE_FALSECOLOR
Definition develop.h:95
@ DT_DEV_RAWOVEREXPOSED_MODE_MARK_CFA
Definition develop.h:93
@ DT_DEV_RAWOVEREXPOSED_MODE_MARK_SOLID
Definition develop.h:94
@ TYPE_UINT16
Definition format.h:57
GdkRGBA color[]
Definition geotagging.c:541
float dt_boundingbox_t[4]
Definition image.h:83
@ DT_IMAGE_4BAYER
Definition image.h:140
static void dt_iop_image_copy_by_size(float *const __restrict__ out, const float *const __restrict__ in, const size_t width, const size_t height, const size_t ch)
Definition imagebuf.h:91
void dt_iop_set_cache_bypass(dt_iop_module_t *module, gboolean state)
Definition imageop.c:1669
@ IOP_FLAGS_HIDDEN
Definition imageop.h:189
@ IOP_FLAGS_ALLOW_TILING
Definition imageop.h:188
@ IOP_FLAGS_ONE_INSTANCE
Definition imageop.h:191
@ IOP_FLAGS_NO_HISTORY_STACK
Definition imageop.h:193
@ IOP_GROUP_TECHNICAL
Definition imageop.h:162
void *const ovoid
static float kernel(const float *x, const float *y)
@ DT_DEBUG_OPENCL
Definition logging.h:57
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...
Definition macros.h:96
#define dt_free_align(ptr)
Release memory from dt_alloc_align() and set ptr to NULL.
Definition mem_alloc.h:214
static void * dt_calloc_align(size_t size)
dt_alloc_align() followed by a zero fill.
Definition mem_alloc.h:225
#define DT_IS_ALIGNED(x)
Promise the compiler that x is already cacheline-aligned, and return it.
Definition mem_alloc.h:51
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
Definition mem_alloc.h:171
uint32_t width
Definition mipmap_cache.c:0
uint32_t height
Definition mipmap_cache.c:1
@ DT_MIPMAP_BLOCKING
@ DT_MIPMAP_FULL
#define dt_mipmap_cache_get(B, C, D, E, F)
#define dt_mipmap_cache_release(B)
#define DT_MODULE(MODVER)
Instantiate the version handshake every module must export. Use once, at file scope,...
int dt_opencl_enqueue_kernel_2d(const int dev, const int kernel, const size_t *sizes)
Definition opencl.c:2554
void * dt_opencl_alloc_device_buffer(const int devid, const size_t size)
Definition opencl.c:2970
int dt_opencl_create_kernel(const int prog, const char *name)
Definition opencl.c:2448
void * dt_opencl_copy_host_to_device_constant(const int devid, const size_t size, void *host)
Definition opencl.c:2750
int dt_opencl_write_buffer_to_device(const int devid, void *host, void *device, const size_t offset, const size_t size, const int blocking)
Definition opencl.c:2738
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)
Definition opencl.c:2679
void dt_opencl_free_kernel(const int kernel)
Definition opencl.c:2491
int dt_opencl_set_kernel_arg(const int dev, const int kernel, const int num, const size_t size, const void *arg)
Definition opencl.c:2545
void * dt_opencl_copy_host_to_device(const int devid, void *host, const int width, const int height, const int bpp)
Definition opencl.c:2765
void dt_opencl_release_mem_object(cl_mem mem)
Definition opencl.c:2805
#define ROUNDUPDHT(a, b)
Definition opencl.h:86
#define ROUNDUPDWD(a, b)
Definition opencl.h:85
#define __OMP_PARALLEL_FOR_SIMD__(...)
Definition openmp.h:96
@ DT_DEV_PIXELPIPE_FULL
Definition pixelpipe.h:43
#define dt_pixelpipe_cache_alloc_align_cache(size, id)
#define dt_pixelpipe_cache_free_align(mem)
#define dt_get_perthread(buf, padsize)
#define dt_pixelpipe_cache_alloc_perthread_float(n, padded_size)
void init(dt_iop_module_t *module)
int default_group()
__DT_CLONE_TARGETS__ int process(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)
static __DT_CLONE_TARGETS__ void process_common_setup(dt_iop_module_t *self, const dt_dev_pixelpipe_iop_t *piece)
const char * name()
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)
void commit_params(dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
void cleanup_global(dt_iop_module_so_t *module)
void cleanup_pipe(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
int default_colorspace(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
int flags()
void init_pipe(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
void init_global(dt_iop_module_so_t *module)
int process_cl(struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out)
float dt_aligned_pixel_simd_t __attribute__((vector_size(16), aligned(16)))
Apply one channel's tone curve to each of the three colour channels, or pass the channel through unto...
Definition simd.h:55
dt_iop_buffer_dsc_t dsc_in
struct dt_iop_module_t *void * data
dt_dev_pixelpipe_type_t type
int32_t gui_attached
Definition develop.h:167
dt_image_t image_storage
Definition develop.h:225
dt_clipping_preview_mode_t mode
Definition develop.h:441
dt_dev_overexposed_colorscheme_t colorscheme
Definition develop.h:438
gboolean enabled
Definition develop.h:370
struct dt_develop_t::@16 rawoverexposed
float threshold
Definition develop.h:452
struct dt_dev_pixelpipe_t * pipe
Definition develop.h:214
int32_t flags
Definition image.h:401
dt_iop_buffer_dsc_t dsc
Definition image.h:419
char filename[DT_MAX_FILENAME_LEN]
Definition image.h:386
int32_t id
Definition image.h:401
uint32_t filters
Definition format.h:89
uint16_t raw_black_level
Definition format.h:103
unsigned int channels
Definition format.h:83
uint8_t xtrans[6][6]
Definition format.h:99
struct dt_iop_buffer_dsc_t::@55 rawprepare
dt_iop_buffer_type_t datatype
Definition format.h:85
uint16_t raw_white_point
Definition format.h:104
dt_iop_global_data_t * data
Definition imageop.h:238
struct dt_develop_t * dev
Definition imageop.h:311
dt_iop_global_data_t * global_data
Definition imageop.h:337
Region of interest passed through the pixelpipe.
Definition format.h:49
double scale
Definition format.h:51
int width
Definition format.h:50
int height
Definition format.h:50
#define __DT_CLONE_TARGETS__
Telling the user something happened.