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
39#include "common/darktable.h" // for darktable, darktable_t, dt_alloc_a...
40#include "common/image.h" // for dt_image_t, ::DT_IMAGE_4BAYER
41#include "common/imagebuf.h" // for dt_iop_image_copy_by_size
42#include "common/mipmap_cache.h" // for dt_mipmap_buffer_t, dt_mipmap_cach...
43#include "common/opencl.h"
44#include "control/control.h" // for dt_control_log
45#include "develop/develop.h" // for dt_develop_t, dt_develop_t::(anony...
46#include "develop/imageop.h" // for dt_iop_module_t, dt_iop_roi_t, dt_...
47#include "develop/imageop_math.h" // for FC, FCxtrans
48#include "develop/pixelpipe.h" // for dt_dev_pixelpipe_type_t::DT_DEV_PI...
49#include "develop/tiling.h"
50#include "iop/iop_api.h" // for dt_iop_params_t
51#include <glib/gi18n.h> // for _
52#include <gtk/gtktypes.h> // for GtkWidget
53#include <stdint.h> // for uint16_t, uint8_t, uint32_t
54#include <stdlib.h> // for size_t, free, NULL, calloc, malloc
55#include <string.h> // for memcpy
56
57DT_MODULE(1)
58
63
64static const float dt_iop_rawoverexposed_colors[][4] __attribute__((aligned(64))) = {
65 { 1.0f, 0.0f, 0.0f, 1.0f }, // red
66 { 0.0f, 1.0f, 0.0f, 1.0f }, // green
67 { 0.0f, 0.0f, 1.0f, 1.0f }, // blue
68 { 0.0f, 0.0f, 0.0f, 1.0f } // black
69};
70
75
82
83const char *name()
84{
85 return _("raw overexposed");
86}
87
89{
91}
92
97
99{
100 return IOP_CS_RGB;
101}
102
105{
106 dt_develop_t *dev = self->dev;
108
109 // 4BAYER is not supported by this module yet anyway.
110 const int ch = (dev->image_storage.flags & DT_IMAGE_4BAYER) ? 4 : 3;
111
112 // the clipping is detected as (raw value > threshold)
114
115 for(int k = 0; k < ch; k++)
116 {
117 // here is our threshold
118 float chthr = threshold;
119
120 // "undo" rawprepare iop
122 chthr += piece->dsc_in.rawprepare.raw_black_level;
123
124 // and this is that threshold, but in raw input buffer values
125 d->threshold[k] = (unsigned int)chthr;
126 }
127}
128
131 const void *const ivoid, void *const ovoid)
132{
133 const dt_iop_roi_t *const roi_in = &piece->roi_in;
134 const dt_iop_roi_t *const roi_out = &piece->roi_out;
135 const dt_iop_rawoverexposed_data_t *const d = piece->data;
136
137 process_common_setup(self, piece);
138
139 dt_develop_t *dev = self->dev;
140 const dt_image_t *const image = &(dev->image_storage);
141 dt_dev_pixelpipe_t *const runtime_pipe = (dt_dev_pixelpipe_t *)pipe;
142
143 const int ch = piece->dsc_in.channels;
144 const double iop_order = self->iop_order;
145
147 const int colorscheme = dev->rawoverexposed.colorscheme;
148 const float *const color = dt_iop_rawoverexposed_colors[colorscheme];
149
150 dt_iop_image_copy_by_size(ovoid, ivoid, roi_out->width, roi_out->height, ch);
151
154 if(IS_NULL_PTR(buf.buf))
155 {
156 dt_control_log(_("failed to get raw buffer from image `%s'"), image->filename);
158 return 0;
159 }
160
161#if 0
162 const float in_scale = roi_in->scale;
163 dt_boundingbox_t pts = {(float)(roi_out->x) / in_scale, (float)(roi_out->y) / in_scale,
164 (float)(roi_out->x + roi_out->width) / in_scale, (float)(roi_out->y + roi_out->height) / in_scale};
165 printf("in %f %f %f %f\n", pts[0], pts[1], pts[2], pts[3]);
166 dt_dev_distort_backtransform_plus(dev->pipe, 0, priority, pts, 2);
167 printf("out %f %f %f %f\n\n", pts[0], pts[1], pts[2], pts[3]);
168#endif
169
170 const uint16_t *const raw = (const uint16_t *const)buf.buf;
171 float *const restrict out = DT_IS_ALIGNED((float *const)ovoid);
172
173 // NOT FROM THE PIPE !!!
174 const uint32_t filters = image->dsc.filters;
175 const uint8_t(*const xtrans)[6] = (const uint8_t(*const)[6])image->dsc.xtrans;
176
177 // acquire temp memory for distorted pixel coords
178 size_t coordbufsize;
179 float *const restrict coordbuf = dt_pixelpipe_cache_alloc_perthread_float(2*roi_out->width, &coordbufsize);
180 if(IS_NULL_PTR(coordbuf))
181 {
183 return 1;
184 }
185 __OMP_PARALLEL_FOR_SIMD__(firstprivate(dt_iop_rawoverexposed_colors))
186 for(int j = 0; j < roi_out->height; j++)
187 {
188 float *const restrict bufptr = dt_get_perthread(coordbuf, coordbufsize);
189
190 // here are all the pixels of this row
191 for(int i = 0; i < roi_out->width; i++)
192 {
193 bufptr[2 * i] = (float)(roi_out->x + i) / roi_in->scale;
194 bufptr[2 * i + 1] = (float)(roi_out->y + j) / roi_in->scale;
195 }
196
197 // where did they come from?
198 dt_dev_distort_backtransform_plus(runtime_pipe, iop_order,
199 DT_DEV_TRANSFORM_DIR_BACK_INCL, bufptr, roi_out->width);
200
201 for(int i = 0; i < roi_out->width; i++)
202 {
203 const size_t pout = (size_t)ch * (j * roi_out->width + i);
204
205 // not sure which float -> int to use here
206 const int i_raw = (int)bufptr[2 * i];
207 const int j_raw = (int)bufptr[2 * i + 1];
208
209 if(i_raw < 0 || j_raw < 0 || i_raw >= buf.width || j_raw >= buf.height) continue;
210
211 int c;
212 if(filters == 9u)
213 {
214 c = FCxtrans(j_raw, i_raw, NULL, xtrans);
215 }
216 else // if(filters)
217 {
218 c = FC(j_raw, i_raw, filters);
219 }
220
221 const size_t pin = (size_t)j_raw * buf.width + i_raw;
222 const float in = raw[pin];
223
224 // was the raw pixel clipped?
225 if(in < d->threshold[c]) continue;
226
227 switch(mode)
228 {
230 memcpy(out + pout, dt_iop_rawoverexposed_colors[c], sizeof(float) * 4);
231 break;
233 memcpy(out + pout, color, sizeof(float) * 4);
234 break;
236 out[pout + c] = 0.0;
237 break;
238 }
239 }
240 }
241
243
245
246 if(pipe->mask_display & DT_DEV_PIXELPIPE_DISPLAY_MASK) dt_iop_alpha_copy(ivoid, ovoid, roi_out->width, roi_out->height);
247 return 0;
248}
249
250#ifdef HAVE_OPENCL
251int 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)
252{
253 const dt_iop_roi_t *const roi_in = &piece->roi_in;
254 const dt_iop_roi_t *const roi_out = &piece->roi_out;
255 const dt_iop_rawoverexposed_data_t *const d = piece->data;
256 dt_develop_t *dev = self->dev;
258
259 cl_mem dev_raw = NULL;
260 float *coordbuf = NULL;
261 cl_mem dev_coord = NULL;
262 cl_mem dev_thresholds = NULL;
263 cl_mem dev_colors = NULL;
264 cl_mem dev_xtrans = NULL;
265
266 cl_int err = -999;
267
268 const dt_image_t *const image = &(dev->image_storage);
269
272 if(IS_NULL_PTR(buf.buf))
273 {
274 dt_control_log(_("failed to get raw buffer from image `%s'"), image->filename);
276 goto error;
277 }
278
279 const int devid = pipe->devid;
280
281 const int width = roi_out->width;
282 const int height = roi_out->height;
283
284 size_t origin[] = { 0, 0, 0 };
285 size_t region[] = { width, height, 1 };
286
287 process_common_setup(self, piece);
288
289 err = dt_opencl_enqueue_copy_image(devid, dev_in, dev_out, origin, origin, region);
290 if(err != CL_SUCCESS) goto error;
291
292 const int colorscheme = dev->rawoverexposed.colorscheme;
293 const float *const color = dt_iop_rawoverexposed_colors[colorscheme];
294
295 // NOT FROM THE PIPE !!!
296 const uint32_t filters = image->dsc.filters;
297
298 const int raw_width = buf.width;
299 const int raw_height = buf.height;
300
301 dev_raw = dt_opencl_copy_host_to_device(devid, buf.buf, raw_width, raw_height, sizeof(uint16_t));
302 if(IS_NULL_PTR(dev_raw)) goto error;
303
304 const size_t coordbufsize = (size_t)height * width * 2 * sizeof(float);
305
306 coordbuf = dt_pixelpipe_cache_alloc_align_cache(coordbufsize, pipe->type);
307 if(IS_NULL_PTR(coordbuf)) goto error;
309 for(int j = 0; j < height; j++)
310 {
311 float *bufptr = ((float *)coordbuf) + (size_t)2 * j * width;
312
313 // here are all the pixels of this row
314 for(int i = 0; i < roi_out->width; i++)
315 {
316 bufptr[2 * i] = (float)(roi_out->x + i) / roi_in->scale;
317 bufptr[2 * i + 1] = (float)(roi_out->y + j) / roi_in->scale;
318 }
319
320 // where did they come from?
322 }
323
324 dev_coord = dt_opencl_alloc_device_buffer(devid, coordbufsize);
325 if(IS_NULL_PTR(dev_coord)) goto error;
326
327 /* _blocking_ memory transfer: host coordbuf buffer -> opencl dev_coordbuf */
328 err = dt_opencl_write_buffer_to_device(devid, coordbuf, dev_coord, 0, coordbufsize, CL_TRUE);
329 if(err != CL_SUCCESS) goto error;
330
331 int kernel;
332 switch(dev->rawoverexposed.mode)
333 {
336
337 dev_colors = dt_opencl_alloc_device_buffer(devid, sizeof(dt_iop_rawoverexposed_colors));
338 if(IS_NULL_PTR(dev_colors)) goto error;
339
340 /* _blocking_ memory transfer: host coordbuf buffer -> opencl dev_colors */
341 err = dt_opencl_write_buffer_to_device(devid, (void *)dt_iop_rawoverexposed_colors, dev_colors, 0,
342 sizeof(dt_iop_rawoverexposed_colors), CL_TRUE);
343 if(err != CL_SUCCESS) goto error;
344
345 break;
348 break;
350 default:
352 break;
353 }
354
355 if(filters == 9u)
356 {
357 dev_xtrans
358 = dt_opencl_copy_host_to_device_constant(devid, sizeof(image->dsc.xtrans), (void *)image->dsc.xtrans);
359 if(IS_NULL_PTR(dev_xtrans)) goto error;
360 }
361
362 dev_thresholds = dt_opencl_copy_host_to_device_constant(devid, sizeof(unsigned int) * 4, (void *)d->threshold);
363 if(IS_NULL_PTR(dev_thresholds)) goto error;
364
365 size_t sizes[2] = { ROUNDUPDWD(width, devid), ROUNDUPDHT(height, devid) };
366 dt_opencl_set_kernel_arg(devid, kernel, 0, sizeof(cl_mem), &dev_in);
367 dt_opencl_set_kernel_arg(devid, kernel, 1, sizeof(cl_mem), &dev_out);
368 dt_opencl_set_kernel_arg(devid, kernel, 2, sizeof(cl_mem), &dev_coord);
369 dt_opencl_set_kernel_arg(devid, kernel, 3, sizeof(int), &width);
370 dt_opencl_set_kernel_arg(devid, kernel, 4, sizeof(int), &height);
371 dt_opencl_set_kernel_arg(devid, kernel, 5, sizeof(cl_mem), &dev_raw);
372 dt_opencl_set_kernel_arg(devid, kernel, 6, sizeof(int), &raw_width);
373 dt_opencl_set_kernel_arg(devid, kernel, 7, sizeof(int), &raw_height);
374 dt_opencl_set_kernel_arg(devid, kernel, 8, sizeof(uint32_t), &filters);
375 dt_opencl_set_kernel_arg(devid, kernel, 9, sizeof(cl_mem), &dev_xtrans);
376 dt_opencl_set_kernel_arg(devid, kernel, 10, sizeof(cl_mem), &dev_thresholds);
377
379 dt_opencl_set_kernel_arg(devid, kernel, 11, sizeof(cl_mem), &dev_colors);
381 dt_opencl_set_kernel_arg(devid, kernel, 11, 4 * sizeof(float), color);
382
383 err = dt_opencl_enqueue_kernel_2d(devid, kernel, sizes);
384 if(err != CL_SUCCESS) goto error;
385
388 dt_opencl_release_mem_object(dev_thresholds);
393
394 return TRUE;
395
396error:
399 dt_opencl_release_mem_object(dev_thresholds);
404 dt_print(DT_DEBUG_OPENCL, "[opencl_rawoverexposed] couldn't enqueue kernel! %d\n", err);
405 return FALSE;
406}
407#endif
408
409void 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)
410{
411 dt_develop_t *dev = self->dev;
412 const dt_image_t *const image = &(dev->image_storage);
413
414 // the module needs access to the full raw image which adds to the memory footprint
415 // on OpenCL devices. We take account in tiling->overhead.
416
418 int raw_width = 0;
419 int raw_height = 0;
420
422
423 if(buf.buf)
424 {
425 raw_width = buf.width;
426 raw_height = buf.height;
427 }
428
430
431 tiling->factor = 2.5f; // in + out + coordinates
432 tiling->maxbuf = 1.0f;
433 tiling->overhead = (size_t)raw_width * raw_height * sizeof(uint16_t);
434 tiling->overlap = 0;
435 tiling->xalign = 1;
436 tiling->yalign = 1;
437 return;
438}
439
442{
443 dt_develop_t *dev = self->dev;
444
445 if(pipe->type != DT_DEV_PIXELPIPE_FULL || !dev->rawoverexposed.enabled || !dev->gui_attached) piece->enabled = 0;
446
447 const dt_image_t *const image = &(dev->image_storage);
448
449 if(image->flags & DT_IMAGE_4BAYER) piece->enabled = 0;
450
451 if(image->dsc.datatype != TYPE_UINT16 || !image->dsc.filters) piece->enabled = 0;
452}
453
455{
456 const int program = 2; // basic.cl from programs.conf
457 module->data = malloc(sizeof(dt_iop_rawoverexposed_global_data_t));
458 dt_iop_rawoverexposed_global_data_t *gd = module->data;
459 gd->kernel_rawoverexposed_mark_cfa = dt_opencl_create_kernel(program, "rawoverexposed_mark_cfa");
460 gd->kernel_rawoverexposed_mark_solid = dt_opencl_create_kernel(program, "rawoverexposed_mark_solid");
461 gd->kernel_rawoverexposed_falsecolor = dt_opencl_create_kernel(program, "rawoverexposed_falsecolor");
462}
463
464
473
479
481{
482 dt_free_align(piece->data);
483 piece->data = NULL;
484}
485
487{
488 module->params = calloc(1, sizeof(dt_iop_rawoverexposed_t));
489 module->default_params = calloc(1, sizeof(dt_iop_rawoverexposed_t));
490 module->hide_enable_button = 1;
491 module->default_enabled = 1;
492 module->params_size = sizeof(dt_iop_rawoverexposed_t);
493 module->gui_data = NULL;
494
495 // This module permanently bypasses the cache because it takes input from GUI
496 // and doesn't leave internal parameters to compute an integrity hash on.
498}
499
500// clang-format off
501// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
502// vim: shiftwidth=2 expandtab tabstop=2 cindent
503// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
504// 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
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
@ 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:761
darktable_t darktable
Definition darktable.c:181
void dt_print(dt_debug_thread_t thread, const char *msg,...)
Definition darktable.c:1542
#define dt_free_align(ptr)
Definition darktable.h:481
static void * dt_calloc_align(size_t size)
Definition darktable.h:488
@ DT_DEBUG_OPENCL
Definition darktable.h:722
#define DT_IS_ALIGNED(x)
Definition darktable.h:371
float dt_boundingbox_t[4]
Definition darktable.h:709
#define dt_pixelpipe_cache_alloc_align_cache(size, id)
Definition darktable.h:433
#define DT_MODULE(MODVER)
Definition darktable.h:140
float dt_aligned_pixel_simd_t __attribute__((vector_size(16), aligned(16)))
Enable aggressive floating-point arithmetic optimizations, in denormals handling. Set through user pr...
Definition darktable.h:524
#define dt_free(ptr)
Definition darktable.h:456
#define dt_pixelpipe_cache_free_align(mem)
Definition darktable.h:453
#define __DT_CLONE_TARGETS__
Definition darktable.h:367
#define dt_get_perthread(buf, padsize)
Definition darktable.h:1035
#define __OMP_PARALLEL_FOR_SIMD__(...)
Definition darktable.h:259
#define dt_pixelpipe_cache_alloc_perthread_float(n, padded_size)
Definition darktable.h:1030
#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 darktable.h:281
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:41
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:1586
@ DT_DEV_PIXELPIPE_DISPLAY_MASK
Definition develop.h:118
@ DT_DEV_TRANSFORM_DIR_BACK_INCL
Definition develop.h:105
dt_dev_rawoverexposed_mode_t
Definition develop.h:87
@ DT_DEV_RAWOVEREXPOSED_MODE_FALSECOLOR
Definition develop.h:90
@ DT_DEV_RAWOVEREXPOSED_MODE_MARK_CFA
Definition develop.h:88
@ DT_DEV_RAWOVEREXPOSED_MODE_MARK_SOLID
Definition develop.h:89
@ TYPE_UINT16
Definition format.h:47
@ DT_IMAGE_4BAYER
Definition image.h:127
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:87
void dt_iop_set_cache_bypass(dt_iop_module_t *module, gboolean state)
Definition imageop.c:2915
@ IOP_FLAGS_HIDDEN
Definition imageop.h:170
@ IOP_FLAGS_ALLOW_TILING
Definition imageop.h:169
@ IOP_FLAGS_ONE_INSTANCE
Definition imageop.h:172
@ IOP_FLAGS_NO_HISTORY_STACK
Definition imageop.h:174
@ IOP_GROUP_TECHNICAL
Definition imageop.h:143
void *const ovoid
static float kernel(const float *x, const float *y)
float *const restrict const size_t k
float *const restrict const size_t const size_t ch
#define dt_mipmap_cache_get(A, B, C, D, E, F)
@ DT_MIPMAP_BLOCKING
#define dt_mipmap_cache_release(A, B)
@ DT_MIPMAP_FULL
int dt_opencl_enqueue_kernel_2d(const int dev, const int kernel, const size_t *sizes)
Definition opencl.c:2136
void * dt_opencl_alloc_device_buffer(const int devid, const size_t size)
Definition opencl.c:2544
int dt_opencl_create_kernel(const int prog, const char *name)
Definition opencl.c:2030
void * dt_opencl_copy_host_to_device_constant(const int devid, const size_t size, void *host)
Definition opencl.c:2332
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:2320
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:2261
void dt_opencl_free_kernel(const int kernel)
Definition opencl.c:2073
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:2127
void * dt_opencl_copy_host_to_device(const int devid, void *host, const int width, const int height, const int bpp)
Definition opencl.c:2347
void dt_opencl_release_mem_object(cl_mem mem)
Definition opencl.c:2383
#define ROUNDUPDHT(a, b)
Definition opencl.h:82
#define ROUNDUPDWD(a, b)
Definition opencl.h:81
@ DT_DEV_PIXELPIPE_FULL
Definition pixelpipe.h:39
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)
struct dt_mipmap_cache_t * mipmap_cache
Definition darktable.h:776
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:162
dt_image_t image_storage
Definition develop.h:259
dt_clipping_preview_mode_t mode
Definition develop.h:455
dt_dev_overexposed_colorscheme_t colorscheme
Definition develop.h:452
gboolean enabled
Definition develop.h:387
struct dt_develop_t::@22 rawoverexposed
float threshold
Definition develop.h:466
struct dt_dev_pixelpipe_t * pipe
Definition develop.h:247
int32_t flags
Definition image.h:319
dt_iop_buffer_dsc_t dsc
Definition image.h:337
char filename[DT_MAX_FILENAME_LEN]
Definition image.h:304
int32_t id
Definition image.h:319
uint32_t filters
Definition format.h:60
struct dt_iop_buffer_dsc_t::@29 rawprepare
uint16_t raw_black_level
Definition format.h:74
unsigned int channels
Definition format.h:54
uint8_t xtrans[6][6]
Definition format.h:70
dt_iop_buffer_type_t datatype
Definition format.h:56
uint16_t raw_white_point
Definition format.h:75
dt_iop_global_data_t * data
Definition imageop.h:233
struct dt_develop_t * dev
Definition imageop.h:296
dt_iop_global_data_t * global_data
Definition imageop.h:314
Region of interest passed through the pixelpipe.
Definition imageop.h:72
double scale
Definition imageop.h:74