8 #include "loadbalance.h"
10 #include "pluginvclient.h"
11 #include "ivtcwindow.h"
12 #include <sys/types.h>
34 class IVTCMain
: public PluginVClient
37 IVTCMain(PluginServer
*server
);
40 // required for all realtime plugins
41 int process_realtime(VFrame
*input_ptr
, VFrame
*output_ptr
);
43 void save_data(KeyFrame
*keyframe
);
44 void read_data(KeyFrame
*keyframe
);
45 PLUGIN_CLASS_MEMBERS(IVTCConfig
, IVTCThread
)
52 void compare_fields(VFrame
*frame1
,
56 int64_t compare(VFrame
*current_avg
,
61 void deinterlace_avg(VFrame
*output
, VFrame
*input
, int dominance
);
64 VFrame
*temp_frame
[2];
65 VFrame
*input
, *output
;
67 // Automatic IVTC variables
68 // Difference between averaged current even lines and original even lines
69 int64_t even_vs_current
;
70 // Difference between averaged current even lines and previous even lines
72 // Difference between averaged current odd lines and original odd lines
73 int64_t odd_vs_current
;
74 // Difference between averaged current odd lines and previous odd lines
77 // Closest combination of fields in previous calculation.
78 // If the lowest current combination is too big and the previous strategy
79 // was direct copy, copy the previous frame.
81 int previous_strategy
;
86 class IVTCPackage
: public LoadPackage
93 class IVTCUnit
: public LoadClient
96 IVTCUnit(IVTCEngine
*server
, IVTCMain
*plugin
);
97 void process_package(LoadPackage
*package
);
101 int64_t even_vs_current
;
102 int64_t even_vs_prev
;
103 int64_t odd_vs_current
;
108 class IVTCEngine
: public LoadServer
111 IVTCEngine(IVTCMain
*plugin
, int cpus
);
113 void init_packages();
114 LoadClient
* new_client();
115 LoadPackage
* new_package();