Fixed initialisation of tf in file_open(). Without setting the memory to 0,
[cinelerra_cv/mob.git] / plugins / interpolate / interpolate.h
blobe787647b0aafa326fb783017c986eeecdf7bb1d6
1 #ifndef INTERPOLATEPIXELS_H
2 #define INTERPOLATEPIXELS_H
4 class InterpolatePixelsMain;
6 #define TOTAL_PATTERNS 2
8 #include "bchash.h"
9 #include "loadbalance.h"
10 #include "mutex.h"
11 #include "pluginvclient.h"
12 #include <sys/types.h>
14 class InterpolatePixelsConfig
16 public:
17 InterpolatePixelsConfig();
18 int equivalent(InterpolatePixelsConfig &that);
19 void copy_from(InterpolatePixelsConfig &that);
20 void interpolate(InterpolatePixelsConfig &prev,
21 InterpolatePixelsConfig &next,
22 int64_t prev_position,
23 int64_t next_position,
24 int64_t current_position);
25 int x, y;
28 class InterpolatePixelsThread;
29 class InterpolatePixelsWindow;
30 class InterpolatePixelsEngine;
32 class InterpolatePixelsOffset : public BC_ISlider
34 public:
35 InterpolatePixelsOffset(InterpolatePixelsWindow *window,
36 int x,
37 int y,
38 int *output);
39 ~InterpolatePixelsOffset();
41 int handle_event();
42 InterpolatePixelsWindow *window;
43 int *output;
46 class InterpolatePixelsWindow : public BC_Window
48 public:
49 InterpolatePixelsWindow(InterpolatePixelsMain *client, int x, int y);
50 ~InterpolatePixelsWindow();
52 int create_objects();
53 int close_event();
55 InterpolatePixelsMain *client;
56 InterpolatePixelsOffset *x_offset;
57 InterpolatePixelsOffset *y_offset;
60 PLUGIN_THREAD_HEADER(InterpolatePixelsMain,
61 InterpolatePixelsThread,
62 InterpolatePixelsWindow);
64 class InterpolatePixelsMain : public PluginVClient
66 public:
67 InterpolatePixelsMain(PluginServer *server);
68 ~InterpolatePixelsMain();
70 PLUGIN_CLASS_MEMBERS(InterpolatePixelsConfig, InterpolatePixelsThread);
72 // required for all realtime plugins
73 int process_buffer(VFrame *frame,
74 int64_t start_position,
75 double frame_rate);
76 int is_realtime();
77 void update_gui();
78 void save_data(KeyFrame *keyframe);
79 void read_data(KeyFrame *keyframe);
80 int load_defaults();
81 int save_defaults();
82 int handle_opengl();
84 InterpolatePixelsEngine *engine;
88 class InterpolatePixelsPackage : public LoadPackage
90 public:
91 InterpolatePixelsPackage();
92 int y1, y2;
95 class InterpolatePixelsUnit : public LoadClient
97 public:
98 InterpolatePixelsUnit(InterpolatePixelsEngine *server, InterpolatePixelsMain *plugin);
99 void process_package(LoadPackage *package);
100 InterpolatePixelsEngine *server;
101 InterpolatePixelsMain *plugin;
104 class InterpolatePixelsEngine : public LoadServer
106 public:
107 InterpolatePixelsEngine(InterpolatePixelsMain *plugin);
108 void init_packages();
109 LoadClient* new_client();
110 LoadPackage* new_package();
111 InterpolatePixelsMain *plugin;
112 float color_matrix[9];
116 #endif