r105: This commit was manufactured by cvs2svn to create tag
[cinelerra_cv/mob.git] / hvirtual / plugins / quark / quark.h
blobdcb29e1cf3f1391109a9fd9530148106bc0bd250
1 #ifndef QUARK_H
2 #define QUARK_H
4 class QuarkMain;
5 #define MAXSHARPNESS 100
7 #include "defaults.h"
8 #include "mutex.h"
9 #include "pluginvclient.h"
10 #include "quarkwindow.h"
12 #include <sys/types.h>
16 class QuarkEngine : public Thread
18 public:
19 QuarkEngine(QuarkMain *plugin);
20 ~QuarkEngine();
22 int start_process_frame(VFrame *output, VFrame *input, int row1, int row2);
23 int wait_process_frame();
24 void run();
26 void filter(int components,
27 int wordsize,
28 int vmax,
29 int w,
30 unsigned char *src,
31 unsigned char *dst,
32 int *neg0,
33 int *neg1,
34 int *neg2);
35 void filter(int components,
36 int wordsize,
37 int vmax,
38 int w,
39 u_int16_t *src,
40 u_int16_t *dst,
41 int *neg0,
42 int *neg1,
43 int *neg2);
46 void filter_888(int w,
47 unsigned char *src,
48 unsigned char *dst,
49 int *neg0,
50 int *neg1,
51 int *neg2);
52 void filter_8888(int w,
53 unsigned char *src,
54 unsigned char *dst,
55 int *neg0,
56 int *neg1,
57 int *neg2);
58 void filter_161616(int w,
59 u_int16_t *src,
60 u_int16_t *dst,
61 int *neg0,
62 int *neg1,
63 int *neg2);
64 void filter_16161616(int w,
65 u_int16_t *src,
66 u_int16_t *dst,
67 int *neg0,
68 int *neg1,
69 int *neg2);
71 void sharpen_888();
72 void sharpen_161616();
73 void sharpen_8888();
74 void sharpen_16161616();
76 int filter(int w,
77 unsigned char *src,
78 unsigned char *dst,
79 int *neg0,
80 int *neg1,
81 int *neg2);
83 QuarkMain *plugin;
84 int field;
85 VFrame *output, *input;
86 int last_frame;
87 Mutex input_lock, output_lock;
88 unsigned char *src_rows[4], *dst_row;
89 int *neg_rows[4];
90 int row1, row2;
93 class QuarkMain : public PluginVClient
95 public:
96 QuarkMain(PluginServer *server);
97 ~QuarkMain();
99 // required for all realtime plugins
100 int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
101 int is_realtime();
102 char* plugin_title();
103 int show_gui();
104 void raise_window();
105 int set_string();
106 void load_configuration();
107 void save_data(KeyFrame *keyframe);
108 void read_data(KeyFrame *keyframe);
109 int load_defaults();
110 int save_defaults();
111 VFrame* new_picon();
113 // parameters needed for sharpness
114 float sharpness; // Range from 0 to 100
115 float last_sharpness;
116 int interlace;
117 int horizontal;
118 int row_step;
119 int luminance;
121 // a thread for the GUI
122 QuarkThread *thread;
123 int pos_lut[0x10000], neg_lut[0x10000];
125 private:
126 int get_luts(int *pos_lut, int *neg_lut, int color_model);
127 Defaults *defaults;
128 QuarkEngine **engine;
129 int total_engines;
132 #endif