ref: 8b3e575a45792fe490b5bc08c3fe08f01553756b
parent: 806faf17f63ca996389a62c1c793f5609ca5361e
author: Tom Finegan <tomfinegan@google.com>
date: Fri Apr 2 05:40:09 EDT 2021
Revert "Pass vizier rc parameter values from command line to twopass" This reverts commit f32829a2e5db3cd1624e8a7a530af84c382762ef. BUG=webm:1723 Change-Id: I866cdf288f9873c350b32091515a6d5f4df362a3
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -638,41 +638,6 @@
return VPX_CODEC_OK;
}
-static vpx_codec_err_t set_twopass_params_from_config(
- const vpx_codec_enc_cfg_t *const cfg, struct VP9_COMP *cpi) {
- if (cpi == NULL) return VPX_CODEC_ERROR;
-
- cpi->twopass.active_wq_factor =
- (double)cfg->active_wq_factor.num / (double)cfg->active_wq_factor.den;
- cpi->twopass.base_err_per_mb =
- (double)cfg->base_err_per_mb.num / (double)cfg->base_err_per_mb.den;
- cpi->twopass.sr_default_decay_limit =
- (double)cfg->sr_default_decay_limit.num /
- (double)cfg->sr_default_decay_limit.den;
- cpi->twopass.sr_diff_factor =
- (double)cfg->sr_diff_factor.num / (double)cfg->sr_diff_factor.den;
- cpi->twopass.kf_err_per_mb =
- (double)cfg->kf_err_per_mb.num / (double)cfg->kf_err_per_mb.den;
- cpi->twopass.kf_frame_min_boost =
- (double)cfg->kf_frame_min_boost.num / (double)cfg->kf_frame_min_boost.den;
- cpi->twopass.kf_frame_max_boost_first =
- (double)cfg->kf_frame_max_boost_first.num /
- (double)cfg->kf_frame_max_boost_first.den;
- cpi->twopass.kf_frame_max_boost_subs =
- (double)cfg->kf_frame_max_boost_subs.num /
- (double)cfg->kf_frame_max_boost_subs.den;
- cpi->twopass.kf_max_total_boost = (int)((double)cfg->kf_max_total_boost.num /
- (double)cfg->kf_max_total_boost.den);
- cpi->twopass.gf_max_total_boost = (int)((double)cfg->gf_max_total_boost.num /
- (double)cfg->gf_max_total_boost.den);
- cpi->twopass.gf_frame_max_boost =
- (double)cfg->gf_frame_max_boost.num / (double)cfg->gf_frame_max_boost.den;
- cpi->twopass.zm_power_factor =
- (double)cfg->zm_power_factor.num / (double)cfg->zm_power_factor.den;
-
- return VPX_CODEC_OK;
-}
-
static vpx_codec_err_t encoder_set_config(vpx_codec_alg_priv_t *ctx,
const vpx_codec_enc_cfg_t *cfg) {
vpx_codec_err_t res;
@@ -699,7 +664,6 @@
if (res == VPX_CODEC_OK) {
ctx->cfg = *cfg;
set_encoder_config(&ctx->oxcf, &ctx->cfg, &ctx->extra_cfg);
- set_twopass_params_from_config(&ctx->cfg, ctx->cpi);
// On profile change, request a key frame
force_key |= ctx->cpi->common.profile != ctx->oxcf.profile;
vp9_change_config(ctx->cpi, &ctx->oxcf);
@@ -732,7 +696,6 @@
if (res == VPX_CODEC_OK) {
ctx->extra_cfg = *extra_cfg;
set_encoder_config(&ctx->oxcf, &ctx->cfg, &ctx->extra_cfg);
- set_twopass_params_from_config(&ctx->cfg, ctx->cpi);
vp9_change_config(ctx->cpi, &ctx->oxcf);
}
return res;
@@ -977,7 +940,6 @@
#endif
priv->cpi = vp9_create_compressor(&priv->oxcf, priv->buffer_pool);
if (priv->cpi == NULL) res = VPX_CODEC_MEM_ERROR;
- set_twopass_params_from_config(&priv->cfg, priv->cpi);
}
}