2
* * Copyright (C) 2006-2011 Anders Brander <anders@brander.dk>,
3
* * Anders Kvist <akv@lnxbx.dk> and Klaus Post <klauspost@gmail.com>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24
#include <rawstudio.h>
25
#define RS_TYPE_DCP (rs_dcp_type)
26
#define RS_DCP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_DCP, RSDcp))
27
#define RS_DCP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_DCP, RSDcpClass))
28
#define RS_IS_DCP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_DCP))
29
#define RS_DCP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_DCP, RSDcpClass))
31
typedef struct _RSDcp RSDcp;
32
typedef struct _RSDcpClass RSDcpClass;
35
/* Precalc: all sizes must be 16 byte aligned */
49
gulong settings_signal_id;
56
gfloat channelmixer_red;
57
gfloat channelmixer_green;
58
gfloat channelmixer_blue;
65
gfloat *curve_samples;
66
gboolean curve_is_flat;
74
gfloat *tone_curve_lut;
76
gboolean has_color_matrix1;
77
gboolean has_color_matrix2;
78
RS_MATRIX3 color_matrix1;
79
RS_MATRIX3 color_matrix2;
81
gboolean has_forward_matrix1;
82
gboolean has_forward_matrix2;
83
RS_MATRIX3 forward_matrix1;
84
RS_MATRIX3 forward_matrix2;
85
RS_MATRIX3 forward_matrix;
87
RSHuesatMap *looktable;
89
RSHuesatMap *huesatmap;
90
RSHuesatMap *huesatmap1;
91
RSHuesatMap *huesatmap2;
92
RSHuesatMap *huesatmap_interpolated;
94
RS_MATRIX3 camera_to_pcs;
96
RS_VECTOR3 camera_white;
97
RS_MATRIX3 camera_to_prophoto;
99
gfloat exposure_slope;
100
gfloat exposure_black;
101
gfloat exposure_radius;
102
gfloat exposure_qscale;
104
PrecalcHSM *huesatmap_precalc;
105
PrecalcHSM *looktable_precalc;
106
void* _huesatmap_precalc_unaligned;
107
void* _looktable_precalc_unaligned;
109
RSCurveWidget* read_out_curve;
113
RSFilterClass parent_class;
114
RSColorSpace *prophoto;
115
RSIccProfile *prophoto_profile;
125
guint curve_input_values[256];
128
gboolean render_SSE2(ThreadInfo* t);
129
gboolean render_SSE4(ThreadInfo* t);
130
void calc_hsm_constants(const RSHuesatMap *map, PrecalcHSM* table);