r864: Merge 2.1:
[cinelerra_cv/ct.git] / plugins / histogram / histogramconfig.h
blobaa1042821d5949a7d23a23c241837df9639a8e84
1 #ifndef HISTOGRAMCONFIG_H
2 #define HISTOGRAMCONFIG_H
5 #include "histogram.inc"
6 #include "histogramconfig.inc"
7 #include "linklist.h"
8 #include <stdint.h>
10 class HistogramPoint : public ListItem<HistogramPoint>
12 public:
13 HistogramPoint();
14 ~HistogramPoint();
16 int equivalent(HistogramPoint *src);
17 float x, y;
21 class HistogramPoints : public List<HistogramPoint>
23 public:
24 HistogramPoints();
25 ~HistogramPoints();
27 // Insert new point
28 HistogramPoint* insert(float x, float y);
29 int equivalent(HistogramPoints *src);
30 void boundaries();
31 void copy_from(HistogramPoints *src);
32 void interpolate(HistogramPoints *prev,
33 HistogramPoints *next,
34 double prev_scale,
35 double next_scale);
38 class HistogramConfig
40 public:
41 HistogramConfig();
43 int equivalent(HistogramConfig &that);
44 void copy_from(HistogramConfig &that);
45 void interpolate(HistogramConfig &prev,
46 HistogramConfig &next,
47 int64_t prev_frame,
48 int64_t next_frame,
49 int64_t current_frame);
50 // Used by constructor and reset button
51 void reset(int do_mode);
52 void reset_points(int colors_only);
53 void boundaries();
54 void dump();
56 // Range 0 - 1.0
57 // Input points
58 HistogramPoints points[HISTOGRAM_MODES];
59 // Output points
60 float output_min[HISTOGRAM_MODES];
61 float output_max[HISTOGRAM_MODES];
62 int automatic;
63 float threshold;
64 int plot;
65 int split;
69 #endif