Update to vpx_temporal_svc_encoder command line.
Set the #threads at command line. Change-Id: Id0daa2393880c3da2d903c11a793072d3008b34b
This commit is contained in:
@@ -514,7 +514,7 @@ int main(int argc, char **argv) {
|
|||||||
FILE *infile = NULL;
|
FILE *infile = NULL;
|
||||||
struct RateControlMetrics rc;
|
struct RateControlMetrics rc;
|
||||||
int64_t cx_time = 0;
|
int64_t cx_time = 0;
|
||||||
const int min_args_base = 11;
|
const int min_args_base = 12;
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
vpx_bit_depth_t bit_depth = VPX_BITS_8;
|
vpx_bit_depth_t bit_depth = VPX_BITS_8;
|
||||||
int input_bit_depth = 8;
|
int input_bit_depth = 8;
|
||||||
@@ -531,12 +531,12 @@ int main(int argc, char **argv) {
|
|||||||
if (argc < min_args) {
|
if (argc < min_args) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
|
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
|
||||||
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
|
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <threads> <mode> "
|
||||||
"<Rate_0> ... <Rate_nlayers-1> <bit-depth> \n",
|
"<Rate_0> ... <Rate_nlayers-1> <bit-depth> \n",
|
||||||
argv[0]);
|
argv[0]);
|
||||||
#else
|
#else
|
||||||
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
|
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
|
||||||
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
|
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <threads> <mode> "
|
||||||
"<Rate_0> ... <Rate_nlayers-1> \n",
|
"<Rate_0> ... <Rate_nlayers-1> \n",
|
||||||
argv[0]);
|
argv[0]);
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
@@ -553,9 +553,9 @@ int main(int argc, char **argv) {
|
|||||||
die("Invalid resolution: %d x %d", width, height);
|
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) {
|
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]) {
|
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;
|
for (i = min_args_base;
|
||||||
(int)i < min_args_base + mode_to_num_layers[layering_mode]; ++i) {
|
(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)
|
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)
|
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.
|
// Real time parameters.
|
||||||
@@ -642,7 +642,7 @@ int main(int argc, char **argv) {
|
|||||||
cfg.rc_resize_allowed = 0;
|
cfg.rc_resize_allowed = 0;
|
||||||
|
|
||||||
// Use 1 thread as default.
|
// Use 1 thread as default.
|
||||||
cfg.g_threads = 1;
|
cfg.g_threads = (unsigned int)strtoul(argv[10], NULL, 0);
|
||||||
|
|
||||||
// Enable error resilient mode.
|
// Enable error resilient mode.
|
||||||
cfg.g_error_resilient = 1;
|
cfg.g_error_resilient = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user