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"
45 class MaskPackage : public LoadPackage
51 int start_x, end_x, start_y, end_y;
54 class MaskUnit : public LoadClient
57 MaskUnit(MaskEngine *engine);
60 void process_package(LoadPackage *package);
61 void draw_line_clamped(VFrame *frame,
67 void do_feather(VFrame *output,
74 void blur_strip(double *val_p,
81 double n_p[5], n_m[5];
82 double d_p[5], d_m[5];
83 double bd_p[5], bd_m[5];
89 class MaskEngine : public LoadServer
96 void do_mask(VFrame *output,
97 // Position relative to project, compensated for playback direction
98 int64_t start_position_project,
99 MaskAutos *keyframe_set,
101 MaskAuto *default_auto);
102 int points_equivalent(ArrayList<MaskPoint*> *new_points,
103 ArrayList<MaskPoint*> *points);
105 void delete_packages();
106 void init_packages();
107 LoadClient* new_client();
108 LoadPackage* new_package();
111 // State of last mask
113 // Temporary for feathering
115 ArrayList<ArrayList<MaskPoint*>*> point_sets;