| Index: webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc
|
| diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc
|
| index 3d357704b582f892a7429125a87593fb2927921f..5c01e89aa1dc33c8251d7b4a1caefa4af2e72eef 100644
|
| --- a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc
|
| +++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc
|
| @@ -27,8 +27,6 @@ namespace {
|
| const int kStartingCongestionWindowBytes = 6000;
|
| } // namespace
|
|
|
| -const int CongestionWindow::kMinimumCongestionWindowBytes;
|
| -
|
| CongestionWindow::CongestionWindow() : data_inflight_bytes_(0) {}
|
|
|
| CongestionWindow::~CongestionWindow() {}
|
| @@ -37,8 +35,6 @@ int CongestionWindow::GetCongestionWindow(BbrBweSender::Mode mode,
|
| int64_t bandwidth_estimate_bps,
|
| rtc::Optional<int64_t> min_rtt_ms,
|
| float gain) {
|
| - if (mode == BbrBweSender::PROBE_RTT)
|
| - return CongestionWindow::kMinimumCongestionWindowBytes;
|
| return GetTargetCongestionWindow(bandwidth_estimate_bps, min_rtt_ms, gain);
|
| }
|
|
|
| @@ -47,6 +43,7 @@ void CongestionWindow::PacketSent(size_t sent_packet_size_bytes) {
|
| }
|
|
|
| void CongestionWindow::AckReceived(size_t received_packet_size_bytes) {
|
| + RTC_DCHECK_GE(data_inflight_bytes_ >= received_packet_size_bytes, true);
|
| data_inflight_bytes_ -= received_packet_size_bytes;
|
| }
|
|
|
| @@ -57,14 +54,13 @@ int CongestionWindow::GetTargetCongestionWindow(
|
| // If we have no rtt sample yet, return the starting congestion window size.
|
| if (!min_rtt_ms)
|
| return gain * kStartingCongestionWindowBytes;
|
| - int bdp = *min_rtt_ms * bandwidth_estimate_bps;
|
| + int bdp = *min_rtt_ms * bandwidth_estimate_bps / 8000;
|
| int congestion_window = bdp * gain;
|
| // Congestion window could be zero in rare cases, when either no bandwidth
|
| // estimate is available, or path's min_rtt value is zero.
|
| if (!congestion_window)
|
| congestion_window = gain * kStartingCongestionWindowBytes;
|
| - return std::max(congestion_window,
|
| - CongestionWindow::kMinimumCongestionWindowBytes);
|
| + return congestion_window;
|
| }
|
| } // namespace bwe
|
| } // namespace testing
|
|
|