]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: Fix the bitrate control for spatial svc
authorSreerenj Balachandran <bsreerenj@gmail.com>
Wed, 1 Jul 2020 02:46:17 +0000 (19:46 -0700)
committerJerome Jiang <jianj@google.com>
Thu, 30 Jul 2020 17:46:27 +0000 (10:46 -0700)
Make sure to initialize the layer context for spatial-svc
which has a single temporal layer.

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

AUTHORS
vp9/ratectrl_rtc.cc

diff --git a/AUTHORS b/AUTHORS
index 79c54db78dea9adc83015a6854ddeef136a198d0..352c91feda0ecee2d3b01606694a24683e8516c3 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -169,6 +169,7 @@ Shimon Doodkin <helpmepro1@gmail.com>
 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>
index 3d6afc5d0334585fdf6b2e08a03a1fa8730bff39..6238b3a955768603887423ef6cdb5554f9713701 100644 (file)
@@ -107,7 +107,8 @@ void VP9RateControlRTC::UpdateRateControl(
   }
   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);