shithub: libvpx

Download patch

ref: 129e0756a55995bdc75e1ddf11030e71643b821d
parent: cd0aca91b1f46fe31dfaf4e77bb40169e8d945bc
author: Sreerenj Balachandran <bsreerenj@gmail.com>
date: Tue Jun 30 15:46:17 EDT 2020

vp9-svc: Fix the bitrate control for spatial svc

Make sure to initialize the layer context for spatial-svc
which has a single temporal layer.

Change-Id: I026ecec483555658e09d6d8893e56ab62ee6914b
(cherry picked from commit 1e9929390c8c18ffda02e0073481625e5afb2529)

--- a/AUTHORS
+++ b/AUTHORS
@@ -169,6 +169,7 @@
 Shiyou Yin <yinshiyou-hf@loongson.cn>
 Shubham Tandle <shubham.tandle@ittiam.com>
 Shunyao Li <shunyaoli@google.com>
+Sreerenj Balachandran <bsreerenj@gmail.com>
 Stefan Holmer <holmer@google.com>
 Suman Sunkara <sunkaras@google.com>
 Supradeep T R <supradeep.tr@ittiam.com>
--- a/vp9/ratectrl_rtc.cc
+++ b/vp9/ratectrl_rtc.cc
@@ -107,7 +107,8 @@
   }
   vp9_set_rc_buffer_sizes(cpi_);
   vp9_new_framerate(cpi_, cpi_->framerate);
-  if (cpi_->svc.number_temporal_layers > 1) {
+  if (cpi_->svc.number_temporal_layers > 1 ||
+      cpi_->svc.number_spatial_layers > 1) {
     if (cm->current_video_frame == 0) vp9_init_layer_context(cpi_);
     vp9_update_layer_context_change_config(cpi_,
                                            (int)cpi_->oxcf.target_bandwidth);