From 7eff8f3b1dc25a28c213900d4d6dd8dbad214520 Mon Sep 17 00:00:00 2001 From: Marco Date: Mon, 3 Oct 2016 09:47:21 -0700 Subject: [PATCH] Update to vpx_temporal_svc_encoder command line. Set the #threads at command line. Change-Id: Id0daa2393880c3da2d903c11a793072d3008b34b --- examples/vpx_temporal_svc_encoder.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/vpx_temporal_svc_encoder.c b/examples/vpx_temporal_svc_encoder.c index 309a2fe2e..752c1baea 100644 --- a/examples/vpx_temporal_svc_encoder.c +++ b/examples/vpx_temporal_svc_encoder.c @@ -514,7 +514,7 @@ int main(int argc, char **argv) { FILE *infile = NULL; struct RateControlMetrics rc; int64_t cx_time = 0; - const int min_args_base = 11; + const int min_args_base = 12; #if CONFIG_VP9_HIGHBITDEPTH vpx_bit_depth_t bit_depth = VPX_BITS_8; int input_bit_depth = 8; @@ -531,12 +531,12 @@ int main(int argc, char **argv) { if (argc < min_args) { #if CONFIG_VP9_HIGHBITDEPTH die("Usage: %s " - " " + " " " ... \n", argv[0]); #else die("Usage: %s " - " " + " " " ... \n", argv[0]); #endif // CONFIG_VP9_HIGHBITDEPTH @@ -553,9 +553,9 @@ int main(int argc, char **argv) { die("Invalid resolution: %d x %d", width, height); } - layering_mode = (int)strtol(argv[10], NULL, 0); + layering_mode = (int)strtol(argv[11], NULL, 0); if (layering_mode < 0 || layering_mode > 13) { - die("Invalid layering mode (0..12) %s", argv[10]); + die("Invalid layering mode (0..12) %s", argv[11]); } if (argc != min_args + mode_to_num_layers[layering_mode]) { @@ -619,11 +619,11 @@ int main(int argc, char **argv) { for (i = min_args_base; (int)i < min_args_base + mode_to_num_layers[layering_mode]; ++i) { - rc.layer_target_bitrate[i - 11] = (int)strtol(argv[i], NULL, 0); + rc.layer_target_bitrate[i - 12] = (int)strtol(argv[i], NULL, 0); if (strncmp(encoder->name, "vp8", 3) == 0) - cfg.ts_target_bitrate[i - 11] = rc.layer_target_bitrate[i - 11]; + cfg.ts_target_bitrate[i - 12] = rc.layer_target_bitrate[i - 12]; else if (strncmp(encoder->name, "vp9", 3) == 0) - cfg.layer_target_bitrate[i - 11] = rc.layer_target_bitrate[i - 11]; + cfg.layer_target_bitrate[i - 12] = rc.layer_target_bitrate[i - 12]; } // Real time parameters. @@ -642,7 +642,7 @@ int main(int argc, char **argv) { cfg.rc_resize_allowed = 0; // Use 1 thread as default. - cfg.g_threads = 1; + cfg.g_threads = (unsigned int)strtoul(argv[10], NULL, 0); // Enable error resilient mode. cfg.g_error_resilient = 1; -- 2.40.0