2 * GreyCStoration plugin for Cinelerra
3 * Copyright (C) 2013 Slock Ruddy
4 * Copyright (C) 2014-2015 Nicola Ferralis <feranick at hotmail dot com>
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.
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.
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
22 #ifndef GREYCSTORATION_H
23 #define GREYCSTORATION_H
26 class GreyCStorationMain;
29 #include "greycstorationwindow.h"
30 #include "pluginvclient.h"
32 class GreyCStorationConfig
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
46 class GreyCStorationMain : public PluginVClient
49 GreyCStorationMain(PluginServer *server);
50 ~GreyCStorationMain();
52 PLUGIN_CLASS_MEMBERS(GreyCStorationConfig);
53 void GREYCSTORATION(VFrame *frame);
55 // required for all realtime plugins
56 int process_buffer(VFrame *frame, int64_t start_position, double frame_rate);
59 void save_data(KeyFrame *keyframe);
60 void read_data(KeyFrame *keyframe);