00001 #ifndef DENOISEVIDEO_H
00002 #define DENOISEVIDEO_H
00003
00004 class DenoiseVideo;
00005 class DenoiseVideoWindow;
00006
00007 #include "bcdisplayinfo.h"
00008 #include "bchash.inc"
00009 #include "pluginvclient.h"
00010 #include "vframe.inc"
00011
00012
00013
00014 class DenoiseVideoConfig
00015 {
00016 public:
00017 DenoiseVideoConfig();
00018
00019 int equivalent(DenoiseVideoConfig &that);
00020 void copy_from(DenoiseVideoConfig &that);
00021 void interpolate(DenoiseVideoConfig &prev,
00022 DenoiseVideoConfig &next,
00023 long prev_frame,
00024 long next_frame,
00025 long current_frame);
00026
00027 int frames;
00028 float threshold;
00029 int do_r, do_g, do_b, do_a;
00030 };
00031
00032
00033
00034
00035 class DenoiseVideoFrames : public BC_ISlider
00036 {
00037 public:
00038 DenoiseVideoFrames(DenoiseVideo *plugin, int x, int y);
00039 int handle_event();
00040 DenoiseVideo *plugin;
00041 };
00042
00043
00044 class DenoiseVideoThreshold : public BC_TextBox
00045 {
00046 public:
00047 DenoiseVideoThreshold(DenoiseVideo *plugin, int x, int y);
00048 int handle_event();
00049 DenoiseVideo *plugin;
00050 };
00051
00052 class DenoiseVideoToggle : public BC_CheckBox
00053 {
00054 public:
00055 DenoiseVideoToggle(DenoiseVideo *plugin,
00056 DenoiseVideoWindow *gui,
00057 int x,
00058 int y,
00059 int *output,
00060 char *text);
00061 int handle_event();
00062 DenoiseVideo *plugin;
00063 int *output;
00064 };
00065
00066
00067 class DenoiseVideoWindow : public BC_Window
00068 {
00069 public:
00070 DenoiseVideoWindow(DenoiseVideo *plugin, int x, int y);
00071
00072 void create_objects();
00073 int close_event();
00074
00075 DenoiseVideo *plugin;
00076 DenoiseVideoFrames *frames;
00077 DenoiseVideoThreshold *threshold;
00078 DenoiseVideoToggle *do_r, *do_g, *do_b, *do_a;
00079 };
00080
00081
00082 PLUGIN_THREAD_HEADER(DenoiseVideo, DenoiseVideoThread, DenoiseVideoWindow)
00083
00084 class DenoiseVideo : public PluginVClient
00085 {
00086 public:
00087 DenoiseVideo(PluginServer *server);
00088 ~DenoiseVideo();
00089
00090 int process_realtime(VFrame *input, VFrame *output);
00091 int is_realtime();
00092 char* plugin_title();
00093 VFrame* new_picon();
00094 int show_gui();
00095 int load_configuration();
00096 int set_string();
00097 int load_defaults();
00098 int save_defaults();
00099 void save_data(KeyFrame *keyframe);
00100 void read_data(KeyFrame *keyframe);
00101 void raise_window();
00102 void update_gui();
00103
00104 float *accumulation;
00105 DenoiseVideoThread *thread;
00106 DenoiseVideoConfig config;
00107 BC_Hash *defaults;
00108 };
00109
00110
00111
00112 #endif