MCPcopy Create free account
hub / github.com/Proryanator/encoder-benchmark / main

Function main

permutor-cli/src/main.rs:19–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17mod permutor_cli;
18
19fn 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
53fn log_special_arguments(cli: &PermutorCli) {
54 if cli.has_special_options() {

Callers

nothing calls this directly

Calls 11

log_cli_headerFunction · 0.85
log_special_argumentsFunction · 0.85
get_vendor_for_codecFunction · 0.85
get_bitrate_permutationsFunction · 0.85
validateMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected