Disable grain table generation if --photon-noise 0 is set (#599)

This commit is contained in:
Josh Holmer 2022-03-25 17:04:09 -04:00 committed by GitHub
parent e9ad35b1ca
commit cfad841648
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -548,7 +548,9 @@ pub fn parse_cli(args: CliOpts) -> anyhow::Result<Vec<EncodeArgs>> {
Err(_) => Some(240_usize),
},
},
photon_noise: args.photon_noise,
photon_noise: args
.photon_noise
.and_then(|arg| if arg == 0 { None } else { Some(arg) }),
sc_pix_format: args.sc_pix_format,
keep: args.keep,
max_tries: args.max_tries,