![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "widgets/bauhaus.h"#include "common/paths.h"#include "common/imagebuf.h"#include "develop/iop_profile.h"#include "colorprofiles/colormatrices.c"#include "colorprofiles/colorspaces.h"#include "colorprofiles/conversion.h"#include "common/colorspaces_inline_conversions.h"#include "common/file_location.h"#include "caches/image_cache.h"#include "common/opencl.h"#include "control/user_message.h"#include "develop/develop.h"#include "develop/imageop_math.h"#include "develop/imageop_gui.h"#include "iop/iop_api.h"#include <assert.h>#include <math.h>#include <stdlib.h>#include <string.h>#include <strings.h>#include "imageio/imageio_profile.h"#include "control/signal.h"
Include dependency graph for colorin.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_colorin_params_t |
| struct | dt_iop_colorin_gui_data_t |
| struct | dt_iop_colorin_global_data_t |
| struct | dt_iop_colorin_data_t |
Macros | |
| #define | DT_IOP_COLOR_ICC_LEN 512 |
| #define | DT_IOP_COLOR_ICC_LEN_V5 100 |
Typedefs | |
| typedef enum dt_iop_color_normalize_t | dt_iop_color_normalize_t |
| typedef struct dt_iop_colorin_params_t | dt_iop_colorin_params_t |
| typedef struct dt_iop_colorin_gui_data_t | dt_iop_colorin_gui_data_t |
| typedef struct dt_iop_colorin_global_data_t | dt_iop_colorin_global_data_t |
| typedef struct dt_iop_colorin_data_t | dt_iop_colorin_data_t |
Enumerations | |
| enum | dt_iop_color_normalize_t { DT_NORMALIZE_OFF , DT_NORMALIZE_SRGB , DT_NORMALIZE_ADOBE_RGB , DT_NORMALIZE_LINEAR_REC709_RGB , DT_NORMALIZE_LINEAR_REC2020_RGB } |
| #define DT_IOP_COLOR_ICC_LEN_V5 100 |
| typedef enum dt_iop_color_normalize_t dt_iop_color_normalize_t |
| typedef struct dt_iop_colorin_data_t dt_iop_colorin_data_t |
| typedef struct dt_iop_colorin_global_data_t dt_iop_colorin_global_data_t |
| typedef struct dt_iop_colorin_gui_data_t dt_iop_colorin_gui_data_t |
| typedef struct dt_iop_colorin_params_t dt_iop_colorin_params_t |
|
static |
Definition at line 750 of file colorin.c.
References DT_COLORSPACE_ADOBERGB, DT_COLORSPACE_LIN_REC2020, DT_COLORSPACE_LIN_REC709, DT_COLORSPACE_NONE, DT_COLORSPACE_SRGB, DT_NORMALIZE_ADOBE_RGB, DT_NORMALIZE_LINEAR_REC2020_RGB, DT_NORMALIZE_LINEAR_REC709_RGB, DT_NORMALIZE_OFF, DT_NORMALIZE_SRGB, and p.
Referenced by commit_params().
|
static |
Definition at line 197 of file colorin.c.
References DT_COLORSPACE_LAB, IOP_CS_LAB, IOP_CS_RGB, p, and dt_iop_module_t::params.
Referenced by input_format(), and output_format().
|
static |
Definition at line 763 of file colorin.c.
References DT_COLORSPACE_ALTERNATE_MATRIX, DT_COLORSPACE_EMBEDDED_ICC, DT_COLORSPACE_EMBEDDED_MATRIX, DT_COLORSPACE_ENHANCED_MATRIX, DT_COLORSPACE_STANDARD_MATRIX, DT_COLORSPACE_VENDOR_MATRIX, and type.
Referenced by commit_params().
|
static |
Definition at line 222 of file colorin.c.
References DT_COLORSPACE_LIN_REC2020, dt_colorspaces_get_name(), dt_colorspaces_profile_exists(), DT_DEBUG_COLORPROFILE, dt_print(), and DT_PROFILE_ROLE_WORKING.
Referenced by legacy_params().
|
static |
Definition at line 737 of file colorin.c.
References d, DT_COLORSPACE_FILE, p, and type.
Referenced by commit_params().
|
static |
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 486 of file colorin.c.
References dt_iop_module_so_t::data, dt_free, dt_opencl_free_kernel(), dt_iop_colorin_global_data_t::kernel_colorin_clipping, and dt_iop_colorin_global_data_t::kernel_colorin_unbound.
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 913 of file colorin.c.
References d, dt_dev_pixelpipe_iop_t::data, dt_colorspaces_free_conversion(), dt_free_align, and IS_NULL_PTR.
| 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 770 of file colorin.c.
References _clipping_profile_type(), _is_image_derived(), _set_input_profile_metadata(), dt_image_t::camera_makermodel, d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_t::dev, DT_COLORSPACE_FILE, DT_COLORSPACE_LAB, DT_COLORSPACE_LIN_REC709, DT_COLORSPACE_NONE, DT_COLORSPACE_STANDARD_MATRIX, dt_colorspaces_conversion_is_matrix(), dt_colorspaces_conversion_source_matrix(), dt_colorspaces_free_conversion(), dt_colorspaces_free_image_profile(), dt_colorspaces_prepare_conversion(), dt_control_log(), DT_CONVERSION_SOURCE_CURVES, DT_DEBUG_COLORPROFILE, dt_image_get_input_profile(), dt_image_is_matrix_correction_supported(), dt_image_pipe_class(), dt_image_pipe_class_name(), DT_INTENT_PERCEPTUAL, dt_iop_fmt_log, dt_ioppr_set_pipe_input_profile_info(), dt_ioppr_set_pipe_work_profile_info(), dt_print(), DT_PROFILE_ROLE_INPUT, DT_PROFILE_ROLE_WORKING, dt_dev_pixelpipe_iop_t::enabled, dt_colorspaces_endpoint_t::filename, dt_iop_order_iccprofile_info_t::filename, flags(), dt_image_t::id, dt_develop_t::image_storage, IS_NULL_PTR, p, dt_dev_pixelpipe_iop_t::process_cl_ready, dt_colorspaces_endpoint_t::resolved, dt_colorspaces_color_profile_t::type, dt_colorspaces_endpoint_t::type, dt_iop_order_iccprofile_info_t::type, dt_dev_pixelpipe_t::type, and type.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 192 of file colorin.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 182 of file colorin.c.
References IOP_GROUP_TECHNICAL.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 172 of file colorin.c.
References dt_iop_set_description().
| int flags | ( | ) |
Definition at line 187 of file colorin.c.
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_ONE_INSTANCE, and IOP_FLAGS_UNSAFE_COPY.
Referenced by commit_params().
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1185 of file colorin.c.
References dt_free, dt_iop_gui_data(), g, and IOP_GUI_FREE.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1135 of file colorin.c.
References dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_new(), dt_bauhaus_combobox_set(), dt_bauhaus_get_global(), dt_bauhaus_widget_set_label(), dt_free, DT_GUI_BOX_SPACING, DT_GUI_MODULE, dt_loc_get_datadir(), dt_loc_get_user_config_dir(), DT_PATH_MAX, g, dt_iop_module_t::gui, IOP_GUI_ALLOC, profile_changed(), tooltip, TRUE, dt_iop_module_gui_t::widget, and workicc_changed().
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Definition at line 924 of file colorin.c.
References dt_iop_module_t::dev, dt_bauhaus_combobox_set(), DT_COLORSPACE_ENHANCED_MATRIX, DT_COLORSPACE_FILE, dt_colorspaces_get_name(), dt_colorspaces_is_profile_equal(), dt_colorspaces_is_raw_matrix_profile_type(), dt_colorspaces_profile_index(), dt_control_log(), DT_DEBUG_COLORPROFILE, dt_image_is_matrix_correction_supported(), dt_iop_gui_data(), dt_print(), DT_PROFILE_ROLE_INPUT, DT_PROFILE_ROLE_WORKING, dt_colorprofile_desc_t::filename, g, dt_develop_t::image_storage, p, dt_iop_module_t::params, and dt_colorprofile_desc_t::type.
| void init_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 476 of file colorin.c.
References dt_opencl_create_kernel(), dt_iop_colorin_global_data_t::kernel_colorin_clipping, and dt_iop_colorin_global_data_t::kernel_colorin_unbound.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 907 of file colorin.c.
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
| void input_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 203 of file colorin.c.
References _colorin_format_cst(), dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::cst, dt_iop_buffer_dsc_t::datatype, and TYPE_FLOAT.
| 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 233 of file colorin.c.
References _resolve_work_profile(), DT_COLORSPACE_ADOBERGB, DT_COLORSPACE_ALTERNATE_MATRIX, DT_COLORSPACE_EMBEDDED_ICC, DT_COLORSPACE_EMBEDDED_MATRIX, DT_COLORSPACE_ENHANCED_MATRIX, DT_COLORSPACE_FILE, DT_COLORSPACE_INFRARED, DT_COLORSPACE_LAB, DT_COLORSPACE_LIN_REC2020, DT_COLORSPACE_LIN_REC709, DT_COLORSPACE_SRGB, DT_COLORSPACE_STANDARD_MATRIX, DT_COLORSPACE_VENDOR_MATRIX, DT_COLORSPACE_XYZ, DT_IOP_COLOR_ICC_LEN, DT_IOP_COLOR_ICC_LEN_V5, dt_iop_colorin_params_v1_t::iccprofile, dt_iop_colorin_params_v1_t::intent, normalize(), and type.
| 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 214 of file colorin.c.
References _colorin_format_cst(), dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::cst, dt_iop_buffer_dsc_t::datatype, and TYPE_FLOAT.
| 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 712 of file colorin.c.
References apply_blue_mapping(), d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::dev, DT_COLORSPACE_LAB, dt_colorspaces_apply_conversion_hooked(), DT_DEV_PIXELPIPE_DISPLAY_MASK, dt_image_is_matrix_correction_supported(), dt_iop_image_copy_by_size(), dt_iop_roi_t::height, dt_develop_t::image_storage, IS_NULL_PTR, dt_dev_pixelpipe_t::mask_display, ovoid, dt_dev_pixelpipe_iop_t::roi_out, 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 598 of file colorin.c.
References d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::dev, dt_dev_pixelpipe_t::devid, DT_COLORSPACE_LAB, dt_colorspaces_conversion_clip_matrix(), dt_colorspaces_conversion_has_clipping(), dt_colorspaces_conversion_matrix(), dt_colorspaces_conversion_source_coeffs(), dt_colorspaces_conversion_source_curve(), DT_DEBUG_OPENCL, dt_image_is_matrix_correction_supported(), dt_opencl_copy_host_to_device(), dt_opencl_copy_host_to_device_constant(), dt_opencl_enqueue_copy_image(), dt_opencl_enqueue_kernel_2d(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_print(), error(), FALSE, dt_iop_module_t::global_data, height, dt_iop_roi_t::height, dt_develop_t::image_storage, IS_NULL_PTR, kernel(), dt_iop_colorin_global_data_t::kernel_colorin_clipping, dt_iop_colorin_global_data_t::kernel_colorin_unbound, pack_3xSSE_to_3x4(), dt_dev_pixelpipe_iop_t::roi_in, ROUNDUPDHT, ROUNDUPDWD, TRUE, width, and dt_iop_roi_t::width.
Definition at line 505 of file colorin.c.
References dt_iop_module_t::dev, dt_bauhaus_combobox_get(), dt_colorspaces_get_name(), dt_colorspaces_profile_at(), DT_COLORSPACES_PROFILE_TYPE_INPUT, dt_control_signal_get_global(), DT_DEBUG_COLORPROFILE, DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_add_history_item, dt_gui_widgets_suppressed(), dt_iop_gui_data(), dt_iop_request_focus(), dt_print(), DT_PROFILE_ROLE_INPUT, DT_SIGNAL_CONTROL_PROFILE_USER_CHANGED, dt_colorprofile_desc_t::filename, g, IS_NULL_PTR, p, dt_iop_module_t::params, TRUE, and dt_colorprofile_desc_t::type.
Referenced by _softproof_profile_callback(), dt_colorspaces_set_display_profile(), gui_init(), and profile_callback().
| void reload_defaults | ( | dt_iop_module_t * | module | ) |
Definition at line 976 of file colorin.c.
References d, dt_iop_module_t::dev, dt_image_find_best_color_profile(), dt_image_is_matrix_correction_supported(), dt_image_pipe_class(), dt_image_pipe_class_name(), dt_iop_fmt_log, dt_image_t::id, dt_develop_t::image_storage, dt_iop_colorin_params_t::type, and update_profile_list().
|
static |
Definition at line 990 of file colorin.c.
References dt_image_t::camera_makermodel, dt_image_t::d65_color_matrix, dt_iop_module_t::dev, dt_alternate_colormatrices, dt_alternate_colormatrix_cnt, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_add_separator(), dt_bauhaus_combobox_add_with_tooltip(), dt_bauhaus_combobox_clear(), DT_COLORSPACE_ALTERNATE_MATRIX, DT_COLORSPACE_EMBEDDED_ICC, DT_COLORSPACE_EMBEDDED_MATRIX, DT_COLORSPACE_ENHANCED_MATRIX, DT_COLORSPACE_FILE, DT_COLORSPACE_STANDARD_MATRIX, DT_COLORSPACE_VENDOR_MATRIX, dt_colorspaces_enumerate_profiles(), dt_colorspaces_get_name(), dt_free_align, dt_free_gpointer(), DT_IMAGE_4BAYER, dt_image_cache_get(), dt_image_cache_read_release(), dt_image_is_matrix_correction_supported(), dt_iop_gui_data(), DT_PROFILE_ROLE_INPUT, DT_PROFILE_ROLE_WORKING, dt_profiled_colormatrices, dt_profiled_colormatrix_cnt, dt_vendor_colormatrices, dt_vendor_colormatrix_cnt, FALSE, dt_colorprofile_desc_t::filename, dt_image_t::flags, g, dt_image_t::id, dt_develop_t::image_storage, IS_NULL_PTR, k, dt_profiled_colormatrix_t::makermodel, dt_colorprofile_desc_t::name, dt_image_t::profile, TRUE, and dt_colorprofile_desc_t::type.
Referenced by reload_defaults().
Definition at line 549 of file colorin.c.
References dt_iop_module_t::dev, dt_bauhaus_combobox_get(), DT_COLORSPACE_NONE, dt_colorspaces_add_profile(), dt_colorspaces_get_name(), dt_colorspaces_profile_at(), DT_COLORSPACES_PROFILE_TYPE_WORK, dt_control_log(), dt_control_signal_get_global(), DT_DEBUG_COLORPROFILE, DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_add_history_item, dt_dev_pixelpipe_rebuild_all, dt_gui_widgets_suppressed(), DT_INTENT_PERCEPTUAL, DT_IOP_COLOR_ICC_LEN, dt_iop_request_focus(), dt_print(), DT_PROFILE_ROLE_WORKING, DT_SIGNAL_CONTROL_PROFILE_USER_CHANGED, dt_colorprofile_desc_t::filename, IS_NULL_PTR, dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::matrix_out, p, dt_iop_module_t::params, TRUE, and dt_colorprofile_desc_t::type.
Referenced by gui_init().