4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef INTERPOLATEPIXELS_H
23 #define INTERPOLATEPIXELS_H
25 class InterpolatePixelsMain;
27 #define TOTAL_PATTERNS 2
30 #include "loadbalance.h"
32 #include "pluginvclient.h"
33 #include <sys/types.h>
35 class InterpolatePixelsConfig
38 InterpolatePixelsConfig();
39 int equivalent(InterpolatePixelsConfig &that);
40 void copy_from(InterpolatePixelsConfig &that);
41 void interpolate(InterpolatePixelsConfig &prev,
42 InterpolatePixelsConfig &next,
43 int64_t prev_position,
44 int64_t next_position,
45 int64_t current_position);
49 class InterpolatePixelsThread;
50 class InterpolatePixelsWindow;
51 class InterpolatePixelsEngine;
53 class InterpolatePixelsOffset : public BC_ISlider
56 InterpolatePixelsOffset(InterpolatePixelsWindow *window,
60 ~InterpolatePixelsOffset();
63 InterpolatePixelsWindow *window;
67 class InterpolatePixelsWindow : public PluginClientWindow
70 InterpolatePixelsWindow(InterpolatePixelsMain *client);
71 ~InterpolatePixelsWindow();
73 void create_objects();
75 InterpolatePixelsMain *client;
76 InterpolatePixelsOffset *x_offset;
77 InterpolatePixelsOffset *y_offset;
81 class InterpolatePixelsMain : public PluginVClient
84 InterpolatePixelsMain(PluginServer *server);
85 ~InterpolatePixelsMain();
87 PLUGIN_CLASS_MEMBERS(InterpolatePixelsConfig);
89 // required for all realtime plugins
90 int process_buffer(VFrame *frame,
91 int64_t start_position,
95 void save_data(KeyFrame *keyframe);
96 void read_data(KeyFrame *keyframe);
99 InterpolatePixelsEngine *engine;
100 VFrame *out_temp, *out_frame;
104 class InterpolatePixelsPackage : public LoadPackage
107 InterpolatePixelsPackage();
111 class InterpolatePixelsUnit : public LoadClient
114 InterpolatePixelsUnit(InterpolatePixelsEngine *server, InterpolatePixelsMain *plugin);
115 void process_package(LoadPackage *package);
116 InterpolatePixelsEngine *server;
117 InterpolatePixelsMain *plugin;
120 class InterpolatePixelsEngine : public LoadServer
123 InterpolatePixelsEngine(InterpolatePixelsMain *plugin);
124 void init_packages();
125 LoadClient* new_client();
126 LoadPackage* new_package();
127 InterpolatePixelsMain *plugin;
128 float color_matrix[9];