5 #include "histogram.inc"
6 #include "histogramconfig.h"
7 #include "histogramwindow.inc"
8 #include "loadbalance.h"
9 #include "plugincolors.h"
10 #include "pluginvclient.h"
13 class HistogramMain
: public PluginVClient
16 HistogramMain(PluginServer
*server
);
19 int process_buffer(VFrame
*frame
,
20 int64_t start_position
,
25 void save_data(KeyFrame
*keyframe
);
26 void read_data(KeyFrame
*keyframe
);
28 void render_gui(void *data
);
29 int calculate_use_opengl();
32 PLUGIN_CLASS_MEMBERS(HistogramConfig
, HistogramThread
)
34 // Interpolate quantized transfer table to linear output
35 float calculate_linear(float input
, int mode
, int do_value
);
36 float calculate_smooth(float input
, int subscript
);
37 // Convert input to smoothed output by looking up in smooth table.
38 float calculate_curve(float input
);
39 // Calculate automatic settings
40 void calculate_automatic(VFrame
*data
);
41 // Calculate histogram.
42 // Value is only calculated for preview.
43 void calculate_histogram(VFrame
*data
, int do_value
);
44 // Calculate the linear, smoothed, lookup curves
45 void tabulate_curve(int subscript
, int use_value
);
51 VFrame
*input
, *output
;
52 HistogramEngine
*engine
;
53 int *lookup
[HISTOGRAM_MODES
];
54 float *smoothed
[HISTOGRAM_MODES
];
55 float *linear
[HISTOGRAM_MODES
];
56 // No value applied to this
57 int *preview_lookup
[HISTOGRAM_MODES
];
58 int *accum
[HISTOGRAM_MODES
];
59 // Input point being dragged or edited
61 // Current channel being viewed
68 class HistogramPackage
: public LoadPackage
75 class HistogramUnit
: public LoadClient
78 HistogramUnit(HistogramEngine
*server
, HistogramMain
*plugin
);
80 void process_package(LoadPackage
*package
);
81 HistogramEngine
*server
;
82 HistogramMain
*plugin
;
86 class HistogramEngine
: public LoadServer
89 HistogramEngine(HistogramMain
*plugin
,
92 void process_packages(int operation
, VFrame
*data
, int do_value
);
94 LoadClient
* new_client();
95 LoadPackage
* new_package();
96 HistogramMain
*plugin
;