()
| 17 | mod permutor_cli; |
| 18 | |
| 19 | fn main() { |
| 20 | log_cli_header(String::from("Permutation Tool")); |
| 21 | let mut cli = PermutorCli::parse(); |
| 22 | cli.validate(); |
| 23 | |
| 24 | log_special_arguments(&cli); |
| 25 | |
| 26 | let mut engine = PermutationEngine::new(cli.log_output_directory.clone()); |
| 27 | let vendor = get_vendor_for_codec(&cli.encoder.clone()); |
| 28 | for bitrate in get_bitrate_permutations(cli.bitrate, cli.max_bitrate_permutation.unwrap()) { |
| 29 | match vendor { |
| 30 | Vendor::Nvidia => { |
| 31 | build_nvenc_setting_permutations(&mut engine, &cli, bitrate); |
| 32 | } |
| 33 | Vendor::AMD => { |
| 34 | build_amf_setting_permutations(&mut engine, &cli, bitrate); |
| 35 | } |
| 36 | Vendor::IntelQSV => { |
| 37 | if cli.encoder.contains("av1") { |
| 38 | build_intel_av1_permutations(&mut engine, &cli, bitrate); |
| 39 | } else { |
| 40 | build_intel_igpu_permutations(&mut engine, &cli, bitrate); |
| 41 | } |
| 42 | } |
| 43 | Vendor::Apple => { |
| 44 | build_apple_silicon_h264_permutations(&mut engine, &cli, bitrate); |
| 45 | } |
| 46 | Vendor::Unknown => {} |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | engine.run(); |
| 51 | } |
| 52 | |
| 53 | fn log_special_arguments(cli: &PermutorCli) { |
| 54 | if cli.has_special_options() { |
nothing calls this directly
no test coverage detected