add auto zoombar/status color, fix 3 batchrender boobies, rotate plugin tweaks, add...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / denoisevideo / denoisevideo.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 DENOISEVIDEO_H
23 #define DENOISEVIDEO_H
24
25 class DenoiseVideo;
26 class DenoiseVideoWindow;
27
28 #include "bcdisplayinfo.h"
29 #include "bchash.inc"
30 #include "pluginvclient.h"
31 #include "vframe.inc"
32
33
34
35 class DenoiseVideoConfig
36 {
37 public:
38         DenoiseVideoConfig();
39
40         int equivalent(DenoiseVideoConfig &that);
41         void copy_from(DenoiseVideoConfig &that);
42         void interpolate(DenoiseVideoConfig &prev,
43                 DenoiseVideoConfig &next,
44                 long prev_frame,
45                 long next_frame,
46                 long current_frame);
47
48         int frames;
49         float threshold;
50         int count_changed;
51         int do_r, do_g, do_b, do_a;
52 };
53
54
55
56
57 class DenoiseVideoFrames : public BC_ISlider
58 {
59 public:
60         DenoiseVideoFrames(DenoiseVideo *plugin, int x, int y);
61         int handle_event();
62         DenoiseVideo *plugin;
63 };
64
65
66 class DenoiseVideoThreshold : public BC_TumbleTextBox
67 {
68 public:
69         DenoiseVideoThreshold(DenoiseVideo *plugin,
70                 DenoiseVideoWindow *gui,
71                 int x,
72                 int y);
73         int handle_event();
74         DenoiseVideo *plugin;
75 };
76
77 class DenoiseVideoToggle : public BC_CheckBox
78 {
79 public:
80         DenoiseVideoToggle(DenoiseVideo *plugin,
81                 DenoiseVideoWindow *gui,
82                 int x,
83                 int y,
84                 int *output,
85                 char *text);
86         int handle_event();
87         DenoiseVideo *plugin;
88         int *output;
89 };
90
91 class DenoiseVideoCountChanged : public BC_Radial
92 {
93 public:
94         DenoiseVideoCountChanged(DenoiseVideo *plugin,
95                 DenoiseVideoWindow *gui,
96                 int x,
97                 int y);
98         int handle_event();
99         DenoiseVideo *plugin;
100         DenoiseVideoWindow *gui;
101 };
102
103 class DenoiseVideoCountSame : public BC_Radial
104 {
105 public:
106         DenoiseVideoCountSame(DenoiseVideo *plugin,
107                 DenoiseVideoWindow *gui,
108                 int x,
109                 int y);
110         int handle_event();
111         DenoiseVideo *plugin;
112         DenoiseVideoWindow *gui;
113 };
114
115 class DenoiseVideoWindow : public PluginClientWindow
116 {
117 public:
118         DenoiseVideoWindow(DenoiseVideo *plugin);
119
120         void create_objects();
121
122         DenoiseVideo *plugin;
123         DenoiseVideoFrames *frames;
124         DenoiseVideoThreshold *threshold;
125         DenoiseVideoToggle *do_r, *do_g, *do_b, *do_a;
126         DenoiseVideoCountChanged *count_changed;
127         DenoiseVideoCountSame *count_same;
128 };
129
130
131
132 class DenoiseVideo : public PluginVClient
133 {
134 public:
135         DenoiseVideo(PluginServer *server);
136         ~DenoiseVideo();
137
138         PLUGIN_CLASS_MEMBERS(DenoiseVideoConfig)
139         int process_realtime(VFrame *input, VFrame *output);
140         int is_realtime();
141         void save_data(KeyFrame *keyframe);
142         void read_data(KeyFrame *keyframe);
143         void update_gui();
144
145         float *accumulation;
146 };
147
148
149
150 #endif