remove old quicktime, replaced with current ffmpeg
[goodguy/history.git] / cinelerra-5.0 / plugins / quark / quark.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  * 
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * 
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  * 
20  */
21
22 #ifndef QUARK_H
23 #define QUARK_H
24
25 class QuarkMain;
26 #define MAXSHARPNESS 100
27
28 #include "bchash.h"
29 #include "mutex.h"
30 #include "pluginvclient.h"
31 #include "sharpenwindow.h"
32
33 #include <sys/types.h>
34
35
36
37 class QuarkEngine : public Thread
38 {
39 public:
40         QuarkEngine(QuarkMain *plugin);
41         ~QuarkEngine();
42
43         int start_process_frame(VFrame *output, VFrame *input, int row1, int row2);
44         int wait_process_frame();
45         void run();
46
47         void filter(int components,
48                 int wordsize,
49                 int vmax,
50                 int w, 
51                 unsigned char *src, 
52                 unsigned char *dst,
53                 int *neg0, 
54                 int *neg1, 
55                 int *neg2);
56         void filter(int components,
57                 int wordsize,
58                 int vmax,
59                 int w, 
60                 u_int16_t *src, 
61                 u_int16_t *dst,
62                 int *neg0, 
63                 int *neg1, 
64                 int *neg2);
65
66
67         void filter_888(int w, 
68                 unsigned char *src, 
69                 unsigned char *dst,
70                 int *neg0, 
71                 int *neg1, 
72                 int *neg2);
73         void filter_8888(int w, 
74                 unsigned char *src, 
75                 unsigned char *dst,
76                 int *neg0, 
77                 int *neg1, 
78                 int *neg2);
79         void filter_161616(int w, 
80                 u_int16_t *src, 
81                 u_int16_t *dst,
82                 int *neg0, 
83                 int *neg1, 
84                 int *neg2);
85         void filter_16161616(int w, 
86                 u_int16_t *src, 
87                 u_int16_t *dst,
88                 int *neg0, 
89                 int *neg1, 
90                 int *neg2);
91
92         void sharpen_888();
93         void sharpen_161616();
94         void sharpen_8888();
95         void sharpen_16161616();
96
97         int filter(int w, 
98                 unsigned char *src, 
99                 unsigned char *dst, 
100                 int *neg0, 
101                 int *neg1, 
102                 int *neg2);
103
104         QuarkMain *plugin;
105         int field;
106         VFrame *output, *input;
107         int last_frame;
108         Mutex input_lock, output_lock;
109         unsigned char *src_rows[4], *dst_row;
110         int *neg_rows[4];
111         int row1, row2;
112 };
113
114 class QuarkMain : public PluginVClient
115 {
116 public:
117         QuarkMain(PluginServer *server);
118         ~QuarkMain();
119
120 // required for all realtime plugins
121         int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
122         int is_realtime();
123         char* plugin_title();
124         int show_gui();
125         void raise_window();
126         int set_string();
127         void load_configuration();
128         void save_data(KeyFrame *keyframe);
129         void read_data(KeyFrame *keyframe);
130
131 // parameters needed for sharpness
132         float sharpness; // Range from 0 to 100
133         float last_sharpness;
134         int interlace;
135         int horizontal;
136         int row_step;
137         int luminance;
138
139 // a thread for the GUI
140         QuarkThread *thread;
141         int pos_lut[0x10000], neg_lut[0x10000];
142
143 private:
144         int get_luts(int *pos_lut, int *neg_lut, int color_model);
145         QuarkEngine **engine;
146         int total_engines;
147 };
148
149 #endif