X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fshiftinterlace%2Fshiftinterlace.h;fp=cinelerra-5.1%2Fplugins%2Fshiftinterlace%2Fshiftinterlace.h;h=d4618a073c4f391fb50ba266a1418097d040e33b;hp=0000000000000000000000000000000000000000;hb=54cc56bff09f5004b2a6cd454375f06e56acf5a0;hpb=834732af87bfd7f1d4035109f31e48db12b415fa diff --git a/cinelerra-5.1/plugins/shiftinterlace/shiftinterlace.h b/cinelerra-5.1/plugins/shiftinterlace/shiftinterlace.h new file mode 100644 index 00000000..d4618a07 --- /dev/null +++ b/cinelerra-5.1/plugins/shiftinterlace/shiftinterlace.h @@ -0,0 +1,136 @@ + +/* + * CINELERRA + * Copyright (C) 2008 Adam Williams + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef SHIFTINTERLACE_H +#define SHIFTINTERLACE_H + +#include "bcdisplayinfo.h" +#include "clip.h" +#include "bchash.h" +#include "filexml.h" +#include "guicast.h" +#include "language.h" +#include "pluginvclient.h" +#include "vframe.h" + + + +#include +#include + + + + + + + +class ShiftInterlaceWindow; +class ShiftInterlaceMain; + +class ShiftInterlaceConfig +{ +public: + ShiftInterlaceConfig(); + + void reset(); + int equivalent(ShiftInterlaceConfig &that); + void copy_from(ShiftInterlaceConfig &that); + void interpolate(ShiftInterlaceConfig &prev, + ShiftInterlaceConfig &next, + long prev_frame, + long next_frame, + long current_frame); + + + int odd_offset; + int even_offset; +}; + + +class ShiftInterlaceOdd : public BC_ISlider +{ +public: + ShiftInterlaceOdd(ShiftInterlaceMain *plugin, int x, int y); + int handle_event(); + ShiftInterlaceMain *plugin; +}; + +class ShiftInterlaceEven : public BC_ISlider +{ +public: + ShiftInterlaceEven(ShiftInterlaceMain *plugin, int x, int y); + int handle_event(); + ShiftInterlaceMain *plugin; +}; + +class ShiftInterlaceReset : public BC_GenericButton +{ +public: + ShiftInterlaceReset(ShiftInterlaceMain *plugin, ShiftInterlaceWindow *gui, int x, int y); + ~ShiftInterlaceReset(); + int handle_event(); + ShiftInterlaceMain *plugin; + ShiftInterlaceWindow *gui; +}; + +class ShiftInterlaceWindow : public PluginClientWindow +{ +public: + ShiftInterlaceWindow(ShiftInterlaceMain *plugin); + + void create_objects(); + void update(); + + ShiftInterlaceOdd *odd_offset; + ShiftInterlaceEven *even_offset; + ShiftInterlaceMain *plugin; + ShiftInterlaceReset *reset; +}; + + + + + + +class ShiftInterlaceMain : public PluginVClient +{ +public: + ShiftInterlaceMain(PluginServer *server); + ~ShiftInterlaceMain(); + +// required for all realtime plugins + PLUGIN_CLASS_MEMBERS(ShiftInterlaceConfig) + int process_realtime(VFrame *input_ptr, VFrame *output_ptr); + int is_realtime(); + void update_gui(); + void save_data(KeyFrame *keyframe); + void read_data(KeyFrame *keyframe); + + + void shift_row(VFrame *input_frame, + VFrame *output_frame, + int offset, + int row); + + +}; + +#endif