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
30 #include "bcdisplayinfo.h"
36 #include "loadbalance.h"
37 #include "pluginvclient.h"
43 class LinearBlurWindow;
44 class LinearBlurEngine;
45 class LinearBlurReset;
50 class LinearBlurConfig
56 int equivalent(LinearBlurConfig &that);
57 void copy_from(LinearBlurConfig &that);
58 void interpolate(LinearBlurConfig &prev,
59 LinearBlurConfig &next,
75 class LinearBlurSize : public BC_ISlider
78 LinearBlurSize(LinearBlurMain *plugin,
85 LinearBlurMain *plugin;
89 class LinearBlurToggle : public BC_CheckBox
92 LinearBlurToggle(LinearBlurMain *plugin,
98 LinearBlurMain *plugin;
102 class LinearBlurReset : public BC_GenericButton
105 LinearBlurReset(LinearBlurMain *plugin, LinearBlurWindow *gui, int x, int y);
108 LinearBlurMain *plugin;
109 LinearBlurWindow *gui;
112 class LinearBlurWindow : public PluginClientWindow
115 LinearBlurWindow(LinearBlurMain *plugin);
118 void create_objects();
121 LinearBlurSize *angle, *steps, *radius;
122 LinearBlurToggle *r, *g, *b, *a;
123 LinearBlurMain *plugin;
124 LinearBlurReset *reset;
131 // Output coords for a layer of blurring
132 // Used for OpenGL only
133 class LinearBlurLayer
136 LinearBlurLayer() {};
140 class LinearBlurMain : public PluginVClient
143 LinearBlurMain(PluginServer *server);
146 int process_buffer(VFrame *frame,
147 int64_t start_position,
150 void save_data(KeyFrame *keyframe);
151 void read_data(KeyFrame *keyframe);
155 PLUGIN_CLASS_MEMBERS(LinearBlurConfig)
157 void delete_tables();
158 VFrame *input, *output, *temp;
159 LinearBlurEngine *engine;
162 LinearBlurLayer *layer_table;
164 int need_reconfigure;
165 // The accumulation buffer is needed because 8 bits isn't precise enough
166 unsigned char *accum;
169 class LinearBlurPackage : public LoadPackage
176 class LinearBlurUnit : public LoadClient
179 LinearBlurUnit(LinearBlurEngine *server, LinearBlurMain *plugin);
180 void process_package(LoadPackage *package);
181 LinearBlurEngine *server;
182 LinearBlurMain *plugin;
185 class LinearBlurEngine : public LoadServer
188 LinearBlurEngine(LinearBlurMain *plugin,
191 void init_packages();
192 LoadClient* new_client();
193 LoadPackage* new_package();
194 LinearBlurMain *plugin;