|
| const char * | name () |
| |
| const char * | aliases () |
| |
| const char ** | description (struct dt_iop_module_t *self) |
| |
| int | default_group () |
| |
| int | flags () |
| |
| int | default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece) |
| |
| static void | _update_gui_lut_cache (dt_iop_module_t *self) |
| |
| static const char * | _node_name (const dt_iop_colorprimaries_node_t node) |
| |
| static void | _init_default_params (dt_iop_colorprimaries_params_t *p) |
| |
| static gboolean | _lut_fields_equal (const dt_iop_colorprimaries_params_t *const a, const dt_iop_colorprimaries_params_t *const b) |
| |
| static void | _node_corner_rgb (const dt_iop_colorprimaries_node_t node, dt_aligned_pixel_t RGB) |
| |
| static void | _node_base_rgb (const dt_iop_colorprimaries_node_t node, const float gamut_coverage, dt_aligned_pixel_t RGB) |
| |
| static float | _mix_hue_delta_weighted (const float hue_a, const float hue_b, const float weight_a, const float weight_b) |
| |
| static float | _hsb_distance (const dt_aligned_pixel_t a, const dt_aligned_pixel_t b) |
| |
| static void | _black_white_rgb (const gboolean white, dt_aligned_pixel_t RGB) |
| |
| static void | _halfway_to_axis_rgb (const dt_aligned_pixel_t source_rgb, dt_aligned_pixel_t halfway_rgb) |
| |
| static gboolean | _build_anchor_from_source_rgb (const dt_aligned_pixel_t source_rgb, const float hue_delta, const float saturation_delta, const float brightness_delta, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_colorrings_sparse_anchor_t *const anchor) |
| |
| static gboolean | _build_halfway_radial_anchor_from_source_rgb (const dt_aligned_pixel_t source_rgb, const float hue_delta, const float saturation_delta, const float brightness_delta, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_colorrings_sparse_anchor_t *const anchor, dt_aligned_pixel_t halfway_rgb) |
| |
| static gboolean | _build_halfway_extreme_anchor_from_source_rgb (const dt_aligned_pixel_t source_rgb, const dt_aligned_pixel_t extreme_rgb, const float hue_delta, const float saturation_delta, const float brightness_delta, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_colorrings_sparse_anchor_t *const anchor, dt_aligned_pixel_t halfway_rgb) |
| |
| static void | _apply_anchor_to_rgb (const dt_aligned_pixel_t source_rgb, const dt_colorrings_sparse_anchor_t *const anchor, dt_aligned_pixel_t target_rgb) |
| |
| static gboolean | _build_node_anchor (const dt_iop_colorprimaries_params_t *const p, const dt_iop_colorprimaries_node_t node, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_colorrings_sparse_anchor_t *const anchor) |
| |
| static gboolean | _build_edge_edit (const dt_iop_colorprimaries_params_t *const p, const dt_iop_colorprimaries_edge_t edge, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_aligned_pixel_t source_rgb, float *const hue_delta, float *const saturation_delta, float *const brightness_delta) |
| |
| static void | _store_viewer_control_node (dt_lut_viewer_control_node_t *const control_nodes, int *const count, const dt_aligned_pixel_t input_rgb, const dt_aligned_pixel_t output_rgb) |
| |
| static void | _append_anchor (dt_colorrings_sparse_anchor_t *const anchors, int *const anchor_count, const dt_colorrings_sparse_anchor_t *const anchor) |
| |
| static gboolean | _build_edge_anchor (const dt_iop_colorprimaries_params_t *const p, const dt_iop_colorprimaries_edge_t edge, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_colorrings_sparse_anchor_t *const anchor) |
| |
| static gboolean | _build_node_radial_midpoint_anchor (const dt_iop_colorprimaries_params_t *const p, const dt_iop_colorprimaries_node_t node, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_colorrings_sparse_anchor_t *const anchor, dt_aligned_pixel_t midpoint_rgb) |
| |
| static gboolean | _build_node_black_white_midpoint_anchor (const dt_iop_colorprimaries_params_t *const p, const dt_iop_colorprimaries_node_t node, const gboolean toward_white, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_colorrings_sparse_anchor_t *const anchor, dt_aligned_pixel_t midpoint_rgb) |
| |
| static gboolean | _build_edge_radial_midpoint_anchor (const dt_iop_colorprimaries_params_t *const p, const dt_iop_colorprimaries_edge_t edge, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_colorrings_sparse_anchor_t *const anchor, dt_aligned_pixel_t midpoint_rgb) |
| |
| static int | _build_viewer_control_nodes (const dt_iop_colorprimaries_params_t *const p, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_lut_viewer_control_node_t *const control_nodes) |
| |
| static void | _node_source_hsb (const dt_iop_colorprimaries_params_t *const p, const dt_iop_colorprimaries_node_t node, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_aligned_pixel_t HSB) |
| |
| static void | _node_target_hsb (const dt_iop_colorprimaries_params_t *const p, const dt_iop_colorprimaries_node_t node, const dt_iop_order_iccprofile_info_t *const lut_profile, dt_aligned_pixel_t HSB) |
| |
| static void | _build_clut (dt_iop_colorprimaries_data_t *d, const dt_iop_colorprimaries_params_t *p, const dt_iop_order_iccprofile_info_t *lut_profile) |
| |
| 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) |
| |
| void | init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| |
| void | cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| |
| __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) |
| |
| static void | _pipe_rgb_to_Ych (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_aligned_pixel_t RGB, dt_aligned_pixel_t Ych) |
| |
| static void | _set_slider_stop_from_hsb (GtkWidget *slider, const float stop, const dt_aligned_pixel_t HSB, const dt_iop_order_iccprofile_info_t *display_profile) |
| |
| static void | _set_slider_stop_from_profile_rgb (GtkWidget *slider, const float stop, const dt_aligned_pixel_t RGB, const dt_iop_order_iccprofile_info_t *lut_profile, const dt_iop_order_iccprofile_info_t *display_profile) |
| |
| static void | _refresh_slider_gradients (dt_iop_module_t *self) |
| |
| void | gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous) |
| |
| void | gui_update (dt_iop_module_t *self) |
| |
| void | gui_cleanup (dt_iop_module_t *self) |
| |
| static GtkWidget * | _new_section_label (GtkWidget *box, const char *label) |
| |
| void | color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| |
| 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) |
| |
| void | gui_init (dt_iop_module_t *self) |
| |
| void | init_global (dt_iop_module_so_t *module) |
| |
| void | cleanup_global (dt_iop_module_so_t *module) |
| |
| void | init (dt_iop_module_t *module) |
| |
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.
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().
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.
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().
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.
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().