r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / deinterlace / deinterlace.h
bloba49982fd8a735aaecdefd8e25c62b52a89aeb03d
1 #ifndef DEINTERLACE_H
2 #define DEINTERLACE_H
4 // the simplest plugin possible
6 class DeInterlaceMain;
8 #include "defaults.inc"
9 #include "deinterwindow.h"
10 #include "pluginvclient.h"
11 #include "vframe.inc"
15 #define THRESHOLD_SCALAR 1000
17 enum
19 DEINTERLACE_NONE,
20 DEINTERLACE_EVEN,
21 DEINTERLACE_ODD,
22 DEINTERLACE_AVG,
23 DEINTERLACE_SWAP_ODD,
24 DEINTERLACE_SWAP_EVEN,
25 DEINTERLACE_AVG_ODD,
26 DEINTERLACE_AVG_EVEN
29 class DeInterlaceConfig
31 public:
32 DeInterlaceConfig();
34 int equivalent(DeInterlaceConfig &that);
35 void copy_from(DeInterlaceConfig &that);
36 void interpolate(DeInterlaceConfig &prev,
37 DeInterlaceConfig &next,
38 int64_t prev_frame,
39 int64_t next_frame,
40 int64_t current_frame);
42 int mode;
43 int adaptive;
44 int threshold;
47 class DeInterlaceMain : public PluginVClient
49 public:
50 DeInterlaceMain(PluginServer *server);
51 ~DeInterlaceMain();
54 PLUGIN_CLASS_MEMBERS(DeInterlaceConfig, DeInterlaceThread)
57 // required for all realtime plugins
58 int process_realtime(VFrame *input, VFrame *output);
59 int is_realtime();
60 int hide_gui();
61 void update_gui();
62 void save_data(KeyFrame *keyframe);
63 void read_data(KeyFrame *keyframe);
64 int load_defaults();
65 int save_defaults();
66 void render_gui(void *data);
68 void deinterlace_even(VFrame *input, VFrame *output, int dominance);
69 void deinterlace_avg_even(VFrame *input, VFrame *output, int dominance);
70 void deinterlace_avg(VFrame *input, VFrame *output);
71 void deinterlace_swap(VFrame *input, VFrame *output, int dominance);
73 int changed_rows;
74 VFrame *temp;
78 #endif