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
26 #include "bcdisplayinfo.h"
27 #include "bcsignals.h"
33 #include "loadbalance.h"
34 #include "pluginvclient.h"
37 #define RESET_DEFAULT_SETTINGS 10
39 #define RESET_XSLIDER 1
40 #define RESET_YSLIDER 2
41 #define RESET_RADIUS 3
48 class ZoomBlurDefaultSettings;
49 class ZoomBlurSliderClr;
58 void reset(int clear);
59 int equivalent(ZoomBlurConfig &that);
60 void copy_from(ZoomBlurConfig &that);
61 void interpolate(ZoomBlurConfig &prev,
79 class ZoomBlurSize : public BC_ISlider
82 ZoomBlurSize(ZoomBlurMain *plugin,
93 class ZoomBlurToggle : public BC_CheckBox
96 ZoomBlurToggle(ZoomBlurMain *plugin,
102 ZoomBlurMain *plugin;
106 class ZoomBlurWindow : public PluginClientWindow
109 ZoomBlurWindow(ZoomBlurMain *plugin);
112 void create_objects();
113 void update_gui(int clear);
115 ZoomBlurSize *x, *y, *radius, *steps;
116 ZoomBlurToggle *r, *g, *b, *a;
117 ZoomBlurMain *plugin;
118 ZoomBlurReset *reset;
119 ZoomBlurDefaultSettings *default_settings;
120 ZoomBlurSliderClr *xClr, *yClr, *radiusClr, *stepsClr;
123 class ZoomBlurReset : public BC_GenericButton
126 ZoomBlurReset(ZoomBlurMain *plugin, ZoomBlurWindow *window, int x, int y);
129 ZoomBlurMain *plugin;
130 ZoomBlurWindow *window;
133 class ZoomBlurDefaultSettings : public BC_GenericButton
136 ZoomBlurDefaultSettings(ZoomBlurMain *plugin, ZoomBlurWindow *window, int x, int y, int w);
137 ~ZoomBlurDefaultSettings();
139 ZoomBlurMain *plugin;
140 ZoomBlurWindow *window;
144 class ZoomBlurSliderClr : public BC_GenericButton
147 ZoomBlurSliderClr(ZoomBlurMain *plugin, ZoomBlurWindow *window, int x, int y, int w, int clear);
148 ~ZoomBlurSliderClr();
150 ZoomBlurMain *plugin;
151 ZoomBlurWindow *window;
157 // Output coords for a layer of blurring
158 // Used for OpenGL only
163 float x1, y1, x2, y2;
166 class ZoomBlurMain : public PluginVClient
169 ZoomBlurMain(PluginServer *server);
172 int process_buffer(VFrame *frame,
173 int64_t start_position,
176 void save_data(KeyFrame *keyframe);
177 void read_data(KeyFrame *keyframe);
181 PLUGIN_CLASS_MEMBERS(ZoomBlurConfig)
183 void delete_tables();
184 VFrame *input, *output, *temp;
185 ZoomBlurEngine *engine;
188 ZoomBlurLayer *layer_table;
190 int need_reconfigure;
191 // The accumulation buffer is needed because 8 bits isn't precise enough
192 unsigned char *accum;
195 class ZoomBlurPackage : public LoadPackage
202 class ZoomBlurUnit : public LoadClient
205 ZoomBlurUnit(ZoomBlurEngine *server, ZoomBlurMain *plugin);
206 void process_package(LoadPackage *package);
207 ZoomBlurEngine *server;
208 ZoomBlurMain *plugin;
211 class ZoomBlurEngine : public LoadServer
214 ZoomBlurEngine(ZoomBlurMain *plugin,
217 void init_packages();
218 LoadClient* new_client();
219 LoadPackage* new_package();
220 ZoomBlurMain *plugin;