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

Unified Diff: webrtc/modules/audio_coding/neteq/tools/neteq_delay_analyzer.cc

Issue 2933053002: Fix a numerical issue in NetEq delay plotting (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/neteq/tools/neteq_delay_analyzer.cc
diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_delay_analyzer.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_delay_analyzer.cc
index a75da49b2248a3f271ab34e8f238328b0d17a33d..aedf067278f6efc3e884ccc065edc8bdeff289a2 100644
--- a/webrtc/modules/audio_coding/neteq/tools/neteq_delay_analyzer.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/neteq_delay_analyzer.cc
@@ -14,6 +14,8 @@
#include <limits>
#include <utility>
+#include <webrtc/base/checks.h>
+
namespace webrtc {
namespace test {
namespace {
@@ -115,8 +117,9 @@ void NetEqDelayAnalyzer::CreateGraphs(
// This loop traverses data_ and populates rtp_timestamps_ms as well as
// calculates the base offset.
for (auto& d : data_) {
- rtp_timestamps_ms.push_back(unwrapper.Unwrap(d.first) /
- (last_sample_rate_hz_ / 1000.f));
ivoc 2017/06/12 10:19:19 Are you sure this change has any effect? I tried t
hlundin-webrtc 2017/06/12 11:54:58 The machine instructions change quite a bit: https
+ rtp_timestamps_ms.push_back(
+ unwrapper.Unwrap(d.first) /
+ rtc::CheckedDivExact(last_sample_rate_hz_, 1000));
offset =
std::min(offset, d.second.arrival_time_ms - rtp_timestamps_ms.back());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698