Commit graph

60 commits

Author SHA1 Message Date
Alessio Bazzica
fab3460a82 Revert "Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.""
This reverts commit 9973933d2e.

Reason for revert: breaking downstream projects and not reviewed by direct owners

Original change's description:
> Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
> 
> This reverts commit 24192c267a.
> 
> Reason for revert: Analyzed the performance regression in more detail.
> 
> Most of the regression comes from the extra RtpPacketInfos-related memory allocations in every `NetEq::GetAudio()` call. Commit 1796a820f6 has removed roughly 2/3rds of the extra allocations from the impacted perf tests. Remaining perf impact is expected to be about "8 microseconds of CPU time per second" on the Linux benchmarking machines and "15 us per second" on Windows/Mac.
> 
> There are options to optimize further but they are unlikely worth doing. Note for example that `NetEqPerformanceTest` uses the PCM codec while the real-world use cases would likely use the much heavier Opus codec. The numbers from `OpusSpeedTest` and `NetEqPerformanceTest` suggest that Opus decoding is about 10x as expensive as NetEq overall.
> 
> Original change's description:
> > Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
> >
> > This reverts commit 3e8ef940fe.
> >
> > Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260.
> >
> > Original change's description:
> > > Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
> > >
> > > This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
> > >
> > > Bug: webrtc:10668
> > > Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
> > > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > > Commit-Queue: Chen Xing <chxg@google.com>
> > > Cr-Commit-Position: refs/heads/master@{#28434}
> >
> > TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com
> >
> > Bug: webrtc:10668, chromium:982260
> > Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339
> > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28561}
> 
> TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: webrtc:10668, chromium:982260
> Change-Id: Ie375a0b327ee368317bf3a04b2f1415c3a974470
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146707
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Chen Xing <chxg@google.com>
> Cr-Commit-Position: refs/heads/master@{#28664}

TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com

Change-Id: I652cb0814d83b514d3bee34e65ca3bb693099b22
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10668, chromium:982260
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146712
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28671}
2019-07-24 16:41:13 +00:00
Chen Xing
9973933d2e Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
This reverts commit 24192c267a.

Reason for revert: Analyzed the performance regression in more detail.

Most of the regression comes from the extra RtpPacketInfos-related memory allocations in every `NetEq::GetAudio()` call. Commit 1796a820f6 has removed roughly 2/3rds of the extra allocations from the impacted perf tests. Remaining perf impact is expected to be about "8 microseconds of CPU time per second" on the Linux benchmarking machines and "15 us per second" on Windows/Mac.

There are options to optimize further but they are unlikely worth doing. Note for example that `NetEqPerformanceTest` uses the PCM codec while the real-world use cases would likely use the much heavier Opus codec. The numbers from `OpusSpeedTest` and `NetEqPerformanceTest` suggest that Opus decoding is about 10x as expensive as NetEq overall.

Original change's description:
> Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
>
> This reverts commit 3e8ef940fe.
>
> Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260.
>
> Original change's description:
> > Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
> >
> > This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
> >
> > Bug: webrtc:10668
> > Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > Commit-Queue: Chen Xing <chxg@google.com>
> > Cr-Commit-Position: refs/heads/master@{#28434}
>
> TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com
>
> Bug: webrtc:10668, chromium:982260
> Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28561}

TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10668, chromium:982260
Change-Id: Ie375a0b327ee368317bf3a04b2f1415c3a974470
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146707
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#28664}
2019-07-24 14:15:28 +00:00
Mirko Bonadei
2ab97f6f8e Migrate WebRTC test infra to ABSL_FLAG.
This is the last CL required to migrate WebRTC to ABSL_FLAG, rtc::Flag
will be removed soon after this one lands.

Bug: webrtc:10616
Change-Id: I2807cec39e28a2737d2c49e2dc23f2a6f98d08f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145727
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28606}
2019-07-19 06:54:04 +00:00
Ivo Creusen
24192c267a Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
This reverts commit 3e8ef940fe.

Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260.

Original change's description:
> Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
>
> This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
>
> Bug: webrtc:10668
> Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Chen Xing <chxg@google.com>
> Cr-Commit-Position: refs/heads/master@{#28434}

TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com

Bug: webrtc:10668, chromium:982260
Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28561}
2019-07-12 16:18:31 +00:00
Chen Xing
3e8ef940fe Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.

Bug: webrtc:10668
Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#28434}
2019-07-01 15:56:40 +00:00
Jakob Ivarsson
a36c591c09 Reland "Reland "Change buffer level filter to store current level in number of samples.""
This is a reland of 0ded32d5a3

Original change's description:
> Reland "Change buffer level filter to store current level in number of samples."
> 
> This is a reland of 87977dd06e
> 
> Original change's description:
> > Change buffer level filter to store current level in number of samples.
> > 
> > The buffer level should not be converted back and forth between samples and packets in case of variable packet lengths.
> > 
> > Bug: webrtc:10736
> > Change-Id: Ia08dcfac3d8104dc79fbad0704a5f6f12a050a01
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142178
> > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28368}
> 
> Bug: webrtc:10736
> Change-Id: I1ff603e65cdd31c7429f36b035dcc00a17b68f3b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143787
> Commit-Queue: Minyue Li <minyue@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28393}

Bug: webrtc:10736
Change-Id: I251b8321e5a5fd870e018bc7c8083ec0a41de81b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144023
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28398}
2019-06-27 09:16:27 +00:00
Jakob Ivarsson
b93af8543d Revert "Reland "Change buffer level filter to store current level in number of samples.""
This reverts commit 0ded32d5a3.

Reason for revert: breaks downstream projects.

Original change's description:
> Reland "Change buffer level filter to store current level in number of samples."
> 
> This is a reland of 87977dd06e
> 
> Original change's description:
> > Change buffer level filter to store current level in number of samples.
> > 
> > The buffer level should not be converted back and forth between samples and packets in case of variable packet lengths.
> > 
> > Bug: webrtc:10736
> > Change-Id: Ia08dcfac3d8104dc79fbad0704a5f6f12a050a01
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142178
> > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28368}
> 
> Bug: webrtc:10736
> Change-Id: I1ff603e65cdd31c7429f36b035dcc00a17b68f3b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143787
> Commit-Queue: Minyue Li <minyue@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28393}

TBR=henrik.lundin@webrtc.org,minyue@webrtc.org,jakobi@webrtc.org

Change-Id: I570c83ec3a88a24d7a1f883a351748dd71bea015
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10736
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144022
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28397}
2019-06-27 08:07:21 +00:00
Jakob Ivarsson
0ded32d5a3 Reland "Change buffer level filter to store current level in number of samples."
This is a reland of 87977dd06e

Original change's description:
> Change buffer level filter to store current level in number of samples.
> 
> The buffer level should not be converted back and forth between samples and packets in case of variable packet lengths.
> 
> Bug: webrtc:10736
> Change-Id: Ia08dcfac3d8104dc79fbad0704a5f6f12a050a01
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142178
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28368}

Bug: webrtc:10736
Change-Id: I1ff603e65cdd31c7429f36b035dcc00a17b68f3b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143787
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28393}
2019-06-26 20:30:05 +00:00
Jakob Ivarsson
d3fc161c16 Revert "Change buffer level filter to store current level in number of samples."
This reverts commit 87977dd06e.

Reason for revert: Breaks downstream project

Original change's description:
> Change buffer level filter to store current level in number of samples.
> 
> The buffer level should not be converted back and forth between samples and packets in case of variable packet lengths.
> 
> Bug: webrtc:10736
> Change-Id: Ia08dcfac3d8104dc79fbad0704a5f6f12a050a01
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142178
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28368}

TBR=henrik.lundin@webrtc.org,minyue@webrtc.org,jakobi@webrtc.org

Change-Id: I3900c9f6071fce51d13fb3b7c886157304d7a5c3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10736
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143786
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28369}
2019-06-25 12:33:01 +00:00
Jakob Ivarsson
87977dd06e Change buffer level filter to store current level in number of samples.
The buffer level should not be converted back and forth between samples and packets in case of variable packet lengths.

Bug: webrtc:10736
Change-Id: Ia08dcfac3d8104dc79fbad0704a5f6f12a050a01
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142178
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28368}
2019-06-25 11:21:51 +00:00
Jakob Ivarsson
26c59ff6ca Fix jitter buffer delay reporting.
Previously, if more than one packet is extracted in a GetAudio call then
an incorrect number of samples will be reported.

Bug: webrtc:10363
Change-Id: Ia1bcc87a0e0082060e4f746d37a4008735eec6b3
Reviewed-on: https://webrtc-review.googlesource.com/c/124829
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26903}
2019-02-28 15:51:31 +00:00
Jakob Ivarsson
d3a780b476 Cleanup NetEqPostponeDecodingAfterExpand field trial.
Change-Id: Ie96e9b35ced4b6ca8daa78f1fa80816386a6643b
Bug: webrtc:9289
Reviewed-on: https://webrtc-review.googlesource.com/c/124127
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26899}
2019-02-28 14:45:59 +00:00
Mirko Bonadei
e45c688e67 Remove webrtc::ProtoString.
Bug: None
Change-Id: If99a977532eda41eada25f57ff0ff6fe17085986
Reviewed-on: https://webrtc-review.googlesource.com/c/122581
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26726}
2019-02-16 11:11:45 +00:00
Chen Xing
0acffb5b36 Expose jitterBufferEmittedCount in addition to the existing jitterBufferDelay for getStats().
NetEq currently only passes `jitterBufferDelay` to `getStats()`. We need its paired `jitterBufferEmittedCount` denominator stat for the calculations to be accurate.

Bug: webrtc:10192
Change-Id: I655aea629026ce9101409c2e0f18c2fa57a1c3ab
Reviewed-on: https://webrtc-review.googlesource.com/c/117320
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#26276}
2019-01-16 11:44:10 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Niels Möller
7289906437 Delete enum NetEqDecoder.
A trimmed down version is moved to legacy_encoded_audio_frame_unittest.cc
where it's used for test parameterization.

Bug: webrtc:10185
Change-Id: I9abda22f9806b831b6ca4b27d6bcc888285f50f2
Reviewed-on: https://webrtc-review.googlesource.com/c/116961
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26218}
2019-01-11 13:52:25 +00:00
Niels Möller
0554368eed Delete method DecoderDatabase::RegisterPayload(...NetEqDecoder...)
Bug: webrtc:10185
Change-Id: I69ce40b1c7267b039cd1d2237c5d5bbae3a81875
Reviewed-on: https://webrtc-review.googlesource.com/c/116683
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26208}
2019-01-11 07:39:45 +00:00
Niels Möller
f7d636644f Delete method NetEqImpl::CurrentDelayMs, used only by tests
Bug: None
Change-Id: If94695f60ed804f6b43be828dd93f02826269140
Reviewed-on: https://webrtc-review.googlesource.com/c/116687
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26193}
2019-01-10 12:49:12 +00:00
Niels Möller
bd6dee89d4 Delete NetEqTest::ExtDecoderMap
Bug: webrtc:10080
Change-Id: Ica2c3b8b94bd31cd3af98b2e918dafc223c341ef
Reviewed-on: https://webrtc-review.googlesource.com/c/115417
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26164}
2019-01-08 16:25:05 +00:00
Niels Möller
3f651d80a0 Reland "Add AudioDecoderFactory to NetEqTest constructor."
This is a reland of daa970f33e

Original change's description:
> Add AudioDecoderFactory to NetEqTest constructor.
>
> Update EventLogAnalyzer to not depend on builtin audio decoders.
>
> Bug: webrtc:8396, webrtc:10080
> Change-Id: Ie02ed9cda6d4f11bfdf2e65eb6482283b7520738
> Reviewed-on: https://webrtc-review.googlesource.com/c/114301
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26026}

Tbr: kwiberg@webrtc.org
Bug: webrtc:8396, webrtc:10080
Change-Id: I598ce1cd41676b1992b0973b09476eeeb0e602d2
Reviewed-on: https://webrtc-review.googlesource.com/c/114940
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26058}
2018-12-19 15:08:47 +00:00
Oleh Prypin
f7f753b320 Revert "Add AudioDecoderFactory to NetEqTest constructor."
This reverts commit daa970f33e.

Reason for revert: Speculative revert due to downstream breakage

Original change's description:
> Add AudioDecoderFactory to NetEqTest constructor.
>
> Update EventLogAnalyzer to not depend on builtin audio decoders.
>
> Bug: webrtc:8396, webrtc:10080
> Change-Id: Ie02ed9cda6d4f11bfdf2e65eb6482283b7520738
> Reviewed-on: https://webrtc-review.googlesource.com/c/114301
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26026}

TBR=mbonadei@webrtc.org,aleloi@webrtc.org,kwiberg@webrtc.org,terelius@webrtc.org,nisse@webrtc.org,ivoc@webrtc.org

No-Try: True
Bug: webrtc:8396, webrtc:10080
Change-Id: Ided750d8ed800d8a38f7cce8f72095d8ed1bc6cb
Reviewed-on: https://webrtc-review.googlesource.com/c/114552
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26030}
2018-12-17 15:16:30 +00:00
Niels Möller
daa970f33e Add AudioDecoderFactory to NetEqTest constructor.
Update EventLogAnalyzer to not depend on builtin audio decoders.

Bug: webrtc:8396, webrtc:10080
Change-Id: Ie02ed9cda6d4f11bfdf2e65eb6482283b7520738
Reviewed-on: https://webrtc-review.googlesource.com/c/114301
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26026}
2018-12-17 11:15:50 +00:00
Ivo Creusen
2db46b0fb7 Added new feature to print a text log to neteq_rtpplay
This will print out the major events during a NetEq simulation.

Bug: b/116685514
Change-Id: Iab172e9a9115695b42c67628d5523c727359bb89
Reviewed-on: https://webrtc-review.googlesource.com/c/114320
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26019}
2018-12-14 16:38:45 +00:00
Yves Gerey
3e70781361 [Cleanup] Add missing #include. Remove useless ones. IWYU part 2.
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.

Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
2018-11-28 18:25:07 +00:00
Niels Möller
53382cb19f Move RtcpStatistics from common_types.h to a new header file
New location is modules/rtp_rtcp/include/rtcp_statistics.h.

Bug: webrtc:5876
Change-Id: I85f55b58658588228ed77175226b3479352fd5de
Reviewed-on: https://webrtc-review.googlesource.com/c/111961
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25799}
2018-11-27 13:46:42 +00:00
Niels Möller
d51b3553db Delete unused NetEq Rtcp stats.
Bug: webrtc:7135
Change-Id: Ib3ca9e02b051b8b41c2eac4e43a4f1f37999bf75
Reviewed-on: https://webrtc-review.googlesource.com/c/111640
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25743}
2018-11-22 08:00:54 +00:00
Yves Gerey
a038e71b48 Less strict audio codec tests to accomodate opus switch to SSE.
Expected checksums depend on whether libopus is built with SSE or not.
Since we have no robust way to know that and we cannot enforce all
clients to use SSE, we accept both results.

Bug: webrtc:9530
Bug: webrtc:9995
Change-Id: I9f0464ffec15df91eafe15d89c61e2140f341cb1
Reviewed-on: https://webrtc-review.googlesource.com/c/110789
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25633}
2018-11-14 10:16:04 +00:00
Yves Gerey
09102a02cf Revert "Roll "Enable SSE, SSE2, and run-time detected SSE4.1 for libopus.""
This reverts commit 466620b326.

Reason for revert: Break downstream clients which are still expecting the previous references for NetEqDecodingTest.TestOpusBitExactness.

Original change's description:
> Roll "Enable SSE, SSE2, and run-time detected SSE4.1 for libopus."
> 
> We manually roll third_party since we need to update impacted tests,
> namely bit-exact comparison of expected neteq_opus results.
> They have changed due to SSE optimization enabled here:
> 85d355e530
> 
> For consistency sake roll_deps has been invoked:
> 
> Roll chromium_revision db720b4ab9..ae94013397 (606025:606579)
> 
> Change log: db720b4ab9..ae94013397
> Full diff: db720b4ab9..ae94013397
> 
> Changed dependencies
> * src/base: fee916f36b..f428263956
> * src/build: 02b0a894b0..3f61809684
> * src/ios: 95aadfb43f..fb48cd850c
> * src/testing: 03b25bebb5..f6a2832441
> * src/third_party: 360db5b8aa..8209b47661
> * src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/dd412c428a..384d0eaf19
> * src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/2e722b007d..f04a3a61ad
> * src/third_party/depot_tools: 4d2d5b4bbe..edcefdcf7d
> * src/third_party/freetype/src: f56830ed40..fb0d66d04c
> * src/tools: a8e76f0ca5..f8ace9b670
> DEPS diff: db720b4ab9..ae94013397/DEPS
> 
> Clang version changed 344066:346388
> Details: db720b4ab9..ae94013397/tools/clang/scripts/update.py
> 
> Bug: webrtc:9530
> Change-Id: I8a016c5834c4f05fc17e3a84a5e139eeaeaee510
> Reviewed-on: https://webrtc-review.googlesource.com/c/110040
> Commit-Queue: Yves Gerey <yvesg@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25588}

TBR=phoglund@webrtc.org,ivoc@webrtc.org,yvesg@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:9530
Change-Id: I01549abdcfbcad70881ff9aeee913df68d0f0052
Reviewed-on: https://webrtc-review.googlesource.com/c/110602
Reviewed-by: Yves Gerey <yvesg@google.com>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#25591}
2018-11-12 09:55:10 +00:00
Yves Gerey
466620b326 Roll "Enable SSE, SSE2, and run-time detected SSE4.1 for libopus."
We manually roll third_party since we need to update impacted tests,
namely bit-exact comparison of expected neteq_opus results.
They have changed due to SSE optimization enabled here:
85d355e530

For consistency sake roll_deps has been invoked:

Roll chromium_revision db720b4ab9..ae94013397 (606025:606579)

Change log: db720b4ab9..ae94013397
Full diff: db720b4ab9..ae94013397

Changed dependencies
* src/base: fee916f36b..f428263956
* src/build: 02b0a894b0..3f61809684
* src/ios: 95aadfb43f..fb48cd850c
* src/testing: 03b25bebb5..f6a2832441
* src/third_party: 360db5b8aa..8209b47661
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/dd412c428a..384d0eaf19
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/2e722b007d..f04a3a61ad
* src/third_party/depot_tools: 4d2d5b4bbe..edcefdcf7d
* src/third_party/freetype/src: f56830ed40..fb0d66d04c
* src/tools: a8e76f0ca5..f8ace9b670
DEPS diff: db720b4ab9..ae94013397/DEPS

Clang version changed 344066:346388
Details: db720b4ab9..ae94013397/tools/clang/scripts/update.py

Bug: webrtc:9530
Change-Id: I8a016c5834c4f05fc17e3a84a5e139eeaeaee510
Reviewed-on: https://webrtc-review.googlesource.com/c/110040
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25588}
2018-11-09 22:30:47 +00:00
Mirko Bonadei
2dfa998be2 Reland "Prefix flag macros with WEBRTC_."
This is a reland of 5ccdc1331f

Original change's description:
> Prefix flag macros with WEBRTC_.
>
> Macros defined in rtc_base/flags.h are intended to be used to define
> flags in WebRTC's binaries (e.g. tests).
>
> They are currently not prefixed and this could cause problems with
> downstream clients since these names are quite common.
>
> This CL adds the 'WEBRTC_' prefix to them.
>
> Generated with:
>
> for x in DECLARE DEFINE; do
>   for y in bool int float string FLAG; do
>     git grep -l "\b$x\_$y\b" | \
>     xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
>   done
> done
> git cl format
>
> Bug: webrtc:9884
> Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
> Reviewed-on: https://webrtc-review.googlesource.com/c/106682
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25270}

TBR=kwiberg@webrtc.org

Bug: webrtc:9884
Change-Id: I5ba5368a231a334d135ed5e6fd7a279629ced8a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/107161
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25277}
2018-10-19 15:06:43 +00:00
Mirko Bonadei
c538fc77b0 Revert "Prefix flag macros with WEBRTC_."
This reverts commit 5ccdc1331f.

Reason for revert: Breaks downstream project.

Original change's description:
> Prefix flag macros with WEBRTC_.
> 
> Macros defined in rtc_base/flags.h are intended to be used to define
> flags in WebRTC's binaries (e.g. tests).
> 
> They are currently not prefixed and this could cause problems with
> downstream clients since these names are quite common.
> 
> This CL adds the 'WEBRTC_' prefix to them.
> 
> Generated with:
> 
> for x in DECLARE DEFINE; do
>   for y in bool int float string FLAG; do
>     git grep -l "\b$x\_$y\b" | \
>     xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
>   done
> done
> git cl format
> 
> Bug: webrtc:9884
> Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
> Reviewed-on: https://webrtc-review.googlesource.com/c/106682
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25270}

TBR=mbonadei@webrtc.org,kwiberg@webrtc.org

Change-Id: Ia79cd6066ecfd1511c34f1b30fd423e560ed6854
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9884
Reviewed-on: https://webrtc-review.googlesource.com/c/107160
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25276}
2018-10-19 15:04:13 +00:00
Mirko Bonadei
5ccdc1331f Prefix flag macros with WEBRTC_.
Macros defined in rtc_base/flags.h are intended to be used to define
flags in WebRTC's binaries (e.g. tests).

They are currently not prefixed and this could cause problems with
downstream clients since these names are quite common.

This CL adds the 'WEBRTC_' prefix to them.

Generated with:

for x in DECLARE DEFINE; do
  for y in bool int float string FLAG; do
    git grep -l "\b$x\_$y\b" | \
    xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
  done
done
git cl format

Bug: webrtc:9884
Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
Reviewed-on: https://webrtc-review.googlesource.com/c/106682
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25270}
2018-10-19 10:55:20 +00:00
Bjorn Terelius
5350d1cafd RtcEventLogSource no longer uses deprecated parsing functions.
Also remove header extension map from NetEqEventLogInput and RtcEventLogSource.

Bug: webrtc:8111
Change-Id: Ic9be7b03e32ab8aa12284596e21e53b6763f483a
Reviewed-on: https://webrtc-review.googlesource.com/c/102622
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25122}
2018-10-11 16:13:17 +00:00
Jonas Olsson
366a50c4ef Remove simple stringstream usages.
This CL replaces std::o?stringstream with rtc::StringBuilder where that's possible to do without changing any of the surrounding code. It also updates includes and build files as appropriate.

The CL was generated by running 'git grep -l -P std::o?stringstream | xargs perl -pi -e "s/std::o?stringstream/rtc::StringBuilder/g"'. Then I've manually updated the #includes and BUILD files, run 'git cl format' and unstaged any file that would need more complex fixes.

Bug: webrtc:8982
Change-Id: Ibc32153f4a3fd177e260b6ad05ce393972549357
Reviewed-on: https://webrtc-review.googlesource.com/98460
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24605}
2018-09-06 12:53:19 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Henrik Lundin
9f2e624024 Break out NetEqEventLogInput to separate source files
Building NetEqEventLogInput requires protobuf support, while building
NetEqRtpDumpInput located in the same file does not. This makes both
classes unusable when protobuf support is lacking. With this CL, the
NetEqEventLogInput is broken out into separate files, to allow usage
of NetEqRtpDumpInput even when protobufs are not supported.

Bug: webrtc:9421
Change-Id: I55efec4ec259713654566cdaa00d2e34c5e9a60f
Reviewed-on: https://webrtc-review.googlesource.com/84587
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23803}
2018-07-02 14:15:29 +00:00
Henrik Lundin
7687ad58b2 Reland "NetEq: Deprecate playout modes Fax, Off and Streaming"
This is a reland of 80c4cca491

Original change's description:
> NetEq: Deprecate playout modes Fax, Off and Streaming
> 
> The playout modes other than Normal have not been reachable for a long
> time, other than through tests. It is time to deprecate them.
> 
> The only meaningful use was that Fax mode was sometimes set from
> tests, in order to avoid time-stretching operations (accelerate and
> pre-emptive expand) from messing with the test results. With this CL,
> a new config is added instead, which lets the user specify exactly
> this: don't do time-stretching.
> 
> As a result of Fax and Off modes being removed, the following code
> clean-up was done:
> - Fold DecisionLogicNormal into DecisionLogic.
> - Remove AudioRepetition and AlternativePlc operations, since they can
>   no longer be reached.
> 
> Bug: webrtc:9421
> Change-Id: I651458e9c1931a99f3b07e242817d303bac119df
> Reviewed-on: https://webrtc-review.googlesource.com/84123
> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23704}

Bug: webrtc:9421
Change-Id: Ice351b635788167f2971b26470f73a5e5fa1a240
Reviewed-on: https://webrtc-review.googlesource.com/86543
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23799}
2018-07-02 10:20:33 +00:00
Henrik Lundin
1ff41eb784 Revert "NetEq: Deprecate playout modes Fax, Off and Streaming"
This reverts commit 80c4cca491.

Reason for revert: Breaks downstream tests.

Original change's description:
> NetEq: Deprecate playout modes Fax, Off and Streaming
> 
> The playout modes other than Normal have not been reachable for a long
> time, other than through tests. It is time to deprecate them.
> 
> The only meaningful use was that Fax mode was sometimes set from
> tests, in order to avoid time-stretching operations (accelerate and
> pre-emptive expand) from messing with the test results. With this CL,
> a new config is added instead, which lets the user specify exactly
> this: don't do time-stretching.
> 
> As a result of Fax and Off modes being removed, the following code
> clean-up was done:
> - Fold DecisionLogicNormal into DecisionLogic.
> - Remove AudioRepetition and AlternativePlc operations, since they can
>   no longer be reached.
> 
> Bug: webrtc:9421
> Change-Id: I651458e9c1931a99f3b07e242817d303bac119df
> Reviewed-on: https://webrtc-review.googlesource.com/84123
> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23704}

TBR=henrik.lundin@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org

Change-Id: I555aae8850fc4ac1ea919bfa72c11b5218066f30
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9421
Reviewed-on: https://webrtc-review.googlesource.com/84680
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23706}
2018-06-21 12:36:44 +00:00
Henrik Lundin
80c4cca491 NetEq: Deprecate playout modes Fax, Off and Streaming
The playout modes other than Normal have not been reachable for a long
time, other than through tests. It is time to deprecate them.

The only meaningful use was that Fax mode was sometimes set from
tests, in order to avoid time-stretching operations (accelerate and
pre-emptive expand) from messing with the test results. With this CL,
a new config is added instead, which lets the user specify exactly
this: don't do time-stretching.

As a result of Fax and Off modes being removed, the following code
clean-up was done:
- Fold DecisionLogicNormal into DecisionLogic.
- Remove AudioRepetition and AlternativePlc operations, since they can
  no longer be reached.

Bug: webrtc:9421
Change-Id: I651458e9c1931a99f3b07e242817d303bac119df
Reviewed-on: https://webrtc-review.googlesource.com/84123
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23704}
2018-06-21 11:51:21 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Danil Chapovalov
b602123a5a Replace rtc::Optional with absl::optional in modules/audio_coding
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script with parameter 'modules/audio_coding'

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: Ic980ee605148fdb160666d4aa03cc87175e48fe8
Reviewed-on: https://webrtc-review.googlesource.com/84130
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23659}
2018-06-19 12:46:20 +00:00
Henrik Lundin
6dc82e8f8b NetEq: Change NetEq's ramp-up behavior after expansions
NetEq tapers down the audio produced through loss concealment when the
expansion has been going on for some time. When the audio packets starts
coming in again, there is a ramp-up that happens. This ramp-up could
before this change extend over more than one 10 ms block, which made
keeping track of the scaling factor necessary. With this change, we make
this ramp-up quicker in the rare cases when it lasted more than 10 ms,
so that it always ramps up to 100% within one block. This way, we can
remove the mute_factor_array.

This change breaks bit-exactness, but careful listening could not reveal
an audible difference.

This change is a part of a larger refactoring of NetEq's PLC code.

Bug: webrtc:9180
Change-Id: I4c513ce3ed8d66f9beec2abfb1f0c7ffaac7a21e
Reviewed-on: https://webrtc-review.googlesource.com/77180
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23342}
2018-05-22 09:38:28 +00:00
Henrik Lundin
9024da84c9 NetEq: Fixing an overflow bug in expand.cc
The overflow currently does not cause any problems, but it has been
found that it can cause crashes after a refactoring that is coming in
the near future.

Bug: webrtc:9180
Change-Id: Ia2c4e545c062c4f8ad13cbc47b8796c6e8a4e906
Reviewed-on: https://webrtc-review.googlesource.com/77667
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23327}
2018-05-21 13:39:25 +00:00
Henrik Lundin
6719017d19 NetEq: Remove background noise fill during long expansions
NetEq was (up until this CL) capable of fading over to generating a
constant background noise when voice expansion had lasted too long.
However, the code has for a really long time only ever used the "off"
mode, which meant that long expansions are faded down to complete
silence (only zeros), i.e., background noise fill was not used.
Removing the other two modes ("on" and "fade") simplifies the code.

Bug: webrtc:9180
Change-Id: Ia2d46960208f3d75c9659ad3f027c52e5ecfb6b0
Reviewed-on: https://webrtc-review.googlesource.com/71485
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22969}
2018-04-23 06:59:46 +00:00
Fredrik Solenberg
bbf21a3fd6 Remove dependencies on modules:module_api from AudioProcessing.
- Directly include api/audio/audio_frame.h everywhere AudioFrame is used.
- This *will* remove transient dependencies on libjpeg and a bunch of other things from the e.g. APM.
- audio_frame.h still included from module_common_types.h for backwards compatibility with clients.

Bug: webrtc:9139, webrtc:7504
Change-Id: Id96f9268c01667fbcc29a01f5c1dd25a37836897
Reviewed-on: https://webrtc-review.googlesource.com/62464
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22845}
2018-04-12 22:05:27 +00:00
Henrik Lundin
4f2a4a12df NetEq: Make the fix for Opus DTX permanent
This change makes the fix for too long delays during Opus DTX periods
permanent. The fix has up until now been under an experiment, named
WebRTC-NetEqOpusDtxDelayFix.

Bug: webrtc:8488,chromium:780849
Change-Id: I006abb67f96d9d7880bf2215d7d6b52db6cbbfbc
Reviewed-on: https://webrtc-review.googlesource.com/44420
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21786}
2018-01-29 08:51:27 +00:00
Mirko Bonadei
81ca3bfb18 Including rtc_base/flags.h after test/gtest.h.
Bug: None
Change-Id: Ic3c0db875902d006935e39139d58dfb842c7a2d6
Reviewed-on: https://webrtc-review.googlesource.com/38180
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21527}
2018-01-09 10:00:33 +00:00
Joachim Bauch
4e90919ad6 Use generic MessageDigest class instead of MD5 / SHA-1 specific classes.
This allows removing the specific classes in a later CL.

Bug: webrtc:8677
Change-Id: I3b9c1f3191c38e6d31a3de990e2d882505e79adc
Reviewed-on: https://webrtc-review.googlesource.com/35040
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Joachim Bauch <jbauch@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21412}
2017-12-21 12:39:50 +00:00
Henrik Lundin
e9619f8f81 Add a new NetEq decoding unit test for Opus with DTX
This tests NetEq with a stream encoded with Opus using it's internal
DTX/CNG.

Also adding a new resource file which is encoded using Opus with DTX.

Bug: webrtc:8488
Change-Id: Icfba5bc5dc7f9c9d0e637a90f4df674e8ba40358
Reviewed-on: https://webrtc-review.googlesource.com/26028
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20905}
2017-11-28 10:45:38 +00:00
Karl Wiberg
e40468ba3d Move some numeric utility code from rtc_base/ to rtc_base/numerics/
Specifically, I'm moving

  safe_compare.h
  safe_conversions.h
  safe_minmax.h

They shouldn't be part of the API, and moving them to an appropriate
subdirectory of rtc_base/ is a good way to keep track of that.

BUG=webrtc:8445

Change-Id: I458531aeb30bcf4291c4bec3bf22a2fffbf054ff
Reviewed-on: https://webrtc-review.googlesource.com/20860
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20829}
2017-11-22 11:21:47 +00:00