![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <math.h>#include <stdlib.h>#include <string.h>#include "widgets/bauhaus.h"#include "pixel/colorequal_shared.h"#include "system/macros.h"#include "system/openmp.h"#include "system/target_clones.h"#include "system/mem_alloc.h"#include "system/simd.h"#include "common/logging.h"#include "common/times.h"#include "common/module_versioning.h"#include "common/imagebuf.h"#include "gui/lut_viewer.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "gui/color_picker_proxy.h"#include "iop/iop_api.h"#include "widgets/label.h"#include "widgets/notebook.h"#include "widgets/widget_style.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 55 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_BLACK_WHITE_COUNT (2 * DT_IOP_COLORPRIMARIES_NODE_COUNT) |
Definition at line 54 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_EDGE_COUNT 6 |
Definition at line 52 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_INV_SQRT2 0.7071067811865475f |
Definition at line 63 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_MAX_ANCHORS |
Definition at line 56 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_NODE_COUNT 6 |
Definition at line 51 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_RADIAL_COUNT (DT_IOP_COLORPRIMARIES_NODE_COUNT + DT_IOP_COLORPRIMARIES_EDGE_COUNT) |
Definition at line 53 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_SQRT3 1.7320508075688772f |
Definition at line 62 of file colorprimaries.c.
| #define DT_IOP_COLORPRIMARIES_VIEWER_CONTROL_NODES |
Definition at line 59 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 65 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 72 of file colorprimaries.c.
|
inlinestatic |
Definition at line 543 of file colorprimaries.c.
Referenced by _build_clut().
|
static |
Definition at line 455 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 305 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 323 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 709 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, 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_debug_flags(), 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, value, and dt_colorrings_sparse_anchor_t::weight.
Referenced by _update_gui_lut_cache(), and commit_params().
|
static |
Definition at line 550 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 483 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 594 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 423 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 379 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 473 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 578 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 565 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 612 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 313 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 297 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 221 of file colorprimaries.c.
References DT_IOP_COLORPRIMARIES_INV_SQRT2, DT_IOP_COLORPRIMARIES_TETRAHEDRAL, and p.
Referenced by init().
|
inlinestatic |
Definition at line 233 of file colorprimaries.c.
Referenced by _update_gui_lut_cache(), and commit_params().
|
inlinestatic |
Definition at line 288 of file colorprimaries.c.
References M_PI_F.
Referenced by _build_edge_edit().
Definition at line 1200 of file colorprimaries.c.
References dt_ui_section_label_new(), FALSE, and TRUE.
Referenced by gui_init().
|
inlinestatic |
Definition at line 278 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 239 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 201 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 689 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 697 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 1001 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 1031 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_colorspaces_add_profile(), DT_INTENT_PERCEPTUAL, DT_IOP_COLORPRIMARIES_NODE_COUNT, dt_iop_gui_data(), dt_ioppr_get_pipe_output_profile_info(), g, 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 1014 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 1022 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 532 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 1110 of file colorprimaries.c.
References _build_clut(), _build_viewer_control_nodes(), _lut_fields_equal(), dt_iop_module_t::dev, DT_COLORSPACE_HLG_REC2020, dt_colorspaces_add_profile(), DT_INTENT_PERCEPTUAL, dt_iop_gui_data(), dt_ioppr_get_pipe_output_profile_info(), dt_lut_viewer_queue_draw(), dt_lut_viewer_set_control_nodes(), dt_lut_viewer_set_lut(), FALSE, g, IS_NULL_PTR, p, dt_iop_module_t::params, dt_develop_t::preview_pipe, and TRUE.
Referenced by gui_changed().
| const char * aliases | ( | ) |
Definition at line 161 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 1228 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 1372 of file colorprimaries.c.
References dt_iop_module_so_t::data, dt_free, dt_opencl_free_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, and dt_iop_colorprimaries_global_data_t::kernel_lut3d_trilinear.
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 869 of file colorprimaries.c.
References d, dt_dev_pixelpipe_iop_t::data, dt_free_align, and IS_NULL_PTR.
| 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 1208 of file colorprimaries.c.
References _pipe_rgb_to_Ych(), dt_iop_module_t::dev, dt_bauhaus_slider_set(), dt_dev_add_history_item, dt_gui_freeze_begin, dt_gui_freeze_end, dt_iop_gui_data(), g, p, dt_iop_module_t::params, dt_iop_module_t::picked_color_max, dt_iop_module_t::picked_color_min, 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 795 of file colorprimaries.c.
References _build_clut(), _lut_fields_equal(), d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, DT_COLORSPACE_HLG_REC2020, dt_colorspaces_add_profile(), DT_INTENT_PERCEPTUAL, dt_ioppr_get_pipe_current_profile_info(), DT_LUT3D_INTERP_TETRAHEDRAL, dt_dev_pixelpipe_iop_t::enabled, FALSE, IS_NULL_PTR, p, 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 185 of file colorprimaries.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 175 of file colorprimaries.c.
References IOP_GROUP_COLOR.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 166 of file colorprimaries.c.
References dt_iop_set_description().
| int flags | ( | ) |
Definition at line 180 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 1158 of file colorprimaries.c.
References _refresh_slider_gradients(), _update_gui_lut_cache(), dt_iop_gui_data(), g, and IS_NULL_PTR.
Referenced by gui_update().
| void gui_cleanup | ( | dt_iop_module_t * | self | ) |
Definition at line 1191 of file colorprimaries.c.
References dt_free_align, dt_iop_gui_data(), dt_lut_viewer_destroy(), g, and IOP_GUI_FREE.
| void gui_init | ( | dt_iop_module_t * | self | ) |
Definition at line 1251 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(), dt_ui_notebook_set_picker_owner(), FALSE, g, dt_iop_colorprimaries_params_t::gamut_coverage, dt_iop_module_t::gui, 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_gui_t::widget.
| void gui_update | ( | dt_iop_module_t * | self | ) |
Definition at line 1166 of file colorprimaries.c.
References dt_bauhaus_combobox_set(), dt_bauhaus_slider_set(), dt_gui_freeze_begin, dt_gui_freeze_end, DT_IOP_COLORPRIMARIES_NODE_COUNT, dt_iop_gui_data(), g, gui_changed(), p, and dt_iop_module_t::params.
Referenced by gui_init().
| void init | ( | dt_iop_module_t * | module | ) |
Definition at line 1384 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 1356 of file colorprimaries.c.
References dt_opencl_create_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, and dt_iop_colorprimaries_global_data_t::kernel_lut3d_trilinear.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 854 of file colorprimaries.c.
References d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, dt_calloc_align(), DT_LUT3D_INTERP_TETRAHEDRAL, and IS_NULL_PTR.
| const char * name | ( | ) |
Definition at line 156 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 958 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(), height, dt_iop_roi_t::height, IS_NULL_PTR, k, 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 881 of file colorprimaries.c.
References cleanup(), 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(), 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, normalize(), dt_dev_pixelpipe_iop_t::roi_in, ROUNDUPDHT, ROUNDUPDWD, width, and dt_iop_roi_t::width.
|
static |
Definition at line 192 of file colorprimaries.c.
Referenced by _build_clut(), and _build_viewer_control_nodes().