![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/extra_optimizations.h"#include "bauhaus/bauhaus.h"#include "common/bspline.h"#include "common/darktable.h"#include "common/dwt.h"#include "common/gaussian.h"#include "common/image.h"#include "common/imagebuf.h"#include "common/iop_profile.h"#include "common/opencl.h"#include "control/control.h"#include "develop/develop.h"#include "develop/imageop_gui.h"#include "develop/imageop_math.h"#include "develop/noise_generator.h"#include "develop/openmp_maths.h"#include "develop/tiling.h"#include "dtgtk/button.h"#include "dtgtk/drawingarea.h"#include "dtgtk/expander.h"#include "dtgtk/paint.h"#include "gui/gtk.h"#include "gui/presets.h"#include "iop/iop_api.h"
Include dependency graph for diffuse.c:Data Structures | |
| struct | dt_iop_diffuse_params_t |
| struct | dt_iop_diffuse_gui_data_t |
| struct | dt_iop_diffuse_global_data_t |
Macros | |
| #define | DEBUG_DUMP_PFM 0 |
| #define | MAX_NUM_SCALES 10 |
| #define | H 1 |
| #define | KAPPA 0.25f |
Typedefs | |
| typedef struct dt_iop_diffuse_params_t | dt_iop_diffuse_params_t |
| typedef struct dt_iop_diffuse_gui_data_t | dt_iop_diffuse_gui_data_t |
| typedef struct dt_iop_diffuse_global_data_t | dt_iop_diffuse_global_data_t |
| typedef struct dt_iop_diffuse_params_t | dt_iop_diffuse_data_t |
| typedef enum dt_isotropy_t | dt_isotropy_t |
Enumerations | |
| enum | dt_isotropy_t { DT_ISOTROPY_ISOTROPE = 0 , DT_ISOTROPY_ISOPHOTE = 1 , DT_ISOTROPY_GRADIENT = 2 } |
Functions | |
| static dt_isotropy_t | check_isotropy_mode (const float anisotropy) |
| const char * | name () |
| const char * | aliases () |
| const char ** | description (struct dt_iop_module_t *self) |
| int | default_group () |
| int | flags () |
| int | default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| int | legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version) |
| void | init_presets (dt_iop_module_so_t *self) |
| void | tiling_callback (struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_in, const dt_iop_roi_t *roi_out, struct dt_develop_tiling_t *tiling) |
| static void | init_reconstruct (float *const restrict reconstructed, const size_t width, const size_t height) |
| static void | find_gradients (const dt_aligned_pixel_t pixels[9], dt_aligned_pixel_t xy[2]) |
| static void | find_laplacians (const dt_aligned_pixel_t pixels[9], dt_aligned_pixel_t xy[2]) |
| static void | rotation_matrix_isophote (const dt_aligned_pixel_t c2, const dt_aligned_pixel_t cos_theta_sin_theta, const dt_aligned_pixel_t cos_theta2, const dt_aligned_pixel_t sin_theta2, dt_aligned_pixel_t a[2][2]) |
| static void | rotation_matrix_gradient (const dt_aligned_pixel_t c2, const dt_aligned_pixel_t cos_theta_sin_theta, const dt_aligned_pixel_t cos_theta2, const dt_aligned_pixel_t sin_theta2, dt_aligned_pixel_t a[2][2]) |
| static void | build_matrix (const dt_aligned_pixel_t a[2][2], dt_aligned_pixel_t kernel[9]) |
| static void | isotrope_laplacian (dt_aligned_pixel_t kernel[9]) |
| static void | compute_kernel (const dt_aligned_pixel_t c2, const dt_aligned_pixel_t cos_theta_sin_theta, const dt_aligned_pixel_t cos_theta2, const dt_aligned_pixel_t sin_theta2, const dt_isotropy_t isotropy_type, dt_aligned_pixel_t kernel[9]) |
| static void | heat_PDE_diffusion (const float *const restrict high_freq, const float *const restrict low_freq, const uint8_t *const restrict mask, const int has_mask, float *const restrict output, const size_t width, const size_t height, const dt_aligned_pixel_t anisotropy, const dt_isotropy_t isotropy_type[4], const float regularization, const float variance_threshold, const float current_radius_square, const int mult, const dt_aligned_pixel_t ABCD, const float strength) |
| static float | compute_anisotropy_factor (const float user_param) |
| static gint | wavelets_process (const float *const restrict in, float *const restrict reconstructed, const uint8_t *const restrict mask, const size_t width, const size_t height, const dt_iop_diffuse_data_t *const data, const float final_radius, const float zoom, const int scales, const int has_mask, float *const restrict HF[10], float *const restrict LF_odd, float *const restrict LF_even) |
| static void | build_mask (const float *const restrict input, uint8_t *const restrict mask, const float threshold, const size_t width, const size_t height) |
| static void | inpaint_mask (float *const restrict inpainted, const float *const restrict original, const uint8_t *const restrict mask, const size_t width, const size_t height) |
| void | process (dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const restrict ivoid, void *const restrict ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out) |
| void | gui_init (struct dt_iop_module_t *self) |
| #define DEBUG_DUMP_PFM 0 |
| #define H 1 |
| #define KAPPA 0.25f |
| #define MAX_NUM_SCALES 10 |
| typedef struct dt_iop_diffuse_params_t dt_iop_diffuse_data_t |
| typedef struct dt_iop_diffuse_global_data_t dt_iop_diffuse_global_data_t |
| typedef struct dt_iop_diffuse_gui_data_t dt_iop_diffuse_gui_data_t |
| typedef struct dt_iop_diffuse_params_t dt_iop_diffuse_params_t |
| typedef enum dt_isotropy_t dt_isotropy_t |
| enum dt_isotropy_t |
| const char * aliases | ( | ) |
|
inlinestatic |
|
inlinestatic |
References for_each_channel, and kernel().
Referenced by compute_kernel().
|
inlinestatic |
References DT_ISOTROPY_GRADIENT, DT_ISOTROPY_ISOPHOTE, and DT_ISOTROPY_ISOTROPE.
Referenced by wavelets_process().
|
inlinestatic |
References sqf().
Referenced by wavelets_process().
|
inlinestatic |
References build_matrix(), c2, DT_ISOTROPY_GRADIENT, DT_ISOTROPY_ISOPHOTE, DT_ISOTROPY_ISOTROPE, isotrope_laplacian(), kernel(), rotation_matrix_gradient(), and rotation_matrix_isophote().
Referenced by heat_PDE_diffusion().
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References IOP_CS_RGB.
| int default_group | ( | ) |
References IOP_GROUP_SHARPNESS.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
|
inlinestatic |
References for_each_channel.
Referenced by heat_PDE_diffusion().
|
inlinestatic |
References for_each_channel.
| int flags | ( | ) |
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
|
inlinestatic |
References ABCD, c2, compute_kernel(), dt_fast_expf_4wide(), DT_IS_ALIGNED, dwt_interleave_rows(), find_gradients(), for_each_channel, H, height, MAX, MIN, sqf(), strength(), and width.
Referenced by wavelets_process().
| void init_presets | ( | dt_iop_module_so_t * | self | ) |
References DEVELOP_BLEND_CS_RGB_SCENE, dt_gui_presets_add_generic(), and dt_iop_module_so_t::op.
|
inlinestatic |
|
inlinestatic |
References DT_ALIGNED_ARRAY, for_four_channels, gaussian_noise(), height, splitmix32(), width, and xoshiro128plus().
Referenced by process().
|
inlinestatic |
References for_each_channel, and kernel().
Referenced by compute_kernel().
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
References dt_iop_module_t::default_params, and dt_iop_diffuse_params_t::radius_center.
| const char * name | ( | ) |
Referenced by wavelets_process().
| void process | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const restrict | ivoid, | ||
| void *const restrict | ovoid, | ||
| const dt_iop_roi_t *const | roi_in, | ||
| const dt_iop_roi_t *const | roi_out | ||
| ) |
References B_SPLINE_SIGMA, build_mask(), dt_dev_pixelpipe_iop_t::data, dt_alloc_align, dt_alloc_align_float(), dt_control_log(), dt_free_align, DT_IS_ALIGNED, error(), FALSE, height, dt_iop_roi_t::height, inpaint_mask(), dt_iop_diffuse_params_t::iterations, MAX, MAX_NUM_SCALES, num_steps_to_reach_equivalent_sigma(), dt_iop_diffuse_params_t::radius, dt_iop_diffuse_params_t::radius_center, dt_iop_roi_t::scale, dt_iop_diffuse_params_t::threshold, TRUE, wavelets_process(), width, and dt_iop_roi_t::width.
|
inlinestatic |
References c2, and for_each_channel.
Referenced by compute_kernel().
|
inlinestatic |
References c2, and for_each_channel.
Referenced by compute_kernel().
| void tiling_callback | ( | struct dt_iop_module_t * | self, |
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| const dt_iop_roi_t * | roi_in, | ||
| const dt_iop_roi_t * | roi_out, | ||
| struct dt_develop_tiling_t * | tiling | ||
| ) |
References B_SPLINE_SIGMA, dt_dev_pixelpipe_iop_t::data, MAX_NUM_SCALES, num_steps_to_reach_equivalent_sigma(), dt_iop_diffuse_params_t::radius, dt_iop_diffuse_params_t::radius_center, and dt_iop_roi_t::scale.
|
inlinestatic |
References ABCD, dt_iop_diffuse_params_t::anisotropy_first, dt_iop_diffuse_params_t::anisotropy_fourth, dt_iop_diffuse_params_t::anisotropy_second, dt_iop_diffuse_params_t::anisotropy_third, B_SPLINE_SIGMA, check_isotropy_mode(), compute_anisotropy_factor(), decompose_2D_Bspline(), DT_ALIGNED_ARRAY, DT_ALIGNED_PIXEL, dt_alloc_perthread_float(), dt_free_align, equivalent_sigma_at_step(), FALSE, dt_iop_diffuse_params_t::first, dt_iop_diffuse_params_t::fourth, heat_PDE_diffusion(), height, KAPPA, name(), dt_iop_diffuse_params_t::radius, dt_iop_diffuse_params_t::radius_center, dt_iop_diffuse_params_t::regularization, dt_iop_diffuse_params_t::second, dt_iop_diffuse_params_t::sharpness, sqf(), strength(), dt_iop_diffuse_params_t::third, TRUE, dt_iop_diffuse_params_t::variance_threshold, and width.
Referenced by process().