Add verbose logging to encoder bitrate adjuster
Bug: webrtc:10155
Change-Id: I69a13c2c3980a2db1b2c2f75fd06e84b670745e0
Reviewed-on: https://webrtc-review.googlesource.com/c/123382
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26745}
diff --git a/video/encoder_bitrate_adjuster.cc b/video/encoder_bitrate_adjuster.cc
index eb6017c..6fa3504 100644
--- a/video/encoder_bitrate_adjuster.cc
+++ b/video/encoder_bitrate_adjuster.cc
@@ -139,6 +139,11 @@
min_bitrates_bps_[si]);
}
+ if (spatial_layer_bitrate_bps > 0) {
+ RTC_LOG(LS_VERBOSE) << "Utilization factor for spatial index " << si
+ << ": " << utilization_factor;
+ }
+
// Populate the adjusted allocation with determined utilization factor.
if (active_tls_[si] == 1 &&
spatial_layer_bitrate_bps > bitrate_allocation.GetBitrate(si, 0)) {
diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc
index 8436dd8..6066ac5 100644
--- a/video/video_stream_encoder.cc
+++ b/video/video_stream_encoder.cc
@@ -858,8 +858,13 @@
}
if (bitrate_adjuster_) {
- return bitrate_adjuster_->AdjustRateAllocation(bitrate_allocation,
- framerate_fps);
+ VideoBitrateAllocation adjusted_allocation =
+ bitrate_adjuster_->AdjustRateAllocation(bitrate_allocation,
+ framerate_fps);
+ RTC_LOG(LS_VERBOSE) << "Adjusting allocation, fps = " << framerate_fps
+ << ", from " << bitrate_allocation.ToString() << ", to "
+ << adjusted_allocation.ToString();
+ return adjusted_allocation;
}
return bitrate_allocation;
}