![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "widgets/bauhaus.h"#include "common/opencl.h"#include "control/user_message.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "develop/imageop_math.h"#include "develop/tiling.h"#include <assert.h>#include <math.h>#include <stdlib.h>#include <string.h>#include "iop/iop_api.h"#include "iop/highlights/clip.h"#include "iop/highlights/common.h"#include "iop/highlights/inpaint.h"#include "iop/highlights/laplacian.h"#include "iop/highlights/lch.h"#include "iop/highlights/process.h"#include <gtk/gtk.h>#include <inttypes.h>#include "widgets/label.h"
Include dependency graph for highlights.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_highlights_gui_data_t |
Typedefs | |
| typedef struct dt_iop_highlights_gui_data_t | dt_iop_highlights_gui_data_t |
|
static |
Definition at line 871 of file highlights.c.
References dt_image_is_monochrome(), and dt_image_is_mosaiced().
Referenced by force_enable(), and gui_update().
|
static |
Definition at line 653 of file highlights.c.
References DT_IOP_HIGHLIGHTS_CLIP, DT_IOP_HIGHLIGHTS_HARMONIC, DT_IOP_HIGHLIGHTS_INPAINT, DT_IOP_HIGHLIGHTS_LAPLACIAN, DT_IOP_HIGHLIGHTS_LCH, and L.
Referenced by commit_params().
|
static |
Definition at line 672 of file highlights.c.
References DT_IOP_HIGHLIGHTS_CLIP, DT_IOP_HIGHLIGHTS_HARMONIC, DT_IOP_HIGHLIGHTS_LAPLACIAN, and TRUE.
Referenced by commit_params().
|
static |
Definition at line 376 of file highlights.c.
References dt_opencl_enqueue_kernel_2d(), dt_opencl_set_kernel_arg(), height, L, ROUNDUPDHT, ROUNDUPDWD, width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by process_cl().
|
static |
Definition at line 332 of file highlights.c.
References dt_opencl_alloc_device_buffer(), dt_opencl_copy_host_to_device_constant(), DT_OPENCL_DEFAULT_ERROR, dt_opencl_enqueue_kernel_2d_with_local(), dt_opencl_read_buffer_from_device(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), height, IS_NULL_PTR, kernel(), L, and width.
Referenced by process_cl().
|
static |
Definition at line 403 of file highlights.c.
References dt_opencl_enqueue_kernel_2d(), dt_opencl_set_kernel_arg(), height, L, ROUNDUPDHT, ROUNDUPDWD, width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by process_cl().
|
static |
Definition at line 420 of file highlights.c.
References dt_opencl_copy_host_to_device_constant(), DT_OPENCL_DEFAULT_ERROR, dt_opencl_enqueue_kernel_2d_with_local(), dt_opencl_local_buffer_opt(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), height, IS_NULL_PTR, L, piece, ROUNDUP, 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 310 of file highlights.c.
References dt_opencl_copy_host_to_device_constant(), DT_OPENCL_DEFAULT_ERROR, dt_opencl_enqueue_kernel_2d(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), height, IS_NULL_PTR, L, ROUNDUPDHT, ROUNDUPDWD, width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by process_cl().
|
static |
Definition at line 296 of file highlights.c.
References ch, dt_iop_image_copy_by_size(), dt_iop_roi_t::height, L, ovoid, piece, and dt_iop_roi_t::width.
Referenced by process().
|
static |
Definition at line 266 of file highlights.c.
References __OMP_PARALLEL_FOR__, __OMP_PARALLEL_FOR_SIMD__, ch, dt_iop_roi_t::height, k, L, MIN, piece, and dt_iop_roi_t::width.
Referenced by process().
|
inlinestatic |
Definition at line 232 of file highlights.c.
References DT_IOP_HIGHLIGHTS_CLIP, DT_IOP_HIGHLIGHTS_HARMONIC, DT_IOP_HIGHLIGHTS_INPAINT, DT_IOP_HIGHLIGHTS_LAPLACIAN, DT_IOP_HIGHLIGHTS_LCH, factor, and L.
Referenced by process(), and process_cl().
Definition at line 1279 of file highlights.c.
References 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_gui_widgets_suppressed(), dt_iop_gui_data(), dt_iop_set_cache_bypass(), g, L, and dt_iop_module_t::request_mask_display.
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 139 of file highlights.c.
References __OMP_PARALLEL_FOR__, FC(), FCxtrans(), dt_iop_roi_t::height, i, L, max, MAX, MIN, p, dt_iop_module_t::params, piece, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 1055 of file highlights.c.
References dt_free, dt_opencl_free_kernel(), and L.
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 1207 of file highlights.c.
References dt_free_align, L, and piece.
| 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 791 of file highlights.c.
References _highlights_mode_name(), _highlights_mode_supported(), d, dt_iop_module_t::dev, dt_control_log(), DT_DEBUG_ALWAYS, dt_image_pipe_class(), dt_image_pipe_class_name(), dt_iop_fmt_log, DT_IOP_HIGHLIGHTS_HARMONIC, DT_IOP_HIGHLIGHTS_INPAINT, DT_IOP_HIGHLIGHTS_LAPLACIAN, dt_print(), dt_develop_t::gui_attached, dt_develop_t::image_storage, k, L, m, p, piece, dt_develop_t::pipe, pipe, 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 127 of file highlights.c.
References IOP_CS_RAW, IOP_CS_RGB, and piece.
| int default_group | ( | ) |
Definition at line 117 of file highlights.c.
References IOP_GROUP_REPAIR.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 110 of file highlights.c.
References dt_iop_set_description(), and L.
|
static |
Definition at line 879 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(), _queue_pending_commit(), dt_dev_add_history_item_ext(), dt_dev_add_history_item_real(), dt_dev_history_commit_item_now(), 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(), force_enable(), and gui_update().
| int flags | ( | ) |
Definition at line 122 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 884 of file highlights.c.
References _highlights_image_supported(), dt_iop_module_t::dev, dt_image_pipe_class(), dt_image_pipe_class_name(), dt_iop_fmt_log, dt_develop_t::image_storage, L, and state.
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
Definition at line 1213 of file highlights.c.
References dt_iop_module_t::dev, dt_image_t::dsc, dt_bauhaus_widget_set_quad_visibility(), dt_iop_gui_data(), DT_IOP_HIGHLIGHTS_HARMONIC, DT_IOP_HIGHLIGHTS_LAPLACIAN, dt_iop_buffer_dsc_t::filters, g, dt_develop_t::image_storage, L, 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 1297 of file highlights.c.
References dt_iop_module_t::dev, dt_bauhaus_widget_set_quad_active(), dt_dev_pixelpipe_update_history_main, dt_iop_gui_data(), FALSE, g, and L.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1309 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, dt_iop_module_t::gui, IOP_GUI_ALLOC, L, TRUE, and dt_iop_module_gui_t::widget.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
Definition at line 1234 of file highlights.c.
References _highlights_image_supported(), 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_bauhaus_widget_set_quad_active(), dt_iop_gui_data(), DT_IOP_HIGHLIGHTS_HARMONIC, DT_IOP_HIGHLIGHTS_LAPLACIAN, enable(), dt_iop_module_t::enabled, FALSE, g, dt_iop_module_t::gui, gui_changed(), dt_iop_module_t::hide_enable_button, dt_develop_t::image_storage, L, supported(), TRUE, and dt_iop_module_gui_t::widget.
| void init_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 898 of file highlights.c.
References dt_opencl_create_kernel(), dt_iop_highlights_global_data_t::kernel_highlights_1f_clip, and L.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 1201 of file highlights.c.
References dt_calloc_align(), and 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 | ||
| ) |
Definition at line 161 of file highlights.c.
References dt_iop_highlights_params_t::clip, L, n, dt_iop_highlights_params_t::noise_level, and dt_iop_highlights_params_t::solid_color.
| const char * name | ( | ) |
Definition at line 105 of file highlights.c.
References L.
| 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 133 of file highlights.c.
References default_output_format(), piece, and pipe.
| __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 680 of file highlights.c.
References _hl_copy_input(), _hl_count_clipped(), _hl_count_thresholds(), dt_iop_highlights_params_t::clip, dt_iop_module_t::dev, dt_dev_get_roi_filters(), DT_DEV_PIXELPIPE_DISPLAY_MASK, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, DT_HL_MIN_CLIPPED_PIXELS, dt_iop_gui_data(), DT_IOP_HIGHLIGHTS_CLIP, DT_IOP_HIGHLIGHTS_HARMONIC, DT_IOP_HIGHLIGHTS_INPAINT, DT_IOP_HIGHLIGHTS_LAPLACIAN, DT_IOP_HIGHLIGHTS_LCH, g, dt_develop_t::gui_attached, dt_iop_roi_t::height, IS_NULL_PTR, L, dt_dev_pixelpipe_t::mask_display, dt_iop_highlights_params_t::mode, ovoid, piece, dt_develop_t::pipe, pipe, process_clip(), process_harmonic(), process_inpaint_bayer(), process_inpaint_xtrans(), process_laplacian(), process_lch_bayer(), process_lch_xtrans(), process_visualize(), and dt_iop_roi_t::width.
| 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 464 of file highlights.c.
References _hl_cl_clip(), _hl_cl_count_clipped(), _hl_cl_lch_bayer(), _hl_cl_lch_xtrans(), _hl_cl_visualize(), _hl_count_thresholds(), d, dt_iop_module_t::dev, dt_dev_pixelpipe_t::devid, DT_DEBUG_OPENCL, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, DT_HL_MIN_CLIPPED_PIXELS, dt_iop_gui_data(), DT_IOP_HIGHLIGHTS_CLIP, DT_IOP_HIGHLIGHTS_HARMONIC, DT_IOP_HIGHLIGHTS_INPAINT, DT_IOP_HIGHLIGHTS_LAPLACIAN, DT_IOP_HIGHLIGHTS_LCH, DT_OPENCL_DEFAULT_ERROR, dt_opencl_enqueue_copy_image(), dt_print(), error(), FALSE, g, dt_iop_module_t::global_data, dt_develop_t::gui_attached, height, dt_iop_roi_t::height, IS_NULL_PTR, L, piece, dt_develop_t::pipe, pipe, process_harmonic_cl(), process_laplacian_bayer_cl(), process_laplacian_passthrough_cl(), process_laplacian_xtrans_cl(), TRUE, width, and dt_iop_roi_t::width.
| void reload_defaults | ( | dt_iop_module_t * | module | ) |
Definition at line 1262 of file highlights.c.
References dt_image_pipe_class(), dt_image_pipe_class_name(), dt_iop_fmt_log, and L.
| 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 577 of file highlights.c.
References d, DS_FACTOR, dt_dev_get_module_scale(), DT_IOP_HIGHLIGHTS_HARMONIC, DT_IOP_HIGHLIGHTS_LAPLACIAN, DT_IOP_HIGHLIGHTS_LCH, dt_iop_roi_t::height, L, MAX_NUM_SCALES, piece, and pipe.