12 #include "whirlwindow.h"
13 #include "pluginvclient.h"
16 class WhirlMain
: public PluginVClient
19 WhirlMain(int argc
, char *argv
[]);
22 // required for all realtime plugins
23 int process_realtime(long size
, VFrame
**input_ptr
, VFrame
**output_ptr
);
24 int plugin_is_realtime();
25 int plugin_is_multi_channel();
36 int save_data(char *text
);
37 int read_data(char *text
);
40 int reconfigure(); // Rebuild tables
44 int automated_function
;
48 // a thread for the GUI
56 class WhirlEngine
: public Thread
59 WhirlEngine(WhirlMain
*plugin
, int start_y
, int end_y
);
62 int start_process_frame(VFrame
**output
, VFrame
**input
, int size
);
63 int wait_process_frame();
66 int calc_undistorted_coords(double wx
,
72 inline VWORD
bilinear(double x
, double y
, VWORD
*values
)
81 m0
= (double)values
[0] + x
* ((double)values
[1] - values
[0]);
82 m1
= (double)values
[2] + x
* ((double)values
[3] - values
[2]);
83 return (VWORD
)(m0
+ y
* (m1
- m0
));
85 void get_pixel(const int &x
, const int &y
, VPixel
*pixel
, VPixel
**input_rows
);
91 VFrame
**output
, **input
;
93 Mutex input_lock
, output_lock
;
94 double radius
, radius2
, radius3
, pinch
;
95 double scale_x
, scale_y
;