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

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc

Issue 1235143002: Fix simulator issue where chokes didn't apply to non-congested packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comments addressed. Created 5 years, 5 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
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/estimators/nada.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc
index c28749d1d3aa703e161125a0917f6ad97ad37a2f..ccbc522b7e375d2e065fe337e6da0038ac237097 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc
@@ -19,6 +19,7 @@
#include <vector>
#include <iostream>
+#include "webrtc/base/common.h"
#include "webrtc/modules/remote_bitrate_estimator/test/estimators/nada.h"
#include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
#include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h"
@@ -27,10 +28,9 @@ namespace webrtc {
namespace testing {
namespace bwe {
-const int NadaBweReceiver::kMedian;
-const int NadaBweSender::kMinRefRateKbps;
-const int NadaBweSender::kMaxRefRateKbps;
-const int64_t NadaBweReceiver::kReceivingRateTimeWindowMs;
+const int NadaBweSender::kMinRefRateKbps = 150;
+const int NadaBweSender::kMaxRefRateKbps = 1500;
+const int64_t NadaBweReceiver::kReceivingRateTimeWindowMs = 500;
NadaBweReceiver::NadaBweReceiver(int flow_id)
: BweReceiver(flow_id),
@@ -64,6 +64,7 @@ void NadaBweReceiver::ReceivePacket(int64_t arrival_time_ms,
baseline_delay_ms_ = std::min(baseline_delay_ms_, delay_ms);
}
delay_signal_ms_ = delay_ms - baseline_delay_ms_; // Refered as d_n.
+ const int kMedian = ARRAY_SIZE(last_delays_ms_);
last_delays_ms_[(last_delays_index_++) % kMedian] = delay_signal_ms_;
int size = std::min(last_delays_index_, kMedian);
int64_t median_filtered_delay_ms_ = MedianFilter(last_delays_ms_, size);
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/estimators/nada.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698