![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"#include "common/imagebuf.h"#include "common/iop_profile.h"#include "common/colormatrices.c"#include "common/colorspaces.h"#include "common/colorspaces_inline_conversions.h"#include "common/file_location.h"#include "common/image_cache.h"#include "common/opencl.h"#include "control/control.h"#include "develop/develop.h"#include "gui/gtk.h"#include "common/imageio_jpeg.h"#include "common/imageio_png.h"#include "common/imageio_tiff.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 <lcms2.h>
Include dependency graph for colorin.c: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 | LUT_SAMPLES 0x10000 |
| #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 512 |
| #define DT_IOP_COLOR_ICC_LEN_V5 100 |
| #define LUT_SAMPLES 0x10000 |
| 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 |
|
inlinestatic |
|
static |
References d, dt_dev_pixelpipe_iop_t::data, DT_COLORSPACE_LAB, IOP_CS_LAB, IOP_CS_RGB, p, and dt_iop_module_t::params.
Referenced by input_format(), and output_format().
|
static |
References d.
Referenced by commit_params().
|
static |
References d, and dt_dev_pixelpipe_iop_t::process_cl_ready.
Referenced by commit_params().
|
static |
References dt_image_t::camera_makermodel, d, DT_COLORSPACE_ALTERNATE_MATRIX, DT_COLORSPACE_EMBEDDED_ICC, DT_COLORSPACE_EMBEDDED_MATRIX, DT_COLORSPACE_ENHANCED_MATRIX, DT_COLORSPACE_LIN_REC709, DT_COLORSPACE_SRGB, DT_COLORSPACE_STANDARD_MATRIX, DT_COLORSPACE_VENDOR_MATRIX, dt_colorspaces_create_alternate_profile(), dt_colorspaces_create_darktable_profile(), dt_colorspaces_create_vendor_profile(), dt_colorspaces_get_input_profile_from_image(), dt_colorspaces_get_profile(), dt_control_log(), DT_DEBUG_COLORPROFILE, dt_image_is_matrix_correction_supported(), dt_print(), DT_PROFILE_DIRECTION_IN, FALSE, dt_image_t::id, dt_dev_pixelpipe_t::image, p, dt_colorspaces_color_profile_t::profile, and type.
Referenced by commit_params().
|
static |
References darktable_t::color_profiles, darktable, DT_COLORSPACE_FILE, DT_COLORSPACE_LIN_REC2020, dt_colorspaces_get_name(), dt_colorspaces_is_profile_equal(), DT_DEBUG_COLORPROFILE, dt_print(), dt_colorspaces_color_profile_t::filename, dt_colorspaces_t::profiles, dt_colorspaces_color_profile_t::type, and dt_colorspaces_color_profile_t::work_pos.
Referenced by legacy_params().
|
static |
References d, DT_COLORSPACE_ADOBERGB, DT_COLORSPACE_LIN_REC2020, DT_COLORSPACE_LIN_REC709, DT_COLORSPACE_SRGB, dt_colorspaces_get_profile(), DT_NORMALIZE_ADOBE_RGB, DT_NORMALIZE_LINEAR_REC2020_RGB, DT_NORMALIZE_LINEAR_REC709_RGB, DT_NORMALIZE_OFF, DT_NORMALIZE_SRGB, DT_PROFILE_DIRECTION_IN, p, and dt_colorspaces_color_profile_t::profile.
Referenced by commit_params().
|
static |
References d, DT_COLORSPACE_FILE, p, and type.
Referenced by commit_params().
|
inlinestatic |
Referenced by process_cmatrix_bm(), and process_lcms2_bm().
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References d, dt_dev_pixelpipe_iop_t::data, dt_colorspaces_cleanup_profile(), 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 | ||
| ) |
References _reset_input_transforms(), _reset_processing_state(), _resolve_input_profile(), _select_normalization_profile(), _set_input_profile_metadata(), d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_colormatrix_mul(), DT_COLORSPACE_FILE, DT_COLORSPACE_LAB, DT_COLORSPACE_LIN_REC709, dt_colorspaces_cleanup_profile(), dt_colorspaces_get_matrix_from_input_profile(), dt_colorspaces_get_matrix_from_output_profile(), dt_colorspaces_get_profile(), dt_control_log(), DT_DEBUG_COLORPROFILE, DT_INTENT_PERCEPTUAL, dt_iop_estimate_exp(), dt_ioppr_set_pipe_input_profile_info(), dt_ioppr_set_pipe_work_profile_info(), dt_print(), DT_PROFILE_DIRECTION_ANY, DT_PROFILE_DIRECTION_IN, dt_dev_pixelpipe_iop_t::enabled, FALSE, dt_iop_order_iccprofile_info_t::filename, input_format(), LUT_SAMPLES, dt_iop_order_iccprofile_info_t::matrix_out, dt_iop_order_iccprofile_info_t::nonlinearlut, p, dt_dev_pixelpipe_iop_t::process_cl_ready, dt_colorspaces_color_profile_t::profile, TRUE, dt_iop_order_iccprofile_info_t::type, type, dt_dev_pixelpipe_t::type, TYPE_XYZA_FLT, and x.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References IOP_CS_RGB.
| int default_group | ( | ) |
References IOP_GROUP_TECHNICAL.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
| int flags | ( | ) |
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_ONE_INSTANCE, and IOP_FLAGS_UNSAFE_COPY.
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
References dt_free, g, dt_iop_module_t::gui_data, and IOP_GUI_FREE.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
References darktable_t::bauhaus, darktable, dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_new(), dt_bauhaus_combobox_set(), DT_BAUHAUS_SPACE, dt_bauhaus_widget_set_label(), dt_free, DT_GUI_MODULE, dt_loc_get_datadir(), dt_loc_get_user_config_dir(), g, IOP_GUI_ALLOC, PATH_MAX, profile_changed(), tooltip, TRUE, dt_iop_module_t::widget, and workicc_changed().
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
References darktable_t::color_profiles, darktable, 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_control_log(), DT_DEBUG_COLORPROFILE, dt_image_is_matrix_correction_supported(), dt_print(), dt_colorspaces_color_profile_t::filename, g, dt_iop_module_t::gui_data, dt_develop_t::image_storage, dt_colorspaces_color_profile_t::in_pos, p, dt_iop_module_t::params, dt_colorspaces_t::profiles, dt_colorspaces_color_profile_t::type, and dt_colorspaces_color_profile_t::work_pos.
| void init_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 | ||
| ) |
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 | ||
| ) |
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.
Referenced by commit_params().
| 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 _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.
| const char * name | ( | ) |
| 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 | ||
| ) |
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.
Referenced by _transform_from_to_rgb_lab_lcms2(), and _transform_rgb_to_rgb_lcms2().
| 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 | ||
| ) |
References d, dt_dev_pixelpipe_iop_t::data, DT_COLORSPACE_LAB, DT_DEV_PIXELPIPE_DISPLAY_MASK, dt_iop_alpha_copy(), dt_iop_image_copy_by_size(), dt_iop_roi_t::height, dt_dev_pixelpipe_t::mask_display, process_cmatrix(), process_lcms2(), dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, and dt_iop_roi_t::width.
|
static |
References d, dt_dev_pixelpipe_iop_t::data, dt_image_is_matrix_correction_supported(), dt_dev_pixelpipe_t::image, process_cmatrix_bm(), process_cmatrix_fastpath(), and process_cmatrix_proper().
Referenced by process().
|
static |
References apply_blue_mapping(), c, d, dt_dev_pixelpipe_iop_t::data, dt_load_simd_aligned(), dt_omploop_sfence, dt_iop_roi_t::height, i, LUT_SAMPLES, out, transpose_3xSSE(), and dt_iop_roi_t::width.
Referenced by process_cmatrix().
|
static |
References d, dt_dev_pixelpipe_iop_t::data, process_cmatrix_fastpath_clipping(), and process_cmatrix_fastpath_simple().
Referenced by process_cmatrix().
|
static |
References d, dt_dev_pixelpipe_iop_t::data, DT_IS_ALIGNED, dt_load_simd_aligned(), dt_omploop_sfence, dt_iop_roi_t::height, out, transpose_3xSSE(), and dt_iop_roi_t::width.
Referenced by process_cmatrix_fastpath().
|
static |
References d, dt_dev_pixelpipe_iop_t::data, DT_IS_ALIGNED, dt_load_simd_aligned(), dt_omploop_sfence, dt_iop_roi_t::height, out, transpose_3xSSE(), and dt_iop_roi_t::width.
Referenced by process_cmatrix_fastpath().
|
static |
References c, d, dt_dev_pixelpipe_iop_t::data, dt_load_simd_aligned(), dt_omploop_sfence, dt_iop_roi_t::height, LUT_SAMPLES, out, transpose_3xSSE(), and dt_iop_roi_t::width.
Referenced by process_cmatrix().
|
static |
References d, dt_dev_pixelpipe_iop_t::data, dt_image_is_matrix_correction_supported(), dt_dev_pixelpipe_t::image, process_lcms2_bm(), and process_lcms2_proper().
Referenced by process().
|
static |
References apply_blue_mapping(), c, d, dt_dev_pixelpipe_iop_t::data, dt_colorspaces_transform_rgba_float_row(), dt_iop_roi_t::height, out, and dt_iop_roi_t::width.
Referenced by process_lcms2().
|
static |
References c, d, dt_dev_pixelpipe_iop_t::data, dt_colorspaces_transform_rgba_float_row(), dt_iop_roi_t::height, out, and dt_iop_roi_t::width.
Referenced by process_lcms2().
References darktable_t::color_profiles, darktable, darktable_t::develop, dt_bauhaus_combobox_get(), dt_colorspaces_get_name(), DT_COLORSPACES_PROFILE_TYPE_INPUT, DT_DEBUG_COLORPROFILE, DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_add_history_item, dt_iop_request_focus(), dt_print(), DT_SIGNAL_CONTROL_PROFILE_USER_CHANGED, dt_colorspaces_color_profile_t::filename, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_colorspaces_color_profile_t::in_pos, p, dt_iop_module_t::params, dt_colorspaces_t::profiles, dt_gui_gtk_t::reset, darktable_t::signals, TRUE, and dt_colorspaces_color_profile_t::type.
Referenced by dt_colorspaces_set_display_profile(), gui_init(), profile_callback(), and softproof_profile_callback().
| void reload_defaults | ( | dt_iop_module_t * | module | ) |
References d, dt_iop_module_t::dev, dt_image_find_best_color_profile(), dt_image_t::id, dt_develop_t::image_storage, dt_iop_colorin_params_t::type, and update_profile_list().
|
static |
References dt_image_t::camera_makermodel, darktable_t::color_profiles, dt_image_t::d65_color_matrix, darktable, dt_iop_module_t::dev, dt_alternate_colormatrices, dt_alternate_colormatrix_cnt, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_clear(), DT_COLORSPACE_ALTERNATE_MATRIX, DT_COLORSPACE_EMBEDDED_ICC, DT_COLORSPACE_EMBEDDED_MATRIX, DT_COLORSPACE_ENHANCED_MATRIX, DT_COLORSPACE_STANDARD_MATRIX, DT_COLORSPACE_VENDOR_MATRIX, dt_colorspaces_get_name(), dt_free_gpointer(), DT_IMAGE_4BAYER, dt_image_cache_get(), dt_image_cache_read_release(), dt_image_is_matrix_correction_supported(), dt_profiled_colormatrices, dt_profiled_colormatrix_cnt, dt_vendor_colormatrices, dt_vendor_colormatrix_cnt, dt_image_t::flags, g, dt_iop_module_t::gui_data, dt_image_t::id, darktable_t::image_cache, dt_develop_t::image_storage, dt_colorspaces_color_profile_t::in_pos, dt_profiled_colormatrix_t::makermodel, dt_colorspaces_color_profile_t::name, dt_image_t::profile, dt_colorspaces_t::profiles, dt_colorspaces_color_profile_t::type, and dt_colorspaces_color_profile_t::work_pos.
Referenced by reload_defaults().
References darktable_t::color_profiles, darktable, dt_iop_module_t::dev, darktable_t::develop, dt_bauhaus_combobox_get(), DT_COLORSPACE_NONE, dt_colorspaces_get_name(), DT_COLORSPACES_PROFILE_TYPE_WORK, dt_control_log(), DT_DEBUG_COLORPROFILE, DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_add_history_item, dt_dev_pixelpipe_rebuild_all, DT_INTENT_PERCEPTUAL, DT_IOP_COLOR_ICC_LEN, dt_iop_request_focus(), dt_ioppr_add_profile_info_to_list(), dt_print(), DT_SIGNAL_CONTROL_PROFILE_USER_CHANGED, dt_colorspaces_color_profile_t::filename, darktable_t::gui, dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::matrix_out, p, dt_iop_module_t::params, dt_colorspaces_t::profiles, dt_gui_gtk_t::reset, darktable_t::signals, TRUE, dt_colorspaces_color_profile_t::type, and dt_colorspaces_color_profile_t::work_pos.
Referenced by gui_init().