![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <assert.h>#include <math.h>#include <stdlib.h>#include <string.h>#include "bauhaus/bauhaus.h"#include "common/box_filters.h"#include "common/bspline.h"#include "common/opencl.h"#include "common/imagebuf.h"#include "common/fast_guided_filter.h"#include "control/control.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_math.h"#include "develop/imageop_gui.h"#include "develop/noise_generator.h"#include "develop/tiling.h"#include "gui/gtk.h"#include "iop/iop_api.h"#include <gtk/gtk.h>#include <inttypes.h>
Include dependency graph for highlights.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_highlights_params_t |
| struct | dt_iop_highlights_gui_data_t |
| struct | dt_iop_highlights_global_data_t |
Macros | |
| #define | MAX_NUM_SCALES 12 |
| #define | REDUCESIZE 64 |
| #define | DS_FACTOR 4 |
| #define | DEBUG_DUMP_PFM 0 |
| #define | SQRT3 1.7320508075688772935274463415058723669L |
| #define | SQRT12 3.4641016151377545870548926830117447339L |
Typedefs | |
| typedef enum dt_iop_highlights_mode_t | dt_iop_highlights_mode_t |
| typedef enum dt_atrous_wavelets_scales_t | dt_atrous_wavelets_scales_t |
| typedef struct dt_iop_highlights_params_t | dt_iop_highlights_params_t |
| typedef struct dt_iop_highlights_gui_data_t | dt_iop_highlights_gui_data_t |
| typedef dt_iop_highlights_params_t | dt_iop_highlights_data_t |
| typedef struct dt_iop_highlights_global_data_t | dt_iop_highlights_global_data_t |
| typedef enum diffuse_reconstruct_variant_t | diffuse_reconstruct_variant_t |
Enumerations | |
| enum | dt_iop_highlights_mode_t { DT_IOP_HIGHLIGHTS_CLIP = 0 , DT_IOP_HIGHLIGHTS_LCH = 1 , DT_IOP_HIGHLIGHTS_INPAINT = 2 , DT_IOP_HIGHLIGHTS_LAPLACIAN = 3 } |
| enum | dt_atrous_wavelets_scales_t { WAVELETS_1_SCALE = 0 , WAVELETS_2_SCALE = 1 , WAVELETS_3_SCALE = 2 , WAVELETS_4_SCALE = 3 , WAVELETS_5_SCALE = 4 , WAVELETS_6_SCALE = 5 , WAVELETS_7_SCALE = 6 , WAVELETS_8_SCALE = 7 , WAVELETS_9_SCALE = 8 , WAVELETS_10_SCALE = 9 , WAVELETS_11_SCALE = 10 , WAVELETS_12_SCALE = 11 } |
| enum | diffuse_reconstruct_variant_t { DIFFUSE_RECONSTRUCT_RGB = 0 , DIFFUSE_RECONSTRUCT_CHROMA } |
| enum | wavelets_scale_t { ANY_SCALE = 1 << 0 , FIRST_SCALE = 1 << 1 , LAST_SCALE = 1 << 2 } |
Functions | |
| const char * | name () |
| 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, const dt_dev_pixelpipe_iop_t *piece) |
| void | output_format (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_buffer_dsc_t *dsc) |
| void | autoset (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *input) |
| int | legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version) |
| static cl_int | process_laplacian_bayer_cl (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const dt_aligned_pixel_t clips) |
| static cl_int | process_laplacian_xtrans_cl (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const dt_aligned_pixel_t clips) |
| int | process_cl (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out) |
| void | tiling_callback (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling) |
| static float | interp_pix_xtrans (const int ratio_next, const ssize_t offset_next, const float clip0, const float clip_next, const float *const in, const float *const ratios) |
| static void | interpolate_color_xtrans (const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, int dim, int dir, int other, const float *const clip, const uint8_t(*const xtrans)[6], const int pass) |
| static void | interpolate_color (const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_out, int dim, int dir, int other, const float *clip, const uint32_t filters, const int pass) |
| static __DT_CLONE_TARGETS__ void | process_lch_bayer (dt_iop_module_t *self, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const float clip) |
| static __DT_CLONE_TARGETS__ void | process_lch_xtrans (dt_iop_module_t *self, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const float clip) |
| static __DT_CLONE_TARGETS__ void | _interpolate_and_mask (const float *const restrict input, float *const restrict interpolated, float *const restrict clipping_mask, const dt_aligned_pixel_t clips, const dt_aligned_pixel_t wb, const uint32_t filters, const size_t width, const size_t height) |
| static __DT_CLONE_TARGETS__ void | _compute_laplacian_normalization (const float *const restrict input, const dt_iop_roi_t *const roi_in, const uint32_t filters, const uint8_t(*const xtrans)[6], dt_aligned_pixel_t normalization) |
| static __DT_CLONE_TARGETS__ void | _build_xtrans_bilinear_lookup (int32_t lookup[6][6][32], const dt_iop_roi_t *const roi_in, const uint8_t(*const xtrans)[6]) |
| static __DT_CLONE_TARGETS__ void | _interpolate_and_mask_xtrans (const float *const restrict input, float *const restrict interpolated, float *const restrict clipping_mask, const dt_aligned_pixel_t clips, const dt_aligned_pixel_t wb, const dt_iop_roi_t *const roi_in, const int32_t lookup[6][6][32], const uint8_t(*const xtrans)[6], const size_t width, const size_t height) |
| static __DT_CLONE_TARGETS__ void | _remosaic_and_replace (const float *const restrict input, const float *const restrict interpolated, const float *const restrict clipping_mask, float *const restrict output, const dt_aligned_pixel_t wb, const uint32_t filters, const size_t width, const size_t height) |
| static __DT_CLONE_TARGETS__ void | _remosaic_and_replace_xtrans (const float *const restrict input, const float *const restrict interpolated, const float *const restrict clipping_mask, float *const restrict output, const dt_aligned_pixel_t wb, const dt_iop_roi_t *const roi_in, const uint8_t(*const xtrans)[6], const size_t width, const size_t height) |
| static | __attribute__ ((always_inline)) |
| static __DT_CLONE_TARGETS__ void | guide_laplacians (const float *const restrict high_freq, const float *const restrict low_freq, const float *const restrict clipping_mask, float *const restrict output, const size_t width, const size_t height, const int mult, const float noise_level, const int salt, const uint8_t scale, const float radius_sq) |
| static __DT_CLONE_TARGETS__ void | heat_PDE_diffusion (const float *const restrict high_freq, const float *const restrict low_freq, const float *const restrict clipping_mask, float *const restrict output, const size_t width, const size_t height, const int mult, const uint8_t scale, const float first_order_factor) |
| static int | wavelets_process (const float *const restrict in, float *const restrict reconstructed, const float *const restrict clipping_mask, const size_t width, const size_t height, const int scales, float *const restrict HF, float *const restrict LF_odd, float *const restrict LF_even, const diffuse_reconstruct_variant_t variant, const float noise_level, const int salt, const float first_order_factor) |
| static __DT_CLONE_TARGETS__ int | process_laplacian_bayer (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const 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, const dt_aligned_pixel_t clips) |
| static __DT_CLONE_TARGETS__ int | process_laplacian_xtrans (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const 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, const dt_aligned_pixel_t clips) |
| static cl_int | wavelets_process_cl (const int devid, cl_mem in, cl_mem reconstructed, cl_mem reconstructed_scratch, cl_mem clipping_mask, const size_t sizes[3], const int width, const int height, dt_iop_highlights_global_data_t *const gd, const int scales, cl_mem HF, cl_mem LF_odd, cl_mem LF_even, const diffuse_reconstruct_variant_t variant, const float noise_level, const int salt, const float solid_color) |
| static __DT_CLONE_TARGETS__ void | process_clip (const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const float clip) |
| static __DT_CLONE_TARGETS__ void | process_visualize (const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const uint32_t filters, dt_iop_highlights_data_t *data) |
| __DT_CLONE_TARGETS__ int | process (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid) |
| void | commit_params (struct dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| static gboolean | enable (dt_image_t *image) |
| gboolean | force_enable (struct dt_iop_module_t *self, const gboolean current_state) |
| void | init_global (dt_iop_module_so_t *module) |
| void | cleanup_global (dt_iop_module_so_t *module) |
| void | init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous) |
| void | gui_update (struct dt_iop_module_t *self) |
| Refresh GUI controls from current params and configuration. | |
| void | reload_defaults (dt_iop_module_t *module) |
| static void | _visualize_callback (GtkWidget *quad, gpointer user_data) |
| void | gui_focus (struct dt_iop_module_t *self, gboolean in) |
| void | gui_init (struct dt_iop_module_t *self) |
| #define DEBUG_DUMP_PFM 0 |
Definition at line 87 of file highlights.c.
| #define DS_FACTOR 4 |
Definition at line 84 of file highlights.c.
| #define MAX_NUM_SCALES 12 |
Definition at line 80 of file highlights.c.
| #define REDUCESIZE 64 |
Definition at line 81 of file highlights.c.
| #define SQRT12 3.4641016151377545870548926830117447339L |
Definition at line 816 of file highlights.c.
| #define SQRT3 1.7320508075688772935274463415058723669L |
Definition at line 815 of file highlights.c.
| typedef enum dt_atrous_wavelets_scales_t dt_atrous_wavelets_scales_t |
Definition at line 160 of file highlights.c.
| typedef struct dt_iop_highlights_global_data_t dt_iop_highlights_global_data_t |
| typedef struct dt_iop_highlights_gui_data_t dt_iop_highlights_gui_data_t |
| typedef enum dt_iop_highlights_mode_t dt_iop_highlights_mode_t |
| typedef struct dt_iop_highlights_params_t dt_iop_highlights_params_t |
| Enumerator | |
|---|---|
| DIFFUSE_RECONSTRUCT_RGB | |
| DIFFUSE_RECONSTRUCT_CHROMA | |
Definition at line 1420 of file highlights.c.
Definition at line 113 of file highlights.c.
| Enumerator | |
|---|---|
| DT_IOP_HIGHLIGHTS_CLIP | |
| DT_IOP_HIGHLIGHTS_LCH | |
| DT_IOP_HIGHLIGHTS_INPAINT | |
| DT_IOP_HIGHLIGHTS_LAPLACIAN | |
Definition at line 105 of file highlights.c.
| enum wavelets_scale_t |
| Enumerator | |
|---|---|
| ANY_SCALE | |
| FIRST_SCALE | |
| LAST_SCALE | |
Definition at line 1427 of file highlights.c.
|
inlinestatic |
Definition at line 1435 of file highlights.c.
References ANY_SCALE, FIRST_SCALE, and LAST_SCALE.
|
static |
Build the X-Trans bilinear interpolation lookup for the current ROI phase.
The lookup keeps the contributing 3x3 neighbours explicit for each position of the 6x6 X-Trans period so CPU and OpenCL guided-laplacian paths start from the same simple bilinear reconstruction.
Definition at line 1231 of file highlights.c.
References __OMP_PARALLEL_FOR__, f, FCxtrans(), lookup(), row, weight(), and x.
Referenced by process_laplacian_xtrans(), and process_laplacian_xtrans_cl().
|
static |
Compute channel normalization factors from the current raw ROI.
Guided Laplacians only needs a relative RGB normalization before the temporary bilinear reconstruction. Using the average measured value of each CFA color in the current tile keeps the normalization explicit and local to the data being reconstructed, instead of relying on the white balance declared upstream.
Definition at line 1192 of file highlights.c.
References __OMP_PARALLEL_FOR__, ALPHA, BLUE, FC(), FCxtrans(), GREEN, dt_iop_roi_t::height, i, RED, value, and dt_iop_roi_t::width.
Referenced by process_laplacian_bayer(), and process_laplacian_xtrans().
|
static |
Definition at line 1048 of file highlights.c.
References __OMP_PARALLEL_FOR__, B, BLUE, FC(), for_each_channel, GREEN, height, i, k, R, RED, RGB, and width.
Referenced by process_laplacian_bayer().
|
static |
Bilinearly demosaic the X-Trans raw mosaic and record clipped colors.
Guided Laplacians operates on temporary RGB data. For X-Trans we use the same lightweight bilinear neighbourhood as the linear VNG stage so the diffusion begins from a simple and explicit reconstruction.
Definition at line 1276 of file highlights.c.
References __OMP_PARALLEL_FOR__, ALPHA, BLUE, f, FCxtrans(), for_each_channel, GREEN, height, i, k, lookup(), MAX, MIN, RED, RGB, value, width, and x.
Referenced by process_laplacian_xtrans().
|
static |
Definition at line 1372 of file highlights.c.
References __OMP_PARALLEL_FOR__, ALPHA, FC(), height, i, and width.
Referenced by process_laplacian_bayer().
|
static |
Reproject the reconstructed RGB back onto the X-Trans mosaic.
Definition at line 1397 of file highlights.c.
References __OMP_PARALLEL_FOR__, ALPHA, FCxtrans(), height, i, and width.
Referenced by process_laplacian_xtrans().
Definition at line 2995 of file highlights.c.
References darktable, dt_iop_module_t::dev, dt_bauhaus_widget_get_quad_active(), DT_DEV_PIXELPIPE_DISPLAY_NONE, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, dt_dev_pixelpipe_update_history_main, dt_iop_set_cache_bypass(), g, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::request_mask_display, and dt_gui_gtk_t::reset.
Referenced by gui_init().
| void autoset | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| const struct dt_dev_pixelpipe_iop_t * | piece, | ||
| const void * | input | ||
| ) |
Definition at line 226 of file highlights.c.
References __OMP_PARALLEL_FOR__, dt_dev_pixelpipe_iop_t::dsc_in, FC(), FCxtrans(), dt_iop_buffer_dsc_t::filters, dt_iop_roi_t::height, i, MAX, max, MIN, p, dt_iop_module_t::params, dt_iop_buffer_dsc_t::processed_maximum, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_roi_t::width, dt_iop_roi_t::x, dt_iop_buffer_dsc_t::xtrans, and dt_iop_roi_t::y.
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 2897 of file highlights.c.
References dt_iop_module_so_t::data, dt_free, dt_opencl_free_kernel(), dt_iop_highlights_global_data_t::kernel_filmic_bspline_horizontal, dt_iop_highlights_global_data_t::kernel_filmic_bspline_horizontal_local, dt_iop_highlights_global_data_t::kernel_filmic_bspline_vertical, dt_iop_highlights_global_data_t::kernel_filmic_bspline_vertical_local, dt_iop_highlights_global_data_t::kernel_highlights_1f_clip, dt_iop_highlights_global_data_t::kernel_highlights_1f_lch_bayer, dt_iop_highlights_global_data_t::kernel_highlights_1f_lch_xtrans, dt_iop_highlights_global_data_t::kernel_highlights_4f_clip, dt_iop_highlights_global_data_t::kernel_highlights_bilinear_and_mask, dt_iop_highlights_global_data_t::kernel_highlights_bilinear_and_mask_xtrans, dt_iop_highlights_global_data_t::kernel_highlights_box_blur, dt_iop_highlights_global_data_t::kernel_highlights_diffuse_color, dt_iop_highlights_global_data_t::kernel_highlights_false_color, dt_iop_highlights_global_data_t::kernel_highlights_guide_laplacians, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_first, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_first_xtrans, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_second, dt_iop_highlights_global_data_t::kernel_highlights_remosaic_and_replace, dt_iop_highlights_global_data_t::kernel_highlights_remosaic_and_replace_xtrans, and dt_iop_highlights_global_data_t::kernel_interpolate_bilinear.
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 2932 of file highlights.c.
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| void commit_params | ( | struct dt_iop_module_t * | self, |
| dt_iop_params_t * | p1, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 2806 of file highlights.c.
References dt_dev_pixelpipe_iop_t::cache_output_on_ram, d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_iop_t::dsc_in, dt_dev_pixelpipe_iop_t::dsc_out, dt_image_pipe_class(), dt_image_pipe_class_name(), dt_iop_fmt_log, DT_IOP_HIGHLIGHTS_INPAINT, DT_IOP_HIGHLIGHTS_LAPLACIAN, dt_dev_pixelpipe_iop_t::enabled, dt_iop_buffer_dsc_t::filters, dt_develop_t::image_storage, k, m, p, dt_dev_pixelpipe_iop_t::process_cl_ready, dt_iop_buffer_dsc_t::processed_maximum, and TRUE.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 213 of file highlights.c.
References dt_iop_buffer_dsc_t::cst, dt_dev_pixelpipe_iop_t::dsc_in, IOP_CS_RAW, and IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 203 of file highlights.c.
References IOP_GROUP_REPAIR.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 194 of file highlights.c.
References dt_iop_set_description().
|
static |
Definition at line 2846 of file highlights.c.
References dt_image_is_monochrome(), and dt_image_needs_rawprepare().
Referenced by _alternative_mode(), _gui_update_structure_states(), _ioporder_create_graph_node(), dt_dev_add_history_item_ext(), dt_dev_add_history_item_real(), dt_gui_preferences_show(), dt_iop_gui_commit_iop_order_change(), dt_thumbnail_alternative_mode(), dt_thumbtable_set_draw_group_borders(), dt_thumbtable_set_focus_peaking(), dt_thumbtable_set_focus_regions(), and force_enable().
| int flags | ( | ) |
Definition at line 208 of file highlights.c.
References IOP_FLAGS_ALLOW_TILING, and IOP_FLAGS_SUPPORTS_BLENDING.
| gboolean force_enable | ( | struct dt_iop_module_t * | self, |
| const gboolean | current_state | ||
| ) |
Definition at line 2853 of file highlights.c.
References dt_iop_module_t::dev, dt_image_pipe_class(), dt_image_pipe_class_name(), dt_iop_fmt_log, enable(), dt_develop_t::image_storage, and state.
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
Definition at line 2938 of file highlights.c.
References dt_iop_module_t::dev, dt_image_t::dsc, dt_bauhaus_widget_set_quad_visibility(), DT_IOP_HIGHLIGHTS_LAPLACIAN, dt_iop_buffer_dsc_t::filters, g, dt_iop_module_t::gui_data, dt_develop_t::image_storage, p, and dt_iop_module_t::params.
Referenced by gui_update().
| void gui_focus | ( | struct dt_iop_module_t * | self, |
| gboolean | in | ||
| ) |
Definition at line 3014 of file highlights.c.
References dt_iop_module_t::dev, dt_bauhaus_widget_set_quad_active(), dt_dev_pixelpipe_update_history_main, FALSE, g, and dt_iop_module_t::gui_data.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
Definition at line 3026 of file highlights.c.
References _visualize_callback(), dt_bauhaus_combobox_from_params(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_range(), dt_bauhaus_widget_set_quad_active(), dt_bauhaus_widget_set_quad_paint(), dt_bauhaus_widget_set_quad_toggle(), DT_GUI_BOX_SPACING, dt_ui_label_new(), dtgtk_cairo_paint_showmask(), FALSE, g, IOP_GUI_ALLOC, TRUE, and dt_iop_module_t::widget.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
Definition at line 2955 of file highlights.c.
References dt_iop_module_t::default_enabled, dt_iop_module_t::dev, dt_bauhaus_widget_set_quad_active(), dt_image_is_monochrome(), dt_image_needs_rawprepare(), dt_iop_module_t::enabled, FALSE, g, gui_changed(), dt_iop_module_t::gui_data, dt_iop_module_t::hide_enable_button, dt_develop_t::image_storage, and dt_iop_module_t::widget.
|
inlinestatic |
Definition at line 1445 of file highlights.c.
References __OMP_PARALLEL_FOR__, ALPHA, BLUE, DT_ALIGNED_ARRAY, DT_IS_ALIGNED, dt_noise_generator_simd(), DT_NOISE_POISSONIAN, dt_simd_set1(), dt_store_simd_aligned(), dwt_interleave_rows(), eps, FALSE, FIRST_SCALE, flip, for_each_channel, GREEN, height, i, LAST_SCALE, MAX, MIN, noise, out, RED, row, row0, row1, row2, sigma, splitmix32(), state, TRUE, width, and xoshiro128plus().
Referenced by wavelets_process().
|
inlinestatic |
Definition at line 1612 of file highlights.c.
References __OMP_PARALLEL_FOR__, ALPHA, B_SPLINE_TO_LAPLACIAN, BLUE, DT_ALIGNED_ARRAY, DT_IS_ALIGNED, dwt_interleave_rows(), FIRST_SCALE, for_each_channel, for_four_channels, GREEN, height, i, k, LAST_SCALE, MAX, MIN, out, RED, row, and width.
Referenced by wavelets_process().
| void init_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 2866 of file highlights.c.
References dt_opencl_create_kernel(), dt_iop_highlights_global_data_t::kernel_filmic_bspline_horizontal, dt_iop_highlights_global_data_t::kernel_filmic_bspline_horizontal_local, dt_iop_highlights_global_data_t::kernel_filmic_bspline_vertical, dt_iop_highlights_global_data_t::kernel_filmic_bspline_vertical_local, dt_iop_highlights_global_data_t::kernel_highlights_1f_clip, dt_iop_highlights_global_data_t::kernel_highlights_1f_lch_bayer, dt_iop_highlights_global_data_t::kernel_highlights_1f_lch_xtrans, dt_iop_highlights_global_data_t::kernel_highlights_4f_clip, dt_iop_highlights_global_data_t::kernel_highlights_bilinear_and_mask, dt_iop_highlights_global_data_t::kernel_highlights_bilinear_and_mask_xtrans, dt_iop_highlights_global_data_t::kernel_highlights_box_blur, dt_iop_highlights_global_data_t::kernel_highlights_diffuse_color, dt_iop_highlights_global_data_t::kernel_highlights_false_color, dt_iop_highlights_global_data_t::kernel_highlights_guide_laplacians, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_first, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_first_xtrans, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_second, dt_iop_highlights_global_data_t::kernel_highlights_remosaic_and_replace, dt_iop_highlights_global_data_t::kernel_highlights_remosaic_and_replace_xtrans, and dt_iop_highlights_global_data_t::kernel_interpolate_bilinear.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 2926 of file highlights.c.
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
|
inlinestatic |
Definition at line 553 of file highlights.c.
Referenced by interpolate_color_xtrans().
|
inlinestatic |
Definition at line 706 of file highlights.c.
References FC(), dt_iop_roi_t::height, i, k, out, ovoid, and dt_iop_roi_t::width.
Referenced by process().
|
inlinestatic |
Definition at line 580 of file highlights.c.
References FCxtrans(), dt_iop_roi_t::height, i, interp_pix_xtrans(), k, out, ovoid, r, and dt_iop_roi_t::width.
Referenced by process().
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
Definition at line 250 of file highlights.c.
References dt_iop_highlights_params_t::clip, n, dt_iop_highlights_params_t::noise_level, and dt_iop_highlights_params_t::solid_color.
| const char * name | ( | ) |
Definition at line 189 of file highlights.c.
Referenced by wavelets_process().
| void output_format | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece, | ||
| dt_iop_buffer_dsc_t * | dsc | ||
| ) |
Definition at line 220 of file highlights.c.
References default_output_format().
| __DT_CLONE_TARGETS__ int process | ( | struct dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const | ivoid, | ||
| void *const | ovoid | ||
| ) |
Definition at line 2697 of file highlights.c.
References __OMP_PARALLEL_FOR__, dt_iop_highlights_params_t::clip, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_iop_t::dsc_in, DT_DEV_PIXELPIPE_DISPLAY_MASK, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, DT_IOP_HIGHLIGHTS_CLIP, DT_IOP_HIGHLIGHTS_INPAINT, DT_IOP_HIGHLIGHTS_LAPLACIAN, DT_IOP_HIGHLIGHTS_LCH, dt_iop_buffer_dsc_t::filters, g, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, dt_iop_roi_t::height, i, interpolate_color(), interpolate_color_xtrans(), IS_NULL_PTR, dt_dev_pixelpipe_t::mask_display, dt_iop_highlights_params_t::mode, ovoid, dt_develop_t::pipe, process_clip(), process_laplacian_bayer(), process_laplacian_xtrans(), process_lch_bayer(), process_lch_xtrans(), process_visualize(), dt_iop_buffer_dsc_t::processed_maximum, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_roi_t::width, and dt_iop_buffer_dsc_t::xtrans.
| int process_cl | ( | struct dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| cl_mem | dev_in, | ||
| cl_mem | dev_out | ||
| ) |
Definition at line 321 of file highlights.c.
References d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_t::devid, dt_dev_pixelpipe_iop_t::dsc_in, DT_DEBUG_OPENCL, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, DT_IOP_HIGHLIGHTS_CLIP, DT_IOP_HIGHLIGHTS_LAPLACIAN, DT_IOP_HIGHLIGHTS_LCH, dt_opencl_copy_host_to_device_constant(), DT_OPENCL_DEFAULT_ERROR, dt_opencl_enqueue_kernel_2d(), dt_opencl_enqueue_kernel_2d_with_local(), dt_opencl_local_buffer_opt(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_print(), error(), FALSE, dt_iop_buffer_dsc_t::filters, g, dt_iop_module_t::global_data, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, height, dt_iop_roi_t::height, IS_NULL_PTR, dt_iop_highlights_global_data_t::kernel_highlights_1f_clip, dt_iop_highlights_global_data_t::kernel_highlights_1f_lch_bayer, dt_iop_highlights_global_data_t::kernel_highlights_1f_lch_xtrans, dt_iop_highlights_global_data_t::kernel_highlights_4f_clip, dt_iop_highlights_global_data_t::kernel_highlights_false_color, dt_develop_t::pipe, process_laplacian_bayer_cl(), process_laplacian_xtrans_cl(), dt_iop_buffer_dsc_t::processed_maximum, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, ROUNDUP, ROUNDUPDHT, ROUNDUPDWD, dt_opencl_local_buffer_t::sizex, dt_opencl_local_buffer_t::sizey, TRUE, width, dt_iop_roi_t::width, dt_iop_roi_t::x, dt_opencl_local_buffer_t::xoffset, dt_iop_buffer_dsc_t::xtrans, and dt_iop_roi_t::y.
|
static |
Definition at line 2643 of file highlights.c.
References __OMP_PARALLEL_FOR_SIMD__, ch, dt_iop_buffer_dsc_t::channels, dt_dev_pixelpipe_iop_t::dsc_in, dt_iop_buffer_dsc_t::filters, dt_iop_roi_t::height, k, MIN, out, ovoid, and dt_iop_roi_t::width.
Referenced by process().
|
static |
Definition at line 1814 of file highlights.c.
References _compute_laplacian_normalization(), _interpolate_and_mask(), _remosaic_and_replace(), dt_dev_pixelpipe_iop_t::data, DIFFUSE_RECONSTRUCT_CHROMA, DIFFUSE_RECONSTRUCT_RGB, DS_FACTOR, dt_dev_pixelpipe_iop_t::dsc_in, dt_box_mean(), dt_dev_get_module_scale(), dt_pixelpipe_cache_alloc_align_float, dt_pixelpipe_cache_free_align, error(), dt_iop_buffer_dsc_t::filters, height, dt_iop_roi_t::height, i, interpolate_bilinear(), IS_NULL_PTR, dt_iop_highlights_params_t::iterations, MAX_NUM_SCALES, dt_iop_highlights_params_t::noise_level, ovoid, dt_iop_highlights_params_t::scales, size, dt_iop_highlights_params_t::solid_color, wavelets_process(), width, and dt_iop_roi_t::width.
Referenced by process().
|
static |
Definition at line 2171 of file highlights.c.
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::devid, DIFFUSE_RECONSTRUCT_CHROMA, DIFFUSE_RECONSTRUCT_RGB, DS_FACTOR, dt_dev_pixelpipe_iop_t::dsc_in, DT_DEBUG_OPENCL, dt_dev_get_module_scale(), dt_opencl_alloc_device(), dt_opencl_alloc_device_buffer(), dt_opencl_copy_host_to_device_constant(), DT_OPENCL_DEFAULT_ERROR, dt_opencl_enqueue_kernel_2d(), dt_opencl_enqueue_kernel_2d_with_local(), dt_opencl_local_buffer_opt(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_print(), error(), dt_iop_buffer_dsc_t::filters, dt_iop_module_t::global_data, height, dt_iop_roi_t::height, i, IS_NULL_PTR, dt_iop_highlights_params_t::iterations, dt_iop_highlights_global_data_t::kernel_highlights_bilinear_and_mask, dt_iop_highlights_global_data_t::kernel_highlights_box_blur, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_first, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_second, dt_iop_highlights_global_data_t::kernel_highlights_remosaic_and_replace, dt_iop_highlights_global_data_t::kernel_interpolate_bilinear, MAX_NUM_SCALES, MIN, dt_iop_highlights_params_t::noise_level, REDUCESIZE, ROUNDUP, ROUNDUPDHT, ROUNDUPDWD, dt_iop_highlights_params_t::scales, dt_opencl_local_buffer_t::sizex, dt_opencl_local_buffer_t::sizey, dt_iop_highlights_params_t::solid_color, swap(), TRUE, wavelets_process_cl(), width, dt_iop_roi_t::width, dt_iop_roi_t::x, dt_opencl_local_buffer_t::xoffset, and dt_iop_roi_t::y.
Referenced by process_cl().
|
static |
Definition at line 1913 of file highlights.c.
References _build_xtrans_bilinear_lookup(), _compute_laplacian_normalization(), _interpolate_and_mask_xtrans(), _remosaic_and_replace_xtrans(), dt_dev_pixelpipe_iop_t::data, DIFFUSE_RECONSTRUCT_CHROMA, DIFFUSE_RECONSTRUCT_RGB, DS_FACTOR, dt_dev_pixelpipe_iop_t::dsc_in, dt_box_mean(), dt_dev_get_module_scale(), dt_pixelpipe_cache_alloc_align_float, dt_pixelpipe_cache_free_align, error(), height, dt_iop_roi_t::height, i, interpolate_bilinear(), IS_NULL_PTR, dt_iop_highlights_params_t::iterations, lookup(), MAX_NUM_SCALES, dt_iop_highlights_params_t::noise_level, ovoid, dt_iop_highlights_params_t::scales, size, dt_iop_highlights_params_t::solid_color, void(), wavelets_process(), width, dt_iop_roi_t::width, and dt_iop_buffer_dsc_t::xtrans.
Referenced by process().
|
static |
Definition at line 2404 of file highlights.c.
References _build_xtrans_bilinear_lookup(), dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::devid, DIFFUSE_RECONSTRUCT_CHROMA, DIFFUSE_RECONSTRUCT_RGB, DS_FACTOR, dt_dev_pixelpipe_iop_t::dsc_in, DT_DEBUG_OPENCL, dt_dev_get_module_scale(), dt_opencl_alloc_device(), dt_opencl_alloc_device_buffer(), dt_opencl_copy_host_to_device_constant(), DT_OPENCL_DEFAULT_ERROR, dt_opencl_enqueue_kernel_2d(), dt_opencl_enqueue_kernel_2d_with_local(), dt_opencl_local_buffer_opt(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_print(), error(), dt_iop_module_t::global_data, height, dt_iop_roi_t::height, i, IS_NULL_PTR, dt_iop_highlights_params_t::iterations, dt_iop_highlights_global_data_t::kernel_highlights_bilinear_and_mask_xtrans, dt_iop_highlights_global_data_t::kernel_highlights_box_blur, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_first_xtrans, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_second, dt_iop_highlights_global_data_t::kernel_highlights_remosaic_and_replace_xtrans, dt_iop_highlights_global_data_t::kernel_interpolate_bilinear, lookup(), MAX_NUM_SCALES, MIN, dt_iop_highlights_params_t::noise_level, REDUCESIZE, ROUNDUP, ROUNDUPDHT, ROUNDUPDWD, dt_iop_highlights_params_t::scales, dt_opencl_local_buffer_t::sizex, dt_opencl_local_buffer_t::sizey, dt_iop_highlights_params_t::solid_color, swap(), TRUE, wavelets_process_cl(), width, dt_iop_roi_t::width, dt_iop_roi_t::x, dt_opencl_local_buffer_t::xoffset, dt_iop_buffer_dsc_t::xtrans, and dt_iop_roi_t::y.
Referenced by process_cl().
|
static |
Definition at line 819 of file highlights.c.
References __OMP_PARALLEL_FOR__, B, C, dt_dev_pixelpipe_iop_t::dsc_in, FC(), dt_iop_buffer_dsc_t::filters, H, dt_iop_roi_t::height, i, L, MAX, MIN, out, ovoid, R, RGB, SQRT12, SQRT3, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by process().
|
static |
Definition at line 917 of file highlights.c.
References __OMP_PARALLEL_FOR__, B, C, dt_dev_pixelpipe_iop_t::dsc_in, FCxtrans(), H, height, dt_iop_roi_t::height, i, L, MAX, MIN, out, ovoid, R, RGB, SQRT12, SQRT3, dt_iop_roi_t::width, and dt_iop_buffer_dsc_t::xtrans.
Referenced by process().
|
static |
Definition at line 2672 of file highlights.c.
References __OMP_FOR_SIMD__, dt_iop_highlights_params_t::clip, dt_dev_pixelpipe_iop_t::dsc_in, FC(), height, dt_iop_roi_t::height, i, out, ovoid, dt_iop_buffer_dsc_t::processed_maximum, row, width, and dt_iop_roi_t::width.
Referenced by process().
| void reload_defaults | ( | dt_iop_module_t * | module | ) |
Definition at line 2973 of file highlights.c.
References dt_iop_module_t::default_enabled, dt_iop_module_t::dev, dt_bauhaus_combobox_add_full(), DT_BAUHAUS_COMBOBOX_ALIGN_RIGHT, dt_bauhaus_combobox_length(), dt_image_pipe_class(), dt_image_pipe_class_name(), dt_iop_fmt_log, DT_IOP_HIGHLIGHTS_LAPLACIAN, g, dt_iop_module_t::gui_data, dt_image_t::id, dt_develop_t::image_storage, TRUE, and dt_iop_module_t::widget.
| void tiling_callback | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| const struct dt_dev_pixelpipe_iop_t * | piece, | ||
| struct dt_develop_tiling_t * | tiling | ||
| ) |
Definition at line 485 of file highlights.c.
References d, dt_dev_pixelpipe_iop_t::data, DS_FACTOR, dt_dev_pixelpipe_iop_t::dsc_in, dt_dev_get_module_scale(), DT_IOP_HIGHLIGHTS_LAPLACIAN, DT_IOP_HIGHLIGHTS_LCH, dt_iop_buffer_dsc_t::filters, dt_iop_roi_t::height, MAX_NUM_SCALES, and dt_dev_pixelpipe_iop_t::roi_in.
|
inlinestatic |
Definition at line 1743 of file highlights.c.
References B_SPLINE_SIGMA, decompose_2D_Bspline(), DIFFUSE_RECONSTRUCT_RGB, DS_FACTOR, dt_pixelpipe_cache_alloc_perthread_float, dt_pixelpipe_cache_free_align, equivalent_sigma_at_step(), guide_laplacians(), heat_PDE_diffusion(), height, IS_NULL_PTR, name(), and width.
Referenced by process_laplacian_bayer(), and process_laplacian_xtrans().
|
inlinestatic |
Definition at line 2004 of file highlights.c.
References B_SPLINE_SIGMA, DIFFUSE_RECONSTRUCT_RGB, DS_FACTOR, DT_OPENCL_DEFAULT_ERROR, dt_opencl_enqueue_kernel_2d(), dt_opencl_enqueue_kernel_2d_with_local(), dt_opencl_local_buffer_opt(), dt_opencl_set_kernel_arg(), equivalent_sigma_at_step(), height, dt_iop_highlights_global_data_t::kernel_filmic_bspline_horizontal, dt_iop_highlights_global_data_t::kernel_filmic_bspline_horizontal_local, dt_iop_highlights_global_data_t::kernel_filmic_bspline_vertical, dt_iop_highlights_global_data_t::kernel_filmic_bspline_vertical_local, dt_iop_highlights_global_data_t::kernel_highlights_diffuse_color, dt_iop_highlights_global_data_t::kernel_highlights_guide_laplacians, ROUNDUP, ROUNDUPDHT, ROUNDUPDWD, dt_opencl_local_buffer_t::sizex, dt_opencl_local_buffer_t::sizey, width, and dt_opencl_local_buffer_t::xoffset.
Referenced by process_laplacian_bayer_cl(), and process_laplacian_xtrans_cl().