![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"#include "common/colorspaces_inline_conversions.h"#include "common/debug.h"#include "common/imagebuf.h"#include "common/opencl.h"#include "control/control.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "develop/tiling.h"#include "gui/gtk.h"#include "gui/presets.h"#include "iop/iop_api.h"#include <assert.h>#include <gtk/gtk.h>#include <inttypes.h>#include <math.h>#include <stdlib.h>#include <string.h>
Include dependency graph for colorreconstruction.c:Data Structures | |
| struct | dt_iop_colorreconstruct_params1_t |
| struct | dt_iop_colorreconstruct_params2_t |
| struct | dt_iop_colorreconstruct_params_t |
| struct | dt_iop_colorreconstruct_Lab_t |
| struct | dt_iop_colorreconstruct_bilateral_frozen_t |
| struct | dt_iop_colorreconstruct_gui_data_t |
| struct | dt_iop_colorreconstruct_data_t |
| struct | dt_iop_colorreconstruct_global_data_t |
| struct | dt_iop_colorreconstruct_bilateral_t |
Macros | |
| #define | DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_S 500 |
| #define | DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_R 100 |
| #define | DT_COLORRECONSTRUCT_SPATIAL_APPROX 100.0f |
Typedefs | |
| typedef enum dt_iop_colorreconstruct_precedence_t | dt_iop_colorreconstruct_precedence_t |
| typedef struct dt_iop_colorreconstruct_params1_t | dt_iop_colorreconstruct_params1_t |
| typedef struct dt_iop_colorreconstruct_params2_t | dt_iop_colorreconstruct_params2_t |
| typedef struct dt_iop_colorreconstruct_params_t | dt_iop_colorreconstruct_params_t |
| typedef struct dt_iop_colorreconstruct_Lab_t | dt_iop_colorreconstruct_Lab_t |
| typedef struct dt_iop_colorreconstruct_bilateral_frozen_t | dt_iop_colorreconstruct_bilateral_frozen_t |
| typedef struct dt_iop_colorreconstruct_gui_data_t | dt_iop_colorreconstruct_gui_data_t |
| typedef struct dt_iop_colorreconstruct_data_t | dt_iop_colorreconstruct_data_t |
| typedef struct dt_iop_colorreconstruct_global_data_t | dt_iop_colorreconstruct_global_data_t |
| typedef struct dt_iop_colorreconstruct_bilateral_t | dt_iop_colorreconstruct_bilateral_t |
Enumerations | |
| enum | dt_iop_colorreconstruct_precedence_t { COLORRECONSTRUCT_PRECEDENCE_NONE , COLORRECONSTRUCT_PRECEDENCE_CHROMA , COLORRECONSTRUCT_PRECEDENCE_HUE } |
| #define DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_R 100 |
| #define DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_S 500 |
| #define DT_COLORRECONSTRUCT_SPATIAL_APPROX 100.0f |
| typedef struct dt_iop_colorreconstruct_bilateral_frozen_t dt_iop_colorreconstruct_bilateral_frozen_t |
| typedef struct dt_iop_colorreconstruct_data_t dt_iop_colorreconstruct_data_t |
| typedef struct dt_iop_colorreconstruct_Lab_t dt_iop_colorreconstruct_Lab_t |
| typedef struct dt_iop_colorreconstruct_params_t dt_iop_colorreconstruct_params_t |
|
static |
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
References dt_iop_module_so_t::data, dt_opencl_free_kernel(), dt_iop_colorreconstruct_global_data_t::kernel_colorreconstruct_blur_line, dt_iop_colorreconstruct_global_data_t::kernel_colorreconstruct_slice, dt_iop_colorreconstruct_global_data_t::kernel_colorreconstruct_splat, and dt_iop_colorreconstruct_global_data_t::kernel_colorreconstruct_zero.
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_pixelpipe_iop_t::data.
| 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 | ||
| ) |
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::devid, dt_iop_colorreconstruct_data_t::hue, dt_iop_colorreconstruct_data_t::precedence, dt_dev_pixelpipe_iop_t::process_cl_ready, dt_iop_colorreconstruct_data_t::range, dt_iop_colorreconstruct_data_t::spatial, and dt_iop_colorreconstruct_data_t::threshold.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References IOP_CS_LAB.
| int default_group | ( | ) |
References IOP_GROUP_REPAIR.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
|
static |
References blur_line().
Referenced by process().
|
static |
References dt_iop_colorreconstruct_bilateral_frozen_t::buf, and dt_free_align.
Referenced by dt_iop_colorreconstruct_bilateral_freeze(), gui_cleanup(), gui_update(), and process().
|
static |
References dt_free_align.
Referenced by dt_iop_colorreconstruct_bilateral_init(), dt_iop_colorreconstruct_bilateral_thaw(), and process().
|
static |
References dt_iop_colorreconstruct_bilateral_frozen_t::buf, dt_alloc_align, dt_iop_colorreconstruct_bilateral_dump(), dt_iop_colorreconstruct_bilateral_frozen_t::height, dt_iop_colorreconstruct_bilateral_frozen_t::scale, dt_iop_colorreconstruct_bilateral_frozen_t::sigma_r, dt_iop_colorreconstruct_bilateral_frozen_t::sigma_s, dt_iop_colorreconstruct_bilateral_frozen_t::size_x, dt_iop_colorreconstruct_bilateral_frozen_t::size_y, dt_iop_colorreconstruct_bilateral_frozen_t::size_z, dt_iop_colorreconstruct_bilateral_frozen_t::width, dt_iop_colorreconstruct_bilateral_frozen_t::x, and dt_iop_colorreconstruct_bilateral_frozen_t::y.
Referenced by process().
|
static |
References CLAMPS, dt_alloc_align, DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_R, DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_S, dt_iop_colorreconstruct_bilateral_free(), dt_iop_roi_t::height, iscale, MAX, dt_iop_roi_t::scale, sigma_r, sigma_s, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by process().
|
static |
References CLAMPS, DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_R, DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_S, height, sigma_r, sigma_s, size_x, size_y, size_z, and width.
Referenced by tiling_callback().
|
static |
References CLAMPS, DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_R, DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_S, height, sigma_r, sigma_s, size_x, size_y, size_z, and width.
Referenced by tiling_callback().
|
static |
References CLAMPS, grid_rescale(), dt_iop_roi_t::height, image_to_grid(), iscale, MIN, dt_iop_roi_t::scale, weight(), and dt_iop_roi_t::width.
Referenced by process().
|
static |
References CLAMPS, COLORRECONSTRUCT_PRECEDENCE_CHROMA, COLORRECONSTRUCT_PRECEDENCE_HUE, COLORRECONSTRUCT_PRECEDENCE_NONE, image_to_grid(), m, M_PI, and weight().
Referenced by process().
|
static |
References dt_iop_colorreconstruct_bilateral_frozen_t::buf, dt_alloc_align, dt_iop_colorreconstruct_bilateral_free(), dt_iop_colorreconstruct_bilateral_frozen_t::height, dt_iop_colorreconstruct_bilateral_frozen_t::scale, dt_iop_colorreconstruct_bilateral_frozen_t::sigma_r, dt_iop_colorreconstruct_bilateral_frozen_t::sigma_s, dt_iop_colorreconstruct_bilateral_frozen_t::size_x, dt_iop_colorreconstruct_bilateral_frozen_t::size_y, dt_iop_colorreconstruct_bilateral_frozen_t::size_z, dt_iop_colorreconstruct_bilateral_frozen_t::width, dt_iop_colorreconstruct_bilateral_frozen_t::x, and dt_iop_colorreconstruct_bilateral_frozen_t::y.
Referenced by process().
| int flags | ( | ) |
References IOP_FLAGS_DEPRECATED, IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
|
inlinestatic |
References dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by dt_iop_colorreconstruct_bilateral_slice().
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
References COLORRECONSTRUCT_PRECEDENCE_HUE, dt_iop_module_t::gui_data, and dt_iop_module_t::params.
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_colorreconstruct_bilateral_dump(), dt_iop_module_t::gui_data, and IOP_GUI_FREE.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
References dt_bauhaus_combobox_from_params(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_factor(), dt_bauhaus_slider_set_feedback(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_stop(), DT_BAUHAUS_SPACE, dt_ui_label_new(), FALSE, IOP_GUI_ALLOC, TRUE, and dt_iop_module_t::widget.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
References COLORRECONSTRUCT_PRECEDENCE_HUE, dt_iop_module_t::dev, dt_image_is_monochrome(), dt_iop_colorreconstruct_bilateral_dump(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_module_t::gui_data, dt_iop_module_t::hide_enable_button, dt_develop_t::image_storage, dt_iop_module_t::params, and dt_iop_module_t::widget.
|
inlinestatic |
References dt_XYZ_to_Lab(), hsl2rgb(), and Lab().
Referenced by process().
|
inlinestatic |
References CLAMPS.
Referenced by dt_iop_colorreconstruct_bilateral_slice(), and dt_iop_colorreconstruct_bilateral_splat().
| void init_global | ( | dt_iop_module_so_t * | module | ) |
References dt_opencl_create_kernel(), dt_iop_colorreconstruct_global_data_t::kernel_colorreconstruct_blur_line, dt_iop_colorreconstruct_global_data_t::kernel_colorreconstruct_slice, dt_iop_colorreconstruct_global_data_t::kernel_colorreconstruct_splat, and dt_iop_colorreconstruct_global_data_t::kernel_colorreconstruct_zero.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_pixelpipe_iop_t::data, and dt_dev_pixelpipe_iop_t::data_size.
| 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 COLORRECONSTRUCT_PRECEDENCE_NONE, dt_iop_colorreconstruct_params2_t::precedence, dt_iop_colorreconstruct_params1_t::range, dt_iop_colorreconstruct_params2_t::range, dt_iop_colorreconstruct_params1_t::spatial, dt_iop_colorreconstruct_params2_t::spatial, dt_iop_colorreconstruct_params1_t::threshold, dt_iop_colorreconstruct_params2_t::threshold, and dt_iop_colorreconstruct_params_t::threshold.
| const char * name | ( | ) |
| void process | ( | struct dt_iop_module_t * | self, |
| 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 | ||
| ) |
References dt_dev_pixelpipe_iop_t::colors, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, DT_COLORRECONSTRUCT_SPATIAL_APPROX, dt_control_get_dev_closeup(), dt_control_get_dev_zoom(), dt_control_log(), dt_dev_get_zoom_scale(), dt_dev_hash(), DT_DEV_PIXELPIPE_FULL, DT_DEV_PIXELPIPE_PREVIEW, dt_dev_sync_pixelpipe_hash(), DT_DEV_TRANSFORM_DIR_BACK_INCL, dt_iop_colorreconstruct_bilateral_blur(), dt_iop_colorreconstruct_bilateral_dump(), dt_iop_colorreconstruct_bilateral_free(), dt_iop_colorreconstruct_bilateral_freeze(), dt_iop_colorreconstruct_bilateral_init(), dt_iop_colorreconstruct_bilateral_slice(), dt_iop_colorreconstruct_bilateral_splat(), dt_iop_colorreconstruct_bilateral_thaw(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_image_copy_by_size(), DT_ZOOM_FIT, error(), dt_develop_t::gui_attached, dt_iop_module_t::gui_data, dt_iop_module_t::gui_lock, dt_iop_roi_t::height, dt_iop_colorreconstruct_data_t::hue, hue_conversion(), dt_iop_module_t::iop_order, M_PI, dt_dev_pixelpipe_iop_t::pipe, dt_iop_colorreconstruct_data_t::precedence, dt_iop_colorreconstruct_data_t::range, dt_iop_roi_t::scale, sigma_r, sigma_s, dt_iop_colorreconstruct_data_t::spatial, dt_iop_colorreconstruct_data_t::threshold, and dt_iop_roi_t::width.
| 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 dt_dev_pixelpipe_iop_t::colors, dt_dev_pixelpipe_iop_t::data, dt_iop_colorreconstruct_bilateral_memory_use(), dt_iop_colorreconstruct_bilateral_singlebuffer_size(), height, dt_iop_roi_t::height, dt_iop_colorreconstruct_data_t::range, dt_iop_roi_t::scale, sigma_r, sigma_s, dt_iop_colorreconstruct_data_t::spatial, width, and dt_iop_roi_t::width.