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)
void dt_iop_channelmixer_shared_simple_from_sliders(GtkWidget *const widgets[6], dt_iop_channelmixer_shared_simple_params_t *simple)
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])
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])
dt_iop_channelmixer_shared_simple_probe_t
@ DT_IOP_CHANNELMIXER_SHARED_SIMPLE_PROBE_AXIS_2
@ DT_IOP_CHANNELMIXER_SHARED_SIMPLE_PROBE_AXIS_1
@ DT_IOP_CHANNELMIXER_SHARED_SIMPLE_PROBE_ROTATION
float dt_iop_channelmixer_shared_decode_simple_coupling_amount(float slider)
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)
void dt_iop_channelmixer_shared_simple_probe_source(dt_iop_channelmixer_shared_simple_probe_t probe, float source[3])
float dt_iop_channelmixer_shared_encode_simple_stretch(float stretch)
void dt_iop_channelmixer_shared_primaries_to_sliders(const dt_iop_channelmixer_shared_primaries_params_t *primaries, GtkWidget *const widgets[9])
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)
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])
float dt_iop_channelmixer_shared_encode_simple_coupling_amount(float amount)
void dt_iop_channelmixer_shared_set_matrix(float rows[3][3], const float M[3][3])
void dt_iop_channelmixer_shared_simple_to_sliders(const dt_iop_channelmixer_shared_simple_params_t *simple, GtkWidget *const widgets[6])
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])
void dt_iop_channelmixer_shared_simple_from_matrix(const float M[3][3], dt_iop_channelmixer_shared_simple_params_t *simple)
void dt_iop_channelmixer_shared_mul3x3(const float A[3][3], const float B[3][3], float C[3][3])
gboolean dt_iop_channelmixer_shared_rows_are_normalized(const gboolean normalize[3])
dt_iop_channelmixer_shared_primaries_basis_t dt_iop_channelmixer_shared_primaries_basis_from_adaptation(dt_adaptation_t adaptation)
float dt_iop_channelmixer_shared_wrap_pi(float angle)
float dt_iop_channelmixer_shared_roundtrip_error(const float M[3][3], const float roundtrip[3][3])
dt_iop_channelmixer_shared_primaries_basis_t
@ DT_IOP_CHANNELMIXER_SHARED_PRIMARIES_BASIS_CAT16
@ DT_IOP_CHANNELMIXER_SHARED_PRIMARIES_BASIS_RGB
@ DT_IOP_CHANNELMIXER_SHARED_PRIMARIES_BASIS_BRADFORD
@ DT_IOP_CHANNELMIXER_SHARED_PRIMARIES_BASIS_XYZ
gboolean dt_iop_channelmixer_shared_get_matrix(const float rows[3][3], const gboolean normalize[3], gboolean force_normalize, float M[3][3])
void dt_iop_channelmixer_shared_paint_temperature_slider(GtkWidget *widget, float temperature_min, float temperature_max)
void dt_iop_channelmixer_shared_simple_to_matrix(const dt_iop_channelmixer_shared_simple_params_t *simple, float M[3][3])
void dt_iop_channelmixer_shared_primaries_from_sliders(GtkWidget *const widgets[9], dt_iop_channelmixer_shared_primaries_params_t *primaries)
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])
float dt_iop_channelmixer_shared_wrap_half_pi(float angle)
static const dt_aligned_pixel_simd_t const dt_adaptation_t adaptation
#define B(y, x)
#define A(y, x)
static const float const float C
static const int row
static const dt_colormatrix_t M
float dt_aligned_pixel_t[4]
struct _GtkWidget GtkWidget
Definition splash.h:29
const float r