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 SHIFTINTERLACE_H
23 #define SHIFTINTERLACE_H
25 #include "bcdisplayinfo.h"
31 #include "pluginvclient.h"
42 #define RESET_ODD_OFFSET 1
43 #define RESET_EVEN_OFFSET 2
46 class ShiftInterlaceWindow;
47 class ShiftInterlaceMain;
49 class ShiftInterlaceConfig
52 ShiftInterlaceConfig();
54 void reset(int clear);
55 int equivalent(ShiftInterlaceConfig &that);
56 void copy_from(ShiftInterlaceConfig &that);
57 void interpolate(ShiftInterlaceConfig &prev,
58 ShiftInterlaceConfig &next,
69 class ShiftInterlaceOdd : public BC_ISlider
72 ShiftInterlaceOdd(ShiftInterlaceMain *plugin, int x, int y);
74 ShiftInterlaceMain *plugin;
77 class ShiftInterlaceEven : public BC_ISlider
80 ShiftInterlaceEven(ShiftInterlaceMain *plugin, int x, int y);
82 ShiftInterlaceMain *plugin;
85 class ShiftInterlaceReset : public BC_GenericButton
88 ShiftInterlaceReset(ShiftInterlaceMain *plugin, ShiftInterlaceWindow *gui, int x, int y);
89 ~ShiftInterlaceReset();
91 ShiftInterlaceMain *plugin;
92 ShiftInterlaceWindow *gui;
95 class ShiftInterlaceSliderClr : public BC_Button
98 ShiftInterlaceSliderClr(ShiftInterlaceMain *plugin, ShiftInterlaceWindow *gui, int x, int y, int w, int clear);
99 ~ShiftInterlaceSliderClr();
101 ShiftInterlaceMain *plugin;
102 ShiftInterlaceWindow *gui;
106 class ShiftInterlaceWindow : public PluginClientWindow
109 ShiftInterlaceWindow(ShiftInterlaceMain *plugin);
111 void create_objects();
112 void update_gui(int clear);
114 ShiftInterlaceOdd *odd_offset;
115 ShiftInterlaceEven *even_offset;
116 ShiftInterlaceMain *plugin;
117 ShiftInterlaceReset *reset;
118 ShiftInterlaceSliderClr *odd_offsetClr, *even_offsetClr;
126 class ShiftInterlaceMain : public PluginVClient
129 ShiftInterlaceMain(PluginServer *server);
130 ~ShiftInterlaceMain();
132 // required for all realtime plugins
133 PLUGIN_CLASS_MEMBERS(ShiftInterlaceConfig)
134 int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
137 void save_data(KeyFrame *keyframe);
138 void read_data(KeyFrame *keyframe);
141 void shift_row(VFrame *input_frame,
142 VFrame *output_frame,