From 67c8bcf8040a3d5b92cc47d6c58ae95aba2dc984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CMichael?= Date: Wed, 27 Jun 2018 04:24:13 -0500 Subject: [PATCH] Revert two instances of num_active_spatial_layers. The variable, num_active_spatial_layers, is used to construct ssData. This CL reverts two instances of num_active_spatial_layers not related to ssData construction. Bug: None Change-Id: I4d90d4578684dfdf8bd5a39c7a2fe778fce4414c Reviewed-on: https://webrtc-review.googlesource.com/85643 Commit-Queue: Michael Horowitz Reviewed-by: Sergey Silkin Reviewed-by: Rasmus Brandt Cr-Commit-Position: refs/heads/master@{#23756} --- modules/video_coding/codecs/vp9/vp9_impl.cc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/video_coding/codecs/vp9/vp9_impl.cc b/modules/video_coding/codecs/vp9/vp9_impl.cc index f0747e56b8..5b7f5b95c5 100644 --- a/modules/video_coding/codecs/vp9/vp9_impl.cc +++ b/modules/video_coding/codecs/vp9/vp9_impl.cc @@ -163,7 +163,7 @@ bool VP9EncoderImpl::SetSvcRates( } else { float rate_ratio[VPX_MAX_LAYERS] = {0}; float total = 0; - for (i = 0; i < num_active_spatial_layers_; ++i) { + for (i = 0; i < num_spatial_layers_; ++i) { if (svc_params_.scaling_factor_num[i] <= 0 || svc_params_.scaling_factor_den[i] <= 0) { RTC_LOG(LS_ERROR) << "Scaling factors not specified!"; @@ -174,7 +174,7 @@ bool VP9EncoderImpl::SetSvcRates( total += rate_ratio[i]; } - for (i = 0; i < num_active_spatial_layers_; ++i) { + for (i = 0; i < num_spatial_layers_; ++i) { RTC_CHECK_GT(total, 0); config_->ss_target_bitrate[i] = static_cast( config_->rc_target_bitrate * rate_ratio[i] / total); @@ -200,14 +200,6 @@ bool VP9EncoderImpl::SetSvcRates( } } } - - // For now, temporal layers only supported when having one spatial layer. - if (num_spatial_layers_ == 1) { - for (i = 0; i < num_temporal_layers_; ++i) { - config_->ts_target_bitrate[i] = config_->layer_target_bitrate[i]; - } - } - return true; }