projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add mask color radio btn sel, fix del all mask btn, fix mask dflt kfrm draw name...
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
plugins
/
histogram
/
histogram.C
diff --git
a/cinelerra-5.1/plugins/histogram/histogram.C
b/cinelerra-5.1/plugins/histogram/histogram.C
index da67c208694425820ffdc42af07f0949562086d7..523c863f3e0bc142c8b372dbde030f44c147a737 100644
(file)
--- a/
cinelerra-5.1/plugins/histogram/histogram.C
+++ b/
cinelerra-5.1/plugins/histogram/histogram.C
@@
-280,7
+280,8
@@
float HistogramMain::calculate_level(float input,
// Scale to input range
if(!EQUIV(config.high_input[mode], config.low_input[mode]))
{
// Scale to input range
if(!EQUIV(config.high_input[mode], config.low_input[mode]))
{
- output = (input - config.low_input[mode]) /
+ output = input < config.low_input[mode] ? 0 :
+ (input - config.low_input[mode]) /
(config.high_input[mode] - config.low_input[mode]);
}
else
(config.high_input[mode] - config.low_input[mode]);
}
else
@@
-457,8
+458,8
@@
int HistogramMain::process_buffer(VFrame *frame,
if( cpus > smps ) cpus = smps;
engine = new HistogramEngine(this, cpus, cpus);
}
if( cpus > smps ) cpus = smps;
engine = new HistogramEngine(this, cpus, cpus);
}
-//
Always plot to set the curves if automatic
- if(config.plot
|| config.automatic
) send_render_gui(frame);
+//
if to plot histogram
+ if(config.plot) send_render_gui(frame);
// Generate tables here. The same table is used by many packages to render
// each horizontal stripe. Need to cover the entire output range in each
// Generate tables here. The same table is used by many packages to render
// each horizontal stripe. Need to cover the entire output range in each