X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Finterpolatevideo%2Fopticflow.h;fp=cinelerra-5.1%2Fplugins%2Finterpolatevideo%2Fopticflow.h;h=f89a325c4c4dca366a791a2894b58bd54e3d4108;hb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;hp=0000000000000000000000000000000000000000;hpb=52fcc46226f9df46f9ce9d0566dc568455a7db0b;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/interpolatevideo/opticflow.h b/cinelerra-5.1/plugins/interpolatevideo/opticflow.h new file mode 100644 index 00000000..f89a325c --- /dev/null +++ b/cinelerra-5.1/plugins/interpolatevideo/opticflow.h @@ -0,0 +1,159 @@ +/* + * CINELERRA + * Copyright (C) 1997-2011 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 OPTICFLOW_H +#define OPTICFLOW_H + + +#include "interpolatevideo.inc" +#include "loadbalance.h" +#include "motionscan.inc" +#include "opticflow.inc" + +// Need a 2nd table if a large number of packages +class OpticFlowMacroblock +{ +public: + OpticFlowMacroblock(); + void copy_from(OpticFlowMacroblock *src); + + int x, y; + int dx, dy; + int is_valid; +// Temporaries for blending macroblocks + float angle1, angle2; + float dist; + int visible; +}; + +class OpticFlowPackage : public LoadPackage +{ +public: + OpticFlowPackage(); + int macroblock0; + int macroblock1; +}; + +class OpticFlowUnit : public LoadClient +{ +public: + OpticFlowUnit(OpticFlow *server); + ~OpticFlowUnit(); + void process_package(LoadPackage *package); + MotionScan *motion; + OpticFlow *server; +}; + + +class OpticFlow : public LoadServer +{ +public: + OpticFlow(InterpolateVideo *plugin, + int total_clients, + int total_packages); + ~OpticFlow(); + void init_packages(); + LoadClient* new_client(); + LoadPackage* new_package(); + InterpolateVideo *plugin; +}; + + + + + + + + + +class WarpPackage : public LoadPackage +{ +public: + WarpPackage(); + int y1, y2; +}; + +class WarpUnit : public LoadClient +{ +public: + WarpUnit(Warp *server); + ~WarpUnit(); + void process_package(LoadPackage *package); + Warp *server; +}; + + +class Warp : public LoadServer +{ +public: + Warp(InterpolateVideo *plugin, + int total_clients, + int total_packages); + ~Warp(); + void init_packages(); + LoadClient* new_client(); + LoadPackage* new_package(); + InterpolateVideo *plugin; +}; + + + + + + +class BlendPackage : public LoadPackage +{ +public: + BlendPackage(); + int number0, number1; +}; + + + +class BlendMacroblockUnit : public LoadClient +{ +public: + BlendMacroblockUnit(BlendMacroblock *server); + ~BlendMacroblockUnit(); + void process_package(LoadPackage *package); + BlendMacroblock *server; +}; + + +class BlendMacroblock : public LoadServer +{ +public: + BlendMacroblock(InterpolateVideo *plugin, + int total_clients, + int total_packages); + ~BlendMacroblock(); + void init_packages(); + LoadClient* new_client(); + LoadPackage* new_package(); + InterpolateVideo *plugin; +}; + + + + + +#endif + +