Allow encoder target bitrate to reach media rate if there is headroom.
This CL adds a field trial that enables the EncoderBitrateAdjuster to
allow higher target bitrate if we are not network constrained. We still
don't allow the bitrate to go higher than the average target media rate
though.
Bug: webrtc:10155
Change-Id: Id5995070aa0cbe84b9305a422279141b38664bb1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132717
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27627}
diff --git a/video/encoder_bitrate_adjuster.h b/video/encoder_bitrate_adjuster.h
index 8901ad4..b142519 100644
--- a/video/encoder_bitrate_adjuster.h
+++ b/video/encoder_bitrate_adjuster.h
@@ -40,8 +40,7 @@
// Adjusts the given rate allocation to make it paceable within the target
// rates.
VideoBitrateAllocation AdjustRateAllocation(
- const VideoBitrateAllocation& bitrate_allocation,
- int framerate_fps);
+ const VideoEncoder::RateControlParameters& rates);
// Updated overuse detectors with data about the encoder, specifically about
// the temporal layer frame rate allocation.
@@ -53,8 +52,9 @@
void Reset();
private:
- VideoBitrateAllocation current_bitrate_allocation_;
- int current_total_framerate_fps_;
+ const bool utilize_bandwidth_headroom_;
+
+ VideoEncoder::RateControlParameters current_rate_control_parameters_;
// FPS allocation of temporal layers, per spatial layer. Represented as a Q8
// fraction; 0 = 0%, 255 = 100%. See VideoEncoder::EncoderInfo.fps_allocation.
absl::InlinedVector<uint8_t, kMaxTemporalStreams>