diff options
author | terelius <terelius@webrtc.org> | 2015-12-10 01:50:55 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-10 09:51:02 +0000 |
commit | 84e78f9102dfbe9fc17aecd8d9d816042425a294 (patch) | |
tree | f3bee872f397daec902cb682d0c3336eeae9f70c /webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h | |
parent | 0b3d7eec07100a9df006e679408a8e015af643d6 (diff) | |
download | webrtc-84e78f9102dfbe9fc17aecd8d9d816042425a294.tar.gz |
Rewrote the PRNG using an xorshift* algorithm and moved the files from test/ to base/.
Created a simple unit test for the new random number generator. (It mostly tests
that the generated numbers are consistent with the intended distribution, e.g. uniform.
It is not a comprehensive test of the quality of the random numbers.)
Several assertions in OveruseDetectorTest seem to depend on the exact sequence of random numbers. I updated those numbers to work with the new PRNG.
Compute the standard deviation of the expected result in TestReorderFilter instead of passing an uncertainty parameter.
BUG=webrtc:5177
Review URL: https://codereview.webrtc.org/1457023002
Cr-Commit-Position: refs/heads/master@{#10965}
Diffstat (limited to 'webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h')
-rw-r--r-- | webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h index d94ee17951..f7c1d1f0bf 100644 --- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h +++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h @@ -22,6 +22,7 @@ #include <vector> #include "webrtc/base/common.h" +#include "webrtc/base/random.h" #include "webrtc/base/scoped_ptr.h" #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" #include "webrtc/modules/include/module_common_types.h" @@ -31,7 +32,6 @@ #include "webrtc/modules/remote_bitrate_estimator/test/packet.h" #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "webrtc/system_wrappers/include/clock.h" -#include "webrtc/test/random.h" namespace webrtc { @@ -265,7 +265,7 @@ class LossFilter : public PacketProcessor { virtual void RunFor(int64_t time_ms, Packets* in_out); private: - test::Random random_; + Random random_; float loss_fraction_; RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(LossFilter); @@ -299,7 +299,7 @@ class JitterFilter : public PacketProcessor { int64_t MeanUs(); private: - test::Random random_; + Random random_; int64_t stddev_jitter_us_; int64_t last_send_time_us_; bool reordering_; // False by default. @@ -318,7 +318,7 @@ class ReorderFilter : public PacketProcessor { virtual void RunFor(int64_t time_ms, Packets* in_out); private: - test::Random random_; + Random random_; float reorder_fraction_; RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(ReorderFilter); |