4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
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.
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.
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
26 #define MAXSHARPNESS 100
30 #include "pluginvclient.h"
31 #include "sharpenwindow.h"
33 #include <sys/types.h>
37 class QuarkEngine : public Thread
40 QuarkEngine(QuarkMain *plugin);
43 int start_process_frame(VFrame *output, VFrame *input, int row1, int row2);
44 int wait_process_frame();
47 void filter(int components,
56 void filter(int components,
67 void filter_888(int w,
73 void filter_8888(int w,
79 void filter_161616(int w,
85 void filter_16161616(int w,
93 void sharpen_161616();
95 void sharpen_16161616();
106 VFrame *output, *input;
108 Mutex input_lock, output_lock;
109 unsigned char *src_rows[4], *dst_row;
114 class QuarkMain : public PluginVClient
117 QuarkMain(PluginServer *server);
120 // required for all realtime plugins
121 int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
123 char* plugin_title();
127 void load_configuration();
128 void save_data(KeyFrame *keyframe);
129 void read_data(KeyFrame *keyframe);
131 // parameters needed for sharpness
132 float sharpness; // Range from 0 to 100
133 float last_sharpness;
139 // a thread for the GUI
141 int pos_lut[0x10000], neg_lut[0x10000];
144 int get_luts(int *pos_lut, int *neg_lut, int color_model);
145 QuarkEngine **engine;