diff options
author | Cheng Chen <chengchen@google.com> | 2021-04-14 16:31:40 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-04-14 16:31:40 +0000 |
commit | ba2bfcf2ebb41d8c50c6c567a27cc193d8a19d3f (patch) | |
tree | a208e322175d23ae9ebb8b03bc4a1d41a5a3854f /vp9/vp9_cx_iface.c | |
parent | 461c1f1b89d5c8956f1fabc3c933a95a0ade528f (diff) | |
parent | 1b07aae9e47a5480f78025dc3434331faaa68e33 (diff) | |
download | libvpx-ba2bfcf2ebb41d8c50c6c567a27cc193d8a19d3f.tar libvpx-ba2bfcf2ebb41d8c50c6c567a27cc193d8a19d3f.tar.gz libvpx-ba2bfcf2ebb41d8c50c6c567a27cc193d8a19d3f.tar.bz2 libvpx-ba2bfcf2ebb41d8c50c6c567a27cc193d8a19d3f.zip |
Merge "Set vizier rc parameters"
Diffstat (limited to 'vp9/vp9_cx_iface.c')
-rw-r--r-- | vp9/vp9_cx_iface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 94b1afbcc..e35b6f1e2 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -350,6 +350,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx, RANGE_CHECK(extra_cfg, color_range, VPX_CR_STUDIO_RANGE, VPX_CR_FULL_RANGE); // The range below shall be further tuned. + RANGE_CHECK(cfg, use_vizier_rc_params, 0, 1); RANGE_CHECK(cfg, active_wq_factor.den, 1, 1000); RANGE_CHECK(cfg, base_err_per_mb.den, 1, 1000); RANGE_CHECK(cfg, sr_default_decay_limit.den, 1, 1000); @@ -654,8 +655,10 @@ static vpx_codec_err_t set_encoder_config( static vpx_codec_err_t set_twopass_params_from_config( const vpx_codec_enc_cfg_t *const cfg, struct VP9_COMP *cpi) { + if (!cfg->use_vizier_rc_params) return VPX_CODEC_OK; if (cpi == NULL) return VPX_CODEC_ERROR; + cpi->twopass.use_vizier_rc_params = cfg->use_vizier_rc_params; cpi->twopass.active_wq_factor = (double)cfg->active_wq_factor.num / (double)cfg->active_wq_factor.den; cpi->twopass.base_err_per_mb = @@ -1943,6 +1946,7 @@ static vpx_codec_enc_cfg_map_t encoder_usage_cfg_map[] = { { 0 }, // ts_layer_id { 0 }, // layer_taget_bitrate 0, // temporal_layering_mode + 0, // use_vizier_rc_params { 0, 1 }, // active_wq_factor { 0, 1 }, // base_err_per_mb { 0, 1 }, // sr_default_decay_limit |