Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
pixelpipe_hb.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2009-2013 johannes hanika.
4 Copyright (C) 2011 Henrik Andersson.
5 Copyright (C) 2011-2014, 2017 Ulrich Pegelow.
6 Copyright (C) 2012 Richard Wonka.
7 Copyright (C) 2013 Simon Spannagel.
8 Copyright (C) 2014-2016 Roman Lebedev.
9 Copyright (C) 2014, 2016-2017, 2019 Tobias Ellinghaus.
10 Copyright (C) 2016 Pedro Côrte-Real.
11 Copyright (C) 2018-2019 Edgardo Hoszowski.
12 Copyright (C) 2020, 2022-2026 Aurélien PIERRE.
13 Copyright (C) 2020-2021 Pascal Obry.
14 Copyright (C) 2020 Ralf Brown.
15 Copyright (C) 2021-2022 Hanno Schwalm.
16 Copyright (C) 2022 Martin Bařinka.
17
18 darktable is free software: you can redistribute it and/or modify
19 it under the terms of the GNU General Public License as published by
20 the Free Software Foundation, either version 3 of the License, or
21 (at your option) any later version.
22
23 darktable is distributed in the hope that it will be useful,
24 but WITHOUT ANY WARRANTY; without even the implied warranty of
25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 GNU General Public License for more details.
27
28 You should have received a copy of the GNU General Public License
29 along with darktable. If not, see <http://www.gnu.org/licenses/>.
30*/
31
32#ifndef DT_DEVELOP_PIXELPIPE_HB_H
33#define DT_DEVELOP_PIXELPIPE_HB_H
34
35#include "system/atomic.h"
37#include "develop/iop_order.h"
38/* develop/imageop.h is deliberately NOT included: it includes this header back.
39 * dt_iop_module_t is only ever used through a pointer here (tag-declared below);
40 * the concrete types needed by value (dt_iop_roi_t, dt_iop_buffer_dsc_t) live in
41 * develop/format.h. */
42#include "pixel/format.h"
44#include "develop/pixelpipe.h"
46
47
53struct dt_iop_module_t;
54struct dt_dev_raster_mask_t;
56struct dt_develop_t;
57
59{
60 int id; // 0 is reserved for the reusable masks written in blend.c
61 float *mask;
63
102{
103 struct dt_iop_module_t *module; // the module in the dev operation stack
104 void *data; // to be used by the module to store stuff per pipe piece
105
106 // Memory size of *data upon which we will compute integrity hashes.
107 // This needs to be the size of the constant part of the data structure.
108 // It can even be 0 if nothing relevant to cache integrity hashes is held there.
109 // If the data struct contains pointers, they should go at the end of the struct,
110 // and the size here should be adjusted to only include constant bits, starting at the address of *data.
111 // "Constant" means identical between 2 pipeline nodes init,
112 // because the lifecycle of a pixelpipe cache is longer than that of a pixelpipe itself.
113 // See an example in colorbalancergb.c
114 size_t data_size;
115
116 void *blendop_data; // to be used by the module to store blendop per pipe piece
117 gboolean enabled; // used to disable parts of the pipe for export, independent on module itself.
118 gboolean detail_mask; // TRUE when the piece blend parameters request detail-mask refinement.
119
120 dt_dev_request_flags_t request_histogram; // (bitwise) set if you want an histogram captured
121 dt_dev_histogram_collection_params_t histogram_params; // set histogram generation params
122
123 int iwidth, iheight; // width and height of input buffer
124
125 // Hash representing the current state of the params, blend params and enabled state of this individual module
128
129 // Cumulative hash representing the current module hash and all the upstream modules from the pipeline,
130 // for the current ROI.
132
133 // Same as global hash but for raster masks
135
136 int bpc; // bits per channel, 32 means float
137 dt_iop_roi_t buf_in, buf_out; // theoretical full buffer regions of interest, as passed through modify_roi_out
138 dt_iop_roi_t roi_in, roi_out; // planned runtime regions of interest after backward ROI propagation
139 int process_cl_ready; // set this to 0 in commit_params to temporarily disable the use of process_cl
140 int process_tiling_ready; // set this to 0 in commit_params to temporarily disable tiling
141
142 // Sealed descriptor contract for this module instance.
143 // dsc_in is the module input contract after input_format() sanitized against
144 // the actual upstream storage format.
145 // dsc_out is the authored module output contract after commit_params() and
146 // output_format().
147 // dsc_mask carries the mask-side storage contract when masks are produced.
149
150 // bypass the cache for this module
151 gboolean bypass_cache;
152
153 // Snapshot of the last reusable output cacheline metadata.
154 // This is intentionally NOT used for bypass_cache / no_cache / reentry modes:
155 // - disposable outputs are flagged auto-destroy and must not be rekeyed,
156 // - realtime outputs and GPU-transient outputs can safely reuse their cacheline.
157 // The reused line is rekeyed while still write-locked, and it is destroyed if processing later
158 // fails before producing a valid output for the new hash.
160
161 // Set to TRUE for modules that should mandatorily cache their output to RAM
162 // even when running on OpenCL. This is a processing-policy flag authored
163 // during synchronization and then consumed by one recursion step; it does not
164 // change the descriptor contract.
167
169{
170 DT_DEV_PIPE_UNCHANGED = 0, // no event
171 DT_DEV_PIPE_TOP_CHANGED = 1 << 0, // only params of top element changed
172 DT_DEV_PIPE_REMOVE = 1 << 1, // possibly elements of the pipe have to be removed
174 = 1 << 2, // all nodes up to end need to be synched, but no removal of module pieces is necessary
175 DT_DEV_PIPE_ZOOMED = 1 << 3, // zoom event, preview pipe does not need changes
176 DT_DEV_PIPE_CACHE_REQUEST = 1 << 4, // GUI requested one cacheline to be materialized on host
177 DT_DEV_PIPE_REENTRY = 1 << 5 // retry runtime side-band generation without rebuilding nodes
179
186
218typedef struct dt_backbuf_t
219{
220 size_t bpp; // bits per pixel
221 size_t width; // pixel size of image
222 size_t height; // pixel size of image
223 dt_atomic_uint64 hash; // data checksum/integrity hash, for example to connect to a cacheline
224 dt_atomic_uint64 history_hash; // arbitrary state hash
225
227 dt_atomic_uint64 generation;
229
239
240static inline void dt_dev_backbuf_publish_begin(dt_backbuf_t *backbuf)
241{
243}
244
245static inline void dt_dev_backbuf_publish_end(dt_backbuf_t *backbuf)
246{
248}
249
258{
260 if(IS_NULL_PTR(backbuf)) return state;
261
262 for(;;)
263 {
264 const uint64_t before = dt_atomic_get_uint64(&backbuf->generation);
265 if(before & 1) continue; // publication in flight
266
267 state.bpp = backbuf->bpp;
268 state.width = backbuf->width;
269 state.height = backbuf->height;
270 state.hash = dt_atomic_get_uint64(&backbuf->hash);
271 state.history_hash = dt_atomic_get_uint64(&backbuf->history_hash);
272
273 const uint64_t after = dt_atomic_get_uint64(&backbuf->generation);
274 if(before == after) break;
275 }
276
277 return state;
278}
279
280static inline uint64_t dt_dev_backbuf_get_hash(const dt_backbuf_t *backbuf)
281{
282 return dt_atomic_get_uint64(&backbuf->hash);
283}
284
285static inline void dt_dev_backbuf_set_hash(dt_backbuf_t *backbuf, const uint64_t hash)
286{
288 dt_atomic_set_uint64(&backbuf->hash, hash);
290}
291
293{
294 return dt_atomic_get_uint64(&backbuf->history_hash);
295}
296
297static inline void dt_dev_backbuf_set_history_hash(dt_backbuf_t *backbuf, const uint64_t history_hash)
298{
300 dt_atomic_set_uint64(&backbuf->history_hash, history_hash);
302}
303
304typedef struct dt_dev_pixelpipe_t
305{
306 // The development to which this pipeline is attached
308
309 // input image. Will be fetched directly from mipmap cache
310 int32_t imgid;
312
313 // width and height of full-resolution input buffer
315
316 // Input scaling between full-resolution source image and
317 // actual pipeline mipmap input.
318 // = 1.f, unless we take downscaled RAW for thumbnail export.
319 float iscale;
320
321 // dimensions of processed buffer assuming we take full-resolution input
323
328 /* Storage for an input profile DERIVED FROM THIS IMAGE, which cannot be shared.
329 *
330 * The types DT_COLORSPACE_EMBEDDED_ICC..DT_COLORSPACE_ALTERNATE_MATRIX are not
331 * registered in the profile list, so nothing can resolve them by identity: their
332 * matrices come from the image's own camera data, via colorin. They were being kept in
333 * the (type, filename) memo, where filename is "" -- so every image sharing a
334 * camera-matrix type shared one entry and overwrote its matrix in place. That was
335 * survivable only because the memo is per-dev and a dev is one image.
336 *
337 * This is per-pipe and owned by the pipe. `input_profile_info` above points either here
338 * or at a genuinely shared memo entry, and is never freed through that pointer. */
342
343 // instances of pixelpipe, stored in GList of dt_dev_pixelpipe_iop_t
344 GList *nodes;
345 // event flag
347
348 // backbuffer (output)
350
351 // Validity checksum of whole pipeline,
352 // taken as the global hash of the last pipe node (module),
353 // after the last synchronization between dev history and pipe nodes completed.
354 // This is computed in dt_dev_pixelpipe_get_global_hash
355 // ahead of processing image.
356 dt_atomic_uint64 hash;
357
358 // Lock this while a pipeline is working.
359 // This is meant to prevent pipeline destruction/cleanup while it is working.
360 // It should __NEVER__ be used from the GUI thread, the GUI thread interacts
361 // with pipelines __ONLY__ through the pipeline cache.
362 dt_pthread_mutex_t busy_mutex;
363
364 // The hidden detailmask module publishes the full-resolution detail mask in
365 // the global pixelpipe cache under a salted hash derived from its
366 // piece->global_hash. The pipeline keeps only that cache key plus the source
367 // ROI of the published mask so zoom/pan updates can reuse the same payload
368 // exactly like raster masks do.
372
373 // References held on the dedicated global raster-mask cachelines required by
374 // the current graph. Keeping them at pipe level prevents LRU eviction between
375 // provider publication and downstream consumption or mask export.
377
392
393 // processing is true when actual pixel computations are ongoing
395 // running is true when the pipe thread is running, computing or idle.
396 // Written by the darkroom worker thread, polled by the GUI thread (view
397 // leave()) to wait for that thread to actually stop before tearing down
398 // pipe nodes/dev->iop/dev->history -- must be atomic.
400 // shutting down?
402 /* Optional caller-owned kill switch used by background thumbnail/surface jobs.
403 * The pipe keeps its own shutdown flag for local teardown, but long-running
404 * non-GUI jobs also need a way to stop as soon as their output target changed
405 * size. Callers own the storage and may flip it from another thread. */
407 // Best-effort processing mode. When TRUE, the processing path bypasses the
408 // early-abort shutdown kill-switch checks that normally stop a stale pipeline
409 // as soon as parameters changed. This allows long-running interactive
410 // pipelines to keep producing "good enough" output until the flag is cleared.
411 // Cleanup/teardown shutdown semantics are unchanged.
413 // opencl enabled for this pixelpipe?
415 // opencl error detected?
417 // running in a tiling context?
419 // should this pixelpipe display a mask in the end?
421 // should this pixelpipe completely suppressed the blendif module?
423 // input data based on this timestamp:
426 // This pipe feeds GUI-side observables such as global histograms and picker
427 // sampling. The processing core reacts to this property instead of branching
428 // on pipeline type.
430
455 // the final output pixel format this pixelpipe will be converted to
457 // opencl device that has been locked for this pipe.
458 int devid;
459 // last opencl device this pipe ran on, kept after `devid` is reset to -1 at
460 // the end of dt_dev_pixelpipe_process(). Used by dt_dev_pixelpipe_cleanup()
461 // to release only this pipe's own cl_mem cache payloads. -1 if this pipe
462 // never ran on OpenCL.
464 // the user might choose to overwrite the output color space and rendering intent.
468 // snapshot of modules iop_order
470 // snapshot of mask list
471 GList *forms;
472 // Publish every provider mask in the global pixelpipe cache, including masks
473 // which have no downstream consumer but may be requested by export.
475
476 // hash of the last history item synchronized with pipeline
477 // that's because the sync_top option can't assume only one history
478 // item was added since the last synchronization.
480 // pointer identity of the last synchronized history item.
481 // This complements `last_history_hash` for in-place top-entry updates where
482 // the same history node is reused and its hash changes.
483 //
484 // The pipe HOLDS A REFERENCE on whatever this points at (dt_dev_history_item_ref), and
485 // it is exchanged atomically (_pipe_set_last_history_item / dt_dev_history_cow_touch).
486 // The resync runs against a snapshot outside history_mutex, so the item it last synced
487 // may since have left dev->history; the reference keeps it alive, which is what makes an
488 // identity compare on it safe -- a freed address could be reused by a NEW item and match.
489 // The exchange is what lets the worker (writing its last-synced item) and the GUI thread
490 // (cow_touch re-pointing it at a clone) race on the slot without leaking or double-freeing.
491 dt_atomic_ptr last_history_item;
492
493 // hash of the whole history stack at the time of synchonization
494 // between pipe and history. This is a local copy of
495 // dev_history_get_hash()
496 dt_atomic_uint64 history_hash;
497 // GUI readers can request one extra host-visible cacheline without pretending
498 // history changed. BACKBUF targets the final pipe output, MODULE targets the
499 // output of cache_request_module.
501 dt_atomic_ptr cache_request_module;
502 // Modules can set this to TRUE internally so the pipeline will
503 // restart right away, in the same thread.
504 // The reentry flag can only be reset (to FALSE) by the same object that captured it.
505 // DO NOT SET THAT DIRECTLY, use the setter/getter functions
506 gboolean reentry;
507
508 // Unique identifier of the object capturing the reentry flag.
509 // This can be a mask or module hash, or anything that stays constant
510 // across 2 pipeline runs from a same thread (aka as long as we don't reinit).
511 // DO NOT SET THAT DIRECTLY, use the setter/getter functions
513
514 // Can be set arbitrarily by pixelpipe modules at runtime
515 // to invalidate downstream module cache lines.
516 // This always gets reset to FALSE when a pipeline finishes,
517 // whether on success or on error.
518 gboolean flush_cache;
519
520 // TRUE if at least one module is bypassing the cache
521 gboolean bypass_cache;
522
523 // If TRUE, do not keep any pixelpipe cache lines around for reuse.
524 // This is intended for one-shot pipelines such as thumbnail exports where caching is pure overhead
525 // and can lead to memory pressure (RAM buffers + OpenCL pinned/device buffers).
526 gboolean no_cache;
527
528 // Temporarily pause the infinite loop of pipeline
529 gboolean pause;
530
531 // Run a self-setting pipeline that will update history for each module
532 // depending on its input if it implements the autoset() method
533 gboolean autoset;
534
536
538{
539 return dt_atomic_get_uint64(&pipe->hash);
540}
541
542static inline void dt_dev_pixelpipe_set_hash(dt_dev_pixelpipe_t *pipe, const uint64_t hash)
543{
544 dt_atomic_set_uint64(&pipe->hash, hash);
545}
546
551
552static inline void dt_dev_pixelpipe_set_history_hash(dt_dev_pixelpipe_t *pipe, const uint64_t history_hash)
553{
554 dt_atomic_set_uint64(&pipe->history_hash, history_hash);
555}
556
561
566
571
577
579{
580 return pipe ? (const struct dt_iop_module_t *)dt_atomic_get_ptr(&pipe->cache_request_module) : NULL;
581}
582
585 const struct dt_iop_module_t *module)
586{
587 if(IS_NULL_PTR(pipe)) return;
588 dt_atomic_set_ptr(&pipe->cache_request_module, (void *)module);
589 dt_atomic_set_int((dt_atomic_int *)&pipe->cache_request, (int)request);
590}
591
598
599struct dt_develop_t;
600
601#ifdef __cplusplus
602extern "C" {
603#endif
604
606
607// inits the pixelpipe with plain passthrough input/output and empty input and default caching settings.
609
613
614// inits the preview pixelpipe with plain passthrough input/output and empty input and default caching
615// settings.
617// inits the pixelpipe with settings optimized for full-image export (no history stack cache)
618int dt_dev_pixelpipe_init_export(dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev, int levels, gboolean store_masks);
619// inits the pixelpipe with settings optimized for thumbnail export (no history stack cache)
621// inits all but the pixel caches, so you can't actually process an image (just get dimensions and
622// distortions)
624// inits the pixelpipe
626// enable/disable best-effort processing mode, bypassing the usual early-abort
627// shutdown checks while the flag stays enabled.
629// return whether best-effort processing mode is currently enabled.
636// constructs a new input buffer from given RGB float array.
638 int height, float iscale, dt_mipmap_size_t size);
639// set some metadata for colorout to avoid race conditions.
641 const gchar *icc_filename, dt_iop_color_intent_t icc_intent);
642// destroys all allocated data.
644// cleanup all nodes except clean input/output
646// sync with develop_t history stack from scratch (new node added, have to pop old ones)
647// this should be called with dev->history_mutex locked in read mode
649// sync with develop_t history stack by just copying the top item params (same op, new params on top)
650void dt_dev_pixelpipe_synch_all_real(dt_dev_pixelpipe_t *pipe, const char *caller_func);
651#define dt_dev_pixelpipe_synch_all(pipe) dt_dev_pixelpipe_synch_all_real(pipe, __FUNCTION__)
652// adjust output node according to history stack (history pop event)
654
655// process region of interest of pixels. returns 1 if pipe was altered during processing.
657
658// Refresh GUI samplers from the cachelines already published by a darkroom pipe.
659
660// disable given op and all that comes after it in the pipe:
662// disable given op and all that comes before it in the pipe:
664
673float *dt_dev_get_raster_mask(dt_dev_pixelpipe_t *pipe, const struct dt_iop_module_t *raster_mask_source,
674 const int raster_mask_id, const struct dt_iop_module_t *target_module,
675 int *error);
676
677// helper function writing the pipe-processed ctmask data to dest
678float *dt_dev_distort_detail_mask(const dt_dev_pixelpipe_t *pipe, float *src, const struct dt_iop_module_t *target_module);
679float *dt_dev_retrieve_rawdetail_mask(const dt_dev_pixelpipe_t *pipe, const struct dt_iop_module_t *target_module);
680
681
703
714
715// check if pipeline should re-entry after it completes
717
718// Force-reset pipeline re-entry flag, for example if we lost the unique ID of the object
719// in a re-entry loop.
721
722#ifdef __cplusplus
723}
724#endif
725
726#endif // DT_DEVELOP_PIXELPIPE_HB_H
727
728// clang-format off
729// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
730// vim: shiftwidth=2 expandtab tabstop=2 cindent
731// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
732// clang-format on
static void error(char *msg)
Definition ashift_lsd.c:202
void dt_atomic_set_int(dt_atomic_int *var, int value)
int dt_atomic_get_int(dt_atomic_int *var)
uint64_t dt_atomic_get_uint64(const dt_atomic_uint64 *var)
void dt_atomic_set_uint64(dt_atomic_uint64 *var, uint64_t value)
void dt_atomic_or_int(dt_atomic_int *var, int flags)
static void * dt_atomic_get_ptr(const dt_atomic_ptr *var)
Definition atomic.h:76
atomic_int dt_atomic_int
Definition atomic.h:68
static void dt_atomic_set_ptr(dt_atomic_ptr *var, void *value)
Definition atomic.h:75
int levels(struct dt_imageio_module_data_t *data)
Definition avif.c:641
const float v
dt_imageio_levels_t
#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
uint32_t width
Definition mipmap_cache.c:0
uint32_t height
Definition mipmap_cache.c:1
float iscale
Definition mipmap_cache.c:2
size_t size
Definition mipmap_cache.c:3
dt_mipmap_buffer_dsc_flags flags
Definition mipmap_cache.c:4
dt_mipmap_size_t
dt_dev_request_flags_t
Definition pixelpipe.h:50
dt_dev_pixelpipe_type_t
Definition pixelpipe.h:40
Pixelpipe cache for storing intermediate results in the pixelpipe.
#define DT_PIXELPIPE_CACHE_HASH_INVALID
void dt_dev_pixelpipe_set_input(dt_dev_pixelpipe_t *pipe, int32_t imgid, int width, int height, float iscale, dt_mipmap_size_t size)
void dt_dev_pixelpipe_disable_before(dt_dev_pixelpipe_t *pipe, const char *op)
static dt_dev_pixelpipe_cache_request_t dt_dev_pixelpipe_get_cache_request(const dt_dev_pixelpipe_t *pipe)
int dt_dev_pixelpipe_init_preview(dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev)
void dt_dev_pixelpipe_synch_top(dt_dev_pixelpipe_t *pipe)
void dt_dev_pixelpipe_reset_reentry(dt_dev_pixelpipe_t *pipe)
void dt_dev_pixelpipe_set_mask_rasterization_step(struct dt_dev_pixelpipe_t *pipe, const int step)
Set the drawn-mask rasterisation step for the next frame, in image pixels (clamped to >= 1).
static void dt_dev_backbuf_publish_begin(dt_backbuf_t *backbuf)
static void dt_dev_pixelpipe_set_hash(dt_dev_pixelpipe_t *pipe, const uint64_t hash)
static dt_dev_pixelpipe_change_t dt_dev_pixelpipe_get_changed(const dt_dev_pixelpipe_t *pipe)
int dt_dev_pixelpipe_init_cached(dt_dev_pixelpipe_t *pipe)
gboolean dt_dev_pixelpipe_has_reentry(dt_dev_pixelpipe_t *pipe)
void dt_dev_pixelpipe_disable_after(dt_dev_pixelpipe_t *pipe, const char *op)
static uint64_t dt_dev_backbuf_get_history_hash(const dt_backbuf_t *backbuf)
static const struct dt_iop_module_t * dt_dev_pixelpipe_get_cache_request_module(const dt_dev_pixelpipe_t *pipe)
float * dt_dev_retrieve_rawdetail_mask(const dt_dev_pixelpipe_t *pipe, const struct dt_iop_module_t *target_module)
static uint64_t dt_dev_pixelpipe_get_hash(const dt_dev_pixelpipe_t *pipe)
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.
static void dt_dev_pixelpipe_or_changed(dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_change_t flags)
static void dt_dev_pixelpipe_reset_cache_request(dt_dev_pixelpipe_t *pipe)
gboolean dt_dev_pixelpipe_get_realtime(const dt_dev_pixelpipe_t *pipe)
static void dt_dev_pixelpipe_set_cache_request(dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_cache_request_t request, const struct dt_iop_module_t *module)
dt_dev_pixelpipe_change_t
@ DT_DEV_PIPE_REENTRY
@ DT_DEV_PIPE_ZOOMED
@ DT_DEV_PIPE_CACHE_REQUEST
@ DT_DEV_PIPE_SYNCH
@ DT_DEV_PIPE_TOP_CHANGED
@ DT_DEV_PIPE_REMOVE
@ DT_DEV_PIPE_UNCHANGED
static uint64_t dt_dev_pixelpipe_get_history_hash(const dt_dev_pixelpipe_t *pipe)
int dt_dev_pixelpipe_init_thumbnail(dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev)
void dt_dev_pixelpipe_set_icc(dt_dev_pixelpipe_t *pipe, dt_colorspaces_color_profile_type_t icc_type, const gchar *icc_filename, dt_iop_color_intent_t icc_intent)
static void dt_dev_pixelpipe_set_history_hash(dt_dev_pixelpipe_t *pipe, const uint64_t history_hash)
char * dt_pixelpipe_get_pipe_name(dt_dev_pixelpipe_type_t pipe_type)
void dt_dev_pixelpipe_synch_all_real(dt_dev_pixelpipe_t *pipe, const char *caller_func)
static dt_backbuf_state_t dt_dev_backbuf_snapshot(const dt_backbuf_t *backbuf)
Read the whole record as one publication.
static void dt_dev_backbuf_set_hash(dt_backbuf_t *backbuf, const uint64_t hash)
static void dt_dev_backbuf_publish_end(dt_backbuf_t *backbuf)
int dt_dev_pixelpipe_init_dummy(dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev)
void dt_dev_pixelpipe_create_nodes(dt_dev_pixelpipe_t *pipe)
static uint64_t dt_dev_backbuf_get_hash(const dt_backbuf_t *backbuf)
static void dt_dev_backbuf_set_history_hash(dt_backbuf_t *backbuf, const uint64_t history_hash)
dt_dev_pixelpipe_cache_request_t
@ DT_DEV_PIXELPIPE_CACHE_REQUEST_BACKBUF
@ DT_DEV_PIXELPIPE_CACHE_REQUEST_NONE
@ DT_DEV_PIXELPIPE_CACHE_REQUEST_MODULE
void dt_dev_pixelpipe_cleanup(dt_dev_pixelpipe_t *pipe)
static void dt_dev_pixelpipe_set_changed(dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_change_t v)
gboolean dt_dev_pixelpipe_unset_reentry(dt_dev_pixelpipe_t *pipe, uint64_t hash)
Remove the re-entry pipeline flag, only if the object identifier is the one that set it....
int dt_dev_pixelpipe_init_export(dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev, int levels, gboolean store_masks)
int dt_dev_pixelpipe_init(dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev)
int dt_dev_pixelpipe_process(dt_dev_pixelpipe_t *pipe, dt_iop_roi_t roi)
static gboolean dt_dev_pixelpipe_has_shutdown(const dt_dev_pixelpipe_t *pipe)
float * dt_dev_distort_detail_mask(const dt_dev_pixelpipe_t *pipe, float *src, const struct dt_iop_module_t *target_module)
gboolean dt_dev_pixelpipe_set_reentry(dt_dev_pixelpipe_t *pipe, uint64_t hash)
Set the re-entry pipeline flag, only if no object is already capturing it.
void dt_dev_pixelpipe_set_realtime(dt_dev_pixelpipe_t *pipe, gboolean state)
void dt_dev_pixelpipe_cleanup_nodes(dt_dev_pixelpipe_t *pipe)
dt_iop_color_intent_t
ICC rendering intent, as stored in iop params and in conf.
dt_colorspaces_color_profile_type_t
const float uint32_t state[4]
unsigned __int64 uint64_t
Definition strptime.c:75
One coherent publication, by value.
What the pipeline last published: which cacheline, and what shape its pixels are in.
dt_atomic_uint64 generation
dt_atomic_uint64 history_hash
dt_atomic_uint64 hash
dt_iop_buffer_dsc_t dsc_out
dt_dev_request_flags_t request_histogram
dt_iop_buffer_dsc_t dsc_in
dt_pixel_cache_entry_t cache_entry
struct dt_iop_module_t *void * data
dt_dev_histogram_collection_params_t histogram_params
dt_iop_buffer_dsc_t dsc_mask
dt_atomic_ptr last_history_item
dt_colorspaces_color_profile_type_t icc_type
struct dt_iop_order_iccprofile_info_t * work_profile_info
struct dt_iop_order_iccprofile_info_t * input_profile_info
struct dt_iop_order_iccprofile_info_t * output_profile_info
gboolean gui_observable_source
uint64_t last_history_hash
dt_pthread_mutex_t busy_mutex
dt_imageio_levels_t levels
dt_atomic_int realtime
dt_atomic_uint64 history_hash
dt_backbuf_t backbuf
dt_mipmap_size_t size
dt_iop_color_intent_t icc_intent
dt_atomic_uint64 hash
dt_atomic_int shutdown
int mask_rasterization_step
Rasterisation step for drawn masks, in image pixels. Always >= 1.
dt_atomic_int running
dt_atomic_int * shutdown_ext
dt_atomic_ptr cache_request_module
dt_dev_pixelpipe_type_t type
dt_atomic_int changed
gboolean store_all_raster_masks
uint64_t rawdetail_mask_hash
struct dt_iop_roi_t rawdetail_mask_roi
GArray * raster_mask_hashes
dt_dev_roi_request_store_t roi_request
The viewport snapshot this run was planned from.
struct dt_develop_t * dev
dt_atomic_int cache_request
struct dt_iop_order_iccprofile_info_t * owned_input_profile_info
struct dt_dev_pixelpipe_t * pipe
Definition develop.h:214
A profile reduced to the arithmetic the pixel loop can run: two matrices and six tone-curve LUTs,...
Region of interest passed through the pixelpipe.
Definition format.h:49