![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Include dependency graph for colorequal_shared.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dt_colorrings_node_t |
| struct | dt_colorrings_sparse_anchor_t |
Macros | |
| #define | DT_COLORRINGS_ANGLE_SHIFT +20.f |
| #define | DT_COLORRINGS_NUM_RINGS 3 |
| #define | DT_COLORRINGS_MAXNODES 20 |
| #define | DT_COLORRINGS_DEFAULT_NODES 8 |
| #define | DT_COLORRINGS_HUE_SAMPLES 64 |
| #define | DT_COLORRINGS_CLUT_LEVEL 64 |
| #define | DT_COLORRINGS_LOCAL_FIELD_RINGS (DT_COLORRINGS_NUM_RINGS + 1) |
Typedefs | |
| typedef enum dt_colorrings_ring_t | dt_colorrings_ring_t |
| typedef struct dt_colorrings_node_t | dt_colorrings_node_t |
| typedef struct dt_colorrings_sparse_anchor_t | dt_colorrings_sparse_anchor_t |
Enumerations | |
| enum | dt_colorrings_ring_t { DT_COLORRINGS_RING_DARK = 0 , DT_COLORRINGS_RING_MID = 1 , DT_COLORRINGS_RING_LIGHT = 2 } |
| #define DT_COLORRINGS_ANGLE_SHIFT +20.f |
We keep the same GUI hue convention as the original color equalizer so the red primary sits at the left edge of the hue graphs.
| #define DT_COLORRINGS_CLUT_LEVEL 64 |
| #define DT_COLORRINGS_DEFAULT_NODES 8 |
| #define DT_COLORRINGS_HUE_SAMPLES 64 |
| #define DT_COLORRINGS_LOCAL_FIELD_RINGS (DT_COLORRINGS_NUM_RINGS + 1) |
| #define DT_COLORRINGS_MAXNODES 20 |
| #define DT_COLORRINGS_NUM_RINGS 3 |
| typedef struct dt_colorrings_node_t dt_colorrings_node_t |
| typedef enum dt_colorrings_ring_t dt_colorrings_ring_t |
| typedef struct dt_colorrings_sparse_anchor_t dt_colorrings_sparse_anchor_t |
| enum dt_colorrings_ring_t |
| gboolean dt_colorrings_apply_rgb_lut | ( | const dt_aligned_pixel_t | input_rgb, |
| float | white_level, | ||
| const dt_iop_order_iccprofile_info_t * | work_profile, | ||
| const dt_iop_order_iccprofile_info_t * | lut_profile, | ||
| const float * | clut, | ||
| uint16_t | clut_level, | ||
| dt_pthread_rwlock_t * | clut_lock, | ||
| dt_lut3d_interpolation_t | interpolation, | ||
| dt_aligned_pixel_t | output_rgb | ||
| ) |
References dt_ioppr_transform_image_colorspace_rgb(), dt_lut3d_apply(), dt_pthread_rwlock_rdlock, dt_pthread_rwlock_unlock, FALSE, IS_NULL_PTR, and TRUE.
Referenced by _refresh_preview_cursor_sample().
| void dt_colorrings_brightness_to_axis_rgb | ( | float | brightness, |
| float | white, | ||
| const dt_iop_order_iccprofile_info_t * | profile, | ||
| dt_aligned_pixel_t | RGB | ||
| ) |
References dt_colorrings_ring_axis_position_from_brightness(), and RGB.
Referenced by _build_anchor_from_source_rgb(), _build_clut(), _build_viewer_control_nodes(), _refresh_slider_gradients(), and _sample_ring_anchor().
| void dt_colorrings_compute_reference_saturations | ( | float | white, |
| float | reference_saturation[3] | ||
| ) |
| void dt_colorrings_cross3 | ( | const dt_aligned_pixel_t | a, |
| const dt_aligned_pixel_t | b, | ||
| dt_aligned_pixel_t | out | ||
| ) |
References out.
Referenced by dt_colorrings_rotate_around_axis().
| float dt_colorrings_curve_periodic_distance | ( | float | x0, |
| float | x1 | ||
| ) |
| float dt_colorrings_curve_periodic_sample | ( | const dt_colorrings_node_t * | curve, |
| int | nodes, | ||
| float | x | ||
| ) |
GUI state and history entries are expected to normalize the editable hue nodes before they reach the shared sampler. Keep the interpolation backend away from empty or degenerate anchor sets anyway so it never throws from the underlying C++ spline code while a module is still repairing its params.
References DT_COLORRINGS_MAXNODES, interpolate_val_V2_periodic(), IS_NULL_PTR, k, MONOTONE_HERMITE, dt_colorrings_node_t::x, CurveAnchorPoint::x, x, dt_colorrings_node_t::y, and CurveAnchorPoint::y.
Referenced by _area_button_press_callback(), _build_clut(), _build_viewer_control_nodes(), _cursor_curve_state(), and button_pressed().
| float dt_colorrings_curve_x_to_hue | ( | float | x | ) |
References DT_COLORRINGS_ANGLE_SHIFT, dt_colorrings_wrap_hue_pi(), M_PI_F, and x.
Referenced by _build_clut(), _build_viewer_control_nodes(), _compute_reference_saturation(), _draw_curve(), and _graph_background_hsb().
| float dt_colorrings_distance_to_cube_shell | ( | const dt_aligned_pixel_t | axis, |
| const dt_aligned_pixel_t | direction | ||
| ) |
Referenced by dt_colorrings_project_to_cube_shell().
| float dt_colorrings_dot3 | ( | const dt_aligned_pixel_t | a, |
| const dt_aligned_pixel_t | b | ||
| ) |
Referenced by dt_colorrings_rotate_around_axis().
| void dt_colorrings_eval_local_field | ( | const float | x[3], |
| const float | anchor_L[(3+1)][64], | ||
| const float | anchor_rho[(3+1)][64], | ||
| const float | anchor_theta[(3+1)][64], | ||
| const float | delta_L[(3+1)][64], | ||
| const float | chroma_scale[(3+1)][64], | ||
| const float | delta_theta[(3+1)][64], | ||
| float | inv_sigma_L, | ||
| float | inv_sigma_rho, | ||
| float | inv_sigma_theta, | ||
| float | rho0, | ||
| float | out[3] | ||
| ) |
| void dt_colorrings_eval_sparse_local_field | ( | const float | x[3], |
| const dt_colorrings_sparse_anchor_t * | anchors, | ||
| int | anchor_count, | ||
| float | inv_sigma_L, | ||
| float | inv_sigma_rho, | ||
| float | inv_sigma_theta, | ||
| float | rho0, | ||
| float | out[3] | ||
| ) |
Sparse anchors let modules author their own control geometry while reusing the same RGB cylindrical local field as the original color rings. We therefore loop only over the caller-provided anchors instead of synthesizing fake ring samples that would bias the normalization.
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(), dt_colorrings_rgb_to_gray_cyl(), dt_colorrings_wendland_c2(), dt_colorrings_wrap_pi(), IS_NULL_PTR, k, dt_colorrings_sparse_anchor_t::L, out, dt_colorrings_sparse_anchor_t::rho, t, dt_colorrings_sparse_anchor_t::weight, and x.
Referenced by dt_colorrings_fill_lut_sparse_local_field().
| void dt_colorrings_fill_lut_local_field | ( | float * | lut, |
| int | level, | ||
| const float | anchor_L[(3+1)][64], | ||
| const float | anchor_rho[(3+1)][64], | ||
| const float | anchor_theta[(3+1)][64], | ||
| const float | delta_L[(3+1)][64], | ||
| const float | chroma_scale[(3+1)][64], | ||
| const float | delta_theta[(3+1)][64], | ||
| float | inv_sigma_L, | ||
| float | inv_sigma_rho, | ||
| float | inv_sigma_theta, | ||
| float | rho0 | ||
| ) |
| void dt_colorrings_fill_lut_sparse_local_field | ( | float * | lut, |
| int | level, | ||
| const dt_colorrings_sparse_anchor_t * | anchors, | ||
| int | anchor_count, | ||
| float | inv_sigma_L, | ||
| float | inv_sigma_rho, | ||
| float | inv_sigma_theta, | ||
| float | rho0 | ||
| ) |
References __OMP_PARALLEL_FOR__, d, dt_colorrings_eval_sparse_local_field(), g, lut, r, and x.
Referenced by _build_clut().
| float dt_colorrings_graph_white | ( | void | ) |
References Y_to_dt_UCS_L_star().
Referenced by _build_anchor_from_source_rgb(), _build_clut(), _build_edge_edit(), _build_halfway_extreme_anchor_from_source_rgb(), _build_halfway_radial_anchor_from_source_rgb(), _build_viewer_control_nodes(), _draw_curve(), _node_source_hsb(), _pipe_rgb_to_dt_ucs_hsb(), _refresh_slider_gradients(), and _set_slider_stop_from_hsb().
| void dt_colorrings_gray_axis_rgb_from_L | ( | float | L, |
| dt_aligned_pixel_t | RGB | ||
| ) |
| void dt_colorrings_gray_basis_to_rgb | ( | float | L, |
| float | u, | ||
| float | v, | ||
| float | rgb[3] | ||
| ) |
| void dt_colorrings_hsb_to_display_rgb | ( | const dt_aligned_pixel_t | HSB, |
| float | white, | ||
| const dt_iop_order_iccprofile_info_t * | display_profile, | ||
| dt_aligned_pixel_t | RGB | ||
| ) |
References _dt_ucs_hsb_to_display_rgb_normalized(), for_each_channel, and RGB.
Referenced by _draw_curve(), _draw_graph_background(), and _set_slider_stop_from_hsb().
| void dt_colorrings_hsb_to_profile_rgb | ( | const dt_aligned_pixel_t | HSB, |
| float | white, | ||
| const dt_iop_order_iccprofile_info_t * | profile, | ||
| dt_aligned_pixel_t | RGB | ||
| ) |
References _xyz_d50_to_profile_rgb(), RGB, XYZ_D50, XYZ_D65, and XYZ_D65_to_D50().
Referenced by _build_clut(), _build_viewer_control_nodes(), _refresh_slider_gradients(), and dt_colorrings_ring_axis_position_from_brightness().
| float dt_colorrings_hue_to_curve_x | ( | float | hue | ) |
References DT_COLORRINGS_ANGLE_SHIFT, dt_colorrings_wrap_hue_2pi(), and M_PI_F.
Referenced by _cursor_curve_state(), _draw_curve(), button_pressed(), and scrolled().
| void dt_colorrings_normalize3 | ( | dt_aligned_pixel_t | vector | ) |
References dt_colorrings_vector_norm3().
| void dt_colorrings_profile_rgb_to_display_rgb | ( | const dt_aligned_pixel_t | RGB, |
| const dt_iop_order_iccprofile_info_t * | profile, | ||
| const dt_iop_order_iccprofile_info_t * | display_profile, | ||
| dt_aligned_pixel_t | display_rgb | ||
| ) |
References _profile_linear_rgb_to_display_rgb_normalized(), _xyz_d50_to_profile_linear_rgb(), for_each_channel, dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, dt_iop_order_iccprofile_info_t::matrix_in_transposed, dt_iop_order_iccprofile_info_t::nonlinearlut, RGB, and XYZ_D50.
Referenced by _set_slider_stop_from_profile_rgb().
| void dt_colorrings_profile_rgb_to_dt_ucs_hsb | ( | const dt_aligned_pixel_t | RGB, |
| float | white, | ||
| const dt_iop_order_iccprofile_info_t * | profile, | ||
| dt_aligned_pixel_t | HSB | ||
| ) |
| void dt_colorrings_profile_rgb_to_dt_ucs_jch | ( | const dt_aligned_pixel_t | RGB, |
| float | white, | ||
| const dt_iop_order_iccprofile_info_t * | profile, | ||
| dt_aligned_pixel_t | JCH | ||
| ) |
References dt_XYZ_to_xyY(), for_each_channel, IS_NULL_PTR, dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, dt_iop_order_iccprofile_info_t::matrix_in_transposed, dt_iop_order_iccprofile_info_t::nonlinearlut, RGB, xyY, xyY_to_dt_UCS_JCH(), XYZ_D50, XYZ_D50_to_D65(), and XYZ_D65.
Referenced by dt_colorrings_profile_rgb_to_dt_ucs_hsb().
| void dt_colorrings_profile_rgb_to_Ych | ( | const dt_aligned_pixel_t | RGB, |
| const dt_iop_order_iccprofile_info_t * | profile, | ||
| dt_aligned_pixel_t | Ych | ||
| ) |
References IS_NULL_PTR, dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, M_PI_F, dt_iop_order_iccprofile_info_t::matrix_in_transposed, dt_iop_order_iccprofile_info_t::nonlinearlut, RGB, XYZ_D50, XYZ_D50_to_D65(), and XYZ_D65.
Referenced by _pipe_rgb_to_Ych(), _pipe_rgb_to_Ych(), and autoset().
| void dt_colorrings_project_to_cube_shell | ( | const dt_aligned_pixel_t | axis, |
| dt_aligned_pixel_t | RGB | ||
| ) |
References dt_colorrings_distance_to_cube_shell(), dt_colorrings_vector_norm3(), and RGB.
Referenced by _apply_anchor_to_rgb(), _build_clut(), _build_viewer_control_nodes(), _refresh_preview_cursor_sample(), _refresh_slider_gradients(), color_picker_apply(), dt_colorrings_eval_local_field(), and dt_colorrings_eval_sparse_local_field().
| void dt_colorrings_rgb_to_gray_cyl | ( | const float | rgb[3], |
| float * | L, | ||
| float * | rho, | ||
| float * | theta | ||
| ) |
| float dt_colorrings_ring_axis_position_from_brightness | ( | float | brightness, |
| float | white, | ||
| const dt_iop_order_iccprofile_info_t * | profile | ||
| ) |
References dt_colorrings_hsb_to_profile_rgb(), and RGB.
Referenced by dt_colorrings_brightness_to_axis_rgb().
| float dt_colorrings_ring_brightness | ( | dt_colorrings_ring_t | ring | ) |
| void dt_colorrings_rotate_around_axis | ( | const dt_aligned_pixel_t | input, |
| const dt_aligned_pixel_t | axis, | ||
| float | cos_angle, | ||
| float | sin_angle, | ||
| dt_aligned_pixel_t | output | ||
| ) |
References dt_colorrings_cross3(), and dt_colorrings_dot3().
| float dt_colorrings_vector_norm3 | ( | const dt_aligned_pixel_t | vector | ) |
Referenced by dt_colorrings_normalize3(), and dt_colorrings_project_to_cube_shell().
| float dt_colorrings_wendland_c2 | ( | float | d | ) |
Referenced by dt_colorrings_eval_local_field(), and dt_colorrings_eval_sparse_local_field().
| float dt_colorrings_wrap_hue_2pi | ( | float | hue | ) |
References M_PI_F.
Referenced by _refresh_slider_gradients(), _sample_ring_hue(), dt_colorrings_hue_to_curve_x(), and dt_colorrings_wrap_hue_pi().
| float dt_colorrings_wrap_hue_pi | ( | float | hue | ) |
References dt_colorrings_wrap_hue_2pi(), and M_PI_F.
Referenced by _build_clut(), _build_viewer_control_nodes(), _graph_background_hsb(), _node_target_hsb(), _refresh_preview_cursor_sample(), color_picker_apply(), and dt_colorrings_curve_x_to_hue().
| float dt_colorrings_wrap_pi | ( | float | x | ) |