4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5 * Copyright (C) 2003-2016 Cinelerra CV contributors
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 // the simplest plugin possible
28 class DeInterlaceMain;
31 #include "deinterwindow-cv.h"
32 #include "pluginvclient.h"
37 #define THRESHOLD_SCALAR 1000
47 DEINTERLACE_TEMPORALSWAP,
50 class DeInterlaceConfig
55 int equivalent(DeInterlaceConfig &that);
56 void copy_from(DeInterlaceConfig &that);
57 void interpolate(DeInterlaceConfig &prev,
58 DeInterlaceConfig &next,
61 int64_t current_frame);
66 volatile int dominance; /* top or bottom field */
69 class DeInterlaceMain : public PluginVClient
72 DeInterlaceMain(PluginServer *server);
76 PLUGIN_CLASS_MEMBERS(DeInterlaceConfig);
79 // required for all realtime plugins
80 int process_buffer(VFrame *frame,
81 int64_t start_position,
86 void save_data(KeyFrame *keyframe);
87 void read_data(KeyFrame *keyframe);
88 void render_gui(void *data);
90 void deinterlace_avg_top(VFrame *input, VFrame *output, int dominance);
91 void deinterlace_top(VFrame *input, VFrame *output, int dominance);
92 void deinterlace_avg(VFrame *input, VFrame *output);
93 void deinterlace_swap(VFrame *input, VFrame *output, int dominance);
94 void deinterlace_temporalswap(VFrame *input, VFrame *prevframe, VFrame *output, int dominance);
95 void deinterlace_bobweave(VFrame *input, VFrame *prevframe, VFrame *output, int dominance);
99 VFrame *temp_prevframe;