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=7203063f35298203b611cd8e6034304754243329;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/histogram/histogramconfig.C b/cinelerra-5.1/plugins/histogram/histogramconfig.C index 7203063f..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,9 +49,10 @@ void HistogramConfig::reset(int do_mode) if(do_mode) { automatic = 0; - automatic_v = 0; - threshold = 1.0; + threshold = 0.97; } + + log_slider = .5; } void HistogramConfig::reset_points(int colors_only) @@ -80,31 +81,32 @@ void HistogramConfig::boundaries() high_output[i] = Units::quantize(high_output[i], PRECISION); } CLAMP(threshold, 0, 1); + CLAMP(log_slider, 0, 1); } 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) return 0; + if( plot != that.plot || + split != that.split || + sum_frames != that.sum_frames || + log_slider != that.log_slider ) return 0; return 1; } @@ -121,23 +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; + 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