00001 #ifndef HISTOGRAMCONFIG_H 00002 #define HISTOGRAMCONFIG_H 00003 00004 00005 #include "histogram.inc" 00006 #include "histogramconfig.inc" 00007 #include "linklist.h" 00008 #include <stdint.h> 00009 00010 class HistogramPoint : public ListItem<HistogramPoint> 00011 { 00012 public: 00013 HistogramPoint(); 00014 ~HistogramPoint(); 00015 00016 int equivalent(HistogramPoint *src); 00017 float x, y; 00018 }; 00019 00020 00021 class HistogramPoints : public List<HistogramPoint> 00022 { 00023 public: 00024 HistogramPoints(); 00025 ~HistogramPoints(); 00026 00027 // Insert new point 00028 HistogramPoint* insert(float x, float y); 00029 int equivalent(HistogramPoints *src); 00030 void boundaries(); 00031 void copy_from(HistogramPoints *src); 00032 void interpolate(HistogramPoints *prev, 00033 HistogramPoints *next, 00034 double prev_scale, 00035 double next_scale); 00036 }; 00037 00038 class HistogramConfig 00039 { 00040 public: 00041 HistogramConfig(); 00042 00043 int equivalent(HistogramConfig &that); 00044 void copy_from(HistogramConfig &that); 00045 void interpolate(HistogramConfig &prev, 00046 HistogramConfig &next, 00047 int64_t prev_frame, 00048 int64_t next_frame, 00049 int64_t current_frame); 00050 // Used by constructor and reset button 00051 void reset(int do_mode); 00052 void reset_points(int colors_only); 00053 void boundaries(); 00054 void dump(); 00055 00056 // Range 0 - 1.0 00057 // Input points 00058 HistogramPoints points[HISTOGRAM_MODES]; 00059 // Output points 00060 float output_min[HISTOGRAM_MODES]; 00061 float output_max[HISTOGRAM_MODES]; 00062 int automatic; 00063 float threshold; 00064 int plot; 00065 int split; 00066 }; 00067 00068 00069 #endif 00070 00071 00072
1.5.5