remove whitespace at eol
[goodguy/history.git] / cinelerra-5.1 / plugins / denoisemjpeg / denoisemjpeg.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef DENOISEMJPEG_H
23 #define DENOISEMJPEG_H
24
25 class DenoiseMJPEG;
26
27 #include "bcdisplayinfo.h"
28 #include "bchash.inc"
29 #include "pluginvclient.h"
30 #include "vframe.inc"
31
32
33
34 class DenoiseMJPEGConfig
35 {
36 public:
37         DenoiseMJPEGConfig();
38
39         int equivalent(DenoiseMJPEGConfig &that);
40         void copy_from(DenoiseMJPEGConfig &that);
41         void interpolate(DenoiseMJPEGConfig &prev,
42                 DenoiseMJPEGConfig &next,
43                 long prev_frame,
44                 long next_frame,
45                 long current_frame);
46
47         int radius;
48         int threshold;
49         int threshold2;
50         int sharpness;
51         int lcontrast;
52         int ccontrast;
53         int deinterlace;
54         int mode;
55         int delay;
56 };
57
58
59 class DenoiseMJPEGWindow;
60
61 class DenoiseMJPEGRadius : public BC_IPot
62 {
63 public:
64         DenoiseMJPEGRadius(DenoiseMJPEG *plugin, int x, int y);
65         int handle_event();
66         DenoiseMJPEG *plugin;
67 };
68
69 class DenoiseMJPEGThresh : public BC_IPot
70 {
71 public:
72         DenoiseMJPEGThresh(DenoiseMJPEG *plugin, int x, int y);
73         int handle_event();
74         DenoiseMJPEG *plugin;
75 };
76
77 class DenoiseMJPEGThresh2 : public BC_IPot
78 {
79 public:
80         DenoiseMJPEGThresh2(DenoiseMJPEG *plugin, int x, int y);
81         int handle_event();
82         DenoiseMJPEG *plugin;
83 };
84
85 class DenoiseMJPEGSharp : public BC_IPot
86 {
87 public:
88         DenoiseMJPEGSharp(DenoiseMJPEG *plugin, int x, int y);
89         int handle_event();
90         DenoiseMJPEG *plugin;
91 };
92
93 class DenoiseMJPEGLContrast : public BC_IPot
94 {
95 public:
96         DenoiseMJPEGLContrast(DenoiseMJPEG *plugin, int x, int y);
97         int handle_event();
98         DenoiseMJPEG *plugin;
99 };
100
101 class DenoiseMJPEGCContrast : public BC_IPot
102 {
103 public:
104         DenoiseMJPEGCContrast(DenoiseMJPEG *plugin, int x, int y);
105         int handle_event();
106         DenoiseMJPEG *plugin;
107 };
108
109 class DenoiseMJPEGDeinterlace : public BC_CheckBox
110 {
111 public:
112         DenoiseMJPEGDeinterlace(DenoiseMJPEG *plugin, int x, int y);
113         int handle_event();
114         DenoiseMJPEG *plugin;
115 };
116
117 class DenoiseMJPEGModeInterlaced : public BC_Radial
118 {
119 public:
120         DenoiseMJPEGModeInterlaced(DenoiseMJPEG *plugin, DenoiseMJPEGWindow *gui, int x, int y);
121         int handle_event();
122         DenoiseMJPEG *plugin;
123         DenoiseMJPEGWindow *gui;
124 };
125
126 class DenoiseMJPEGModeProgressive : public BC_Radial
127 {
128 public:
129         DenoiseMJPEGModeProgressive(DenoiseMJPEG *plugin, DenoiseMJPEGWindow *gui, int x, int y);
130         int handle_event();
131         DenoiseMJPEG *plugin;
132         DenoiseMJPEGWindow *gui;
133 };
134
135 class DenoiseMJPEGModeFast : public BC_Radial
136 {
137 public:
138         DenoiseMJPEGModeFast(DenoiseMJPEG *plugin, DenoiseMJPEGWindow *gui, int x, int y);
139         int handle_event();
140         DenoiseMJPEG *plugin;
141         DenoiseMJPEGWindow *gui;
142 };
143
144 class DenoiseMJPEGDelay : public BC_IPot
145 {
146 public:
147         DenoiseMJPEGDelay(DenoiseMJPEG *plugin, int x, int y);
148         int handle_event();
149         DenoiseMJPEG *plugin;
150 };
151
152
153 class DenoiseMJPEGWindow : public PluginClientWindow
154 {
155 public:
156         DenoiseMJPEGWindow(DenoiseMJPEG *plugin);
157
158         void create_objects();
159         int close_event();
160         void update_mode(int value);
161
162         DenoiseMJPEG *plugin;
163         DenoiseMJPEGRadius *radius;
164         DenoiseMJPEGThresh *threshold1;
165         DenoiseMJPEGThresh2 *threshold2;
166         DenoiseMJPEGSharp *sharpness;
167         DenoiseMJPEGLContrast *lcontrast;
168         DenoiseMJPEGCContrast *ccontrast;
169         DenoiseMJPEGDeinterlace *deinterlace;
170         DenoiseMJPEGModeInterlaced *interlaced;
171         DenoiseMJPEGModeProgressive *progressive;
172         DenoiseMJPEGModeFast *fast;
173         DenoiseMJPEGDelay *delay;
174 };
175
176
177
178 class DenoiseMJPEG : public PluginVClient
179 {
180 public:
181         DenoiseMJPEG(PluginServer *server);
182         ~DenoiseMJPEG();
183         PLUGIN_CLASS_MEMBERS(DenoiseMJPEGConfig);
184
185         int process_realtime(VFrame *input, VFrame *output);
186         int is_realtime();
187         void save_data(KeyFrame *keyframe);
188         void read_data(KeyFrame *keyframe);
189         void update_gui();
190
191         float *accumulation;
192 };
193
194
195
196 #endif