~ubuntu-branches/ubuntu/vivid/rawstudio/vivid

« back to all changes in this revision

Viewing changes to plugins/dcp/dcp.h

  • Committer: Bazaar Package Importer
  • Author(s): Bernd Zeimetz
  • Date: 2011-07-28 17:36:32 UTC
  • mfrom: (2.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20110728173632-5czluz9ye3c83zc5
Tags: 2.0-1
* [3750b2cf] Merge commit 'upstream/2.0'
* [63637468] Removing Patch, not necessary anymore.
* [2fb580dc] Add new build-dependencies.
* [c57d953b] Run dh_autoreconf due to patches in configure.in
* [13febe39] Add patch to remove the libssl requirement.
* [5ae773fe] Replace libjpeg62-dev by libjpeg8-dev :)
* [1969d755] Don't build static libraries.
* [7cfe0a2e] Add a patch to fix the plugin directory path.
  As plugins are shared libraries, they need to go into /usr/lib,
  not into /usr/share.
  Thanks to Andrew McMillan
* [c1d0d9dd] Don't install .la files for all plugins and libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * * Copyright (C) 2006-2011 Anders Brander <anders@brander.dk>,
 
3
 * * Anders Kvist <akv@lnxbx.dk> and Klaus Post <klauspost@gmail.com>
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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.
 
18
 */
 
19
 
 
20
#ifndef DCP_H
 
21
#define DCP_H
 
22
 
 
23
#include "config.h"
 
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))
 
30
 
 
31
typedef struct _RSDcp RSDcp;
 
32
typedef struct _RSDcpClass RSDcpClass;
 
33
 
 
34
typedef struct {
 
35
        /* Precalc: all sizes must be 16 byte aligned */
 
36
        gfloat hScale[4];
 
37
        gfloat sScale[4];
 
38
        gfloat vScale[4];
 
39
        gint maxHueIndex0[4];
 
40
        gint maxSatIndex0[4];
 
41
        gint maxValIndex0[4];
 
42
        gint hueStep[4];
 
43
        gint valStep[4];
 
44
} PrecalcHSM;
 
45
 
 
46
 
 
47
struct _RSDcp {
 
48
        RSFilter parent;
 
49
        gulong settings_signal_id;
 
50
        RSSettings *settings;
 
51
 
 
52
        gfloat exposure;
 
53
        gfloat saturation;
 
54
        gfloat contrast;
 
55
        gfloat hue;
 
56
        gfloat channelmixer_red;
 
57
        gfloat channelmixer_green;
 
58
        gfloat channelmixer_blue;
 
59
        gfloat warmth, tint;
 
60
 
 
61
        RS_VECTOR3 pre_mul;
 
62
        RS_xy_COORD white_xy;
 
63
 
 
64
        gint nknots;
 
65
        gfloat *curve_samples;
 
66
        gboolean curve_is_flat;
 
67
 
 
68
        gfloat temp1;
 
69
        gfloat temp2;
 
70
 
 
71
        gboolean use_profile;
 
72
 
 
73
        RSSpline *tone_curve;
 
74
        gfloat *tone_curve_lut;
 
75
 
 
76
        gboolean has_color_matrix1;
 
77
        gboolean has_color_matrix2;
 
78
        RS_MATRIX3 color_matrix1;
 
79
        RS_MATRIX3 color_matrix2;
 
80
 
 
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;
 
86
 
 
87
        RSHuesatMap *looktable;
 
88
 
 
89
        RSHuesatMap *huesatmap;
 
90
        RSHuesatMap *huesatmap1;
 
91
        RSHuesatMap *huesatmap2;
 
92
        RSHuesatMap *huesatmap_interpolated;
 
93
 
 
94
        RS_MATRIX3 camera_to_pcs;
 
95
 
 
96
        RS_VECTOR3 camera_white;
 
97
        RS_MATRIX3 camera_to_prophoto;
 
98
 
 
99
        gfloat exposure_slope;
 
100
        gfloat exposure_black;
 
101
        gfloat exposure_radius;
 
102
        gfloat exposure_qscale;
 
103
 
 
104
        PrecalcHSM *huesatmap_precalc;
 
105
        PrecalcHSM *looktable_precalc;
 
106
        void* _huesatmap_precalc_unaligned;
 
107
        void* _looktable_precalc_unaligned;
 
108
        gfloat junk_value;
 
109
        RSCurveWidget* read_out_curve;
 
110
};
 
111
 
 
112
struct _RSDcpClass {
 
113
        RSFilterClass parent_class;
 
114
        RSColorSpace *prophoto;
 
115
        RSIccProfile *prophoto_profile;
 
116
};
 
117
 
 
118
typedef struct {
 
119
        RSDcp *dcp;
 
120
        GThread *threadid;
 
121
        gint start_x;
 
122
        gint start_y;
 
123
        gint end_y;
 
124
        RS_IMAGE16 *tmp;
 
125
        guint curve_input_values[256];
 
126
} ThreadInfo;
 
127
 
 
128
gboolean render_SSE2(ThreadInfo* t);
 
129
gboolean render_SSE4(ThreadInfo* t);
 
130
void calc_hsm_constants(const RSHuesatMap *map, PrecalcHSM* table); 
 
131
 
 
132
#endif /* DCP_H */