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

Issue 1457023002: Rewrote the PRNG using an xorshift* algorithm and moved the files from test/ to base/. (Closed)

Created:
5 years, 1 month ago by terelius
Modified:
5 years ago
CC:
webrtc-reviews_webrtc.org, peah-webrtc, Andrew MacDonald, henrika_webrtc, stefan-webrtc, tterriberry_mozilla.com, hlundin-webrtc, mflodman, kwiberg-webrtc, minyue-webrtc, the sun, aluebs-webrtc, bjornv1
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

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 Committed: https://crrev.com/84e78f9102dfbe9fc17aecd8d9d816042425a294 Cr-Commit-Position: refs/heads/master@{#10965}

Patch Set 1 #

Patch Set 2 : Fix compiler warnings #

Patch Set 3 : Rebase #

Patch Set 4 : Fix rebase mistake #

Patch Set 5 : Fix bug in RtcpPacketReportBlockTest #

Total comments: 5

Patch Set 6 : Minor comments #

Total comments: 31

Patch Set 7 : Comments from solenberg@ #

Patch Set 8 : Rebase #

Patch Set 9 : Fix comment and RTC_CHECK #

Patch Set 10 : Minor comments #

Patch Set 11 : Use new PRNG in bwe_simulations.cc. Remove rand() from overuse_detector_unittest.cc #

Patch Set 12 : Rebase #

Patch Set 13 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+496 lines, -261 lines) Patch
M webrtc/base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/base/base.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/base/base_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A + webrtc/base/random.h View 1 2 3 4 5 4 chunks +26 lines, -15 lines 0 comments Download
A webrtc/base/random.cc View 1 2 3 4 5 1 chunk +86 lines, -0 lines 0 comments Download
A webrtc/base/random_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +302 lines, -0 lines 0 comments Download
M webrtc/call/rtc_event_log_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +8 lines, -8 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc View 1 2 3 4 5 6 7 8 9 10 26 chunks +37 lines, -35 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/test/bwe_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h View 1 2 5 chunks +4 lines, -4 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc View 1 2 3 4 5 6 7 8 9 5 chunks +18 lines, -44 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block_unittest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
D webrtc/test/random.h View 1 chunk +0 lines, -71 lines 0 comments Download
D webrtc/test/random.cc View 1 chunk +0 lines, -72 lines 0 comments Download
M webrtc/test/webrtc_test_common.gyp View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M webrtc/voice_engine/test/auto_test/voe_output_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 28 (8 generated)
terelius
Please have a look at this CL which improves the random number generator. Moving the ...
5 years, 1 month ago (2015-11-19 10:01:40 UTC) #3
the sun
https://codereview.webrtc.org/1457023002/diff/80001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1457023002/diff/80001/webrtc/base/random.h#newcode53 webrtc/base/random.h:53: // TODO(solenberg): Random from histogram. You can remove this ...
5 years, 1 month ago (2015-11-20 09:38:51 UTC) #4
terelius
https://codereview.webrtc.org/1457023002/diff/80001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1457023002/diff/80001/webrtc/base/random.h#newcode53 webrtc/base/random.h:53: // TODO(solenberg): Random from histogram. On 2015/11/20 09:38:50, the ...
5 years, 1 month ago (2015-11-20 10:32:29 UTC) #5
The Sun (google.com)
https://codereview.webrtc.org/1457023002/diff/80001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1457023002/diff/80001/webrtc/base/random.h#newcode62 webrtc/base/random.h:62: RTC_DCHECK(state_ != 0x0ULL); On 2015/11/20 10:32:29, terelius wrote: > ...
5 years, 1 month ago (2015-11-20 11:37:18 UTC) #7
pbos-webrtc
https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random.h#newcode29 webrtc/base/random.h:29: T Rand() { Do we need this generic template ...
5 years, 1 month ago (2015-11-20 12:51:57 UTC) #8
the sun
https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random.h#newcode29 webrtc/base/random.h:29: T Rand() { On 2015/11/20 12:51:57, pbos-webrtc wrote: > ...
5 years ago (2015-11-25 10:12:38 UTC) #9
pbos-webrtc
https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random.h#newcode35 webrtc/base/random.h:35: return static_cast<T>(NextOutput()); On 2015/11/20 12:51:57, pbos-webrtc wrote: > I ...
5 years ago (2015-11-25 21:16:16 UTC) #10
terelius
https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random_unittest.cc File webrtc/base/random_unittest.cc (right): https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random_unittest.cc#newcode17 webrtc/base/random_unittest.cc:17: #include "webrtc/base/checks.h" On 2015/11/25 10:12:37, the sun wrote: > ...
5 years ago (2015-11-27 10:35:24 UTC) #11
the sun
https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random_unittest.cc File webrtc/base/random_unittest.cc (right): https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random_unittest.cc#newcode25 webrtc/base/random_unittest.cc:25: assert(n > 0); On 2015/11/27 10:35:24, terelius wrote: > ...
5 years ago (2015-11-27 11:02:10 UTC) #12
pbos-webrtc
https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random_unittest.cc File webrtc/base/random_unittest.cc (right): https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random_unittest.cc#newcode25 webrtc/base/random_unittest.cc:25: assert(n > 0); On 2015/11/27 11:02:10, the sun wrote: ...
5 years ago (2015-11-27 11:06:28 UTC) #13
terelius
https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random.h File webrtc/base/random.h (right): https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random.h#newcode29 webrtc/base/random.h:29: T Rand() { On 2015/11/25 10:12:37, the sun wrote: ...
5 years ago (2015-11-27 11:31:23 UTC) #14
terelius
https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random_unittest.cc File webrtc/base/random_unittest.cc (right): https://codereview.webrtc.org/1457023002/diff/100001/webrtc/base/random_unittest.cc#newcode25 webrtc/base/random_unittest.cc:25: assert(n > 0); On 2015/11/27 11:02:10, the sun wrote: ...
5 years ago (2015-11-27 11:46:08 UTC) #15
terelius
https://codereview.webrtc.org/1457023002/diff/100001/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc File webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc (right): https://codereview.webrtc.org/1457023002/diff/100001/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc#newcode538 webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc:538: // The expected number of swaps we perform is ...
5 years ago (2015-11-27 12:54:32 UTC) #16
the sun
lgtm https://codereview.webrtc.org/1457023002/diff/100001/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc File webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc (right): https://codereview.webrtc.org/1457023002/diff/100001/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc#newcode542 webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc:542: // pair is p * (1-p). Since there ...
5 years ago (2015-11-27 13:37:26 UTC) #17
pbos-webrtc
lgtm
5 years ago (2015-11-27 13:41:32 UTC) #18
mflodman
base/ LGTM
5 years ago (2015-11-30 09:19:23 UTC) #19
stefan-webrtc
lgtm for webrtc/modules/remote_bitrate_estimator
5 years ago (2015-12-10 08:15:14 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1457023002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1457023002/240001
5 years ago (2015-12-10 09:34:24 UTC) #24
commit-bot: I haz the power
Committed patchset #13 (id:240001)
5 years ago (2015-12-10 09:50:58 UTC) #26
commit-bot: I haz the power
5 years ago (2015-12-10 09:51:11 UTC) #28
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/84e78f9102dfbe9fc17aecd8d9d816042425a294
Cr-Commit-Position: refs/heads/master@{#10965}

Powered by Google App Engine
This is Rietveld 408576698