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
26 #include "condition.inc"
27 #include "loadbalance.h"
28 #include "maskautos.inc"
29 #include "maskauto.inc"
33 typedef uint16_t temp_t; // temp is A16
46 class MaskPackage : public LoadPackage
52 int start_x, end_x, start_y, end_y;
55 class MaskUnit : public LoadClient
58 MaskUnit(MaskEngine *engine);
61 void draw_line(int v, int x1, int y1, int x2, int y2);
62 void draw_fill(int v);
63 void draw_feather(int ix1,int iy1, int ix2,int iy2);
64 void draw_spot(int ix, int iy);
65 void process_package(LoadPackage *package);
74 class MaskEngine : public LoadServer
80 void do_mask(VFrame *output,
81 // Position relative to project, compensated for playback direction
82 int64_t start_position_project,
83 MaskAutos *keyframe_set,
85 MaskAuto *default_auto);
86 int points_equivalent(MaskPoints *new_points,
89 void delete_packages();
91 LoadClient* new_client();
92 LoadPackage* new_package();
97 MaskPointSets point_sets;
98 ArrayList<float> faders;
99 ArrayList<float> feathers;
100 int step, total_submasks;
102 temp_t fade[SUBMASKS+1];