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 Copyright (C) 2026 Guillaume Stutin.
18
19 darktable is free software: you can redistribute it and/or modify
20 it under the terms of the GNU General Public License as published by
21 the Free Software Foundation, either version 3 of the License, or
22 (at your option) any later version.
23
24 darktable is distributed in the hope that it will be useful,
25 but WITHOUT ANY WARRANTY; without even the implied warranty of
26 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 GNU General Public License for more details.
28
29 You should have received a copy of the GNU General Public License
30 along with darktable. If not, see <http://www.gnu.org/licenses/>.
31*/
32
33#ifndef DT_DEVELOP_PIXELPIPE_HB_H
34#define DT_DEVELOP_PIXELPIPE_HB_H
35
36#include "system/atomic.h"
38#include "develop/iop_order.h"
39/* develop/imageop.h is deliberately NOT included: it includes this header back.
40 * dt_iop_module_t is only ever used through a pointer here (tag-declared below);
41 * the concrete types needed by value (dt_iop_roi_t, dt_iop_buffer_dsc_t) live in
42 * develop/format.h. */
43#include "pixel/format.h"
45#include "develop/pixelpipe.h"
47
48
54struct dt_iop_module_t;
57struct dt_develop_t;
58
60{
61 int id; // 0 is reserved for the reusable masks written in blend.c
62 float *mask;
64
103{
104 struct dt_iop_module_t *module; // the module in the dev operation stack
105 void *data; // to be used by the module to store stuff per pipe piece
106
107 // Memory size of *data upon which we will compute integrity hashes.
108 // This needs to be the size of the constant part of the data structure.
109 // It can even be 0 if nothing relevant to cache integrity hashes is held there.
110 // If the data struct contains pointers, they should go at the end of the struct,
111 // and the size here should be adjusted to only include constant bits, starting at the address of *data.
112 // "Constant" means identical between 2 pipeline nodes init,
113 // because the lifecycle of a pixelpipe cache is longer than that of a pixelpipe itself.
114 // See an example in colorbalancergb.c
115 size_t data_size;
116
117 void *blendop_data; // to be used by the module to store blendop per pipe piece
118 gboolean enabled; // used to disable parts of the pipe for export, independent on module itself.
119 gboolean detail_mask; // TRUE when the piece blend parameters request detail-mask refinement.
120
121 dt_dev_request_flags_t request_histogram; // (bitwise) set if you want an histogram captured
122 dt_dev_histogram_collection_params_t histogram_params; // set histogram generation params
123
124 int iwidth, iheight; // width and height of input buffer
125
126 // Hash representing the current state of the params, blend params and enabled state of this individual module
129
130 // Cumulative hash representing the current module hash and all the upstream modules from the pipeline,
131 // for the current ROI.
133
134 // Same as global hash but for raster masks
136
137 /* Cumulative hash of the PARAMETERS of every enabled module upstream of this one: their
138 * history state, and neither their ROI nor anything of this module's own. It identifies the
139 * transformation chain above the node, which is what a drawn shape's rasterisation depends on
140 * -- every mask is rasterised in sensor coordinates and back-transformed through that chain,
141 * so it moves with an upstream parameter and not with the viewport. A module memoising such a
142 * result (see `iop/retouch.c`) keys it on this plus whatever of its own state the result
143 * depends on, and gets a memo that survives an edit of the parameter being dragged, which
144 * `global_hash` cannot offer.
145 *
146 * Deliberately ROI-free, because it is read from `modify_roi_in()`, which runs BEFORE
147 * `dt_pixelpipe_get_global_hash()` publishes the plan being built: what a consumer reads
148 * there still describes the previous plan's ROI, and would be a lie if the ROI were in it. It
149 * never describes the previous plan's PARAMETERS, since every commit path runs the hash pass
150 * before any planning. DT_PIXELPIPE_CACHE_HASH_INVALID until that pass has run at all. */
152
153 int bpc; // bits per channel, 32 means float
154 dt_iop_roi_t buf_in, buf_out; // theoretical full buffer regions of interest, as passed through modify_roi_out
155 dt_iop_roi_t roi_in, roi_out; // planned runtime regions of interest after backward ROI propagation
156 int process_cl_ready; // set this to 0 in commit_params to temporarily disable the use of process_cl
157 int process_tiling_ready; // set this to 0 in commit_params to temporarily disable tiling
158
159 // Sealed descriptor contract for this module instance.
160 // dsc_in is the module input contract after input_format() sanitized against
161 // the actual upstream storage format.
162 // dsc_out is the authored module output contract after commit_params() and
163 // output_format().
164 // dsc_mask carries the mask-side storage contract when masks are produced.
166
167 // bypass the cache for this module
168 gboolean bypass_cache;
169
170 // Snapshot of the last reusable output cacheline metadata.
171 // This is intentionally NOT used for bypass_cache / no_cache / reentry modes:
172 // - disposable outputs are flagged auto-destroy and must not be rekeyed,
173 // - realtime outputs and GPU-transient outputs can safely reuse their cacheline.
174 // The reused line is rekeyed while still write-locked, and it is destroyed if processing later
175 // fails before producing a valid output for the new hash.
177
191
192 // Set to TRUE for modules that should mandatorily cache their output to RAM
193 // even when running on OpenCL. This is a processing-policy flag authored
194 // during synchronization and then consumed by one recursion step; it does not
195 // change the descriptor contract.
198
200{
201 DT_DEV_PIPE_UNCHANGED = 0, // no event
202 DT_DEV_PIPE_TOP_CHANGED = 1 << 0, // only params of top element changed
203 DT_DEV_PIPE_REMOVE = 1 << 1, // possibly elements of the pipe have to be removed
205 = 1 << 2, // all nodes up to end need to be synched, but no removal of module pieces is necessary
206 DT_DEV_PIPE_ZOOMED = 1 << 3, // zoom event, preview pipe does not need changes
207 DT_DEV_PIPE_CACHE_REQUEST = 1 << 4, // GUI requested one cacheline to be materialized on host
208 DT_DEV_PIPE_REENTRY = 1 << 5, // retry runtime side-band generation without rebuilding nodes
209 DT_DEV_PIPE_SWITCHED = 1 << 6 // history switched to another state (module toggled, undo, history jump):
210 // keep the outputs it replaces, see dt_dev_pixelpipe_t.keep_outputs
212
219
251typedef struct dt_backbuf_t
252{
253 size_t bpp; // bits per pixel
254 size_t width; // pixel size of image
255 size_t height; // pixel size of image
256 dt_atomic_uint64 hash; // data checksum/integrity hash, for example to connect to a cacheline
257 dt_atomic_uint64 history_hash; // arbitrary state hash
258
260 dt_atomic_uint64 generation;
261
272
277
280
290
291static inline void dt_dev_backbuf_publish_begin(dt_backbuf_t *backbuf)
292{
294}
295
296static inline void dt_dev_backbuf_publish_end(dt_backbuf_t *backbuf)
297{
299}
300
309{
311 if(IS_NULL_PTR(backbuf)) return state;
312
313 for(;;)
314 {
315 const uint64_t before = dt_atomic_get_uint64(&backbuf->generation);
316 if(before & 1) continue; // publication in flight
317
318 state.bpp = backbuf->bpp;
319 state.width = backbuf->width;
320 state.height = backbuf->height;
321 state.hash = dt_atomic_get_uint64(&backbuf->hash);
322 state.history_hash = dt_atomic_get_uint64(&backbuf->history_hash);
323
324 const uint64_t after = dt_atomic_get_uint64(&backbuf->generation);
325 if(before == after) break;
326 }
327
328 return state;
329}
330
331static inline uint64_t dt_dev_backbuf_get_hash(const dt_backbuf_t *backbuf)
332{
333 return dt_atomic_get_uint64(&backbuf->hash);
334}
335
336static inline void dt_dev_backbuf_set_hash(dt_backbuf_t *backbuf, const uint64_t hash)
337{
339 dt_atomic_set_uint64(&backbuf->hash, hash);
341}
342
344{
345 return dt_atomic_get_uint64(&backbuf->history_hash);
346}
347
348static inline void dt_dev_backbuf_set_history_hash(dt_backbuf_t *backbuf, const uint64_t history_hash)
349{
351 dt_atomic_set_uint64(&backbuf->history_hash, history_hash);
353}
354
355typedef struct dt_dev_pixelpipe_t
356{
357 // The development to which this pipeline is attached
359
360 // input image. Will be fetched directly from mipmap cache
361 int32_t imgid;
363
364 // width and height of full-resolution input buffer
366
367 // Input scaling between full-resolution source image and
368 // actual pipeline mipmap input.
369 // = 1.f, unless we take downscaled RAW for thumbnail export.
370 float iscale;
371
372 // dimensions of processed buffer assuming we take full-resolution input
374
379 /* Storage for an input profile DERIVED FROM THIS IMAGE, which cannot be shared.
380 *
381 * The types DT_COLORSPACE_EMBEDDED_ICC..DT_COLORSPACE_ALTERNATE_MATRIX are not
382 * registered in the profile list, so nothing can resolve them by identity: their
383 * matrices come from the image's own camera data, via colorin. They were being kept in
384 * the (type, filename) memo, where filename is "" -- so every image sharing a
385 * camera-matrix type shared one entry and overwrote its matrix in place. That was
386 * survivable only because the memo is per-dev and a dev is one image.
387 *
388 * This is per-pipe and owned by the pipe. `input_profile_info` above points either here
389 * or at a genuinely shared memo entry, and is never freed through that pointer. */
393
394 // instances of pixelpipe, stored in GList of dt_dev_pixelpipe_iop_t
396 // event flag
398
399 // backbuffer (output)
401
402 // Validity checksum of whole pipeline,
403 // taken as the global hash of the last pipe node (module),
404 // after the last synchronization between dev history and pipe nodes completed.
405 // This is computed in dt_dev_pixelpipe_get_global_hash
406 // ahead of processing image.
407 dt_atomic_uint64 hash;
408
409 // Lock this while a pipeline is working.
410 // This is meant to prevent pipeline destruction/cleanup while it is working.
411 // It should __NEVER__ be used from the GUI thread, the GUI thread interacts
412 // with pipelines __ONLY__ through the pipeline cache.
413 dt_pthread_mutex_t busy_mutex;
414
415 // The hidden detailmask module publishes the full-resolution detail mask in
416 // the global pixelpipe cache under a salted hash derived from its
417 // piece->global_hash. The pipeline keeps only that cache key plus the source
418 // ROI of the published mask so zoom/pan updates can reuse the same payload
419 // exactly like raster masks do.
423
424 // References held on the dedicated global raster-mask cachelines required by
425 // the current graph. Keeping them at pipe level prevents LRU eviction between
426 // provider publication and downstream consumption or mask export.
428
443
444 // processing is true when actual pixel computations are ongoing
446 // running is true when the pipe thread is running, computing or idle.
447 // Written by the darkroom worker thread, polled by the GUI thread (view
448 // leave()) to wait for that thread to actually stop before tearing down
449 // pipe nodes/dev->iop/dev->history -- must be atomic.
451 // shutting down?
453 /* Optional caller-owned kill switch used by background thumbnail/surface jobs.
454 * The pipe keeps its own shutdown flag for local teardown, but long-running
455 * non-GUI jobs also need a way to stop as soon as their output target changed
456 * size. Callers own the storage and may flip it from another thread. */
458 // Best-effort processing mode. When TRUE, the processing path bypasses the
459 // early-abort shutdown kill-switch checks that normally stop a stale pipeline
460 // as soon as parameters changed. This allows long-running interactive
461 // pipelines to keep producing "good enough" output until the flag is cleared.
462 // Cleanup/teardown shutdown semantics are unchanged.
464 // opencl enabled for this pixelpipe?
466 // opencl error detected?
468 // running in a tiling context?
470 // should this pixelpipe display a mask in the end?
472 // should this pixelpipe completely suppressed the blendif module?
474 // input data based on this timestamp:
477 // This pipe feeds GUI-side observables such as global histograms and picker
478 // sampling. The processing core reacts to this property instead of branching
479 // on pipeline type.
481
506 // the final output pixel format this pixelpipe will be converted to
508 // opencl device that has been locked for this pipe.
509 int devid;
510 // last opencl device this pipe ran on, kept after `devid` is reset to -1 at
511 // the end of dt_dev_pixelpipe_process(). Used by dt_dev_pixelpipe_cleanup()
512 // to release only this pipe's own cl_mem cache payloads. -1 if this pipe
513 // never ran on OpenCL.
515 // the user might choose to overwrite the output color space and rendering intent.
519 // snapshot of modules iop_order
521 // snapshot of mask list
523 // Publish every provider mask in the global pixelpipe cache, including masks
524 // which have no downstream consumer but may be requested by export.
526
527 // hash of the last history item synchronized with pipeline
528 // that's because the sync_top option can't assume only one history
529 // item was added since the last synchronization.
531 // pointer identity of the last synchronized history item.
532 // This complements `last_history_hash` for in-place top-entry updates where
533 // the same history node is reused and its hash changes.
534 //
535 // The pipe HOLDS A REFERENCE on whatever this points at (dt_dev_history_item_ref), and
536 // it is exchanged atomically (_pipe_set_last_history_item / dt_dev_history_cow_touch).
537 // The resync runs against a snapshot outside history_mutex, so the item it last synced
538 // may since have left dev->history; the reference keeps it alive, which is what makes an
539 // identity compare on it safe -- a freed address could be reused by a NEW item and match.
540 // The exchange is what lets the worker (writing its last-synced item) and the GUI thread
541 // (cow_touch re-pointing it at a clone) race on the slot without leaking or double-freeing.
542 dt_atomic_ptr last_history_item;
543
544 // hash of the whole history stack at the time of synchonization
545 // between pipe and history. This is a local copy of
546 // dev_history_get_hash()
547 dt_atomic_uint64 history_hash;
548 // GUI readers can request one extra host-visible cacheline without pretending
549 // history changed. BACKBUF targets the final pipe output, MODULE targets the
550 // output of cache_request_module.
552 dt_atomic_ptr cache_request_module;
553 // Modules can set this to TRUE internally so the pipeline will
554 // restart right away, in the same thread.
555 // The reentry flag can only be reset (to FALSE) by the same object that captured it.
556 // DO NOT SET THAT DIRECTLY, use the setter/getter functions
557 gboolean reentry;
558
559 // Unique identifier of the object capturing the reentry flag.
560 // This can be a mask or module hash, or anything that stays constant
561 // across 2 pipeline runs from a same thread (aka as long as we don't reinit).
562 // DO NOT SET THAT DIRECTLY, use the setter/getter functions
564
565 // Can be set arbitrarily by pixelpipe modules at runtime
566 // to invalidate downstream module cache lines.
567 // This always gets reset to FALSE when a pipeline finishes,
568 // whether on success or on error.
569 gboolean flush_cache;
570
571 // TRUE if at least one module is bypassing the cache
572 gboolean bypass_cache;
573
574 // If TRUE, do not keep any pixelpipe cache lines around for reuse.
575 // This is intended for one-shot pipelines such as exports and thumbnails where caching is pure
576 // overhead and can lead to memory pressure (RAM buffers + OpenCL pinned/device buffers).
577 // Lines other pipes hold are still reused: dt_dev_pixelpipe_cache_get_writable() hands them back
578 // as exact hits, and only what this pipe computes is dropped once consumed.
579 gboolean no_cache;
580
581 /* When TRUE, a module writes its output into a new cacheline instead of rekeying the one it
582 * wrote last time, so the outputs of the state just left stay cached for a switch back. Raised
583 * by DT_DEV_PIPE_SWITCHED, lowered once a run completes. */
584 gboolean keep_outputs;
585
586 // Temporarily pause the infinite loop of pipeline.
587 // Written by drawlayer from BOTH the GUI thread and its paint worker, polled by the
588 // darkroom loop -- so it is atomic, like `running`, `shutdown` and `realtime` beside it.
589 // The pause path happened to be fenced by the `shutdown` store that followed it; the
590 // RESUME path had no atomic after it at all.
592
593 // Run a self-setting pipeline that will update history for each module
594 // depending on its input if it implements the autoset() method
595 gboolean autoset;
596
598
603
608
613
615{
616 dt_atomic_set_uint64(&pipe->history_hash, history_hash);
617}
618
623
628
633
639
644
653
660
661struct dt_develop_t;
662
663#ifdef __cplusplus
664extern "C" {
665#endif
666
668
669// inits the pixelpipe with plain passthrough input/output and empty input and default caching settings.
671
675
676// inits the preview pixelpipe with plain passthrough input/output and empty input and default caching
677// settings.
679// inits the pixelpipe with settings optimized for full-image export (no history stack cache)
681// inits the pixelpipe with settings optimized for thumbnail export (no history stack cache)
683// inits all but the pixel caches, so you can't actually process an image (just get dimensions and
684// distortions)
686// inits the pixelpipe
688// enable/disable best-effort processing mode, bypassing the usual early-abort
689// shutdown checks while the flag stays enabled.
691// return whether best-effort processing mode is currently enabled.
698// constructs a new input buffer from given RGB float array.
700 int height, float iscale, dt_mipmap_size_t size);
701// set some metadata for colorout to avoid race conditions.
703 const gchar *icc_filename, dt_iop_color_intent_t icc_intent);
704// destroys all allocated data.
706// cleanup all nodes except clean input/output
708// sync with develop_t history stack from scratch (new node added, have to pop old ones)
709// this should be called with dev->history_mutex locked in read mode
711// sync with develop_t history stack by just copying the top item params (same op, new params on top)
713#define dt_dev_pixelpipe_synch_all(pipe) dt_dev_pixelpipe_synch_all_real(pipe, __FUNCTION__)
714// adjust output node according to history stack (history pop event)
716
717// process region of interest of pixels. returns 1 if pipe was altered during processing.
719
720// Refresh GUI samplers from the cachelines already published by a darkroom pipe.
721
722// disable given op and all that comes after it in the pipe:
724// disable given op and all that comes before it in the pipe:
726
735float *dt_dev_get_raster_mask(dt_dev_pixelpipe_t *pipe, const struct dt_iop_module_t *raster_mask_source,
736 const int raster_mask_id, const struct dt_iop_module_t *target_module,
737 int *error);
738
739// helper function writing the pipe-processed ctmask data to dest
742
743
765
776
777// check if pipeline should re-entry after it completes
779
780// Force-reset pipeline re-entry flag, for example if we lost the unique ID of the object
781// in a re-entry loop.
783
784#ifdef __cplusplus
785}
786#endif
787
788#endif // DT_DEVELOP_PIXELPIPE_HB_H
789
790// clang-format off
791// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
792// vim: shiftwidth=2 expandtab tabstop=2 cindent
793// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
794// 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
static const dt_dev_pixelpipe_t * pipe
Definition layers.h:49
hash
Definition layers.h:90
#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)
void dt_dev_backbuf_take_keepalive(dt_backbuf_t *backbuf, struct dt_pixel_cache_entry_t *entry)
Take the keepalive reference on entry, releasing whatever this backbuffer held. Idempotent for the sa...
Definition develop.c:2154
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)
void dt_dev_backbuf_release_keepalive(dt_backbuf_t *backbuf)
Release this backbuffer's keepalive reference, if it holds one. Safe to call twice.
Definition develop.c:2170
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_SWITCHED
@ 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
struct dt_pixel_cache_entry_t * keepalive
dt_iop_buffer_dsc_t dsc_out
dt_dev_request_flags_t request_histogram
dt_pixel_cache_entry_t cache_entry_prev
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_atomic_int pause
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
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