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,
62 int x1, int y1, int x2, int y2, unsigned char value);
63 void do_feather(VFrame *output, VFrame *input,
64 double feather, int start_y, int end_y, int start_x, int end_x);
65 void blur_strip(double *val_p, double *val_m,
66 double *dst, double *src, int size, int max);
68 double n_p[5], n_m[5];
69 double d_p[5], d_m[5];
70 double bd_p[5], bd_m[5];
77 class MaskEngine : public LoadServer
84 void do_mask(VFrame *output,
85 // Position relative to project, compensated for playback direction
86 int64_t start_position_project,
87 MaskAutos *keyframe_set,
89 MaskAuto *default_auto);
90 int points_equivalent(ArrayList<MaskPoint*> *new_points,
91 ArrayList<MaskPoint*> *points);
93 void delete_packages();
95 LoadClient* new_client();
96 LoadPackage* new_package();
101 // Temporary for feathering
103 ArrayList<ArrayList<MaskPoint*>*> point_sets;