1174 Commits

Author SHA1 Message Date
kwiberg
ceb9d0cc29 Audio decoder factory test: Ensure that g722's sample rate is 16 kHz, not 8 kHz
Review-Url: https://codereview.webrtc.org/2068133002
Cr-Commit-Position: refs/heads/master@{#13153}
2016-06-15 12:55:22 +00:00
kwiberg
6808419068 iSAC decoder: Remove obsolete TODO
NOTRY=true

Review-Url: https://codereview.webrtc.org/2069993002
Cr-Commit-Position: refs/heads/master@{#13152}
2016-06-15 12:54:20 +00:00
kjellander
fb11424551 GN: Add modules_unittests
Changes:
* Enabled protobuf for iOS globally.
* Set WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE on a global
scope similar to GYP since tests depend on it.
* Added missing rtc_libvpx_build_vp9 variable.
* Moved out audio_coding defines into .gni file to avoid code duplication
* Renamed files to avoid object naming conflicts that GN disallows:
  * webrtc/modules/audio_processing/{echo_cancellation_unittest.cc->echo_cancellation_bit_exact_unittest.cc}
  * webrtc/modules/video_coding/codecs/vp9/{screenshare_layers_unittest.cc->vp9_screenshare_layers_unittest.cc}

BUG=webrtc:5949
TESTED=Built and ran the tests on Mac. Also ran:
gn gen out/Default --args="rtc_enable_bwe_test_logging=true"
and verified that more objects are being built (1885 vs 1883)
when compiling modules_unittests.

NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2041233006
Cr-Commit-Position: refs/heads/master@{#13108}
2016-06-13 07:19:53 +00:00
henrik.lundin
919518613f NetEq: Rename Nack to NackTracker to avoid name collisions in GN
BUG=webrtc:5949
NOTRY=True
R=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2045243002
Cr-Commit-Position: refs/heads/master@{#13069}
2016-06-08 13:43:49 +00:00
kwiberg
a10740239d Fix UBSan errors (signed integer overflow)
WebRtcSpl_CrossCorrelation and WebRtcSpl_DotProductWithScale compute
the int32 sum of pairwise products from two int16 arrays. So as to
avoid overflow (which could otherwise happen when as little as two
products were summed), the products are right-shifted by an amount
specified by the caller.

This CL changes WebRtcIlbcfix_MyCorr and WebRtcIlbcfix_Smooth to give
sufficient right-shift amounts, instead of ones that may be too small
and cause overflow.

BUG=chromium:601787

Review-Url: https://codereview.webrtc.org/2014033002
Cr-Commit-Position: refs/heads/master@{#13066}
2016-06-08 12:24:47 +00:00
mbarbella
7bf939c720 Check for out-of-bounds access on |kIntrpCoef|.
BUG=chromium:600953

Review-Url: https://codereview.webrtc.org/2025493002
Cr-Commit-Position: refs/heads/master@{#13039}
2016-06-03 17:06:05 +00:00
kwiberg
f882880947 AudioDecoder: Document that the sample rate and number of channels is constant
Review-Url: https://codereview.webrtc.org/2029273003
Cr-Commit-Position: refs/heads/master@{#13012}
2016-06-02 10:19:26 +00:00
kwiberg
abe95ba323 AudioDecoderIsacT: Require caller to always specify sample rate
This gets rid of the complex & icky state where the sample rate is not
yet determined.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2020353003
Cr-Commit-Position: refs/heads/master@{#13011}
2016-06-02 09:59:02 +00:00
kwiberg
c0f2dcf9ed NetEq decoder database: Don't keep track of sample rate for builtin decoders
This allows us to get rid of the function that computes it, which gets
us one step closer to getting rid of the NetEqDecoder type.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2021063002
Cr-Commit-Position: refs/heads/master@{#12974}
2016-05-31 13:28:09 +00:00
kwiberg
6c2eab34f8 AudioDecoder: New method SampleRateHz, + implementations for our codecs
This will let NetEq (and the factory, and every layer in between) keep
track of just the decoder, instead of decoder and sample rate.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2024633002
Cr-Commit-Position: refs/heads/master@{#12968}
2016-05-31 09:46:28 +00:00
Tommi
90edc65929 Reland of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2018553002/ )
Adding a some checks and switching out a few assert for RTC_[D]CHECK.
These changes are around use of AudioFrame.data_ to help us catch issues earlier since assert() is left out in release builds, including builds with DCHECK enabled.  I've also added a few full-on CHECKs to avoid reading past buffer boundaries or continuing on in a failed state.

TBR=kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Committed: https://crrev.com/60c4e0ae8f124f08372645a95042f4a1246d7aa3
Cr-Commit-Position: refs/heads/master@{#12925}

Committed: https://crrev.com/5771beb265129082d31736259b7dc6ca037cff4d
Cr-Commit-Position: refs/heads/master@{#12926}

Committed: https://crrev.com/54e1c6a500e390e543bce7b78fae65eb9bb14ab6
Cr-Commit-Position: refs/heads/master@{#12927}

Committed: https://crrev.com/f9d2fe983fe196373850c55acd3dc3824add480e
Cr-Commit-Position: refs/heads/master@{#12928}

Committed: f4fc0ff6f9

Committed: https://crrev.com/c47f0099eee08e8b6731a359563ba09dfe453ded
Cr-Commit-Position: refs/heads/master@{#12930}

Committed: https://crrev.com/0ad72ead67ce848b45541af6aba0a15486b5e0a7
Cr-Commit-Position: refs/heads/master@{#12931}

Review URL: https://codereview.webrtc.org/2014973002 .

Cr-Commit-Position: refs/heads/master@{#12933}
2016-05-26 21:48:27 +00:00
Tommi
5771beb265 Reland of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2018553002/ )
Adding a some checks and switching out a few assert for RTC_[D]CHECK.
These changes are around use of AudioFrame.data_ to help us catch issues earlier since assert() is left out in release builds, including builds with DCHECK enabled.  I've also added a few full-on CHECKs to avoid reading past buffer boundaries or continuing on in a failed state.

TBR=kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Committed: https://crrev.com/60c4e0ae8f124f08372645a95042f4a1246d7aa3
Cr-Commit-Position: refs/heads/master@{#12925}

Review URL: https://codereview.webrtc.org/2014973002 .

Cr-Commit-Position: refs/heads/master@{#12926}
2016-05-26 19:51:41 +00:00
tommi
b4ff7a7a8b Revert of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2014183003/ )
Reason for revert:
Alas, the bot magically fails again.  Looks like indeed it's a Clang bug :(

https://build.chromium.org/p/client.webrtc/builders/Win64%20Debug%20%28Clang%29/builds/1687

Original issue's description:
> Reland of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2006313009/ )
>
> Reason for revert:
> Relanding.  The errors look like legit disk space problems so I'm going to watch the bots this time.
>
> Original issue's description:
> > Revert of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2009253004/ )
> >
> > Reason for revert:
> > Fails unexpectedly on multiple commit bots:
> > https://build.chromium.org/p/client.webrtc/builders/Win32%20Debug%20%28Clang%29/builds/1748
> > https://build.chromium.org/p/client.webrtc/builders/Win64%20Debug%20%28Clang%29/builds/1683
> >
> > I filed https://bugs.chromium.org/p/chromium/issues/detail?id=614967 to track the problem. I'll reland if it doesn't solve the problem.
> >
> > Original issue's description:
> > > Reland of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2006243002/ )
> > >
> > > Original issue's description:
> > > > Adding a some checks and switching out a few assert for RTC_[D]CHECK.
> > > > These changes are around use of AudioFrame.data_ to help us catch issues earlier since assert() is left out in release builds, including builds with DCHECK enabled.  I've also added a few full-on CHECKs to avoid reading past buffer boundaries or continuing on in a failed state.
> > > >
> > > > BUG=chromium:613482
> > > > NOTRY=true
> > > > (using notry due to offline android_arm64_rel bot)
> > > >
> > > > Committed: https://crrev.com/d36df89d40bde3c62ee5cbff841933e50b3c007b
> > > > Cr-Commit-Position: refs/heads/master@{#12870}
> > >
> > > TBR=henrik.lundin@webrtc.org
> > > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > > BUG=chromium:613482
> > >
> > > Committed: https://crrev.com/ba189cc4f4f6fe311a815646059e8011ffa53894
> > > Cr-Commit-Position: refs/heads/master@{#12907}
> >
> > TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=chromium:613482
> >
> > Committed: https://crrev.com/6895d8ca788df29f4d3a4b97fe891f0fb3a6dbec
> > Cr-Commit-Position: refs/heads/master@{#12909}
>
> TBR=henrik.lundin@webrtc.org,kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:613482
>
> Committed: https://crrev.com/b7318f1293453d8d319e27473c5bfb72292ebfd2
> Cr-Commit-Position: refs/heads/master@{#12920}

TBR=henrik.lundin@webrtc.org,kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:613482

Review-Url: https://codereview.webrtc.org/2018553002
Cr-Commit-Position: refs/heads/master@{#12921}
2016-05-26 15:27:43 +00:00
tommi
b7318f1293 Reland of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2006313009/ )
Reason for revert:
Relanding.  The errors look like legit disk space problems so I'm going to watch the bots this time.

Original issue's description:
> Revert of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2009253004/ )
>
> Reason for revert:
> Fails unexpectedly on multiple commit bots:
> https://build.chromium.org/p/client.webrtc/builders/Win32%20Debug%20%28Clang%29/builds/1748
> https://build.chromium.org/p/client.webrtc/builders/Win64%20Debug%20%28Clang%29/builds/1683
>
> I filed https://bugs.chromium.org/p/chromium/issues/detail?id=614967 to track the problem. I'll reland if it doesn't solve the problem.
>
> Original issue's description:
> > Reland of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2006243002/ )
> >
> > Original issue's description:
> > > Adding a some checks and switching out a few assert for RTC_[D]CHECK.
> > > These changes are around use of AudioFrame.data_ to help us catch issues earlier since assert() is left out in release builds, including builds with DCHECK enabled.  I've also added a few full-on CHECKs to avoid reading past buffer boundaries or continuing on in a failed state.
> > >
> > > BUG=chromium:613482
> > > NOTRY=true
> > > (using notry due to offline android_arm64_rel bot)
> > >
> > > Committed: https://crrev.com/d36df89d40bde3c62ee5cbff841933e50b3c007b
> > > Cr-Commit-Position: refs/heads/master@{#12870}
> >
> > TBR=henrik.lundin@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=chromium:613482
> >
> > Committed: https://crrev.com/ba189cc4f4f6fe311a815646059e8011ffa53894
> > Cr-Commit-Position: refs/heads/master@{#12907}
>
> TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:613482
>
> Committed: https://crrev.com/6895d8ca788df29f4d3a4b97fe891f0fb3a6dbec
> Cr-Commit-Position: refs/heads/master@{#12909}

TBR=henrik.lundin@webrtc.org,kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:613482

Review-Url: https://codereview.webrtc.org/2014183003
Cr-Commit-Position: refs/heads/master@{#12920}
2016-05-26 15:17:29 +00:00
henrik.lundin
303d3e1782 Fixing neteq_rtpplay
A regression happened in https://codereview.webrtc.org/2006723002,
causing neteq_rtpplay not to work. The problem was that when the main
code was moved inside of the webrtc::test namespace, it was no longer
visible to the linker. Meanwhile, the dependency on test_support_main
rather than test_support caused the executable to be a gtest.

In this fix, the gyp dependencies are corrected, and a main method is
added outside of the namespaces.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2018473002
Cr-Commit-Position: refs/heads/master@{#12918}
2016-05-26 12:56:07 +00:00
kwiberg
4f6c2b6eff Fix UBSan errors (left shift of negative value)
BUG=chromium:601787

Review-Url: https://codereview.webrtc.org/2000403006
Cr-Commit-Position: refs/heads/master@{#12911}
2016-05-26 10:40:56 +00:00
kjellander
6895d8ca78 Revert of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2009253004/ )
Reason for revert:
Fails unexpectedly on multiple commit bots:
https://build.chromium.org/p/client.webrtc/builders/Win32%20Debug%20%28Clang%29/builds/1748
https://build.chromium.org/p/client.webrtc/builders/Win64%20Debug%20%28Clang%29/builds/1683

I filed https://bugs.chromium.org/p/chromium/issues/detail?id=614967 to track the problem. I'll reland if it doesn't solve the problem.

Original issue's description:
> Reland of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2006243002/ )
>
> Original issue's description:
> > Adding a some checks and switching out a few assert for RTC_[D]CHECK.
> > These changes are around use of AudioFrame.data_ to help us catch issues earlier since assert() is left out in release builds, including builds with DCHECK enabled.  I've also added a few full-on CHECKs to avoid reading past buffer boundaries or continuing on in a failed state.
> >
> > BUG=chromium:613482
> > NOTRY=true
> > (using notry due to offline android_arm64_rel bot)
> >
> > Committed: https://crrev.com/d36df89d40bde3c62ee5cbff841933e50b3c007b
> > Cr-Commit-Position: refs/heads/master@{#12870}
>
> TBR=henrik.lundin@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=chromium:613482
>
> Committed: https://crrev.com/ba189cc4f4f6fe311a815646059e8011ffa53894
> Cr-Commit-Position: refs/heads/master@{#12907}

TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:613482

Review-Url: https://codereview.webrtc.org/2006313009
Cr-Commit-Position: refs/heads/master@{#12909}
2016-05-26 09:46:59 +00:00
tommi
ba189cc4f4 Reland of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #1 id:1 of https://codereview.webrtc.org/2006243002/ )
Original issue's description:
> Adding a some checks and switching out a few assert for RTC_[D]CHECK.
> These changes are around use of AudioFrame.data_ to help us catch issues earlier since assert() is left out in release builds, including builds with DCHECK enabled.  I've also added a few full-on CHECKs to avoid reading past buffer boundaries or continuing on in a failed state.
>
> BUG=chromium:613482
> NOTRY=true
> (using notry due to offline android_arm64_rel bot)
>
> Committed: https://crrev.com/d36df89d40bde3c62ee5cbff841933e50b3c007b
> Cr-Commit-Position: refs/heads/master@{#12870}

TBR=henrik.lundin@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:613482

Review-Url: https://codereview.webrtc.org/2009253004
Cr-Commit-Position: refs/heads/master@{#12907}
2016-05-26 09:13:14 +00:00
henrik.lundin
612c25e7af NetEq: Fix stats counting in muted mode
The NetEqNetworkStatistics::expand_rate was not incremented during muted
state, which caused under-reporting of that metric. This change fixes
that.

BUG=chromium:613321, webrtc:5608

Review-Url: https://codereview.webrtc.org/2003203004
Cr-Commit-Position: refs/heads/master@{#12894}
2016-05-25 15:21:09 +00:00
ossu
e352578bc8 Moved injection of AudioDecoderFactory into voe::Channel.
Channel's API remains unchanged, but the creation of a BuiltinAudioDecoderFactory is now in Channel. The next step would be to amend Channel's API (through CreateChannel, I believe) to allow an AudioDecoderFactory to be sent along.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/1992763002
Cr-Commit-Position: refs/heads/master@{#12893}
2016-05-25 14:37:47 +00:00
henrik.lundin
46ba49c622 Let PacketSource::NextPacket() return an std::unique_ptr
The return type of PacketSource::NextPacket() is changed from a naked
pointer to an std::uniqe_ptr. The interface contract was and still is
that the ownership is passed from the callee to the caller, but a
unique_ptr makes this explicit.

BUG=webrtc:2692

Review-Url: https://codereview.webrtc.org/2005873002
Cr-Commit-Position: refs/heads/master@{#12884}
2016-05-25 05:50:54 +00:00
tommi
fb98b9edb4 Revert of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (patchset #6 id:100001 of https://codereview.webrtc.org/2007563002/ )
Reason for revert:
Reverting temporarily.  Need to fix tests downstream that pass invalid arguments.

Original issue's description:
> Adding a some checks and switching out a few assert for RTC_[D]CHECK.
> These changes are around use of AudioFrame.data_ to help us catch issues earlier since assert() is left out in release builds, including builds with DCHECK enabled.  I've also added a few full-on CHECKs to avoid reading past buffer boundaries or continuing on in a failed state.
>
> BUG=chromium:613482
> NOTRY=true
> (using notry due to offline android_arm64_rel bot)
>
> Committed: https://crrev.com/d36df89d40bde3c62ee5cbff841933e50b3c007b
> Cr-Commit-Position: refs/heads/master@{#12870}

TBR=henrik.lundin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:613482

Review-Url: https://codereview.webrtc.org/2006243002
Cr-Commit-Position: refs/heads/master@{#12874}
2016-05-24 13:44:36 +00:00
henrik.lundin
ce5570e54e Move neteq_rtpplay.cc inside webrtc::test namespace
This simplifies the code.

BUG=webrtc:2692

Review-Url: https://codereview.webrtc.org/2006723002
Cr-Commit-Position: refs/heads/master@{#12873}
2016-05-24 13:15:03 +00:00
tommi
d36df89d40 Adding a some checks and switching out a few assert for RTC_[D]CHECK.
These changes are around use of AudioFrame.data_ to help us catch issues earlier since assert() is left out in release builds, including builds with DCHECK enabled.  I've also added a few full-on CHECKs to avoid reading past buffer boundaries or continuing on in a failed state.

BUG=chromium:613482
NOTRY=true
(using notry due to offline android_arm64_rel bot)

Review-Url: https://codereview.webrtc.org/2007563002
Cr-Commit-Position: refs/heads/master@{#12870}
2016-05-24 12:49:10 +00:00
kwiberg
64208e5523 Fix UBSan errors (left shift of negative value)
I've settled on replacing x << n with x * (1 << n); this gets rid of
the "left shift of negative value" warning, but will still trigger
undefined behavior if the multiplication overflows. It also still
looks like a left shift, which is good for the readability of the
fixed-point code.

(The compiler is smart enough to recognize that the
multiplication+shift is just a shift, for both variable and constant
shift amounts, so the generated code should not change.)

BUG=chromium:603491

Review-Url: https://codereview.webrtc.org/1989803002
Cr-Commit-Position: refs/heads/master@{#12845}
2016-05-23 10:28:35 +00:00
kwiberg
2036135620 AudioEncoderOpus: Default to 32 kbit/s for mono, 64 kbit/s for stereo
When this class was created, we inadvertently set the default to 64
kbit/s for both cases, failing to preserve the previous behavior. This
patch restores the old behavior.

From what I've been able to dig up, this problem did not affect Opus
encoders created internally in the Audio Coding Module. Those have
always used the bitrate from the supplied CodecInst.

Review-Url: https://codereview.webrtc.org/1942193002
Cr-Commit-Position: refs/heads/master@{#12827}
2016-05-20 11:57:08 +00:00
kwiberg
3fc8e8dde3 Fix UBSan errors (left shift of negative value)
BUG=chromium:604803

Review-Url: https://codereview.webrtc.org/1988113003
Cr-Commit-Position: refs/heads/master@{#12826}
2016-05-20 11:40:33 +00:00
ossu
e725f7c73e Turned AudioDecoderFactory into a RefCounted thing to use with scoped_refptr.
First step of AudioDecoderFactory injection CLs. AudioDecoderFactories will be shared, and shared_ptr is currently off the table, so this CL changes the current uses of AudioDecoderFactory from std::unique_ptr to rtc::scoped_refptr.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/1990803004
Cr-Commit-Position: refs/heads/master@{#12815}
2016-05-19 17:48:12 +00:00
kwiberg
89f237cedc Fix UBSan errors (left shift of negative value, left shift overflows int)
BUG=chromium:603498

Review-Url: https://codereview.webrtc.org/1979973003
Cr-Commit-Position: refs/heads/master@{#12787}
2016-05-18 09:20:35 +00:00
henrik.lundin
d4ccb00b9e Propagate muted parameter to VoE::Channel
Deleted the temporary ACM method without the muted parameter, and had
to modify several tests for this. The muted parameter is not yet propagated to the AudioConferenceMixer; this is the next step.

BUG=webrtc:5609
TBR=perkj@webrtc.org

Review-Url: https://codereview.webrtc.org/1985743002
Cr-Commit-Position: refs/heads/master@{#12779}
2016-05-17 19:22:03 +00:00
pasko
e305d956c0 Remove runtime NEON detection
Chrome does not detect NEON instruction set at runtime in WebRTC code starting
with M50, which is now in Stable. Remove support for runtime detection for
simplicity.

The only remaining piece of Chrome that will continue to depend on runtime
detection is /net, where devices with _broken_ neon support are also detected,
and it is not configurable via GYP/GN.

BUG=522035
NOPRESUBMIT=true

Review-Url: https://codereview.webrtc.org/1955413003
Cr-Commit-Position: refs/heads/master@{#12778}
2016-05-17 17:56:48 +00:00
kwiberg
9b2228fdfc Fix UBSan errors (left shift of negative value)
BUG=chromium:603501

Review-Url: https://codereview.webrtc.org/1988723002
Cr-Commit-Position: refs/heads/master@{#12775}
2016-05-17 13:40:48 +00:00
aleloi
8bce67b745 Added UMA logging for audio codec usage. A histogram statistic named "WebRTC.Audio.Encoder.CodecType" has been created.
Review-Url: https://codereview.webrtc.org/1967503002
Cr-Commit-Position: refs/heads/master@{#12760}
2016-05-16 14:34:31 +00:00
henrik.lundin
834a6ea12b Add muted_output parameter to ACM
The new parameter indicates if the output in the AudioFrame is muted. If
so, the output samples are not written, but should be interpreted as all
zero.

A version of AudioCodingModule::PlayoutData10Ms() without the new
parameter is maintained while waiting for downstream dependencies to
conform.

BUG=webrtc:5609

Review-Url: https://codereview.webrtc.org/1976913002
Cr-Commit-Position: refs/heads/master@{#12719}
2016-05-13 10:45:31 +00:00
terelius
d5c1a0bd5d New parser for event log. Manually parse the outermost EventStream to more easily deal with corrupt or partially written logs.
Changed rtpdump converter and neteq tool to use new parser, but still aborting if the file is corrupt.

Review-Url: https://codereview.webrtc.org/1768773002
Cr-Commit-Position: refs/heads/master@{#12714}
2016-05-13 07:43:04 +00:00
henrik.lundin
7a926812d8 NetEq: Implement muted output
This CL implements the muted output functionality in NetEq. Tests are
added. The feature is currently off by default, and AcmReceiver makes
sure that the muted state is not engaged.

BUG=webrtc:5608

Review-Url: https://codereview.webrtc.org/1965733002
Cr-Commit-Position: refs/heads/master@{#12711}
2016-05-12 20:51:37 +00:00
ossu
7e3968e46c Removed MaxEncodedBytes from AudioEncoder.
This is the last step in changing the signature of AudioEncoder::Encode
to taking an rtc::Buffer as its output parameter, rather than a pointer
to and a size parameter.

The notry parameter has been added specifically to work around android_compile_x86_dbg bot failing.

NOTRY=True
BUG=webrtc:5591

Review-Url: https://codereview.webrtc.org/1962013003
Cr-Commit-Position: refs/heads/master@{#12685}
2016-05-11 11:39:58 +00:00
minyue-webrtc
79553cb66e Using ring buffer for AudioVector in NetEq.
AudioVector used NetEq was based on a shift buffer, which has a high complexity, and the complexity is very much dependent on the capacity of the buffer.

This CL changes the shift buffer to a ring buffer.

Reduction in the CPU usages of NetEq is expected.

BUG=608644
R=henrik.lundin@webrtc.org

Review URL: https://codereview.webrtc.org/1948483002 .

Cr-Commit-Position: refs/heads/master@{#12676}
2016-05-10 17:56:10 +00:00
Niels Möller
d28db7fd65 Delete all use of tick_util.h.
Depends on Chrome cl https://codereview.chromium.org/1888003002/, which was landed some time ago.

BUG=webrtc:5740
R=stefan@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1888593004 .

Cr-Commit-Position: refs/heads/master@{#12674}
2016-05-10 14:31:58 +00:00
henrik.lundin
f3995f71ce NetEq: Implement Expand::Muted
Adding a new method to the Expand class, which will answer the question
whether an ongoing expansion has been faded down to zero
amplitude (i.e., been muted). Also adding a test.

This new functionality will be used in CLs to follow.

BUG=webrtc:5608
NOTRY=True

Review-Url: https://codereview.webrtc.org/1967473004
Cr-Commit-Position: refs/heads/master@{#12672}
2016-05-10 12:54:43 +00:00
henrik.lundin
60f6ce2a29 NetEq: Update stats earlier in the GetAudioInternal call
This is to prepare for implementation of NetEq muted state, which may
cause GetAudioInternal to make an early return just before the call to
GetDecision. With this change, the stats are updated in any case.

BUG=webrtc:5608
NOTRY=True

Review-Url: https://codereview.webrtc.org/1948663002
Cr-Commit-Position: refs/heads/master@{#12671}
2016-05-10 10:52:13 +00:00
Henrik Lundin
47b17dc59c NetEq: Replace timescale_holdoff_ with a Countdown timer
The timescale_holdoff_ is a counter in the DecisionLogic class. The
purpose is to enforce a minimum number of GetAudio calls
between (successfull) time-scaling operations (i.e., Accelerate and
Pre-emptive Expand operations). With this change, the counter is
replaced with a Countdown timer obtained from a TickTimer object.

BUG=webrtc:5608
R=tina.legrand@webrtc.org

Review URL: https://codereview.webrtc.org/1945863002 .

Cr-Commit-Position: refs/heads/master@{#12670}
2016-05-10 08:21:11 +00:00
pbos
c7a6569713 Revert of Disable failing modules_unittests for UBSan. (patchset #1 id:40001 of https://codereview.webrtc.org/1915813002/ )
Reason for revert:
Fix upstream should've landed in our repository.

Original issue's description:
> Disable failing modules_unittests for UBSan.
>
> BUG=webrtc:5820
> TBR=pbos@webrtc.org
>
> Committed: https://crrev.com/c23bf2e54d922486254cdd7657aafceaa958ce25
> Cr-Commit-Position: refs/heads/master@{#12482}

TBR=kjellander@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5820

Review-Url: https://codereview.webrtc.org/1937153002
Cr-Commit-Position: refs/heads/master@{#12647}
2016-05-06 19:50:08 +00:00
minyue
1746179c96 Reducing neteq sync buffer size.
BUG=608644

Review-Url: https://codereview.webrtc.org/1947453002
Cr-Commit-Position: refs/heads/master@{#12614}
2016-05-03 20:32:13 +00:00
henrik.lundin
c8fe991a3d Removing SpatialAudio test code
The code has not been dead for almost four years (since
https://webrtc-codereview.appspot.com/636006).

NOTRY=True

Review-Url: https://codereview.webrtc.org/1947483002
Cr-Commit-Position: refs/heads/master@{#12610}
2016-05-03 15:40:13 +00:00
henrik.lundin
b1fb72bebb NetEq: Move counting of generated CNG samples from DecisionLogic
The counting is moved to NetEqImpl, and the new counter is realized as a
Stopwatch object. The DecisionLogic class still has to maintain record
of when the CNG period is shortened, in order to reduce the delay. This
is recorded in a new noise_fast_forward_ member in DecisionLogic.

BUG=webrtc:5608

Review-Url: https://codereview.webrtc.org/1914303004
Cr-Commit-Position: refs/heads/master@{#12608}
2016-05-03 15:18:54 +00:00
kwiberg
5178ee86ba NetEq: Use a BuiltinAudioDecoderFactory to create decoders
Later steps in the refactoring will have the factory injected from the
outside rather than owned by NetEq.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/1928293002
Cr-Commit-Position: refs/heads/master@{#12604}
2016-05-03 08:39:08 +00:00
minyue
5bd3397e53 Adding 120 ms frame length support in NetEq.
BUG=webrtc:1015

Review-Url: https://codereview.webrtc.org/1901633002
Cr-Commit-Position: refs/heads/master@{#12592}
2016-05-02 11:46:19 +00:00
minyue
53ff70f582 Reland "Avoiding overflow in cross correlation in NetEq."
The original CL is https://codereview.webrtc.org/1908623002/

An error was caused by that and this CL fix that problem and reland the CL.

BUG=

Review-Url: https://codereview.webrtc.org/1931933004
Cr-Commit-Position: refs/heads/master@{#12589}
2016-05-02 08:50:34 +00:00
kwiberg
bfefb03ec1 Replace scoped_ptr with unique_ptr everywhere
But keep #including scoped_ptr.h in .h files, so as not to break
WebRTC users who expect those .h files to give them rtc::scoped_ptr.

BUG=webrtc:5520

Review-Url: https://codereview.webrtc.org/1937693002
Cr-Commit-Position: refs/heads/master@{#12581}
2016-05-01 21:53:55 +00:00