~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to source/blender/compositor/operations/COM_ConvertOperation.h

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2011, Blender Foundation.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU General Public License
 
6
 * as published by the Free Software Foundation; either version 2
 
7
 * of the License, or (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software Foundation,
 
16
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
17
 *
 
18
 * Contributor: 
 
19
 *              Jeroen Bakker 
 
20
 *              Monique Dewanchand
 
21
 */
 
22
 
 
23
#ifndef _COM_ConvertOperation_h
 
24
#define _COM_ConvertOperation_h
 
25
 
 
26
#include "COM_NodeOperation.h"
 
27
 
 
28
 
 
29
class ConvertBaseOperation : public NodeOperation {
 
30
protected:
 
31
        SocketReader *m_inputOperation;
 
32
        
 
33
public:
 
34
        ConvertBaseOperation();
 
35
        
 
36
        void initExecution();
 
37
        void deinitExecution();
 
38
};
 
39
 
 
40
 
 
41
class ConvertValueToColorOperation : public ConvertBaseOperation {
 
42
public:
 
43
        ConvertValueToColorOperation();
 
44
        
 
45
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
46
};
 
47
 
 
48
 
 
49
class ConvertColorToValueOperation : public ConvertBaseOperation {
 
50
public:
 
51
        ConvertColorToValueOperation();
 
52
        
 
53
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
54
};
 
55
 
 
56
 
 
57
class ConvertColorToBWOperation : public ConvertBaseOperation {
 
58
public:
 
59
        ConvertColorToBWOperation();
 
60
        
 
61
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
62
};
 
63
 
 
64
 
 
65
class ConvertColorToVectorOperation : public ConvertBaseOperation {
 
66
public:
 
67
        ConvertColorToVectorOperation();
 
68
        
 
69
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
70
};
 
71
 
 
72
 
 
73
class ConvertValueToVectorOperation : public ConvertBaseOperation {
 
74
public:
 
75
        ConvertValueToVectorOperation();
 
76
        
 
77
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
78
};
 
79
 
 
80
 
 
81
class ConvertVectorToColorOperation : public ConvertBaseOperation {
 
82
public:
 
83
        ConvertVectorToColorOperation();
 
84
        
 
85
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
86
};
 
87
 
 
88
 
 
89
class ConvertVectorToValueOperation : public ConvertBaseOperation {
 
90
public:
 
91
        ConvertVectorToValueOperation();
 
92
        
 
93
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
94
};
 
95
 
 
96
 
 
97
class ConvertRGBToYCCOperation : public ConvertBaseOperation {
 
98
private:
 
99
        /** YCbCr mode (Jpeg, ITU601, ITU709) */
 
100
        int m_mode;
 
101
public:
 
102
        ConvertRGBToYCCOperation();
 
103
 
 
104
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
105
 
 
106
        /** Set the YCC mode */
 
107
        void setMode(int mode);
 
108
};
 
109
 
 
110
 
 
111
class ConvertYCCToRGBOperation : public ConvertBaseOperation {
 
112
private:
 
113
        /** YCbCr mode (Jpeg, ITU601, ITU709) */
 
114
        int m_mode;
 
115
public:
 
116
        ConvertYCCToRGBOperation();
 
117
        
 
118
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
119
        
 
120
        /** Set the YCC mode */
 
121
        void setMode(int mode);
 
122
};
 
123
 
 
124
 
 
125
class ConvertRGBToYUVOperation : public ConvertBaseOperation {
 
126
public:
 
127
        ConvertRGBToYUVOperation();
 
128
        
 
129
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
130
};
 
131
 
 
132
 
 
133
class ConvertYUVToRGBOperation : public ConvertBaseOperation {
 
134
public:
 
135
        ConvertYUVToRGBOperation();
 
136
        
 
137
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
138
};
 
139
 
 
140
 
 
141
class ConvertRGBToHSVOperation : public ConvertBaseOperation {
 
142
public:
 
143
        ConvertRGBToHSVOperation();
 
144
        
 
145
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
146
};
 
147
 
 
148
 
 
149
class ConvertHSVToRGBOperation : public ConvertBaseOperation {
 
150
public:
 
151
        ConvertHSVToRGBOperation();
 
152
        
 
153
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
154
};
 
155
 
 
156
 
 
157
class ConvertPremulToStraightOperation : public ConvertBaseOperation {
 
158
public:
 
159
        ConvertPremulToStraightOperation();
 
160
 
 
161
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
162
};
 
163
 
 
164
 
 
165
class ConvertStraightToPremulOperation : public ConvertBaseOperation {
 
166
public:
 
167
        ConvertStraightToPremulOperation();
 
168
 
 
169
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
170
};
 
171
 
 
172
 
 
173
class SeparateChannelOperation : public NodeOperation {
 
174
private:
 
175
        SocketReader *m_inputOperation;
 
176
        int m_channel;
 
177
public:
 
178
        SeparateChannelOperation();
 
179
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
180
        
 
181
        void initExecution();
 
182
        void deinitExecution();
 
183
        
 
184
        void setChannel(int channel) { this->m_channel = channel; }
 
185
};
 
186
 
 
187
 
 
188
class CombineChannelsOperation : public NodeOperation {
 
189
private:
 
190
        SocketReader *m_inputChannel1Operation;
 
191
        SocketReader *m_inputChannel2Operation;
 
192
        SocketReader *m_inputChannel3Operation;
 
193
        SocketReader *m_inputChannel4Operation;
 
194
public:
 
195
        CombineChannelsOperation();
 
196
        void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
197
        
 
198
        void initExecution();
 
199
        void deinitExecution();
 
200
};
 
201
 
 
202
#endif