X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fhistogram%2Fhistogramconfig.C;h=20bc6ba35ed0b1fabdbf95075fa9b4580d2a1dff;hb=81915b8dd7046fd88697e3a9cc1a11b891be62db;hp=fc138ba7fa85202e5c0d6565a9bc04c6970076f2;hpb=0b751b07a28e84a721b2bb76083db6629aa26d73;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/histogram/histogramconfig.C b/cinelerra-5.1/plugins/histogram/histogramconfig.C index fc138ba7..20bc6ba3 100644 --- a/cinelerra-5.1/plugins/histogram/histogramconfig.C +++ b/cinelerra-5.1/plugins/histogram/histogramconfig.C @@ -31,7 +31,7 @@ HistogramConfig::HistogramConfig() { plot = 1; split = 0; - + sum_frames = 0; reset(1); } @@ -49,11 +49,9 @@ void HistogramConfig::reset(int do_mode) if(do_mode) { automatic = 0; - automatic_v = 0; - threshold = 1.0; + threshold = 0.97; } - frames = 0; log_slider = .5; } @@ -84,34 +82,31 @@ void HistogramConfig::boundaries() } CLAMP(threshold, 0, 1); CLAMP(log_slider, 0, 1); - CLAMP(frames, 0, 65535); } int HistogramConfig::equivalent(HistogramConfig &that) { // EQUIV isn't precise enough to detect changes in points - for(int i = 0; i < HISTOGRAM_MODES; i++) - { + for(int i = 0; i < HISTOGRAM_MODES; i++) { // if(!EQUIV(low_input[i], that.low_input[i]) || // !EQUIV(high_input[i], that.high_input[i]) || // !EQUIV(gamma[i], that.gamma[i]) || // !EQUIV(low_output[i], that.low_output[i]) || // !EQUIV(high_output[i], that.high_output[i])) return 0; - if(low_input[i] != that.low_input[i] || - high_input[i] != that.high_input[i] || - gamma[i] != that.gamma[i] || - low_output[i] != that.low_output[i] || - high_output[i] != that.high_output[i]) return 0; + if( low_input[i] != that.low_input[i] || + high_input[i] != that.high_input[i] || + gamma[i] != that.gamma[i] || + low_output[i] != that.low_output[i] || + high_output[i] != that.high_output[i] ) return 0; } - if(automatic != that.automatic || - automatic_v != that.automatic_v || - threshold != that.threshold) return 0; + if( automatic != that.automatic || + threshold != that.threshold ) return 0; - if(plot != that.plot || - split != that.split || - frames != that.frames || - log_slider != that.log_slider ) return 0; + if( plot != that.plot || + split != that.split || + sum_frames != that.sum_frames || + log_slider != that.log_slider ) return 0; return 1; } @@ -128,25 +123,20 @@ void HistogramConfig::copy_from(HistogramConfig &that) } automatic = that.automatic; - automatic_v = that.automatic_v; threshold = that.threshold; plot = that.plot; split = that.split; - frames = that.frames; + sum_frames = that.sum_frames; log_slider = that.log_slider; } -void HistogramConfig::interpolate(HistogramConfig &prev, - HistogramConfig &next, - int64_t prev_frame, - int64_t next_frame, - int64_t current_frame) +void HistogramConfig::interpolate(HistogramConfig &prev, HistogramConfig &next, + int64_t prev_frame, int64_t next_frame, int64_t current_frame) { double next_scale = (double)(current_frame - prev_frame) / (next_frame - prev_frame); double prev_scale = 1.0 - next_scale; - for(int i = 0; i < HISTOGRAM_MODES; i++) - { + for( int i=0; i