Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
channelmixerrgb_shared.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <glib.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct _GtkWidget GtkWidget;
13
14#define DT_IOP_CHANNELMIXER_SHARED_SIMPLE_TAN_SCALE 1.55f
15#define DT_IOP_CHANNELMIXER_SHARED_SIMPLE_EPS 5e-5f
16#define DT_IOP_CHANNELMIXER_SHARED_SIMPLE_CHROMA_PROBE 0.5f
17
25
32
42
55
56float dt_iop_channelmixer_shared_wrap_pi(float angle);
65 GtkWidget *const widgets[6]);
69 GtkWidget *const widgets[9]);
70
72gboolean dt_iop_channelmixer_shared_get_matrix(const float rows[3][3], const gboolean normalize[3],
73 gboolean force_normalize, float M[3][3]);
74void dt_iop_channelmixer_shared_set_matrix(float rows[3][3], const float M[3][3]);
75void dt_iop_channelmixer_shared_mul3x3(const float A[3][3], const float B[3][3], float C[3][3]);
76
80 float M[3][3]);
81float dt_iop_channelmixer_shared_roundtrip_error(const float M[3][3], const float roundtrip[3][3]);
82
87 float M[3][3]);
89 const float M[3][3],
91
94 const dt_iop_order_iccprofile_info_t *work_profile,
95 const dt_iop_order_iccprofile_info_t *display_profile,
96 dt_aligned_pixel_t display_rgb);
98 const dt_iop_order_iccprofile_info_t *work_profile,
99 const dt_iop_order_iccprofile_info_t *display_profile,
100 float display_rgb[3]);
101void dt_iop_channelmixer_shared_paint_temperature_slider(GtkWidget *widget, float temperature_min,
102 float temperature_max);
104 const dt_iop_order_iccprofile_info_t *work_profile,
105 const dt_iop_order_iccprofile_info_t *display_profile,
106 float r, float g, float b, gboolean normalize,
107 const float row[3], GtkWidget *const widgets[3]);
109 const dt_iop_order_iccprofile_info_t *work_profile,
110 const dt_iop_order_iccprofile_info_t *display_profile,
112 GtkWidget *const widgets[6]);
115 const dt_iop_order_iccprofile_info_t *display_profile,
117 const dt_iop_channelmixer_shared_primaries_params_t *primaries, GtkWidget *const widgets[9]);
118
119#ifdef __cplusplus
120}
121#endif
static __DT_CLONE_TARGETS__ void normalize(float *const buffer, const size_t width, const size_t height, const float norm)
Definition blurs.c:347
float dt_iop_channelmixer_shared_decode_simple_stretch(float slider)
Definition channelmixerrgb_shared.c:59
void dt_iop_channelmixer_shared_simple_from_sliders(GtkWidget *const widgets[6], dt_iop_channelmixer_shared_simple_params_t *simple)
Definition channelmixerrgb_shared.c:77
void dt_iop_channelmixer_shared_module_color_to_display(const float module_color[3], dt_adaptation_t adaptation, const dt_iop_order_iccprofile_info_t *work_profile, const dt_iop_order_iccprofile_info_t *display_profile, float display_rgb[3])
Definition channelmixerrgb_shared.c:615
void dt_iop_channelmixer_shared_paint_primaries_sliders(dt_adaptation_t adaptation, const dt_iop_order_iccprofile_info_t *work_profile, const dt_iop_order_iccprofile_info_t *display_profile, dt_iop_channelmixer_shared_primaries_basis_t basis, const dt_iop_channelmixer_shared_primaries_params_t *primaries, GtkWidget *const widgets[9])
Definition channelmixerrgb_shared.c:859
dt_iop_channelmixer_shared_simple_probe_t
Definition channelmixerrgb_shared.h:27
@ DT_IOP_CHANNELMIXER_SHARED_SIMPLE_PROBE_AXIS_2
Definition channelmixerrgb_shared.h:30
@ DT_IOP_CHANNELMIXER_SHARED_SIMPLE_PROBE_AXIS_1
Definition channelmixerrgb_shared.h:29
@ DT_IOP_CHANNELMIXER_SHARED_SIMPLE_PROBE_ROTATION
Definition channelmixerrgb_shared.h:28
float dt_iop_channelmixer_shared_decode_simple_coupling_amount(float slider)
Definition channelmixerrgb_shared.c:71
void dt_iop_channelmixer_shared_work_rgb_to_display(const dt_aligned_pixel_t work_rgb, const dt_iop_order_iccprofile_info_t *work_profile, const dt_iop_order_iccprofile_info_t *display_profile, dt_aligned_pixel_t display_rgb)
Definition channelmixerrgb_shared.c:584
void dt_iop_channelmixer_shared_simple_probe_source(dt_iop_channelmixer_shared_simple_probe_t probe, float source[3])
Definition channelmixerrgb_shared.c:550
float dt_iop_channelmixer_shared_encode_simple_stretch(float stretch)
Definition channelmixerrgb_shared.c:52
void dt_iop_channelmixer_shared_primaries_to_sliders(const dt_iop_channelmixer_shared_primaries_params_t *primaries, GtkWidget *const widgets[9])
Definition channelmixerrgb_shared.c:113
gboolean dt_iop_channelmixer_shared_primaries_from_matrix(dt_iop_channelmixer_shared_primaries_basis_t basis, const float M[3][3], dt_iop_channelmixer_shared_primaries_params_t *primaries)
Definition channelmixerrgb_shared.c:500
void dt_iop_channelmixer_shared_paint_simple_sliders(dt_adaptation_t adaptation, const dt_iop_order_iccprofile_info_t *work_profile, const dt_iop_order_iccprofile_info_t *display_profile, const dt_iop_channelmixer_shared_simple_params_t *simple, GtkWidget *const widgets[6])
Definition channelmixerrgb_shared.c:750
float dt_iop_channelmixer_shared_encode_simple_coupling_amount(float amount)
Definition channelmixerrgb_shared.c:66
void dt_iop_channelmixer_shared_set_matrix(float rows[3][3], const float M[3][3])
Definition channelmixerrgb_shared.c:150
void dt_iop_channelmixer_shared_simple_to_sliders(const dt_iop_channelmixer_shared_simple_params_t *simple, GtkWidget *const widgets[6])
Definition channelmixerrgb_shared.c:88
gboolean dt_iop_channelmixer_shared_primaries_to_matrix(dt_iop_channelmixer_shared_primaries_basis_t basis, const dt_iop_channelmixer_shared_primaries_params_t *primaries, float M[3][3])
Definition channelmixerrgb_shared.c:447
void dt_iop_channelmixer_shared_simple_from_matrix(const float M[3][3], dt_iop_channelmixer_shared_simple_params_t *simple)
Definition channelmixerrgb_shared.c:201
void dt_iop_channelmixer_shared_mul3x3(const float A[3][3], const float B[3][3], float C[3][3])
Definition channelmixerrgb_shared.c:157
gboolean dt_iop_channelmixer_shared_rows_are_normalized(const gboolean normalize[3])
Definition channelmixerrgb_shared.c:127
dt_iop_channelmixer_shared_primaries_basis_t dt_iop_channelmixer_shared_primaries_basis_from_adaptation(dt_adaptation_t adaptation)
Definition channelmixerrgb_shared.c:265
float dt_iop_channelmixer_shared_wrap_pi(float angle)
Definition channelmixerrgb_shared.c:38
float dt_iop_channelmixer_shared_roundtrip_error(const float M[3][3], const float roundtrip[3][3])
Definition channelmixerrgb_shared.c:254
dt_iop_channelmixer_shared_primaries_basis_t
Definition channelmixerrgb_shared.h:19
@ DT_IOP_CHANNELMIXER_SHARED_PRIMARIES_BASIS_CAT16
Definition channelmixerrgb_shared.h:23
@ DT_IOP_CHANNELMIXER_SHARED_PRIMARIES_BASIS_RGB
Definition channelmixerrgb_shared.h:20
@ DT_IOP_CHANNELMIXER_SHARED_PRIMARIES_BASIS_BRADFORD
Definition channelmixerrgb_shared.h:22
@ DT_IOP_CHANNELMIXER_SHARED_PRIMARIES_BASIS_XYZ
Definition channelmixerrgb_shared.h:21
gboolean dt_iop_channelmixer_shared_get_matrix(const float rows[3][3], const gboolean normalize[3], gboolean force_normalize, float M[3][3])
Definition channelmixerrgb_shared.c:132
void dt_iop_channelmixer_shared_paint_temperature_slider(GtkWidget *widget, float temperature_min, float temperature_max)
Definition channelmixerrgb_shared.c:633
void dt_iop_channelmixer_shared_simple_to_matrix(const dt_iop_channelmixer_shared_simple_params_t *simple, float M[3][3])
Definition channelmixerrgb_shared.c:233
void dt_iop_channelmixer_shared_primaries_from_sliders(GtkWidget *const widgets[9], dt_iop_channelmixer_shared_primaries_params_t *primaries)
Definition channelmixerrgb_shared.c:99
void dt_iop_channelmixer_shared_paint_row_sliders(dt_adaptation_t adaptation, const dt_iop_order_iccprofile_info_t *work_profile, const dt_iop_order_iccprofile_info_t *display_profile, float r, float g, float b, gboolean normalize, const float row[3], GtkWidget *const widgets[3])
Definition channelmixerrgb_shared.c:667
float dt_iop_channelmixer_shared_wrap_half_pi(float angle)
Definition channelmixerrgb_shared.c:45
static const dt_aligned_pixel_simd_t const dt_adaptation_t adaptation
Definition chromatic_adaptation.h:308
dt_adaptation_t
Definition chromatic_adaptation.h:30
#define B(y, x)
Definition colorspaces.c:187
#define A(y, x)
Definition colorspaces.c:186
const float g
Definition colorspaces_inline_conversions.h:674
static const float const float C
Definition colorspaces_inline_conversions.h:437
static const int row
Definition colorspaces_inline_conversions.h:35
static const dt_colormatrix_t M
Definition colorspaces_inline_conversions.h:682
float dt_aligned_pixel_t[4]
Definition noiseprofile.c:28
struct _GtkWidget GtkWidget
Definition splash.h:29
const float r
Definition src/develop/noise_generator.h:101
Definition channelmixerrgb_shared.h:44
float green_purity
Definition channelmixerrgb_shared.h:50
float gain
Definition channelmixerrgb_shared.h:53
float red_hue
Definition channelmixerrgb_shared.h:47
float blue_hue
Definition channelmixerrgb_shared.h:51
float achromatic_hue
Definition channelmixerrgb_shared.h:45
float red_purity
Definition channelmixerrgb_shared.h:48
float achromatic_purity
Definition channelmixerrgb_shared.h:46
float green_hue
Definition channelmixerrgb_shared.h:49
float blue_purity
Definition channelmixerrgb_shared.h:52
Definition channelmixerrgb_shared.h:34
float coupling_hue
Definition channelmixerrgb_shared.h:40
float coupling_amount
Definition channelmixerrgb_shared.h:39
float stretch_1
Definition channelmixerrgb_shared.h:37
float stretch_2
Definition channelmixerrgb_shared.h:38
float theta
Definition channelmixerrgb_shared.h:35
float psi
Definition channelmixerrgb_shared.h:36
Definition iop_profile.h:52