Commit 4a1386e3 authored by Minghai Shang's avatar Minghai Shang
Browse files

[svc rc] Increase worst quality for enhancement layers

Change-Id: Ifbfa90894eec9944bd55f364f1d17eb152338d6b
parent b906fe65
......@@ -920,12 +920,19 @@ static int get_twopass_worst_quality(const VP9_COMP *cpi,
const int target_norm_bits_per_mb = ((uint64_t)section_target_bandwidth <<
BPER_MB_NORMBITS) / num_mbs;
int q;
int is_svc_upper_layer = 0;
if (cpi->use_svc && cpi->svc.number_temporal_layers == 1 &&
cpi->svc.spatial_layer_id > 0) {
is_svc_upper_layer = 1;
}
// Try and pick a max Q that will be high enough to encode the
// content at the given rate.
for (q = rc->best_quality; q < rc->worst_quality; ++q) {
const double factor = calc_correction_factor(err_per_mb, ERR_DIVISOR,
0.5, 0.90, q);
const double factor =
calc_correction_factor(err_per_mb, ERR_DIVISOR,
is_svc_upper_layer ? 0.8 : 0.5,
is_svc_upper_layer ? 1.0 : 0.90, q);
const int bits_per_mb = vp9_rc_bits_per_mb(INTER_FRAME, q,
factor * speed_term);
if (bits_per_mb <= target_norm_bits_per_mb)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment