lrc->ni_frames = 0;
lrc->decimation_count = 0;
lrc->decimation_factor = 0;
+ lrc->worst_quality = oxcf->worst_allowed_q;
+ lrc->best_quality = oxcf->best_allowed_q;
for (i = 0; i < RATE_FACTOR_LEVELS; ++i) {
lrc->rate_correction_factors[i] = 1.0;
// Setting the worst/best_quality via the encoder control: SET_SVC_PARAMETERS,
// only for non-BYPASS mode for now.
- if (svc->temporal_layering_mode != VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
+ if (svc->temporal_layering_mode != VP9E_TEMPORAL_LAYERING_MODE_BYPASS ||
+ svc->use_set_ref_frame_config) {
RATE_CONTROL *const lrc = &lc->rc;
lrc->worst_quality = vp9_quantizer_to_qindex(lc->max_q);
lrc->best_quality = vp9_quantizer_to_qindex(lc->min_q);
enc_cfg->rc_buf_sz = 1000;
}
+ for (tl = 0; tl < svc_ctx->temporal_layers; ++tl) {
+ for (sl = 0; sl < svc_ctx->spatial_layers; ++sl) {
+ i = sl * svc_ctx->temporal_layers + tl;
+ if (enc_cfg->rc_end_usage == VPX_CBR &&
+ enc_cfg->g_pass == VPX_RC_ONE_PASS) {
+ si->svc_params.max_quantizers[i] = enc_cfg->rc_max_quantizer;
+ si->svc_params.min_quantizers[i] = enc_cfg->rc_min_quantizer;
+ }
+ }
+ }
+
if (enc_cfg->g_error_resilient == 0 && si->use_multiple_frame_contexts == 0)
enc_cfg->g_error_resilient = 1;