The Bazel build format doesn't support having separate
lists of compilation flags for C and C++; it just has a single
copts list for cc_library:
https://bazel.build/versions/master/docs/be/c-cpp.html#cc_binary.copts
This makes it hard to convert our GN targets to Bazel when there are
compiler warnings that aren't supported for C (like -Woverloaded-virtual
being added in bugs.webrtc.org/6653).
The solution for this is to move all .c files to their own targets
and remove C++-only compiler flags during conversion.
New targets:
//webrtc/common_audio:common_audio_c
//webrtc/common_audio:common_audio_neon_c
//webrtc/modules/audio_coding:g711_c
//webrtc/modules/audio_coding:g722_c
//webrtc/modules/audio_coding:ilbc_c
//webrtc/modules/audio_coding:isac_c
//webrtc/modules/audio_coding:isac_fix_c
//webrtc/modules/audio_coding:isac_test_util
//webrtc/modules/audio_coding:pcm16b_c
//webrtc/modules/audio_coding:webrtc_opusj_c
//webrtc/modules/audio_device:mac_portaudio
//webrtc/modules/audio_procssing:audio_processing_c
//webrtc/modules/audio_procssing:audio_processing_neon_c
This CL also adds a PRESUBMIT.py check that will throw an error
if targets are mixing .c and .cc files, to preven this from regressing.
BUG=webrtc:6653
NOTRY=True
Review-Url: https://codereview.webrtc.org/2550563003
Cr-Commit-Position: refs/heads/master@{#15433}
There's no longer any need to make the two arguments have the same
signedness, so we can remove a bunch of superfluous (and sometimes
dangerous) casts.
It turned out I also had to fix the safe_cmp functions to properly handle
enums that are implicitly convertible to integers.
NOPRESUBMIT=true
BUG=webrtc:6645
Review-Url: https://codereview.webrtc.org/2534683002
Cr-Commit-Position: refs/heads/master@{#15281}
There's no longer any need to make the two arguments have the same
signedness, so we can drop the "u" suffix on literal integer
arguments.
NOPRESUBMIT=true
BUG=webrtc:6645
Review-Url: https://codereview.webrtc.org/2535593002
Cr-Commit-Position: refs/heads/master@{#15280}
This change adds code that lets Opus increase the complexity setting
at low bitrates (only relevant for mobile where the default complexity
is not already maximum). The feature is default off.
Also adding a performance test to make sure the complexity adaptation
has desired effect.
BUG=webrtc:6708
Review-Url: https://codereview.webrtc.org/2503443002
Cr-Commit-Position: refs/heads/master@{#15182}
Reason for revert:
Breaks downstream projects:
error: undefined reference to 'rtc::ExpFilter::kValueUndefined'
error: undefined reference to 'rtc::ExpFilter::Apply(float, float)'
error: undefined reference to 'rtc::ExpFilter::Reset(float)'
rror: undefined reference to 'rtc::ExpFilter::UpdateBase(float)'
Original issue's description:
> Move smoothing filter to common audio.
>
> This will make the smoothing filter a basic tool that is going to be used by both voice engine and ANA.
>
> BUG=webrtc:6443
>
> Committed: https://crrev.com/a82395bf7cd15b7396456df06fe952ede8db0c39
> Cr-Commit-Position: refs/heads/master@{#15146}
TBR=minyue@webrtc.org,solenberg@webrtc.org,perkj@webrtc.org,tommi@webrtc.org,michaelt@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6443
Review-Url: https://codereview.webrtc.org/2510373002
Cr-Commit-Position: refs/heads/master@{#15147}
This will make the smoothing filter a basic tool that is going to be used by both voice engine and ANA.
BUG=webrtc:6443
Review-Url: https://codereview.webrtc.org/2484153002
Cr-Commit-Position: refs/heads/master@{#15146}
This is undefined behavior, according to specification.
BUG=chromium:661133
Review-Url: https://codereview.webrtc.org/2500953003
Cr-Commit-Position: refs/heads/master@{#15078}
This can happen in rare and strange cases.
Also taking the opportunity to replace all asserts with DCHECKs in
that file.
BUG=chromium:659225
Review-Url: https://codereview.webrtc.org/2499013002
Cr-Commit-Position: refs/heads/master@{#15070}
This fix is made to remove the discrepancy between GYP and GN audio_decoder_factory_interface target.
BUG=webrtc:6412
NOTRY=True
Review-Url: https://codereview.webrtc.org/2472643003
Cr-Commit-Position: refs/heads/master@{#14894}
With this change, instead of
RTC_DCHECK_GE(unsigned_var, 17u);
we can simply write
RTC_DCHECK_GE(unsigned_var, 17);
or even
RTC_DCHECK_GE(unsigned_var, -17); // Always true.
and the mathematically sensible thing will happen.
Perhaps more importantly, we can replace checks like
// index is size_t, num_channels is int.
RTC_DCHECK(num_channels >= 0
&& index < static_cast<size_t>(num_channels));
or, even worse, just
// Surely num_channels isn't negative. That would be absurd!
RTC_DCHECK_LT(index, static_cast<size_t>(num_channels));
with simply
RTC_DCHECK_LT(index, num_channels);
In short, you no longer have to keep track of the signedness of the arguments, because the sensible thing will happen.
BUG=webrtc:6645
Review-Url: https://codereview.webrtc.org/2459793002
Cr-Commit-Position: refs/heads/master@{#14878}
The timestamps are 32 bit and can (conceivably) be spaced far enough
apart for the calculation, which is done in Q4, to overflow.
BUG=chromium:653268
Review-Url: https://codereview.webrtc.org/2460393002
Cr-Commit-Position: refs/heads/master@{#14856}
Introduce a convention on categorizing GN targets:
1. Production code
2. Tests
3. Examples
4. Tools
The first two have targets spread out all over the tree,
while the latter are isolated to examples/ and tools/ directories.
Another new convention: Each directory's BUILD.gn file shall contain
a target named similar to the directory name. This target shall
contain the 'most common' production code, i.e. so that most
consumers of the directory can depend on only the directory
(which implicitly means that target in GN).
//webrtc:webrtc_tests is changed to depend on all WebRTC tests.
From now on, it's necessary to add new test targets to this dependency
tree in order to get them compiled.
Two new group targets are created:
//webrtc/modules/audio_coding:audio_coding_tests
//webrtc/modules/audio_processing:audio_processing_tests
to reduce the long list of tests in //webrtc:webrtc_tests.
Visibility on //webrtc:webrtc and //webrtc:webrtc_tests is restricted
to the root target, to avoid circular dependencies due to the monolithic
property of these targets (a problem we've had in the past).
The 'root' target at the top level is renamed to 'default', which means GN will
build this target instead of _all_ generated targets
(see https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/faq.md#Can-I-control-what-targets-are-built-by-default).
This target now depends on everything we want to build, meaning all targets now
explicitly needs to be wired up from the root target in order to get build.
Having this, the number of compiled objects on Android is decreased from 8855 to 6276. It also gives us better control over our build.
BUG=webrtc:6440
TESTED=git cl try --clobber
NOTRY=True
Review-Url: https://codereview.webrtc.org/2441383002
Cr-Commit-Position: refs/heads/master@{#14821}
It turns out that that audio network adaptor can always be created with knowledge of receiver frame length range. There is no need to keep some infrastructure that is used for runtime setting of receiver frame length ranges.
BUG=webrtc:6303
Review-Url: https://codereview.webrtc.org/2429503002
Cr-Commit-Position: refs/heads/master@{#14748}
PacketList is now list<Packet> instead of list<Packet*>.
Splicing the lists in NetEqImpl::InsertPacketInternal instead of
moving packets. Avoid moving the packet when doing Rfc3389Cng.
Removed PacketBuffer::DeleteFirstPacket and DeleteAllPackets.
BUG=chromium:657300
Review-Url: https://codereview.webrtc.org/2425223002
Cr-Commit-Position: refs/heads/master@{#14747}
Only three items in the (rather large) header were actually used after
InsertPacket: payloadType, timestamp and sequenceNumber. They are now
put directly into Packet. This saves 129 bytes per Packet that no
longer need to be allocated and deallocated.
This also works towards decoupling NetEq from RTP. As part of that,
I've moved the NACK code earlier in InsertPacketInternal, together
with other things that directly reference the RTPHeader.
BUG=webrtc:6549
Review-Url: https://codereview.webrtc.org/2411183003
Cr-Commit-Position: refs/heads/master@{#14658}
With this change, the calculations inside AverageIAT are changed to be
in double-precision floating point instead of in fixed point. Also,
the method's name is changed to EstimatedClockDriftPpm to better
reflect what it returns.
A few unit tests had to be updated because of minor numerical
differences.
Also removing the UBSan suppression related to this issue.
BUG=webrtc:5889
Review-Url: https://codereview.webrtc.org/2408653002
Cr-Commit-Position: refs/heads/master@{#14628}
This was an ill tested special case which turned out to be more problem
than benefit. The special case was only triggered when the decoder frame
size was smaller than 10 ms, which is more or less unsupported by NetEq.
Also fixed a bug in a test, a bug which was exposed by the code change.
BUG=chromium:654983
Review-Url: https://codereview.webrtc.org/2412883002
Cr-Commit-Position: refs/heads/master@{#14627}
This gets rid of a bit of codec-specific code in VoE.
BUG=webrtc:5805
Review-Url: https://codereview.webrtc.org/2355483003
Cr-Commit-Position: refs/heads/master@{#14614}
This CL deletes the old and not used video defines in
engine_configurations.h and pre-pends voice_ to indicate there are only
voice/audio defines left in the file.
BUG=none
R=solenberg@webrtc.org
Review URL: https://codereview.webrtc.org/2401673002 .
Cr-Commit-Position: refs/heads/master@{#14558}
Updating GN files, include paths, and include guards
BUG=None
NOTRY=True
NOPRESUBMIT=true
Review-Url: https://codereview.webrtc.org/2387113005
Cr-Commit-Position: refs/heads/master@{#14542}
The original CL (https://codereview.webrtc.org/2315633002) was
reverted since the fuzzer depended on gflags and files in the
resources folder; neither of this is allowed for a fuzzer test in
Chromium. This new version streamlines the dependencies, and changes
the test to generate a sinusoid input audio signal instead of reading
from a file.
Original commit message:
This CL introduces a new fuzzer target neteq_rtp_fuzzer that
manipulates the RTP header fields before inserting the packets into
NetEq. A few helper classes are also introduced.
BUG=webrtc:5447
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_chromium_rel_ng;master.tryserver.chromium.android:android_compile_dbg,linux_android_rel_ng;master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.chromium.mac:mac_chromium_rel_ng,ios-device
Review-Url: https://codereview.webrtc.org/2384423002
Cr-Commit-Position: refs/heads/master@{#14523}