Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(848)

Unified Diff: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc

Issue 1151603008: Make the BWE threshold adaptive. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Redid the experiment settings initialization slightly and set the default threshold back to 12.5. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
index 8106ee330b4d0c4f386c6272eb1787b1006504e1..ebdde9382a78bee627df56ff450cc730ad098385 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
@@ -405,22 +405,22 @@ void RemoteBitrateEstimatorAbsSendTimeImpl::IncomingPacketInfo(
ProcessClusters(now_ms);
}
if (!inter_arrival_.get()) {
- inter_arrival_.reset(new InterArrival(
- (kTimestampGroupLengthMs << kInterArrivalShift) / 1000, kTimestampToMs,
- remote_rate_->GetControlType() == kAimdControl));
+ inter_arrival_.reset(
+ new InterArrival((kTimestampGroupLengthMs << kInterArrivalShift) / 1000,
+ kTimestampToMs, true));
}
if (inter_arrival_->ComputeDeltas(timestamp, arrival_time_ms, payload_size,
&ts_delta, &t_delta, &size_delta)) {
double ts_delta_ms = (1000.0 * ts_delta) / (1 << kInterArrivalShift);
estimator_.Update(t_delta, ts_delta_ms, size_delta, detector_.State());
detector_.Detect(estimator_.offset(), ts_delta_ms,
- estimator_.num_of_deltas(), now_ms);
+ estimator_.num_of_deltas(), arrival_time_ms);
UpdateStats(static_cast<int>(t_delta - ts_delta_ms), now_ms);
}
if (detector_.State() == kBwOverusing) {
- unsigned int incoming_bitrate = incoming_bitrate_.Rate(now_ms);
+ uint32_t incoming_bitrate_bps = incoming_bitrate_.Rate(now_ms);
if (prior_state != kBwOverusing ||
- remote_rate_->TimeToReduceFurther(now_ms, incoming_bitrate)) {
+ remote_rate_->TimeToReduceFurther(now_ms, incoming_bitrate_bps)) {
// The first overuse should immediately trigger a new estimate.
// We also have to update the estimate immediately if we are overusing
// and the target bitrate is too high compared to what we are receiving.
@@ -475,13 +475,12 @@ void RemoteBitrateEstimatorAbsSendTimeImpl::UpdateEstimate(int64_t now_ms) {
const RateControlInput input(detector_.State(),
incoming_bitrate_.Rate(now_ms),
estimator_.var_noise());
- const RateControlRegion region = remote_rate_->Update(&input, now_ms);
+ remote_rate_->Update(&input, now_ms);
unsigned int target_bitrate = remote_rate_->UpdateBandwidthEstimate(now_ms);
if (remote_rate_->ValidEstimate()) {
process_interval_ms_ = remote_rate_->GetFeedbackInterval();
observer_->OnReceiveBitrateChanged(Keys(ssrcs_), target_bitrate);
}
- detector_.SetRateControlRegion(region);
}
void RemoteBitrateEstimatorAbsSendTimeImpl::OnRttUpdate(int64_t rtt) {

Powered by Google App Engine
This is Rietveld 408576698