X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fyuvshift%2Fyuvshift.h;fp=cinelerra-5.1%2Fplugins%2Fyuvshift%2Fyuvshift.h;h=c943f5b7647283c6aa4cef3cf2bc88ead6943b72;hb=54cc56bff09f5004b2a6cd454375f06e56acf5a0;hp=0000000000000000000000000000000000000000;hpb=834732af87bfd7f1d4035109f31e48db12b415fa;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/yuvshift/yuvshift.h b/cinelerra-5.1/plugins/yuvshift/yuvshift.h new file mode 100644 index 00000000..c943f5b7 --- /dev/null +++ b/cinelerra-5.1/plugins/yuvshift/yuvshift.h @@ -0,0 +1,109 @@ + +/* + * 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 YUVSHIFT_H +#define YUVSHIFT_H + +#include "bcdisplayinfo.h" +#include "clip.h" +#include "bchash.h" +#include "filexml.h" +#include "guicast.h" +#include "language.h" +#include "bccolors.h" +#include "pluginvclient.h" +#include "vframe.h" + +#include +#include + + +class YUVShiftEffect; +class YUVShiftWindow; +class YUVShiftReset; + + +class YUVShiftConfig +{ +public: + YUVShiftConfig(); + + void reset(); + void copy_from(YUVShiftConfig &src); + int equivalent(YUVShiftConfig &src); + void interpolate(YUVShiftConfig &prev, + YUVShiftConfig &next, + long prev_frame, + long next_frame, + long current_frame); + + int y_dx, y_dy, u_dx, u_dy, v_dx, v_dy; +}; + +class YUVShiftLevel : public BC_ISlider +{ +public: + YUVShiftLevel(YUVShiftEffect *plugin, int *output, int x, int y); + int handle_event(); + YUVShiftEffect *plugin; + int *output; +}; + +class YUVShiftReset : public BC_GenericButton +{ +public: + YUVShiftReset(YUVShiftEffect *plugin, YUVShiftWindow *window, int x, int y); + ~YUVShiftReset(); + int handle_event(); + YUVShiftEffect *plugin; + YUVShiftWindow *window; +}; + +class YUVShiftWindow : public PluginClientWindow +{ +public: + YUVShiftWindow(YUVShiftEffect *plugin); + void create_objects(); + void update(); + YUVShiftLevel *y_dx, *y_dy, *u_dx, *u_dy, *v_dx, *v_dy; + YUVShiftEffect *plugin; + YUVShiftReset *reset; +}; + + + +class YUVShiftEffect : public PluginVClient +{ + VFrame *temp_frame; +public: + YUVShiftEffect(PluginServer *server); + ~YUVShiftEffect(); + + + PLUGIN_CLASS_MEMBERS(YUVShiftConfig) + int process_realtime(VFrame *input, VFrame *output); + int is_realtime(); + void save_data(KeyFrame *keyframe); + void read_data(KeyFrame *keyframe); + void update_gui(); +}; + +#endif