From a16f07537501ac96531577d5af004ad0b591a705 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Wed, 17 Dec 2014 15:15:33 -0800 Subject: [PATCH] Corrected value range of --cpu-used for vp9 This commit removes undefined value options of cpu-used for VP9 and changed vpxenc prompt to reflect the usable range of [-8,8] Change-Id: Ib80fef3dbb6ec9aabac45ed13e8ab6fbaf94f55e --- vp9/encoder/vp9_speed_features.c | 10 +--------- vp9/vp9_cx_iface.c | 2 +- vpxenc.c | 8 +++++--- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index 0775b919c..15831fbbe 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -339,18 +339,10 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf, sf->mv.fullpel_search_step_param = 10; sf->lpf_pick = LPF_PICK_MINIMAL_LPF; } - - if (speed >= 12) { + if (speed >= 8) { sf->adaptive_rd_thresh = 4; sf->mv.subpel_force_stop = 2; } - - if (speed >= 13) { - int i; - sf->max_intra_bsize = BLOCK_32X32; - for (i = 0; i < BLOCK_SIZES; ++i) - sf->inter_mode_mask[i] = INTER_NEAREST; - } } void vp9_set_speed_features_framesize_dependent(VP9_COMP *cpi) { diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index b9fb8140c..f40dc7ff0 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -208,7 +208,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx, "or kf_max_dist instead."); RANGE_CHECK(extra_cfg, enable_auto_alt_ref, 0, 2); - RANGE_CHECK(extra_cfg, cpu_used, -16, 16); + RANGE_CHECK(extra_cfg, cpu_used, -8, 8); RANGE_CHECK_HI(extra_cfg, noise_sensitivity, 6); RANGE_CHECK(extra_cfg, tile_columns, 0, 6); RANGE_CHECK(extra_cfg, tile_rows, 0, 2); diff --git a/vpxenc.c b/vpxenc.c index ebdbb074c..e14c5eaab 100644 --- a/vpxenc.c +++ b/vpxenc.c @@ -328,8 +328,10 @@ static const arg_def_t sharpness = ARG_DEF( NULL, "sharpness", 1, "Loop filter sharpness (0..7)"); static const arg_def_t static_thresh = ARG_DEF( NULL, "static-thresh", 1, "Motion detection threshold"); -static const arg_def_t cpu_used = ARG_DEF( +static const arg_def_t cpu_used_vp8 = ARG_DEF( NULL, "cpu-used", 1, "CPU Used (-16..16)"); +static const arg_def_t cpu_used_vp9 = ARG_DEF( + NULL, "cpu-used", 1, "CPU Used (-8..8)"); static const arg_def_t auto_altref = ARG_DEF( NULL, "auto-alt-ref", 1, "Enable automatic alt reference frames"); static const arg_def_t arnr_maxframes = ARG_DEF( @@ -361,7 +363,7 @@ static const arg_def_t screen_content_mode = ARG_DEF(NULL, "screen-content-mode" static const arg_def_t token_parts = ARG_DEF( NULL, "token-parts", 1, "Number of token partitions to use, log2"); static const arg_def_t *vp8_args[] = { - &cpu_used, &auto_altref, &noise_sens, &sharpness, &static_thresh, + &cpu_used_vp8, &auto_altref, &noise_sens, &sharpness, &static_thresh, &token_parts, &arnr_maxframes, &arnr_strength, &arnr_type, &tune_ssim, &cq_level, &max_intra_rate_pct, &screen_content_mode, NULL @@ -420,7 +422,7 @@ static const arg_def_t tune_content = ARG_DEF_ENUM( NULL, "tune-content", 1, "Tune content type", tune_content_enum); static const arg_def_t *vp9_args[] = { - &cpu_used, &auto_altref, &sharpness, &static_thresh, + &cpu_used_vp9, &auto_altref, &sharpness, &static_thresh, &tile_cols, &tile_rows, &arnr_maxframes, &arnr_strength, &arnr_type, &tune_ssim, &cq_level, &max_intra_rate_pct, &max_inter_rate_pct, &gf_cbr_boost_pct, &lossless, -- 2.40.0