Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
pixelpipe_rawdetail.c File Reference

Raw-detail mask transport helpers. More...

+ Include dependency graph for pixelpipe_rawdetail.c:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

gboolean dt_dev_pixelpipe_rawdetail_mask_check_hit (dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const uint64_t output_hash)
 Whether a cached output of piece may stand for it, called before that output is looked up.
 
float * dt_dev_retrieve_rawdetail_mask (const dt_dev_pixelpipe_t *pipe, const dt_iop_module_t *target_module)
 
float * dt_dev_distort_detail_mask (const dt_dev_pixelpipe_t *pipe, float *src, const dt_iop_module_t *target_module)
 

Detailed Description

Raw-detail mask transport helpers.

These helpers transport the side-band detail mask written by the hidden detailmask module and later consumed by blend operators. They are private implementation details of the pixelpipe and are included from pixelpipe_hb.c to keep raw-detail specific geometry logic out of the main pipeline recursion code.

Definition in file pixelpipe_rawdetail.c.

Function Documentation

◆ dt_dev_distort_detail_mask()

◆ dt_dev_pixelpipe_rawdetail_mask_check_hit()

gboolean dt_dev_pixelpipe_rawdetail_mask_check_hit ( dt_dev_pixelpipe_t *  pipe,
const dt_dev_pixelpipe_iop_t *  piece,
const uint64_t  output_hash 
)

Whether a cached output of piece may stand for it, called before that output is looked up.

The hidden detailmask stage publishes two cachelines: its output, a copy of its input, and the detail mask, under a hash of its own. Either can be evicted without the other, and the output alone cannot rebuild the mask: a consumer finding none skips the detail refinement, and its output is cached under the hash of a refined one. So a cached output stands for the stage only while its mask is there too. When it is, the pipe takes the mask now, as the stage's process() would; when it is not, the output is invalidated so that the stage runs and publishes the mask again. Any other piece's output stands as it is.

Parameters
pipeThe pipe about to look up the output.
pieceThe piece the output belongs to.
output_hashThe output's cache key.
Returns
TRUE when the output may stand for the piece, FALSE when it was invalidated.

Definition at line 14 of file pixelpipe_rawdetail.c.

References dt_dev_clear_rawdetail_mask(), dt_dev_pixelpipe_cache_invalidate_hashes(), dt_dev_pixelpipe_cache_ref_entry_by_hash(), dt_dev_pixelpipe_rawdetail_mask_hash(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, piece, pipe, dt_dev_pixelpipe_t::rawdetail_mask_hash, dt_dev_pixelpipe_t::rawdetail_mask_roi, and TRUE.

Referenced by _detail_output_with_its_mask_stands(), _detail_output_without_its_mask_goes(), _other_output_stands(), and dt_dev_pixelpipe_process_rec().

◆ dt_dev_retrieve_rawdetail_mask()