X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Fmaskengine.h;fp=cinelerra-5.0%2Fcinelerra%2Fmaskengine.h;h=0000000000000000000000000000000000000000;hb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;hp=340d923c851db18f546feb9352ef2176e1e340ba;hpb=52fcc46226f9df46f9ce9d0566dc568455a7db0b;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/cinelerra/maskengine.h b/cinelerra-5.0/cinelerra/maskengine.h deleted file mode 100644 index 340d923c..00000000 --- a/cinelerra-5.0/cinelerra/maskengine.h +++ /dev/null @@ -1,125 +0,0 @@ - -/* - * 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 MASKENGINE_H -#define MASKENGINE_H - - -#include "condition.inc" -#include "loadbalance.h" -#include "maskautos.inc" -#include "maskauto.inc" -#include "mutex.inc" -#include "vframe.inc" - - -class MaskEngine; - -// Values for step -enum -{ - DO_MASK, - DO_X_FEATHER, - DO_Y_FEATHER, - DO_APPLY -}; - -class MaskPackage : public LoadPackage -{ -public: - MaskPackage(); - ~MaskPackage(); - - int start_x, end_x, start_y, end_y; -}; - -class MaskUnit : public LoadClient -{ -public: - MaskUnit(MaskEngine *engine); - ~MaskUnit(); - - void process_package(LoadPackage *package); - void draw_line_clamped(VFrame *frame, - int &x1, - int &y1, - int x2, - int y2, - unsigned char value); - void do_feather(VFrame *output, - VFrame *input, - double feather, - int start_y, - int end_y, - int start_x, - int end_x); - void blur_strip(double *val_p, - double *val_m, - double *dst, - double *src, - int size, - int max); - - double n_p[5], n_m[5]; - double d_p[5], d_m[5]; - double bd_p[5], bd_m[5]; - MaskEngine *engine; - VFrame *temp; -}; - - -class MaskEngine : public LoadServer -{ -public: - MaskEngine(int cpus); - ~MaskEngine(); - - - void do_mask(VFrame *output, -// Position relative to project, compensated for playback direction - int64_t start_position_project, - MaskAutos *keyframe_set, - MaskAuto *keyframe, - MaskAuto *default_auto); - int points_equivalent(ArrayList *new_points, - ArrayList *points); - - void delete_packages(); - void init_packages(); - LoadClient* new_client(); - LoadPackage* new_package(); - - VFrame *output; -// State of last mask - VFrame *mask; -// Temporary for feathering - VFrame *temp_mask; - ArrayList*> point_sets; - int mode; - int step; - double feather; - int recalculate; - int value; -}; - - - -#endif