![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dt_heal_solver_t |
| struct | dt_heal_cl_global_t |
| struct | heal_params_cl_t |
Typedefs | |
| typedef enum dt_heal_domain_t | dt_heal_domain_t |
| typedef struct dt_heal_solver_t | dt_heal_solver_t |
| typedef struct dt_heal_cl_global_t | dt_heal_cl_global_t |
| typedef struct heal_params_cl_t | heal_params_cl_t |
Enumerations | |
| enum | dt_heal_domain_t { DT_HEAL_DOMAIN_LINEAR = 0 , DT_HEAL_DOMAIN_SQRT = 1 } |
Functions | |
| void | dt_heal (const float *const src_buffer, float *dest_buffer, const float *const mask_buffer, const int width, const int height, const int ch, const dt_heal_solver_t solver) |
| void | dt_heal_init_cl_global (void) |
| void | dt_heal_free_cl_global (void) |
| heal_params_cl_t * | dt_heal_init_cl (const int devid) |
| void | dt_heal_free_cl (heal_params_cl_t *p) |
| cl_int | dt_heal_cl (heal_params_cl_t *p, cl_mem dev_src, cl_mem dev_dest, const float *const mask_buffer, const int width, const int height, const dt_heal_solver_t solver) |
| typedef struct dt_heal_cl_global_t dt_heal_cl_global_t |
| typedef enum dt_heal_domain_t dt_heal_domain_t |
The domain the source-to-destination difference is interpolated in.
LINEAR adds a harmonic correction to the source pixels as they are, so a source brighter than the destination keeps its absolute noise and texture amplitude on a darker base: once encoded for display, that noise is stronger than the destination's own.
SQRT interpolates the difference of square roots, the variance-stabilising transform of shot noise, so the pasted noise takes the amplitude it would have had at the destination level. Only the three colour channels are transformed; the fourth stays linear.
| typedef struct dt_heal_solver_t dt_heal_solver_t |
How the fill is solved; both settings come from the calling module.
| typedef struct heal_params_cl_t heal_params_cl_t |
| enum dt_heal_domain_t |
The domain the source-to-destination difference is interpolated in.
LINEAR adds a harmonic correction to the source pixels as they are, so a source brighter than the destination keeps its absolute noise and texture amplitude on a darker base: once encoded for display, that noise is stronger than the destination's own.
SQRT interpolates the difference of square roots, the variance-stabilising transform of shot noise, so the pasted noise takes the amplitude it would have had at the destination level. Only the three colour channels are transformed; the fourth stays linear.
| Enumerator | |
|---|---|
| DT_HEAL_DOMAIN_LINEAR | |
| DT_HEAL_DOMAIN_SQRT | |
| void dt_heal | ( | const float *const | src_buffer, |
| float * | dest_buffer, | ||
| const float *const | mask_buffer, | ||
| const int | width, | ||
| const int | height, | ||
| const int | ch, | ||
| const dt_heal_solver_t | solver | ||
| ) |
Heal dest_buffer using src_buffer as a reference and mask_buffer to define the area to be healed. The 3 buffers must have the same size, but mask_buffer is 1 channel and is tested for != 0.f.
Definition at line 410 of file heal.c.
References _heal_add(), _heal_laplace_loop(), _heal_sub(), ch, cleanup(), dt_heal_solver_t::domain, dt_pixelpipe_cache_alloc_align_float_cache, dt_pixelpipe_cache_free_align, height, IS_NULL_PTR, dt_heal_solver_t::max_iter, and width.
Referenced by _retouch_heal(), and dt_heal_cl().
| cl_int dt_heal_cl | ( | heal_params_cl_t * | p, |
| cl_mem | dev_src, | ||
| cl_mem | dev_dest, | ||
| const float *const | mask_buffer, | ||
| const int | width, | ||
| const int | height, | ||
| const dt_heal_solver_t | solver | ||
| ) |
Definition at line 483 of file heal.c.
References ch, cleanup(), dt_heal(), dt_opencl_read_buffer_from_device(), DT_OPENCL_SYSMEM_ALLOCATION, dt_opencl_write_buffer_to_device(), dt_pixelpipe_cache_alloc_align_float_cache, dt_pixelpipe_cache_free_align, height, IS_NULL_PTR, p, and width.
Referenced by _retouch_heal_cl().
| void dt_heal_free_cl | ( | heal_params_cl_t * | p | ) |
Definition at line 477 of file heal.c.
References dt_free, IS_NULL_PTR, and p.
Referenced by _retouch_heal_cl().
Definition at line 456 of file heal.c.
References _heal_cl_global, dt_free, g, and IS_NULL_PTR.
Referenced by dt_opencl_cleanup().
| heal_params_cl_t * dt_heal_init_cl | ( | const int | devid | ) |
Definition at line 465 of file heal.c.
References _heal_cl_global, heal_params_cl_t::global, IS_NULL_PTR, and p.
Referenced by _retouch_heal_cl().
Definition at line 449 of file heal.c.
References _heal_cl_global, and g.
Referenced by dt_opencl_init().