This is a first draft of what we're hoping to use to create all
AudioDecoder instances. Follow-up CLs will start using this internally
in NetEq instead of calling constructors manually.
BUG=webrtc:5801
Review-Url: https://codereview.webrtc.org/1917163002
Cr-Commit-Position: refs/heads/master@{#12548}
Reason for revert:
There seems an error made in this patch.
Hi Henrik,
I think the bit shift returned by CrossCorrelationWithAutoShift may be wrongly used by DotProduct.
We'd better revert this CL.
Doing another fix (and future fixes) will be paintful. I will work on a easy-to-modify bitexactness test first.
Original issue's description:
> Avoiding overflow in cross correlation in NetEq.
>
> BUG=
TBR=henrik.lundin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Review-Url: https://codereview.webrtc.org/1925053002
Cr-Commit-Position: refs/heads/master@{#12543}
Specifically, this change replaces peak_period_counter_ms_ with
peak_period_stopwatch_ which obtains a Stopwatch object from
TickTimer. Necessary plumbing to get the TickTimer through to the
DelayPeakDetector is also included.
BUG=webrtc:5608
NOTRY=True
Review-Url: https://codereview.webrtc.org/1921163003
Cr-Commit-Position: refs/heads/master@{#12542}
Changed DecoderDatabase::IsComfortNoise to do one, rather than four,
lookups of the rtp payload type. IsComfortNoise is called more frequently
since CNG was changed to not be an AudioDecoder.
BUG=606765
Review URL: https://codereview.webrtc.org/1923763003
Cr-Commit-Position: refs/heads/master@{#12533}
With this change, the NetEqImpl constructor takes a struct
(NetEqImpl::Dependencies) as input instead of a collection of
individual dependencies. The NetEqImpl unit test fixture is modified
to make better used of unique_ptrs.
Review URL: https://codereview.webrtc.org/1921243002
Cr-Commit-Position: refs/heads/master@{#12514}
Any file that uses the RTC_DISALLOW_* macros should #include
"webrtc/base/constructormagic.h", but a shocking number of them don't.
This causes trouble when we try to wean files off of #including
scoped_ptr.h, since a bunch of files get their constructormagic macros
only from there.
Rather than fixing these errors one by one as they turn up, this CL
simply ensures that every file in the WebRTC tree that uses the
RTC_DISALLOW_* macros #includes "webrtc/base/constructormagic.h".
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1917043005
Cr-Commit-Position: refs/heads/master@{#12509}
This change makes use of the TickTimer::Stopwatch in Packets. When a
packet is inserted into the PacketBuffer, a Stopwatch object is
attached to it. When the packet is extracted from the buffer, the
Stopwatch is read to know how long the packet waited in the buffer.
BUG=webrtc:5608
Review URL: https://codereview.webrtc.org/1917913002
Cr-Commit-Position: refs/heads/master@{#12508}
The audio_decoder_interface and audio_encoder_interface
targets are depending on rtc_base_approved headers but don't
declare such dependencies.
NOTRY=True
Review URL: https://codereview.webrtc.org/1916953002
Cr-Commit-Position: refs/heads/master@{#12500}
The TickTimer is incremented on each call to GetAudioInternal(). Other
than that, the new object is not used yet.
Also adding a unit test in NetEqImplTest to verify that the tick timer
is incremented in the call to NetEq::GetAudio.
BUG=webrtc:5608
Review URL: https://codereview.webrtc.org/1903153005
Cr-Commit-Position: refs/heads/master@{#12493}
Broke out CNG from AudioDecoder as they didn't really share an interface.
Converted the CNG code to C++, to make initialization and resource handling easier. This includes several changes to the behavior, favoring RTC_CHECKs over returning error codes.
Review URL: https://codereview.webrtc.org/1868143002
Cr-Commit-Position: refs/heads/master@{#12491}
The new class is intended to be used as a central time-keeping object
inside NetEq. The actual use of the class will come in subsequent
changes.
BUG=webrtc:5608
Review URL: https://codereview.webrtc.org/1910523003
Cr-Commit-Position: refs/heads/master@{#12477}
They can all benefit from moving, since they contain std::string and
std::vector. We intended to add these in
https://codereview.webrtc.org/1896953004/, but got compiler errors we
couldn't make sense of, so we skipped them. It turns out that what the
compiler was complaining about was that when we said we'd have a
user-defined move constructor, it stopped generating a copy assignment
operator for us. This CL solves the problem by outfitting the types
with defaulted copy and move assignment operators too.
Review URL: https://codereview.webrtc.org/1899173002
Cr-Commit-Position: refs/heads/master@{#12469}
This will allow us to fix the sample rate of each AudioDecoder at
instantiation time.
This change results in different checksums for the following tests:
AcmReceiverBitExactnessOldApi.8kHzOutput
AcmReceiverBitExactnessOldApi.16kHzOutput
AcmReceiverBitExactnessOldApi.32kHzOutput
AcmReceiverBitExactnessOldApi.48kHzOutputExternalDecoder
AcmReceiverBitExactnessOldApi.48kHzOutput
Because they make an ACM and then ask it to decode both 16 kHz and 32
kHz iSAC. (The arm32 and arm64 checksums didn't change, because the
tests skip 32 kHz iSAC on arm.)
BUG=webrtc:5801
Review URL: https://codereview.webrtc.org/1908923002
Cr-Commit-Position: refs/heads/master@{#12463}
The fs_hz member variable is going away too, being replaced by a
method in the AudioDecoder interface. If we ever end up needing the
RTP sample rate here, a method ought to be the right solution for that
too.
BUG=webrtc:5801
Review URL: https://codereview.webrtc.org/1907183002
Cr-Commit-Position: refs/heads/master@{#12462}
By eliminating one of the two constructors, handling decoder ownership
with a unique_ptr instead of a raw pointer, and making all member
variables const (except one, which is made private instead).
BUG=webrtc:5801
Review URL: https://codereview.webrtc.org/1899733002
Cr-Commit-Position: refs/heads/master@{#12425}
Remove the deprecated EncodeInternal interface from AudioEncoder
Also hid MaxEncodedBytes by making it private. It will get removed as soon as subclasses have had time to remove their overrides.
BUG=webrtc:5591
Review URL: https://codereview.webrtc.org/1881003003
Cr-Commit-Position: refs/heads/master@{#12409}
Reason for revert:
Broke import. Implementations of the old interface still exists somewhere.
Original issue's description:
> Remove the deprecated EncodeInternal interface from AudioEncoder
>
> Also hid MaxEncodedBytes by making it private. It will get removed as soon as subclasses have had time to remove their overrides.
>
> BUG=webrtc:5591
>
> Committed: https://crrev.com/5222d315dbea8f3563c100cc9f2451907f70b05f
> Cr-Commit-Position: refs/heads/master@{#12329}
TBR=kwiberg@webrtc.org,solenberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5591
Review URL: https://codereview.webrtc.org/1883543002
Cr-Commit-Position: refs/heads/master@{#12330}
Also hid MaxEncodedBytes by making it private. It will get removed as soon as subclasses have had time to remove their overrides.
BUG=webrtc:5591
Review URL: https://codereview.webrtc.org/1864993002
Cr-Commit-Position: refs/heads/master@{#12329}
With this change, the return value from NetEq::GetPlayoutTimestamp is
empty if the latest call to NetEq::GetAudio resulted in comfort noise
(codec-internal or external) being played out. This is because the
playout timestamp is not updated during CNG, and can therefore not be
trusted.
A few unit tests were updated to reflect the change.
BUG=webrtc:5669
Review URL: https://codereview.webrtc.org/1861303002
Cr-Commit-Position: refs/heads/master@{#12268}
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}