summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMinghai Shang <minghai@google.com>2014-06-27 11:48:22 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-06-27 11:48:22 -0700
commit83269ff8ff1b17ebf5abffafd56d1bbf04420f21 (patch)
tree1f29390eb931636de2417f01daefdd2b0d2b2c61 /examples
parent5ca7c65e0d1bd9ea603ab39c71e675915deaded8 (diff)
parentdf381964539bde62e0961f1f255e1baa18862078 (diff)
downloadlibvpx-83269ff8ff1b17ebf5abffafd56d1bbf04420f21.tar.gz
Merge "[spatial svc] Remove encoding modes since we only need one mode at this time."
Diffstat (limited to 'examples')
-rw-r--r--examples/vp9_spatial_svc_encoder.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/examples/vp9_spatial_svc_encoder.c b/examples/vp9_spatial_svc_encoder.c
index 708ddda70..223f37eb5 100644
--- a/examples/vp9_spatial_svc_encoder.c
+++ b/examples/vp9_spatial_svc_encoder.c
@@ -28,16 +28,6 @@
#include "vpx/vpx_encoder.h"
#include "./vpxstats.h"
-static const struct arg_enum_list encoding_mode_enum[] = {
- {"i", INTER_LAYER_PREDICTION_I},
- {"alt-ip", ALT_INTER_LAYER_PREDICTION_IP},
- {"ip", INTER_LAYER_PREDICTION_IP},
- {"gf", USE_GOLDEN_FRAME},
- {NULL, 0}
-};
-
-static const arg_def_t encoding_mode_arg = ARG_DEF_ENUM(
- "m", "encoding-mode", 1, "Encoding mode algorithm", encoding_mode_enum);
static const arg_def_t skip_frames_arg =
ARG_DEF("s", "skip-frames", 1, "input frames to skip");
static const arg_def_t frames_arg =
@@ -74,15 +64,13 @@ static const arg_def_t max_bitrate_arg =
ARG_DEF(NULL, "max-bitrate", 1, "Maximum bitrate");
static const arg_def_t *svc_args[] = {
- &encoding_mode_arg, &frames_arg, &width_arg, &height_arg,
+ &frames_arg, &width_arg, &height_arg,
&timebase_arg, &bitrate_arg, &skip_frames_arg, &layers_arg,
&kf_dist_arg, &scale_factors_arg, &quantizers_arg, &passes_arg,
&pass_arg, &fpf_name_arg, &min_q_arg, &max_q_arg,
&min_bitrate_arg, &max_bitrate_arg, NULL
};
-static const SVC_ENCODING_MODE default_encoding_mode =
- INTER_LAYER_PREDICTION_IP;
static const uint32_t default_frames_to_skip = 0;
static const uint32_t default_frames_to_code = 60 * 60;
static const uint32_t default_width = 1920;
@@ -131,7 +119,6 @@ static void parse_command_line(int argc, const char **argv_,
// initialize SvcContext with parameters that will be passed to vpx_svc_init
svc_ctx->log_level = SVC_LOG_DEBUG;
svc_ctx->spatial_layers = default_spatial_layers;
- svc_ctx->encoding_mode = default_encoding_mode;
// start with default encoder configuration
res = vpx_codec_enc_config_default(vpx_codec_vp9_cx(), enc_cfg, 0);
@@ -157,9 +144,7 @@ static void parse_command_line(int argc, const char **argv_,
for (argi = argj = argv; (*argj = *argi); argi += arg.argv_step) {
arg.argv_step = 1;
- if (arg_match(&arg, &encoding_mode_arg, argi)) {
- svc_ctx->encoding_mode = arg_parse_enum_or_int(&arg);
- } else if (arg_match(&arg, &frames_arg, argi)) {
+ if (arg_match(&arg, &frames_arg, argi)) {
app_input->frames_to_code = arg_parse_uint(&arg);
} else if (arg_match(&arg, &width_arg, argi)) {
enc_cfg->g_w = arg_parse_uint(&arg);
@@ -264,12 +249,12 @@ static void parse_command_line(int argc, const char **argv_,
printf(
"Codec %s\nframes: %d, skip: %d\n"
- "mode: %d, layers: %d\n"
+ "layers: %d\n"
"width %d, height: %d,\n"
"num: %d, den: %d, bitrate: %d,\n"
"gop size: %d\n",
vpx_codec_iface_name(vpx_codec_vp9_cx()), app_input->frames_to_code,
- app_input->frames_to_skip, svc_ctx->encoding_mode,
+ app_input->frames_to_skip,
svc_ctx->spatial_layers, enc_cfg->g_w, enc_cfg->g_h,
enc_cfg->g_timebase.num, enc_cfg->g_timebase.den,
enc_cfg->rc_target_bitrate, enc_cfg->kf_max_dist);