![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <math.h>#include <stdlib.h>#include <string.h>#include "bauhaus/bauhaus.h"#include "common/colorequal_shared.h"#include "common/darktable.h"#include "common/imagebuf.h"#include "common/lut_viewer.h"#include "control/control.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "gui/color_picker_proxy.h"#include "gui/gtk.h"#include "iop/iop_api.h"
Include dependency graph for colorprimaries.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_colorprimaries_edge_t |
| struct | dt_iop_colorprimaries_params_t |
| struct | dt_iop_colorprimaries_data_t |
| struct | dt_iop_colorprimaries_global_data_t |
| struct | dt_iop_colorprimaries_gui_data_t |
Macros | |
| #define | DT_IOP_COLORPRIMARIES_NODE_COUNT 6 |
| #define | DT_IOP_COLORPRIMARIES_EDGE_COUNT 6 |
| #define | DT_IOP_COLORPRIMARIES_RADIAL_COUNT (DT_IOP_COLORPRIMARIES_NODE_COUNT + DT_IOP_COLORPRIMARIES_EDGE_COUNT) |
| #define | DT_IOP_COLORPRIMARIES_BLACK_WHITE_COUNT (2 * DT_IOP_COLORPRIMARIES_NODE_COUNT) |
| #define | DT_IOP_COLORPRIMARIES_AXIS_ANCHORS 64 |
| #define | DT_IOP_COLORPRIMARIES_MAX_ANCHORS |
| #define | DT_IOP_COLORPRIMARIES_VIEWER_CONTROL_NODES |
| #define | DT_IOP_COLORPRIMARIES_SQRT3 1.7320508075688772f |
| #define | DT_IOP_COLORPRIMARIES_INV_SQRT2 0.7071067811865475f |
Typedefs | |
| typedef enum dt_iop_colorprimaries_interpolation_t | dt_iop_colorprimaries_interpolation_t |
| typedef enum dt_iop_colorprimaries_node_t | dt_iop_colorprimaries_node_t |
| typedef struct dt_iop_colorprimaries_edge_t | dt_iop_colorprimaries_edge_t |
| typedef struct dt_iop_colorprimaries_params_t | dt_iop_colorprimaries_params_t |
| typedef struct dt_iop_colorprimaries_data_t | dt_iop_colorprimaries_data_t |
| typedef struct dt_iop_colorprimaries_global_data_t | dt_iop_colorprimaries_global_data_t |
| typedef struct dt_iop_colorprimaries_gui_data_t | dt_iop_colorprimaries_gui_data_t |
Enumerations | |
| enum | dt_iop_colorprimaries_interpolation_t { DT_IOP_COLORPRIMARIES_TETRAHEDRAL = 0 , DT_IOP_COLORPRIMARIES_TRILINEAR = 1 , DT_IOP_COLORPRIMARIES_PYRAMID = 2 } |
| enum | dt_iop_colorprimaries_node_t { DT_IOP_COLORPRIMARIES_RED = 0 , DT_IOP_COLORPRIMARIES_YELLOW = 1 , DT_IOP_COLORPRIMARIES_GREEN = 2 , DT_IOP_COLORPRIMARIES_CYAN = 3 , DT_IOP_COLORPRIMARIES_BLUE = 4 , DT_IOP_COLORPRIMARIES_MAGENTA = 5 } |
Variables | |
| static const dt_iop_colorprimaries_edge_t | _chroma_edges [6] |
| #define DT_IOP_COLORPRIMARIES_AXIS_ANCHORS 64 |
Definition at line 46 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_BLACK_WHITE_COUNT (2 * DT_IOP_COLORPRIMARIES_NODE_COUNT) |
Definition at line 45 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_EDGE_COUNT 6 |
Definition at line 43 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_INV_SQRT2 0.7071067811865475f |
Definition at line 54 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_MAX_ANCHORS |
Definition at line 47 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_NODE_COUNT 6 |
Definition at line 42 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_RADIAL_COUNT (DT_IOP_COLORPRIMARIES_NODE_COUNT + DT_IOP_COLORPRIMARIES_EDGE_COUNT) |
Definition at line 44 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_SQRT3 1.7320508075688772f |
Definition at line 53 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_VIEWER_CONTROL_NODES |
Definition at line 50 of file colorprimaries.c.
| typedef struct dt_iop_colorprimaries_data_t dt_iop_colorprimaries_data_t |
| typedef struct dt_iop_colorprimaries_edge_t dt_iop_colorprimaries_edge_t |
| typedef struct dt_iop_colorprimaries_gui_data_t dt_iop_colorprimaries_gui_data_t |
| typedef enum dt_iop_colorprimaries_node_t dt_iop_colorprimaries_node_t |
| typedef struct dt_iop_colorprimaries_params_t dt_iop_colorprimaries_params_t |
| Enumerator | |
|---|---|
| DT_IOP_COLORPRIMARIES_TETRAHEDRAL | |
| DT_IOP_COLORPRIMARIES_TRILINEAR | |
| DT_IOP_COLORPRIMARIES_PYRAMID | |
Definition at line 56 of file colorprimaries.c.
| Enumerator | |
|---|---|
| DT_IOP_COLORPRIMARIES_RED | |
| DT_IOP_COLORPRIMARIES_YELLOW | |
| DT_IOP_COLORPRIMARIES_GREEN | |
| DT_IOP_COLORPRIMARIES_CYAN | |
| DT_IOP_COLORPRIMARIES_BLUE | |
| DT_IOP_COLORPRIMARIES_MAGENTA | |
Definition at line 63 of file colorprimaries.c.
|
inlinestatic |
Definition at line 527 of file colorprimaries.c.
Referenced by _build_clut().
|
static |
Definition at line 439 of file colorprimaries.c.
References dt_colorrings_sparse_anchor_t::chroma_scale, dt_colorrings_sparse_anchor_t::delta_L, dt_colorrings_sparse_anchor_t::delta_theta, dt_colorrings_gray_axis_rgb_from_L(), dt_colorrings_gray_basis_to_rgb(), dt_colorrings_project_to_cube_shell(), and dt_colorrings_rgb_to_gray_cyl().
Referenced by _build_viewer_control_nodes().
|
inlinestatic |
Definition at line 289 of file colorprimaries.c.
References RGB.
Referenced by _build_node_black_white_midpoint_anchor().
|
static |
Express the user edits directly as a cylindrical RGB transform instead of reconstructing a temporary target RGB anchor first.
The important subtlety is that dt UCS HSB source saturations can exceed the normalized [0, 1] GUI interval for some recessed nodes, especially near blue. Clamping that source state before applying a zero user delta silently turns a neutral setting into a non-neutral desaturation. Build the sparse transform from the slider deltas themselves so the identity transform stays exact regardless of where the source node lands in dt UCS.
Definition at line 307 of file colorprimaries.c.
References dt_colorrings_sparse_anchor_t::chroma_scale, dt_colorrings_sparse_anchor_t::delta_L, dt_colorrings_sparse_anchor_t::delta_theta, dt_colorrings_brightness_to_axis_rgb(), dt_colorrings_graph_white(), dt_colorrings_profile_rgb_to_dt_ucs_hsb(), dt_colorrings_rgb_to_gray_cyl(), dt_colorrings_wrap_pi(), FALSE, dt_colorrings_sparse_anchor_t::L, dt_colorrings_sparse_anchor_t::rho, dt_colorrings_sparse_anchor_t::theta, TRUE, and dt_colorrings_sparse_anchor_t::weight.
Referenced by _build_edge_anchor(), _build_halfway_extreme_anchor_from_source_rgb(), _build_halfway_radial_anchor_from_source_rgb(), _build_node_anchor(), and _build_viewer_control_nodes().
|
static |
The user edits six recessed RGB/CYM vertices of the Rec2020/HLG gamut. Each edited HSB node is converted back to RGB, then the same RGB cylindrical local field as color equalizer spreads those sparse displacements over the whole LUT volume. A dense ladder of no-op axis anchors keeps the black-white diagonal fixed and stabilizes near-neutral interpolation.
Definition at line 693 of file colorprimaries.c.
References _append_anchor(), _build_edge_anchor(), _build_edge_radial_midpoint_anchor(), _build_node_anchor(), _build_node_black_white_midpoint_anchor(), _build_node_radial_midpoint_anchor(), _chroma_edges, dt_colorrings_sparse_anchor_t::chroma_scale, d, darktable, dt_colorrings_sparse_anchor_t::delta_L, dt_colorrings_sparse_anchor_t::delta_theta, dt_alloc_align_float(), DT_COLORRINGS_CLUT_LEVEL, dt_colorrings_fill_lut_sparse_local_field(), DT_DEBUG_PERF, dt_get_wtime(), DT_IOP_COLORPRIMARIES_AXIS_ANCHORS, DT_IOP_COLORPRIMARIES_EDGE_COUNT, DT_IOP_COLORPRIMARIES_MAX_ANCHORS, DT_IOP_COLORPRIMARIES_NODE_COUNT, DT_IOP_COLORPRIMARIES_SQRT3, dt_print(), IS_NULL_PTR, dt_colorrings_sparse_anchor_t::L, p, dt_colorrings_sparse_anchor_t::rho, dt_colorrings_sparse_anchor_t::theta, darktable_t::unmuted, value, and dt_colorrings_sparse_anchor_t::weight.
Referenced by _update_gui_lut_cache(), and commit_params().
|
static |
Definition at line 534 of file colorprimaries.c.
References _build_anchor_from_source_rgb(), _build_edge_edit(), FALSE, and p.
Referenced by _build_clut().
|
static |
The user only edits the six chromatic vertices, but the local field gets unstable when those anchors are too far apart on the hue circle. Insert a midpoint anchor on every chromatic edge and inherit its HSB transform from the two neighbouring vertex edits.
The midpoint of an RGB edge is not generally halfway between its endpoints once mapped to dt UCS HSB. Weight the synthetic control in that same HSB geometry so the extra anchor follows the perceptual spacing of the source nodes instead of assuming a fixed 50/50 split.
Definition at line 467 of file colorprimaries.c.
References _hsb_distance(), _mix_hue_delta_weighted(), _node_base_rgb(), dt_iop_colorprimaries_edge_t::a, dt_iop_colorprimaries_edge_t::b, dt_colorrings_graph_white(), dt_colorrings_profile_rgb_to_dt_ucs_hsb(), for_each_channel, p, and TRUE.
Referenced by _build_edge_anchor(), _build_edge_radial_midpoint_anchor(), and _build_viewer_control_nodes().
|
static |
Definition at line 578 of file colorprimaries.c.
References _build_edge_edit(), _build_halfway_radial_anchor_from_source_rgb(), FALSE, and p.
Referenced by _build_clut(), and _build_viewer_control_nodes().
|
static |
Definition at line 407 of file colorprimaries.c.
References _build_anchor_from_source_rgb(), _hsb_distance(), dt_colorrings_graph_white(), and dt_colorrings_profile_rgb_to_dt_ucs_hsb().
Referenced by _build_node_black_white_midpoint_anchor().
|
static |
The achromatic endpoint has no meaningful hue of its own. Reuse the outer control-node hue there so the HSB distance only measures how far the halfway point sits from the colored control versus the neutral axis, instead of introducing a branch-cut-dependent hue error from a grey value.
Definition at line 363 of file colorprimaries.c.
References _build_anchor_from_source_rgb(), _halfway_to_axis_rgb(), _hsb_distance(), dt_colorrings_graph_white(), dt_colorrings_gray_axis_rgb_from_L(), dt_colorrings_profile_rgb_to_dt_ucs_hsb(), dt_colorrings_rgb_to_gray_cyl(), and FALSE.
Referenced by _build_edge_radial_midpoint_anchor(), and _build_node_radial_midpoint_anchor().
|
static |
Definition at line 457 of file colorprimaries.c.
References _build_anchor_from_source_rgb(), _node_base_rgb(), M_PI_F, and p.
Referenced by _build_clut(), and _build_viewer_control_nodes().
|
static |
Definition at line 562 of file colorprimaries.c.
References _black_white_rgb(), _build_halfway_extreme_anchor_from_source_rgb(), _node_base_rgb(), M_PI_F, and p.
Referenced by _build_clut(), and _build_viewer_control_nodes().
|
static |
Definition at line 549 of file colorprimaries.c.
References _build_halfway_radial_anchor_from_source_rgb(), _node_base_rgb(), M_PI_F, and p.
Referenced by _build_clut(), and _build_viewer_control_nodes().
|
static |
Definition at line 596 of file colorprimaries.c.
References _apply_anchor_to_rgb(), _build_anchor_from_source_rgb(), _build_edge_edit(), _build_edge_radial_midpoint_anchor(), _build_node_anchor(), _build_node_black_white_midpoint_anchor(), _build_node_radial_midpoint_anchor(), _chroma_edges, _node_base_rgb(), _store_viewer_control_node(), DT_IOP_COLORPRIMARIES_EDGE_COUNT, DT_IOP_COLORPRIMARIES_NODE_COUNT, IS_NULL_PTR, and p.
Referenced by _update_gui_lut_cache().
|
static |
Definition at line 297 of file colorprimaries.c.
References dt_colorrings_gray_basis_to_rgb(), dt_colorrings_rgb_to_gray_cyl(), and L.
Referenced by _build_halfway_radial_anchor_from_source_rgb().
|
inlinestatic |
Definition at line 281 of file colorprimaries.c.
References dt_colorrings_wrap_pi().
Referenced by _build_edge_edit(), _build_halfway_extreme_anchor_from_source_rgb(), and _build_halfway_radial_anchor_from_source_rgb().
|
static |
Definition at line 205 of file colorprimaries.c.
References DT_IOP_COLORPRIMARIES_INV_SQRT2, DT_IOP_COLORPRIMARIES_TETRAHEDRAL, and p.
Referenced by init().
|
inlinestatic |
Definition at line 217 of file colorprimaries.c.
Referenced by _update_gui_lut_cache(), and commit_params().
|
inlinestatic |
Definition at line 272 of file colorprimaries.c.
References M_PI_F.
Referenced by _build_edge_edit().
Definition at line 1177 of file colorprimaries.c.
References dt_ui_section_label_new(), FALSE, and TRUE.
Referenced by gui_init().
|
inlinestatic |
Definition at line 262 of file colorprimaries.c.
References _node_corner_rgb(), for_each_channel, mu, and RGB.
Referenced by _build_edge_edit(), _build_node_anchor(), _build_node_black_white_midpoint_anchor(), _build_node_radial_midpoint_anchor(), _build_viewer_control_nodes(), and _node_source_hsb().
|
inlinestatic |
Definition at line 223 of file colorprimaries.c.
References DT_IOP_COLORPRIMARIES_BLUE, DT_IOP_COLORPRIMARIES_CYAN, DT_IOP_COLORPRIMARIES_GREEN, DT_IOP_COLORPRIMARIES_MAGENTA, DT_IOP_COLORPRIMARIES_RED, DT_IOP_COLORPRIMARIES_YELLOW, and RGB.
Referenced by _node_base_rgb().
|
inlinestatic |
Definition at line 185 of file colorprimaries.c.
References DT_IOP_COLORPRIMARIES_BLUE, DT_IOP_COLORPRIMARIES_CYAN, DT_IOP_COLORPRIMARIES_GREEN, DT_IOP_COLORPRIMARIES_MAGENTA, DT_IOP_COLORPRIMARIES_RED, and DT_IOP_COLORPRIMARIES_YELLOW.
Referenced by gui_init().
|
static |
Definition at line 673 of file colorprimaries.c.
References _node_base_rgb(), dt_colorrings_graph_white(), dt_colorrings_profile_rgb_to_dt_ucs_hsb(), p, and RGB.
Referenced by _node_target_hsb(), and _refresh_slider_gradients().
|
static |
Definition at line 681 of file colorprimaries.c.
References _node_source_hsb(), dt_colorrings_wrap_hue_pi(), M_PI_F, and p.
Referenced by _refresh_slider_gradients().
|
static |
Definition at line 965 of file colorprimaries.c.
References dt_colorrings_profile_rgb_to_Ych(), dt_ioppr_get_pipe_current_profile_info(), IS_NULL_PTR, and RGB.
Referenced by color_picker_apply().
|
static |
The slider stops are purely visual guides. Convert every dt UCS HSB stop through the current display profile so the gradients match the monitor gamut and tone response used by the graph backgrounds elsewhere.
The saturation slider is meant to show the actual chroma axis of the edited node, not arbitrary dt UCS saturation extrema. Build its color ramp from the edited node RGB itself: grey at the same brightness, current node color in the middle, and the same RGB direction extended to the LUT cube shell at the top end.
Definition at line 995 of file colorprimaries.c.
References _node_source_hsb(), _node_target_hsb(), _set_slider_stop_from_hsb(), _set_slider_stop_from_profile_rgb(), dt_iop_module_t::dev, dt_bauhaus_slider_clear_stops(), dt_colorrings_brightness_to_axis_rgb(), dt_colorrings_graph_white(), dt_colorrings_hsb_to_profile_rgb(), dt_colorrings_project_to_cube_shell(), dt_colorrings_wrap_hue_2pi(), DT_COLORSPACE_HLG_REC2020, DT_INTENT_PERCEPTUAL, DT_IOP_COLORPRIMARIES_NODE_COUNT, dt_ioppr_add_profile_info_to_list(), dt_ioppr_get_pipe_output_profile_info(), g, dt_iop_module_t::gui_data, IS_NULL_PTR, M_PI_F, p, dt_iop_module_t::params, and dt_develop_t::preview_pipe.
Referenced by gui_changed().
|
static |
Definition at line 978 of file colorprimaries.c.
References dt_bauhaus_slider_set_stop(), dt_colorrings_graph_white(), dt_colorrings_hsb_to_display_rgb(), and RGB.
Referenced by _refresh_slider_gradients().
|
static |
Definition at line 986 of file colorprimaries.c.
References dt_bauhaus_slider_set_stop(), dt_colorrings_profile_rgb_to_display_rgb(), and RGB.
Referenced by _refresh_slider_gradients().
|
inlinestatic |
Definition at line 516 of file colorprimaries.c.
References dt_lut_viewer_control_node_t::input_rgb, and dt_lut_viewer_control_node_t::output_rgb.
Referenced by _build_viewer_control_nodes().
|
static |
Definition at line 1074 of file colorprimaries.c.
References _build_clut(), _build_viewer_control_nodes(), _lut_fields_equal(), dt_iop_colorprimaries_global_data_t::cache, dt_iop_colorprimaries_global_data_t::cache_generation, dt_iop_colorprimaries_global_data_t::cache_valid, dt_iop_colorprimaries_data_t::clut, dt_iop_colorprimaries_data_t::clut_level, dt_iop_module_t::dev, DT_COLORSPACE_HLG_REC2020, DT_INTENT_PERCEPTUAL, dt_ioppr_add_profile_info_to_list(), dt_ioppr_get_pipe_output_profile_info(), dt_lut_viewer_queue_draw(), dt_lut_viewer_set_control_nodes(), dt_lut_viewer_set_lut(), dt_pthread_rwlock_rdlock, dt_pthread_rwlock_unlock, dt_pthread_rwlock_wrlock, FALSE, g, dt_iop_module_t::global_data, dt_iop_module_t::gui_data, IS_NULL_PTR, dt_iop_colorprimaries_global_data_t::lock, p, dt_iop_module_t::params, dt_iop_colorprimaries_global_data_t::params, dt_develop_t::preview_pipe, and TRUE.
Referenced by commit_params().
| const char * aliases | ( | ) |
Definition at line 145 of file colorprimaries.c.
| 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 * | i | ||
| ) |
Definition at line 1205 of file colorprimaries.c.
References __OMP_PARALLEL_FOR__, dt_iop_buffer_dsc_t::channels, dt_dev_pixelpipe_iop_t::dsc_in, dt_colorrings_profile_rgb_to_Ych(), dt_ioppr_get_pipe_current_profile_info(), dt_iop_roi_t::height, i, IS_NULL_PTR, k, max, p, dt_iop_module_t::params, dt_dev_pixelpipe_iop_t::roi_out, and dt_iop_roi_t::width.
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 1348 of file colorprimaries.c.
References dt_iop_colorprimaries_global_data_t::cache, dt_iop_colorprimaries_data_t::clut, dt_iop_module_so_t::data, dt_free, dt_free_align, dt_opencl_free_kernel(), dt_pthread_rwlock_destroy, dt_iop_colorprimaries_global_data_t::kernel_exposure, dt_iop_colorprimaries_global_data_t::kernel_lut3d_pyramid, dt_iop_colorprimaries_global_data_t::kernel_lut3d_tetrahedral, dt_iop_colorprimaries_global_data_t::kernel_lut3d_trilinear, and dt_iop_colorprimaries_global_data_t::lock.
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 831 of file colorprimaries.c.
References d, dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 1185 of file colorprimaries.c.
References _pipe_rgb_to_Ych(), darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_dev_add_history_item, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color_max, dt_iop_module_t::picked_color_min, dt_gui_gtk_t::reset, and TRUE.
| 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 779 of file colorprimaries.c.
References _build_clut(), _lut_fields_equal(), _update_gui_lut_cache(), dt_iop_colorprimaries_global_data_t::cache, dt_iop_colorprimaries_global_data_t::cache_generation, dt_iop_colorprimaries_global_data_t::cache_valid, dt_iop_colorprimaries_data_t::clut, dt_iop_colorprimaries_data_t::clut_level, d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, DT_COLORSPACE_HLG_REC2020, DT_INTENT_PERCEPTUAL, dt_ioppr_add_profile_info_to_list(), dt_ioppr_get_pipe_current_profile_info(), DT_LUT3D_INTERP_TETRAHEDRAL, dt_pthread_rwlock_unlock, dt_pthread_rwlock_wrlock, g, dt_iop_module_t::global_data, dt_iop_module_t::gui_data, IS_NULL_PTR, dt_iop_colorprimaries_global_data_t::lock, p, dt_iop_colorprimaries_global_data_t::params, 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 169 of file colorprimaries.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 159 of file colorprimaries.c.
References IOP_GROUP_COLOR.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 150 of file colorprimaries.c.
References dt_iop_set_description().
| int flags | ( | ) |
Definition at line 164 of file colorprimaries.c.
References IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
Definition at line 1137 of file colorprimaries.c.
References _refresh_slider_gradients(), g, dt_iop_module_t::gui_data, and IS_NULL_PTR.
Referenced by gui_update().
| void gui_cleanup | ( | dt_iop_module_t * | self | ) |
Definition at line 1169 of file colorprimaries.c.
References dt_lut_viewer_destroy(), g, dt_iop_module_t::gui_data, and IOP_GUI_FREE.
| void gui_init | ( | dt_iop_module_t * | self | ) |
Definition at line 1228 of file colorprimaries.c.
References _new_section_label(), _node_name(), dt_iop_colorprimaries_params_t::brightness, dt_iop_module_t::default_params, dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_set_default(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_default(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_range(), dt_bauhaus_widget_set_label(), DT_COLOR_PICKER_AREA, dt_color_picker_new(), dt_gui_add_class(), DT_GUI_BOX_SPACING, DT_GUI_MODULE, DT_IOP_COLORPRIMARIES_NODE_COUNT, dt_lut_viewer_get_widget(), dt_lut_viewer_new(), FALSE, g, dt_iop_colorprimaries_params_t::gamut_coverage, gui_update(), dt_iop_colorprimaries_params_t::hue, dt_iop_colorprimaries_params_t::interpolation, IOP_GUI_ALLOC, dt_iop_colorprimaries_params_t::neutral_protection, dt_iop_colorprimaries_params_t::saturation, dt_iop_colorprimaries_params_t::sigma_L, dt_iop_colorprimaries_params_t::sigma_rho, dt_iop_colorprimaries_params_t::sigma_theta, TRUE, dt_iop_colorprimaries_params_t::white_level, and dt_iop_module_t::widget.
| void gui_update | ( | dt_iop_module_t * | self | ) |
Definition at line 1144 of file colorprimaries.c.
References darktable, dt_bauhaus_combobox_set(), dt_bauhaus_slider_set(), DT_IOP_COLORPRIMARIES_NODE_COUNT, g, darktable_t::gui, gui_changed(), dt_iop_module_t::gui_data, p, dt_iop_module_t::params, and dt_gui_gtk_t::reset.
Referenced by gui_init().
| void init | ( | dt_iop_module_t * | module | ) |
Definition at line 1363 of file colorprimaries.c.
References _init_default_params(), dt_iop_module_t::default_params, dt_iop_default_init(), dt_iop_module_t::params, and dt_iop_module_t::params_size.
| void init_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 1331 of file colorprimaries.c.
References dt_opencl_create_kernel(), dt_pthread_rwlock_init, dt_iop_colorprimaries_global_data_t::kernel_exposure, dt_iop_colorprimaries_global_data_t::kernel_lut3d_pyramid, dt_iop_colorprimaries_global_data_t::kernel_lut3d_tetrahedral, dt_iop_colorprimaries_global_data_t::kernel_lut3d_trilinear, and dt_iop_colorprimaries_global_data_t::lock.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 822 of file colorprimaries.c.
References d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, dt_calloc_align(), and DT_LUT3D_INTERP_TETRAHEDRAL.
| const char * name | ( | ) |
Definition at line 140 of file colorprimaries.c.
| __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 | ibuf, | ||
| void *const | obuf | ||
| ) |
Definition at line 919 of file colorprimaries.c.
References __OMP_PARALLEL_FOR__, ch, dt_iop_buffer_dsc_t::channels, d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::dsc_in, dt_iop_image_copy_by_size(), dt_ioppr_transform_image_colorspace_rgb(), dt_lut3d_apply(), dt_pthread_rwlock_rdlock, dt_pthread_rwlock_unlock, dt_iop_module_t::global_data, height, dt_iop_roi_t::height, IS_NULL_PTR, k, dt_iop_colorprimaries_global_data_t::lock, out, dt_dev_pixelpipe_iop_t::roi_in, width, 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 840 of file colorprimaries.c.
References dt_iop_colorprimaries_global_data_t::cache, cleanup(), dt_iop_colorprimaries_data_t::clut, d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::devid, DT_DEBUG_OPENCL, dt_ioppr_transform_image_colorspace_rgb_cl(), DT_LUT3D_INTERP_PYRAMID, DT_LUT3D_INTERP_TRILINEAR, dt_opencl_copy_host_to_device_constant(), dt_opencl_enqueue_kernel_2d(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_print(), dt_pthread_rwlock_rdlock, dt_pthread_rwlock_unlock, FALSE, dt_iop_module_t::global_data, height, dt_iop_roi_t::height, IS_NULL_PTR, kernel(), dt_iop_colorprimaries_global_data_t::kernel_exposure, dt_iop_colorprimaries_global_data_t::kernel_lut3d_pyramid, dt_iop_colorprimaries_global_data_t::kernel_lut3d_tetrahedral, dt_iop_colorprimaries_global_data_t::kernel_lut3d_trilinear, dt_iop_colorprimaries_global_data_t::lock, normalize(), dt_dev_pixelpipe_iop_t::roi_in, ROUNDUPDHT, ROUNDUPDWD, width, and dt_iop_roi_t::width.
|
static |
Definition at line 176 of file colorprimaries.c.
Referenced by _build_clut(), and _build_viewer_control_nodes().