X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Funsharp%2Funsharp.h;fp=cinelerra-5.1%2Fplugins%2Funsharp%2Funsharp.h;h=0b83a1723f4fdc00748c609a38d5def91d93af85;hb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;hp=0000000000000000000000000000000000000000;hpb=52fcc46226f9df46f9ce9d0566dc568455a7db0b;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/unsharp/unsharp.h b/cinelerra-5.1/plugins/unsharp/unsharp.h new file mode 100644 index 00000000..0b83a172 --- /dev/null +++ b/cinelerra-5.1/plugins/unsharp/unsharp.h @@ -0,0 +1,124 @@ + +/* + * 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 UNSHARP_H +#define UNSHARP_H + +#include +#include +#include + +#include "bchash.inc" +#include "filexml.inc" +#include "keyframe.inc" +#include "loadbalance.h" +#include "pluginvclient.h" +#include "unsharp.inc" +#include "unsharpwindow.inc" +#include "vframe.inc" + + + +class UnsharpConfig +{ +public: + UnsharpConfig(); + + int equivalent(UnsharpConfig &that); + void copy_from(UnsharpConfig &that); + void interpolate(UnsharpConfig &prev, + UnsharpConfig &next, + int64_t prev_frame, + int64_t next_frame, + int64_t current_frame); + float radius; + float amount; + int threshold; +}; + + + + +class UnsharpMain : public PluginVClient +{ +public: + UnsharpMain(PluginServer *server); + ~UnsharpMain(); + + PLUGIN_CLASS_MEMBERS(UnsharpConfig) + int process_buffer(VFrame *frame, + int64_t start_position, + double frame_rate); + int is_realtime(); + void save_data(KeyFrame *keyframe); + void read_data(KeyFrame *keyframe); + void update_gui(); + + UnsharpEngine *engine; +}; + + +class UnsharpPackage : public LoadPackage +{ +public: + UnsharpPackage(); + int y1, y2; +}; + +class UnsharpUnit : public LoadClient +{ +public: + UnsharpUnit(UnsharpEngine *server, UnsharpMain *plugin); + ~UnsharpUnit(); + + void process_package(LoadPackage *package); + + UnsharpEngine *server; + UnsharpMain *plugin; + VFrame *temp; +}; + +class UnsharpEngine : public LoadServer +{ +public: + UnsharpEngine(UnsharpMain *plugin, + int total_clients, + int total_packages); + ~UnsharpEngine(); + void init_packages(); + LoadClient* new_client(); + LoadPackage* new_package(); + void do_unsharp(VFrame *src); + VFrame *src; + + UnsharpMain *plugin; +}; + + + + +#endif + + + + + +