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"
41 #define RESET_ODD_OFFSET 1
42 #define RESET_EVEN_OFFSET 2
45 class ShiftInterlaceWindow;
46 class ShiftInterlaceMain;
48 class ShiftInterlaceConfig
51 ShiftInterlaceConfig();
53 void reset(int clear);
54 int equivalent(ShiftInterlaceConfig &that);
55 void copy_from(ShiftInterlaceConfig &that);
56 void interpolate(ShiftInterlaceConfig &prev,
57 ShiftInterlaceConfig &next,
68 class ShiftInterlaceOdd : public BC_ISlider
71 ShiftInterlaceOdd(ShiftInterlaceMain *plugin, int x, int y);
73 ShiftInterlaceMain *plugin;
76 class ShiftInterlaceEven : public BC_ISlider
79 ShiftInterlaceEven(ShiftInterlaceMain *plugin, int x, int y);
81 ShiftInterlaceMain *plugin;
84 class ShiftInterlaceReset : public BC_GenericButton
87 ShiftInterlaceReset(ShiftInterlaceMain *plugin, ShiftInterlaceWindow *gui, int x, int y);
88 ~ShiftInterlaceReset();
90 ShiftInterlaceMain *plugin;
91 ShiftInterlaceWindow *gui;
94 class ShiftInterlaceSliderClr : public BC_GenericButton
97 ShiftInterlaceSliderClr(ShiftInterlaceMain *plugin, ShiftInterlaceWindow *gui, int x, int y, int w, int clear);
98 ~ShiftInterlaceSliderClr();
100 ShiftInterlaceMain *plugin;
101 ShiftInterlaceWindow *gui;
105 class ShiftInterlaceWindow : public PluginClientWindow
108 ShiftInterlaceWindow(ShiftInterlaceMain *plugin);
110 void create_objects();
111 void update_gui(int clear);
113 ShiftInterlaceOdd *odd_offset;
114 ShiftInterlaceEven *even_offset;
115 ShiftInterlaceMain *plugin;
116 ShiftInterlaceReset *reset;
117 ShiftInterlaceSliderClr *odd_offsetClr, *even_offsetClr;
125 class ShiftInterlaceMain : public PluginVClient
128 ShiftInterlaceMain(PluginServer *server);
129 ~ShiftInterlaceMain();
131 // required for all realtime plugins
132 PLUGIN_CLASS_MEMBERS(ShiftInterlaceConfig)
133 int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
136 void save_data(KeyFrame *keyframe);
137 void read_data(KeyFrame *keyframe);
140 void shift_row(VFrame *input_frame,
141 VFrame *output_frame,