r877: Fix files that were missing from a make dist tarball.
[cinelerra_cv.git] / plugins / gamma / gamma.h
blobc3486e1dee0db09721efc8bf17d6cfa5e471e159
1 #ifndef LINEARIZE_H
2 #define LINEARIZE_H
4 class GammaEngine;
5 class GammaMain;
7 #include "gammawindow.h"
8 #include "loadbalance.h"
9 #include "plugincolors.h"
10 #include "guicast.h"
11 #include "pluginvclient.h"
12 #include "thread.h"
14 #define HISTOGRAM_SIZE 256
16 class GammaConfig
18 public:
19 GammaConfig();
21 int equivalent(GammaConfig &that);
22 void copy_from(GammaConfig &that);
23 void interpolate(GammaConfig &prev,
24 GammaConfig &next,
25 int64_t prev_frame,
26 int64_t next_frame,
27 int64_t current_frame);
29 float max;
30 float gamma;
31 int automatic;
32 // Plot histogram
33 int plot;
36 class GammaPackage : public LoadPackage
38 public:
39 GammaPackage();
40 int start, end;
43 class GammaUnit : public LoadClient
45 public:
46 GammaUnit(GammaMain *plugin);
47 void process_package(LoadPackage *package);
48 GammaMain *plugin;
49 int accum[HISTOGRAM_SIZE];
52 class GammaEngine : public LoadServer
54 public:
55 GammaEngine(GammaMain *plugin);
57 void process_packages(int operation, VFrame *data);
58 void init_packages();
59 LoadClient* new_client();
60 LoadPackage* new_package();
61 VFrame *data;
62 int operation;
63 enum
65 HISTOGRAM,
66 APPLY
68 GammaMain *plugin;
69 int accum[HISTOGRAM_SIZE];
72 class GammaMain : public PluginVClient
74 public:
75 GammaMain(PluginServer *server);
76 ~GammaMain();
78 // required for all realtime plugins
79 int process_buffer(VFrame *frame,
80 int64_t start_position,
81 double frame_rate);
82 void calculate_max(VFrame *frame);
83 int is_realtime();
84 void update_gui();
85 void save_data(KeyFrame *keyframe);
86 void read_data(KeyFrame *keyframe);
87 int load_defaults();
88 int save_defaults();
89 void render_gui(void *data);
90 int handle_opengl();
92 GammaEngine *engine;
93 VFrame *frame;
95 PLUGIN_CLASS_MEMBERS(GammaConfig, GammaThread)
100 #endif