This was previously done in AcmReceiver, but belongs in NetEq where the
rest of the AudioFrame fields are populated.
BUG=webrtc:5669,webrtc:5607
Review URL: https://codereview.webrtc.org/1863993002
Cr-Commit-Position: refs/heads/master@{#12265}
This is in preparation for changes to when the playout timestamp is
valid.
BUG=webrtc:5669
Review URL: https://codereview.webrtc.org/1853183002
Cr-Commit-Position: refs/heads/master@{#12256}
This new unit test verifies the parameter fields (not the audio data
itself) written to the AudioFrame output by AcmReceiver::GetAudio.
Also corrected a few comments reflecting recent changes in the code.
BUG=webrtc:5669
Review URL: https://codereview.webrtc.org/1859953002
Cr-Commit-Position: refs/heads/master@{#12253}
Now that the Rent-A-Codec no longer owns the encoders and decoders it
produces, they may outlive it. It's thus no longer correct for the
Rent-A-Codec to own the bandwidth estimation state; all of the
involved objects need to share ownership.
BUG=webrtc:5028
Review URL: https://codereview.webrtc.org/1821513003
Cr-Commit-Position: refs/heads/master@{#12159}
- The interleaved_ field. Never set to anything but 'true'. AudioFrame data appears to always be treated as interleaved.
- The Append() method.
- operator-=().
BUG=
Review URL: https://codereview.webrtc.org/1830713003
Cr-Commit-Position: refs/heads/master@{#12152}
WebRtcIsacfix_PitchFilterCore requires indW32 >= PITCH_FRACORDER - 2;
otherwise, it will read from entries of ubufQQ that haven't been
written yet. (The problem of indW32 being too small has only been seen
in fuzzer tests, not in real life.)
BUG=chromium:581901
Review URL: https://codereview.webrtc.org/1811453002
Cr-Commit-Position: refs/heads/master@{#12047}
Except in places where this would break out-of-tree code,
such as Chromium.
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1785173002
Cr-Commit-Position: refs/heads/master@{#12037}
Reason for revert:
The openmax_dl include change breaks downstream projects.
Original issue's description:
> Add check_deps rules in DEPS files.
>
> Add fine-grained check_deps rules for all of WebRTC.
> This will help both maintaining sane dependencies and provides a way
> to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.
>
> Example:
> buildtools/checkdeps/graphdeps.py --root=. --format=png \
> --out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
> --excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'
>
> will produce a neat webrtc.png image showcasing the dependencies
> (according to the DEPS file) for the bitrate_controller module.
> Some dependencies are filtered out for readability.
>
> BUG=webrtc:5623
> TESTED=Passing runs using:
> buildtools/checkdeps/checkdeps.py --root=. talk
> buildtools/checkdeps/checkdeps.py --root=. webrtc
>
> R=tommi@webrtc.org
>
> Committed: https://crrev.com/086f851b7b9b4bcbd4fe507c3bf83b760bd7f4d9
> Cr-Commit-Position: refs/heads/master@{#12008}
TBR=tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5623
Review URL: https://codereview.webrtc.org/1808573002
Cr-Commit-Position: refs/heads/master@{#12009}
Add fine-grained check_deps rules for all of WebRTC.
This will help both maintaining sane dependencies and provides a way
to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.
Example:
buildtools/checkdeps/graphdeps.py --root=. --format=png \
--out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
--excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'
will produce a neat webrtc.png image showcasing the dependencies
(according to the DEPS file) for the bitrate_controller module.
Some dependencies are filtered out for readability.
BUG=webrtc:5623
TESTED=Passing runs using:
buildtools/checkdeps/checkdeps.py --root=. talk
buildtools/checkdeps/checkdeps.py --root=. webrtc
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1796413002 .
Cr-Commit-Position: refs/heads/master@{#12008}
- Clean up unused methods in voe::Channel following removal of VoEDtmf APIs.
BUG=webrtc:4690
Review URL: https://codereview.webrtc.org/1785643006
Cr-Commit-Position: refs/heads/master@{#11976}
The test code created an AudioBuffer object inside the work loop. This
turned out to be expensive, since the AudioBuffer ctor implicitly
called memset on all of the audio data array. The obvious remedy is to
create the buffer outside of the loop. This does not have any impact
apart from the performance boost, since the output data from NetEq is
not even considered in the test.
BUG=chromium:592907,webrtc:5647
TBR=ivoc@webrtc.org
NOTRY=true
Review URL: https://codereview.webrtc.org/1782803002
Cr-Commit-Position: refs/heads/master@{#11940}
- Use better types in AudioSendStream::SendTelephoneEvent() and related methods.
BUG=webrtc:4690
Review URL: https://codereview.webrtc.org/1722253002
Cr-Commit-Position: refs/heads/master@{#11927}
We want this because otherwise the ACM uses its mutex to protect an
encoder that's owned by someone else. That someone else may easily
slip up and delete or otherwise touch the encoder before making sure
that the ACM has stopped using it, bypassing the lock.
BUG=webrtc:5028
Review URL: https://codereview.webrtc.org/1702943002
Cr-Commit-Position: refs/heads/master@{#11909}
This copies the contents (unittest excluded) of base/numerics in
chromium to base/numerics in webrtc. Files added:
- safe_conversions.h
- safe_conversions_impl.h
- safe_math.h
- safe_math_impl.h
A really old version of safe_conversions[_impl].h previously existed in
base/, this has been deleted and sources using it have been updated
to include the new base/numerics/safe_converions.h.
This CL also adds a DEPS file to webrtc/base.
NOPRESUBMIT=True
BUG=webrtc:5548, webrtc:5623
Review URL: https://codereview.webrtc.org/1753293002
Cr-Commit-Position: refs/heads/master@{#11907}
The type is included in the AudioFrame output parameter.
Rename the type NetEqOutputType to just OutputType, since it is now
internal to NetEq.
BUG=webrtc:5607
Review URL: https://codereview.webrtc.org/1769883002
Cr-Commit-Position: refs/heads/master@{#11903}
This change essentially does two things:
1. Remove the VAD-related methods from AcmReceiver. These are
EnableVad(), DisableVad(), and vad_enabled(). None of them were used
outside of unit tests.
2. Move the functionality to set AudioFrame::speech_type_ and
AudioFrame::vad_activity_ inside NetEq. This was previously done in
AcmReceiver, but based on information inherently owned by NetEq.
With the change in 2, NetEq's GetAudio interface can be simplified by
removing the output type parameter. This will be done in a follow-up
CL.
BUG=webrtc:5607
Review URL: https://codereview.webrtc.org/1772583002
Cr-Commit-Position: refs/heads/master@{#11902}
Sparse macro replaced for all audio histograms that have a constant name.
BUG=webrtc:5283
Review URL: https://codereview.webrtc.org/1762863003
Cr-Commit-Position: refs/heads/master@{#11885}
With this change, NetEq now uses AudioFrame as output type, like the
surrounding functions in ACM and VoiceEngine already do.
The computational savings is probably slim, since one memcpy is
removed while another one is added (both in AcmReceiver::GetAudio).
More simplifications and clean-up will be done in
AcmReceiver::GetAudio in future CLs.
BUG=webrtc:5607
Review URL: https://codereview.webrtc.org/1750353002
Cr-Commit-Position: refs/heads/master@{#11874}
Renamed the new variant of EncodeInternal to EncodeImpl, so that
subclasses implementing one of the EncodeInternal don't need to
explicitly contain 'using AudioEncoder::EncodeInternal' to avoid their
implementation hiding the other variant of EncodeInternal. This causes
a warning (treated as an error) when building using GCC.
Review URL: https://codereview.webrtc.org/1764583003
Cr-Commit-Position: refs/heads/master@{#11868}
For backwards compatibility, I've added kept the old interface to
Encode() and EncodeInternal and created default implementations of both
variants of EncodeInternal(), each calling the other. At least one of
the variants must be implemented in a subclass or we'll run out of stack
and explode. Would be nice if we could catch that before runtime. :/
The new interface to EncodeInternal() is protected, since it should
never be called from the outside.
Was unable to mark the old EncodeInternal() as RTC_DEPRECATED, since the
default implementaion of the new variant needs to call it to work around
old implementations. The old Encode() variant is deprecated, at least.
Added a test for backwards compatibility in audio_encoder_unittest.cc.
For the added test I broke out MockEncodeHelper from
audio_encoder_copy_red_unittest.cc and renamed it MockAudioEncoderHelper.
Review URL: https://codereview.webrtc.org/1725143003
Cr-Commit-Position: refs/heads/master@{#11823}
By doing an unsigned instead of a signed addition, we get the exact
same machine code (in non-UBSan builds), but no longer trigger
undefined behavior since unsigned overflow is defined behavior.
BUG=webrtc:5485
Review URL: https://codereview.webrtc.org/1734883003
Cr-Commit-Position: refs/heads/master@{#11776}
The array is reset in Init() but not the indexer. This makes the start point undefined after Init() for re-initializing an AudioLoop. This can be fixed.
BUG=
Review URL: https://codereview.webrtc.org/1727353002
Cr-Commit-Position: refs/heads/master@{#11739}
Previously, we relied on the encoded stream to come to an end before
the end of the buffer. This is a bad idea, since it is possible to
craft a stream that fills the buffer while decoding to less than the
expected amount of data; without the new checks introduced here, this
causes the decoder to read past the end of the input buffer.
BUG=chromium:582471, chromium:587852
Review URL: https://codereview.webrtc.org/1721593004
Cr-Commit-Position: refs/heads/master@{#11734}
With this change the following tests have been successfully
passing in the iOS Simulator for iPhone 5 and iOS 9:
* audio_decoder_unittests
* common_video_unittests
* modules_tests
* rtc_api_objc_tests
* rtc_pc_unittests
* system_wrappers_unittests
* voice_engine_unittests
The modules_unittests and common_audio_unittests are
handled in https://codereview.webrtc.org/1698033002/
BUG=webrtc:4755
NOTRY=True
Review URL: https://codereview.webrtc.org/1694353003
Cr-Commit-Position: refs/heads/master@{#11646}
In some cases, the decoder can write outside of an allocated array. See
the new comment in the code for more details.
BUG=chromium:568885, webrtc:5305
Review URL: https://codereview.webrtc.org/1704463002
Cr-Commit-Position: refs/heads/master@{#11641}
In some cases, the decoder can read outside of an allocated array. See
the new comment in the code for more details.
BUG=chromium:568889, webrtc:5305
Review URL: https://codereview.webrtc.org/1700973002
Cr-Commit-Position: refs/heads/master@{#11637}
Both were related to very large jumps in RTP timestamps.
BUG=webrtc:5488
Review URL: https://codereview.webrtc.org/1685103002
Cr-Commit-Position: refs/heads/master@{#11569}
In some rare occations (very low energy signal), a shift value happened
to be negative. This is now fixed by using the WEBRTC_SPL_SHIFT_W32,
which in essence checks the sign of the number of shifts and performs a
right or left shift accordingly.
The fix reverts to how the code was written in old NetEq; see
4d363ae305/webrtc/modules/audio_coding/neteq/normal.c (165).
BUG=webrtc:5490
Review URL: https://codereview.webrtc.org/1675293002
Cr-Commit-Position: refs/heads/master@{#11546}
This pulls in several fixes and gets Visual Studio 2015 support.
The new repo is located at https://github.com/gflags/gflags
which is mirrored in Chrome infrastructure at
https://chromium.googlesource.com/external/github.com/gflags/gflags
New configuration headers were generated according to README.webrtc
on Windows and Linux. I verified the Linux generated ones are working
on Mac. The generating headers on Mac are identical with only a minor
difference (an __unused attribute) that doesn't effect the build.
BUG=webrtc:5185
NOTRY=True
NOPRESUBMIT=True
TESTED=Successfully ran:
out/Release/video_quality_measurement --input_filename=resources/foreman_cif.yuv --width=352 --height=288
to verify flags are still being parsed properly.
I also ran the compile trybots and the baremetal bots
(since they run tests that have gflags flags).
Review URL: https://codereview.webrtc.org/1679263002
Cr-Commit-Position: refs/heads/master@{#11539}
If a StatisticsCalculator::PeriodicUmaAverage object was created and
then deleted without any samples being logged, the destructor would call
the Metric() method, which calculated sum_/counter_. However, with no
samples logged, counter_ is 0.
This was found and verified using UBSan tests; see the bug for more info.
BUG=webrtc:5490
R=ivoc@webrtc.org
Review URL: https://codereview.webrtc.org/1678773003
Cr-Commit-Position: refs/heads/master@{#11534}
This is needed because the target is defined in webrtc/common.gyp
and its current location crosses package boundaries when generating
projects for some build systems.
NOTRY=True
Review URL: https://codereview.webrtc.org/1665603003
Cr-Commit-Position: refs/heads/master@{#11496}
Visual Studio 2015 balks at the implicit truncation of values. Easily fixed with an explicit cast.
Fixed redefinition of CLOCKS_PER_SEC when using Visual Studio 2015 and the Windows 10 SDK. CLOCKS_PER_SEC is also defined in "<WIN10 SDK DIR>\include\10.0.10240.0\ucrt\time.h" and also has the value of 1000
Hiding snprintf definition if building with Visual Studio 2015
Fixed C4573 compiler complaint in audio_processing_impl_locking_unittest.cc.
BUG=webrtc:5183
Review URL: https://codereview.webrtc.org/1412653006
Cr-Commit-Position: refs/heads/master@{#11434}
This will make it easier for future CLs to make them optional.
BUG=webrtc:5028
Review URL: https://codereview.webrtc.org/1625363002
Cr-Commit-Position: refs/heads/master@{#11381}
This should have been done in commit 11340, but it was left out by
mistake.
BUG=webrtc:5028
Review URL: https://codereview.webrtc.org/1631443002
Cr-Commit-Position: refs/heads/master@{#11378}