add auto zoombar/status color, fix 3 batchrender boobies, rotate plugin tweaks, add...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / greycstoration / greycstorationplugin.h
1 /*
2  * GreyCStoration plugin for Cinelerra
3  * Copyright (C) 2013 Slock Ruddy
4  * Copyright (C) 2014-2015 Nicola Ferralis <feranick at hotmail dot com>
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 GREYCSTORATION_H
23 #define GREYCSTORATION_H
24
25
26 class GreyCStorationMain;
27
28 #include "filexml.h"
29 #include "greycstorationwindow.h"
30 #include "pluginvclient.h"
31
32 class GreyCStorationConfig
33 {
34 public:
35         GreyCStorationConfig();
36         void copy_from(GreyCStorationConfig &that);
37         int equivalent(GreyCStorationConfig &that);
38         void interpolate(GreyCStorationConfig &prev, GreyCStorationConfig &next,
39                 int64_t prev_frame, int64_t next_frame, int64_t current_frame);
40         float amplitude;   // = 40.0f;// cimg_option("-dt",40.0f,"Regularization strength for one iteration (>=0)");
41         float sharpness;   // = 0.8f; // cimg_option("-p",0.8f,"Contour preservation for regularization (>=0)");
42         float anisotropy;  // = 0.8f; // cimg_option("-a",0.8f,"Regularization anisotropy (0<=a<=1)");
43         float noise_scale; // alpha
44 };
45
46 class GreyCStorationMain : public PluginVClient
47 {
48 public:
49         GreyCStorationMain(PluginServer *server);
50         ~GreyCStorationMain();
51
52         PLUGIN_CLASS_MEMBERS(GreyCStorationConfig);
53         void GREYCSTORATION(VFrame *frame);
54
55 // required for all realtime plugins
56         int process_buffer(VFrame *frame, int64_t start_position, double frame_rate);
57         int is_realtime();
58         void update_gui();
59         void save_data(KeyFrame *keyframe);
60         void read_data(KeyFrame *keyframe);
61
62         uint8_t *alpha;
63         long alpha_size;
64 };
65
66
67 #endif