00001 #ifndef INTERPOLATEPIXELS_H
00002 #define INTERPOLATEPIXELS_H
00003
00004 class InterpolatePixelsMain;
00005
00006 #define TOTAL_PATTERNS 2
00007
00008 #include "bchash.h"
00009 #include "loadbalance.h"
00010 #include "mutex.h"
00011 #include "pluginvclient.h"
00012 #include <sys/types.h>
00013
00014 class InterpolatePixelsConfig
00015 {
00016 public:
00017 InterpolatePixelsConfig();
00018 int equivalent(InterpolatePixelsConfig &that);
00019 void copy_from(InterpolatePixelsConfig &that);
00020 void interpolate(InterpolatePixelsConfig &prev,
00021 InterpolatePixelsConfig &next,
00022 int64_t prev_position,
00023 int64_t next_position,
00024 int64_t current_position);
00025 int x, y;
00026 };
00027
00028 class InterpolatePixelsThread;
00029 class InterpolatePixelsWindow;
00030 class InterpolatePixelsEngine;
00031
00032 class InterpolatePixelsOffset : public BC_ISlider
00033 {
00034 public:
00035 InterpolatePixelsOffset(InterpolatePixelsWindow *window,
00036 int x,
00037 int y,
00038 int *output);
00039 ~InterpolatePixelsOffset();
00040
00041 int handle_event();
00042 InterpolatePixelsWindow *window;
00043 int *output;
00044 };
00045
00046 class InterpolatePixelsWindow : public BC_Window
00047 {
00048 public:
00049 InterpolatePixelsWindow(InterpolatePixelsMain *client, int x, int y);
00050 ~InterpolatePixelsWindow();
00051
00052 int create_objects();
00053 int close_event();
00054
00055 InterpolatePixelsMain *client;
00056 InterpolatePixelsOffset *x_offset;
00057 InterpolatePixelsOffset *y_offset;
00058 };
00059
00060 PLUGIN_THREAD_HEADER(InterpolatePixelsMain,
00061 InterpolatePixelsThread,
00062 InterpolatePixelsWindow);
00063
00064 class InterpolatePixelsMain : public PluginVClient
00065 {
00066 public:
00067 InterpolatePixelsMain(PluginServer *server);
00068 ~InterpolatePixelsMain();
00069
00070 PLUGIN_CLASS_MEMBERS(InterpolatePixelsConfig, InterpolatePixelsThread);
00071
00072
00073 int process_buffer(VFrame *frame,
00074 int64_t start_position,
00075 double frame_rate);
00076 int is_realtime();
00077 void update_gui();
00078 void save_data(KeyFrame *keyframe);
00079 void read_data(KeyFrame *keyframe);
00080 int load_defaults();
00081 int save_defaults();
00082 int handle_opengl();
00083
00084 InterpolatePixelsEngine *engine;
00085 };
00086
00087
00088 class InterpolatePixelsPackage : public LoadPackage
00089 {
00090 public:
00091 InterpolatePixelsPackage();
00092 int y1, y2;
00093 };
00094
00095 class InterpolatePixelsUnit : public LoadClient
00096 {
00097 public:
00098 InterpolatePixelsUnit(InterpolatePixelsEngine *server, InterpolatePixelsMain *plugin);
00099 void process_package(LoadPackage *package);
00100 InterpolatePixelsEngine *server;
00101 InterpolatePixelsMain *plugin;
00102 };
00103
00104 class InterpolatePixelsEngine : public LoadServer
00105 {
00106 public:
00107 InterpolatePixelsEngine(InterpolatePixelsMain *plugin);
00108 void init_packages();
00109 LoadClient* new_client();
00110 LoadPackage* new_package();
00111 InterpolatePixelsMain *plugin;
00112 float color_matrix[9];
00113 };
00114
00115
00116 #endif