00001 #ifndef UNSHARP_H
00002 #define UNSHARP_H
00003
00004 #include <math.h>
00005 #include <stdint.h>
00006 #include <string.h>
00007
00008 #include "bchash.inc"
00009 #include "filexml.inc"
00010 #include "keyframe.inc"
00011 #include "loadbalance.h"
00012 #include "pluginvclient.h"
00013 #include "unsharp.inc"
00014 #include "unsharpwindow.inc"
00015 #include "vframe.inc"
00016
00017
00018
00019 class UnsharpConfig
00020 {
00021 public:
00022 UnsharpConfig();
00023
00024 int equivalent(UnsharpConfig &that);
00025 void copy_from(UnsharpConfig &that);
00026 void interpolate(UnsharpConfig &prev,
00027 UnsharpConfig &next,
00028 int64_t prev_frame,
00029 int64_t next_frame,
00030 int64_t current_frame);
00031 float radius;
00032 float amount;
00033 int threshold;
00034 };
00035
00036
00037
00038
00039 class UnsharpMain : public PluginVClient
00040 {
00041 public:
00042 UnsharpMain(PluginServer *server);
00043 ~UnsharpMain();
00044
00045 int process_buffer(VFrame *frame,
00046 int64_t start_position,
00047 double frame_rate);
00048 int is_realtime();
00049 int load_defaults();
00050 int save_defaults();
00051 void save_data(KeyFrame *keyframe);
00052 void read_data(KeyFrame *keyframe);
00053 void update_gui();
00054
00055 PLUGIN_CLASS_MEMBERS(UnsharpConfig, UnsharpThread)
00056
00057 UnsharpEngine *engine;
00058 };
00059
00060
00061 class UnsharpPackage : public LoadPackage
00062 {
00063 public:
00064 UnsharpPackage();
00065 int y1, y2;
00066 };
00067
00068 class UnsharpUnit : public LoadClient
00069 {
00070 public:
00071 UnsharpUnit(UnsharpEngine *server, UnsharpMain *plugin);
00072 ~UnsharpUnit();
00073
00074 void process_package(LoadPackage *package);
00075
00076 UnsharpEngine *server;
00077 UnsharpMain *plugin;
00078 VFrame *temp;
00079 };
00080
00081 class UnsharpEngine : public LoadServer
00082 {
00083 public:
00084 UnsharpEngine(UnsharpMain *plugin,
00085 int total_clients,
00086 int total_packages);
00087 ~UnsharpEngine();
00088 void init_packages();
00089 LoadClient* new_client();
00090 LoadPackage* new_package();
00091 void do_unsharp(VFrame *src);
00092 VFrame *src;
00093
00094 UnsharpMain *plugin;
00095 };
00096
00097
00098
00099
00100 #endif
00101
00102
00103
00104
00105
00106