Commit 5814bd02 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry Committed by David Michael Barr
Browse files

Make bitrate on the command line be kbps

The help text said it was, but we were not actually multiplying by
 1000.
Thanks to Derek Buitenhuis for the report.
parent 557b4cbb
......@@ -329,7 +329,7 @@ fn parse_config(matches: &ArgMatches<'_>) -> EncoderConfig {
100
}
});
let bitrate = maybe_bitrate.unwrap_or(0);
let bitrate: i32 = maybe_bitrate.unwrap_or(0);
let train_rdo = matches.is_present("train-rdo");
if quantizer == 0 {
unimplemented!("Lossless encoding not yet implemented");
......@@ -434,7 +434,7 @@ fn parse_config(matches: &ArgMatches<'_>) -> EncoderConfig {
};
cfg.quantizer = quantizer;
cfg.bitrate = bitrate;
cfg.bitrate = bitrate.checked_mul(1000).expect("Bitrate too high");
cfg.show_psnr = matches.is_present("PSNR");
cfg.pass = matches.value_of("PASS").map(|pass| pass.parse().unwrap());
cfg.stats_file = if cfg.pass.is_some() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment