00001 #ifndef DENOISEMJPEG_H
00002 #define DENOISEMJPEG_H
00003
00004 class DenoiseMJPEG;
00005
00006 #include "bcdisplayinfo.h"
00007 #include "bchash.inc"
00008 #include "pluginvclient.h"
00009 #include "vframe.inc"
00010
00011
00012
00013 class DenoiseMJPEGConfig
00014 {
00015 public:
00016 DenoiseMJPEGConfig();
00017
00018 int equivalent(DenoiseMJPEGConfig &that);
00019 void copy_from(DenoiseMJPEGConfig &that);
00020 void interpolate(DenoiseMJPEGConfig &prev,
00021 DenoiseMJPEGConfig &next,
00022 long prev_frame,
00023 long next_frame,
00024 long current_frame);
00025
00026 int radius;
00027 int threshold;
00028 int threshold2;
00029 int sharpness;
00030 int lcontrast;
00031 int ccontrast;
00032 int deinterlace;
00033 int mode;
00034 int delay;
00035 };
00036
00037
00038 class DenoiseMJPEGWindow;
00039
00040 class DenoiseMJPEGRadius : public BC_IPot
00041 {
00042 public:
00043 DenoiseMJPEGRadius(DenoiseMJPEG *plugin, int x, int y);
00044 int handle_event();
00045 DenoiseMJPEG *plugin;
00046 };
00047
00048 class DenoiseMJPEGThresh : public BC_IPot
00049 {
00050 public:
00051 DenoiseMJPEGThresh(DenoiseMJPEG *plugin, int x, int y);
00052 int handle_event();
00053 DenoiseMJPEG *plugin;
00054 };
00055
00056 class DenoiseMJPEGThresh2 : public BC_IPot
00057 {
00058 public:
00059 DenoiseMJPEGThresh2(DenoiseMJPEG *plugin, int x, int y);
00060 int handle_event();
00061 DenoiseMJPEG *plugin;
00062 };
00063
00064 class DenoiseMJPEGSharp : public BC_IPot
00065 {
00066 public:
00067 DenoiseMJPEGSharp(DenoiseMJPEG *plugin, int x, int y);
00068 int handle_event();
00069 DenoiseMJPEG *plugin;
00070 };
00071
00072 class DenoiseMJPEGLContrast : public BC_IPot
00073 {
00074 public:
00075 DenoiseMJPEGLContrast(DenoiseMJPEG *plugin, int x, int y);
00076 int handle_event();
00077 DenoiseMJPEG *plugin;
00078 };
00079
00080 class DenoiseMJPEGCContrast : public BC_IPot
00081 {
00082 public:
00083 DenoiseMJPEGCContrast(DenoiseMJPEG *plugin, int x, int y);
00084 int handle_event();
00085 DenoiseMJPEG *plugin;
00086 };
00087
00088 class DenoiseMJPEGDeinterlace : public BC_CheckBox
00089 {
00090 public:
00091 DenoiseMJPEGDeinterlace(DenoiseMJPEG *plugin, int x, int y);
00092 int handle_event();
00093 DenoiseMJPEG *plugin;
00094 };
00095
00096 class DenoiseMJPEGModeInterlaced : public BC_Radial
00097 {
00098 public:
00099 DenoiseMJPEGModeInterlaced(DenoiseMJPEG *plugin, DenoiseMJPEGWindow *gui, int x, int y);
00100 int handle_event();
00101 DenoiseMJPEG *plugin;
00102 DenoiseMJPEGWindow *gui;
00103 };
00104
00105 class DenoiseMJPEGModeProgressive : public BC_Radial
00106 {
00107 public:
00108 DenoiseMJPEGModeProgressive(DenoiseMJPEG *plugin, DenoiseMJPEGWindow *gui, int x, int y);
00109 int handle_event();
00110 DenoiseMJPEG *plugin;
00111 DenoiseMJPEGWindow *gui;
00112 };
00113
00114 class DenoiseMJPEGModeFast : public BC_Radial
00115 {
00116 public:
00117 DenoiseMJPEGModeFast(DenoiseMJPEG *plugin, DenoiseMJPEGWindow *gui, int x, int y);
00118 int handle_event();
00119 DenoiseMJPEG *plugin;
00120 DenoiseMJPEGWindow *gui;
00121 };
00122
00123 class DenoiseMJPEGDelay : public BC_IPot
00124 {
00125 public:
00126 DenoiseMJPEGDelay(DenoiseMJPEG *plugin, int x, int y);
00127 int handle_event();
00128 DenoiseMJPEG *plugin;
00129 };
00130
00131
00132 class DenoiseMJPEGWindow : public BC_Window
00133 {
00134 public:
00135 DenoiseMJPEGWindow(DenoiseMJPEG *plugin, int x, int y);
00136
00137 void create_objects();
00138 int close_event();
00139 void update_mode(int value);
00140
00141 DenoiseMJPEG *plugin;
00142 DenoiseMJPEGRadius *radius;
00143 DenoiseMJPEGThresh *threshold1;
00144 DenoiseMJPEGThresh2 *threshold2;
00145 DenoiseMJPEGSharp *sharpness;
00146 DenoiseMJPEGLContrast *lcontrast;
00147 DenoiseMJPEGCContrast *ccontrast;
00148 DenoiseMJPEGDeinterlace *deinterlace;
00149 DenoiseMJPEGModeInterlaced *interlaced;
00150 DenoiseMJPEGModeProgressive *progressive;
00151 DenoiseMJPEGModeFast *fast;
00152 DenoiseMJPEGDelay *delay;
00153 };
00154
00155
00156
00157
00158
00159 PLUGIN_THREAD_HEADER(DenoiseMJPEG, DenoiseMJPEGThread, DenoiseMJPEGWindow)
00160
00161 class DenoiseMJPEG : public PluginVClient
00162 {
00163 public:
00164 DenoiseMJPEG(PluginServer *server);
00165 ~DenoiseMJPEG();
00166
00167 int process_realtime(VFrame *input, VFrame *output);
00168 int is_realtime();
00169 char* plugin_title();
00170 VFrame* new_picon();
00171 int show_gui();
00172 int load_configuration();
00173 int set_string();
00174 int load_defaults();
00175 int save_defaults();
00176 void save_data(KeyFrame *keyframe);
00177 void read_data(KeyFrame *keyframe);
00178 void raise_window();
00179 void update_gui();
00180
00181 float *accumulation;
00182 DenoiseMJPEGThread *thread;
00183 DenoiseMJPEGConfig config;
00184 BC_Hash *defaults;
00185 };
00186
00187
00188
00189 #endif