This is a reland of 1ca8d87239
Original change's description:
> Support AVX2/FMA intrinsics in Audio Resampler module
>
> From the test result, using AVX2/FMA is 1.60x faster than SSE on atlas.
>
> Bug: webrtc:11663
> Test: common_audio_unittests on atlas and octopus.
> Change-Id: Ibd45ea46aa97d5790a24e5116f741592b95f6416
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176382
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31810}
Bug: webrtc:11663
Change-Id: I92f5832a42c0314853c9fead46425c08e2040dc0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181800
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31945}
From the test result, using AVX2/FMA is 1.60x faster than SSE on atlas.
Bug: webrtc:11663
Test: common_audio_unittests on atlas and octopus.
Change-Id: Ibd45ea46aa97d5790a24e5116f741592b95f6416
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176382
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31810}
A slight simplification of the NetEq code is also included.
The subtrees below common_audio, modules/audio_coding and
modules/audio_processing were scanned while making this CL.
Bug: webrtc:11680
Change-Id: I33bb1c75b2e3d1c6793fd1c5741ca59f4b6e8455
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178361
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31578}
This CL moves the two OOURA implementations present in the WebRTC tree
in one place.
No functional change is expected.
TBR=kwiberg@webrtc.org
No-Try: True
Bug: webrtc:11509
Change-Id: I330a9ec57e3dc65c9c8b43edd4bb295c55920efa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173682
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31106}
This CL changes so that the fft4g code is built as C++.
The CL also
-adds namespaces
-removes unused code.
To simplify the review, the CL is partitioned into different patchsets
where each comprising of one step in the modification of the code
(e.g., patch set 1 performs the renaming of the .c files to .cc).
Bug: webrtc:5298
Change-Id: I1dba78cc07c48622888be7b6f49a506795bc22ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171100
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30841}
This CL refactors and optimizes the 3-band split-filter in APM, which
is a very computationally complex component.
Beyond optimizing the code, the filter coefficients are also quantized
to avoid denormals.
The changes reduces the complexity of the split filter by about 30-50%.
The CL has been tested for bitexactness on a number of aecdump
recordings.
(the CL also removes the now unused code for the sparse_fir_filter)
Bug: webrtc:6181
Change-Id: If45f8d1f189c6812ccb03721156c77eb68181211
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168189
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30592}
Move definition of AlignedArray to the only code using it, the
test-only LappedTransform class, and delete unused methods.
Bug: webrtc:6424, webrtc:9577
Change-Id: I1bb5f57400f7217345b7ec7376235ad4c4bae858
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168701
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30576}
This CL adds support for reading and writing floating point
wav files in WebRTC. It also updates the former wav handling
code as well as adds some simplifications.
Beyond this, the CL also adds support in the APM data_dumper
and in the audioproc_f tool for using the floating point wav
format.
Bug: webrtc:11307
Change-Id: I2ea33fd12f590b6031ac85f75708f6cc88a266b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/162902
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30423}
`gn format` recently [1] changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.
Now that we've rolled in a GN binary with the change,
reformat all files so that people don't get presubmit
warnings due to this.
CL generated with:
$ git ls-files | grep BUILD.gn | xargs gn format
$ gn format build_overrides/build.gni
$ gn format build_overrides/gtest.gni
$ gn format modules/audio_coding/audio_coding.gni
$ gn format webrtc.gni
$ gn format .gn
Plus a few manual changes to add exceptions for
"public_deps" (after changing these lines the presubmit
started to complain).
[1] - https://gn-review.googlesource.com/c/gn/+/6860
Bug: webrtc:11302
Change-Id: Iac29d23c1618ebef925c972e2891cd9f4e8cd613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166882
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30334}
This CL removes the use of absl::InlineVector in the PushResampler which
causes real-time reallocations for setups with more than 8 channels.
As part of the CL, it also removes one dependency on absl for the
common_audio module.
Bug: webrtc:11197
Change-Id: I0788ee9a0f3d08b91bb18caa65f660fb52368a97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161729
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30059}
Static libraries don't guarantee that an exported symbol gets linked
into a shared library (and in order to support Chromium's component
build mode, WebRTC needs to be linked as a shared library).
Source sets always pass all the object files to the linker.
On the flip side, source_sets link more object files in release builds
and to avoid this, this CL introduces a the GN template "rtc_library" that
expands to static_library during release builds and to source_set during
component builds.
See: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_source_set
Bug: webrtc:9419
Change-Id: I4667e820c2b3fcec417becbd2034acc13e4f04fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157168
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29525}
Also, change test target from rtc_static_library to rtc_source_set so that it is actually linked and run.
Bug: webrtc:11010, webrtc:11037
Change-Id: I05173718ee7de8a9fad73b62c0efd0da4d4f1a7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157166
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29509}
This CL is a no-op since rtc_use_lto is always false and in general
such change should probably be implemented in
//build/config/compiler/BUILD.gn.
Bug: chromium:408997
Change-Id: Id37d3181e66e699f8cd535aee1af7609352a7259
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149833
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28919}
This CL removes all external access to the integer sample data in the
AudioBuffer class. It also removes the API in AudioBuffer that provides this.
The purpose of this is to pave the way for removing the sample
duplicating and implicit conversions between integer and floating point
sample formats which is done inside the AudioBuffer.
Bug: webrtc:10882
Change-Id: I1438b691bcef98278aef8e3c63624c367c2d12e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149162
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28912}
This CL changes the way that values are converted
between fixed and floating point to
-Avoid the former asymmetric conversion causing
nonlinear distortions.
-Reduce the complexity.
In contrast to the initial CL, the DCHECKS on the incoming sample
range was changed to limiting.
Bug: webrtc:6594
Change-Id: I8218dfd5c45388ad5aac61be453d2f28725a2475
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132783
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Original-Commit-Position: refs/heads/master@{#28867}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149169
Cr-Commit-Position: refs/heads/master@{#28897}
This reverts commit 67e43c8b95.
Reason for revert: speculative revert since we see failing bots on Android after this change
https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Android%20Tests%20%28dbg%29%20%28K%20Nexus5%29/4124
Original change's description:
> Correct conversion between float and fixed formats
>
> This CL changes the way that values are converted
> between fixed and floating point to
> -Avoid the former asymmetric conversion causing
> nonlinear distortions.
> -Reduce the complexity.
>
> Bug: webrtc:6594
> Change-Id: I64d0cc31c5d16f397686a59a062cfbc4b336d94d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132783
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28867}
TBR=henrik.lundin@webrtc.org,gustaf@webrtc.org,peah@webrtc.org
Change-Id: Id828a09de7075e48556fe2d0beba7a0c6ec227f6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6594
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149165
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28872}
This CL changes the way that values are converted
between fixed and floating point to
-Avoid the former asymmetric conversion causing
nonlinear distortions.
-Reduce the complexity.
Bug: webrtc:6594
Change-Id: I64d0cc31c5d16f397686a59a062cfbc4b336d94d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132783
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28867}
Some of the macros in format_macros.h follow the C standard and try to fill holes in it (on Windows). But this one has no direct equivalent in the standard and is just mimicking the naming convention. That's not nice.
References:
https://devblogs.microsoft.com/cppblog/c99-library-support-in-visual-studio-2013/https://stackoverflow.com/a/2524673
Change-Id: I53f3faca2976a5b5d4b04a67ffb56ae0f4e930b2
Bug: webrtc:10852
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147862
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28794}
Add seek methods to FileWrapper, and refactor WavReader to use that
class instead.
Bug: webrtc:6463
Change-Id: Ifbb1989a072da6280ea5fc04b4beff991614dd53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147265
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28770}
The last run-time logic for selecting function pointers was removed in
May 2016, here: https://codereview.webrtc.org/1955413003
It would be even better if we could eliminate the function pointers
entirely and just have different implementations that we select at
compile time; I've left a TODO asking for this.
Bug: webrtc:9553
Change-Id: Ica71d71e19759da00967168f6479b7eb8b46c590
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144053
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28414}
Only remaining user is WavReader. Demote its constructor
accepting a PlatformFile to private, to refactor implementation
in a later cl.
Bug: webrtc:6463
Change-Id: I7b950be6f02073cb135dd0fab1190b9dc0de1fba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144025
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28410}
Semi-automatically created with:
git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format
After this, two .cc files failed to compile and I have fixed them
manually.
Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
These are manual edits please verify there are no typos.
Feel free to auto-submit if there are no issues.
Bug: webrtc:10410
Change-Id: If995d9d9d21534d3c66a1e7c1fc1c62569766f40
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127627
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27138}
Googletest recently started replacing the term Test Case by Test Suite.
From now on, the preferred API is TestSuite*; the older TestCase* API
will be slowly deprecated.
This CL moves WebRTC to the new set of APIs.
More info in [1].
This CL has been generated with this script:
declare -A items
items[TYPED_TEST_CASE]=TYPED_TEST_SUITE
items[TYPED_TEST_CASE_P]=TYPED_TEST_SUITE_P
items[REGISTER_TYPED_TEST_CASE_P]=REGISTER_TYPED_TEST_SUITE_P
items[INSTANTIATE_TYPED_TEST_CASE_P]=INSTANTIATE_TYPED_TEST_SUITE_P
items[INSTANTIATE_TEST_CASE_P]=INSTANTIATE_TEST_SUITE_P
for i in "${!items[@]}"
do
git ls-files | xargs sed -i "s/\b$i\b/${items[$i]}/g"
done
git cl format
[1] - https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature
Bug: None
Change-Id: I5ae191e3046caf347aeee01554d5743548ab0e3f
Reviewed-on: https://webrtc-review.googlesource.com/c/118701
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26494}
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}
Wave files may contain optional chunks, such as a metadata one.
This CL makes WavReader tolerant to such chunks - it just ignores them.
For more details on the Wave format, please refer to
https://sites.google.com/site/musicgapi/technical-documents/wav-file-format.
Bug: webrtc:8762
Change-Id: Ie0e19dea75661808e7781f51faa1d0f0affeb3e1
Reviewed-on: https://webrtc-review.googlesource.com/c/40300
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25562}
This CL consistently use:
* relative paths for WebRTC dependent targets (test_support)
* absolute paths for shared dependent targets (abseil)
This is a necessary (but insufficient) step to build WebRTC tests
from Chromium tree (rtc_include_tests=true), since test/ doesn't
sit anymore in the top level directory.
We also make sure that target declarations and uses are
consistent in regard to build_with_chromium flag.
Bug: webrtc:9943
Bug: webrtc:9855
Change-Id: I21dea98894df2fd4bfe2fd7ee7b71ba971e0ab5b
Reviewed-on: https://webrtc-review.googlesource.com/c/108720
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25445}
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.
bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
Extract functionality of test_main into separate library to be able to
reuse it if another main will be required.
Bug: webrtc:5996
Change-Id: I2925b4240bd0e4fb884b43bb16667ca2d6216bbd
Reviewed-on: https://webrtc-review.googlesource.com/c/105921
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25172}
The PushResampler has a SincResampler per channel. Before this CL, it
was hard-coded to handle up to 2 channels. In this CL I made it handle
arbitrarily many.
Bug: webrtc:8649
Change-Id: Ia2f33e45535f8bbda59090f8a0847546ff7edd75
Reviewed-on: https://webrtc-review.googlesource.com/103000
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24928}
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}
LappedTransform is only used in BandwidthAdaptationTest and therefore it
should not be anymore a visible target under common_audio.
This CL moves LappedTransform and other two classes it depends on (and which
are not used elsewhere) to modules/audio_coding/codecs/opus/test.
Bug: webrtc:9577, webrtc:5298
Change-Id: I1aa8052c2df2b2b150c279c0c9b1001474aed47a
Reviewed-on: https://webrtc-review.googlesource.com/96440
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24509}
WebRTC internal headers are always included starting from the root
(e.g. #include "common_audio/..."), so there is no need to
specify the include_dirs removed by this CL.
Bug: webrtc:9538
Change-Id: Id2c070dad48c88dece3fea59e9dd0e64695ee298
Reviewed-on: https://webrtc-review.googlesource.com/89390
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24035}
This CL removes //build/config/clang:find_bad_constructs from the
suppressed_configs list, which means that clang:find_bad_constructs
is now enabled on these translation units.
Bug: webrtc:9251
Change-Id: I1607df2a3ad177e2f3023156eb8cf37857ae06ba
Reviewed-on: https://webrtc-review.googlesource.com/89041
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24002}
common_audio/fft4g.c is third party codem that have to be moved into
third_party folder, so to be able to do it at first we have to extract
it into separate target. It is extracted with corresponding header file
and will be moved in futher CL.
Bug: webrtc:8366
Change-Id: I586ca94d4e9242c23163b987fa334dfa705020ed
Reviewed-on: https://webrtc-review.googlesource.com/85372
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23742}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script passing top level directories except rtc_base and api
find $@ -type f \( -name \*.h -o -name \*.cc -o -name \*.mm \) \
-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: I9465c172e65ba6e6ed4e4fdc35b0b265038d6f71
Reviewed-on: https://webrtc-review.googlesource.com/84584
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23697}
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}
This lets us remove stringstreams from common_audio/
Bug: webrtc:8982
Change-Id: I450d87dc50090e838edabc7c1db645aca9c1b0f7
Reviewed-on: https://webrtc-review.googlesource.com/82163
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23609}
This removes the redundant type and replaces all usages. A slight change
in behavior is that we no longer get nanosecond resolution. This should
not matter since no current code requires nanosecond resolution.
Bug: webrtc:9155
Change-Id: I04334e08c686d95731621a6c8a7e40400d0ae3b2
Reviewed-on: https://webrtc-review.googlesource.com/71163
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23174}
During pitch search in the RNN VAD, we calculate auto
correlation. Before this CL, we computed kNumInvertedLags12kHz=147 dot
products of vectors with kBufSize12kHz-kMaxPitch12kHz=240
elements. This was the most time consuming step of the new VAD.
This CL makes the computation happen in frequency domain. Profiling
shows a 3x speed increase. In future, we can try using a more efficient
FFT and to reduce the FFT length to some of e.g. 400, 405, 432.
# For minimal Clang plugin check change.
TBR: kwiberg@webrtc.org
Bug: webrtc:9076
Change-Id: I688251a415869d53175a37f390f441d4e035d954
Reviewed-on: https://webrtc-review.googlesource.com/73366
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23171}
Follow-up CL of https://webrtc-review.googlesource.com/c/src/+/69641
in which the 3pp lib openmax_dl had been disabled (but not removed).
Bug: webrtc:9071
Change-Id: Id766e4a48ab255a86e13f5f5f1480aee88c428a5
Reviewed-on: https://webrtc-review.googlesource.com/74482
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23140}
In this code, the problem was that the ptr could sometimes point
outside of the allocated arrays, in particular before the array,
causing a pointer overflow warning. However, the memory pointed to was
never read or written while the pointer was off.
With this change, we keep an index instead of a pointer, which avoids
warnings for pointer overflow. The index might be negative at times,
but the index will not be used to address the arrays while negative.
Bug: webrtc:9166
Change-Id: I3a32d8e814660f43be9d4c94889d00ac3f8403a5
Reviewed-on: https://webrtc-review.googlesource.com/71165
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22951}
Commit bbf21a3fd6 ("Remove dependencies on
modules:module_api from AudioProcessing") causes the build to fail with
libstdc++ due to several files using memcpy(3) or memset(3) while relying on
string.h being included implicitly by other headers.
Bug: webrtc:9139
Change-Id: Ib73284962f8694d8bed0551968265bfd13cab967
Reviewed-on: https://webrtc-review.googlesource.com/70180
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#22895}
|is_posix| will be switched to false for Fuchsia, this is a preliminary change.
Bug: chromium:812974
Change-Id: I3bfda3e056ad1e5229834286ce5d095d9204a428
Reviewed-on: https://webrtc-review.googlesource.com/65782
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#22753}
This moves them from an API directory (system_wrappers/include/) to a
non-API directory, which is exactly what we want for utilities like
this.
BUG=webrtc:8445
Change-Id: I6dc34fe662f5d87b3b5288d33055345bc6bf91db
Reviewed-on: https://webrtc-review.googlesource.com/21164
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22567}
This moves it from an API directory (system_wrappers/include/) to a
non-API directory, which is exactly what we want for utilities like
this.
Bug: webrtc:8445
NOPRESUBMIT=true
Change-Id: I30d01fcb9cbe1427a7703a3cdd7befae751066b5
Reviewed-on: https://webrtc-review.googlesource.com/21982
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22550}
The real_fourier_openmax.h header should only be included when
RTC_USE_OPENMAX_DL is defined.
Bug: None
Change-Id: I70a9c7745e2c24d15c7bb510d432638a2c70eef9
Reviewed-on: https://webrtc-review.googlesource.com/56841
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22167}
The functions replace some existing code and will be used in the
the new AutomaticGainController.
Bug: webrtc:7949
Change-Id: I9a32132d4a4699a507b8548a2eac10972a2f3fd6
Reviewed-on: https://webrtc-review.googlesource.com/53141
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22045}
If a WebRTC build target requires gmock it has to include
test/gmock.h and just depend on //test:test_support.
Unfortunately //testtest_support was a leaky abstraction because it
wasn't propagating the correct -I compiler flag. To make everything
work, all the targets that use gmock started also to depend on
//testing/gmock (even if they were not including any gmock header
directly).
This CL makes //testtest_support propagate the include path up in the
dependency chain so it is possible to remove unused dependencies.
Note: all_dependent_configs should probably be used in the original
gmock target. There is an ongoing discussion about it. This CL solves
the problem on WebRTC side and it is forward compatible.
TBR=phoglund@webrtc.org
Bug: webrtc:8603
Change-Id: If08daf2ce9a6431a6e881a236743b4ec33b59ea7
Reviewed-on: https://webrtc-review.googlesource.com/44340
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21776}
We have done changes to the Audio Processing fuzzer here
https://webrtc-review.googlesource.com/c/src/+/36500/6.
We ran the new version of the fuzzer locally. The UBSAN
detector found these (minor) issues.
We have used the Godbolt compiler explorer to check that similar
changes produce identical compiled code.
Bug: webrtc:7820
Change-Id: I9cc3b81e4be7cf691f878c37010ce105bc2f3e38
Reviewed-on: https://webrtc-review.googlesource.com/39264
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21605}
This reverts commit c73e1f4378.
Reason for revert:
The problem with failed deps in chrome content/renderer had already been fixed in https://webrtc-review.googlesource.com/c/src/+/38660
Original change's description:
> Revert "GN rtc_* templates: Set default visibility to webrtc_root + "/*""
>
> This reverts commit 588c548657.
>
> Reason for revert:
>
> Breaks Chrome FYI:
>
> /b/c/b/Linux_Builder/src/buildtools/linux64/gn gen //out/Release --check
> -> returned 1
> ERROR at //build/split_static_library.gni:12:5: Dependency not allowed.
> static_library(target_name) {
> ^----------------------------
> The item //content/renderer:renderer
> can not depend on //third_party/webrtc/media:rtc_internal_video_codecs
> because it is not in //third_party/webrtc/media:rtc_internal_video_codecs's visibility list: [
> //third_party/webrtc/*
> //third_party/webrtc_overrides/*
> ]
>
> https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.webrtc.fyi%2FLinux_Builder%2F23560%2F%2B%2Frecipes%2Fsteps%2Fgenerate_build_files%2F0%2Fstdout
>
> Original change's description:
> > GN rtc_* templates: Set default visibility to webrtc_root + "/*"
> >
> > This means that by default, targets are visible to everything under
> > the WebRTC root, but not visible to anything else.
> >
> > API targets are manually tagged with visibility "*", so that targets
> > outside the WebRTC tree can see them.
> >
> > BUG=webrtc:8254
> >
> > Change-Id: Icdbee6e0d22d93240ff2fb530c8f9dc48e351509
> > Reviewed-on: https://webrtc-review.googlesource.com/24140
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#21548}
>
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org
>
> Change-Id: I06620ce3d6f67482935c22efa231dd6cab91625a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8254
> Reviewed-on: https://webrtc-review.googlesource.com/38760
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21555}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,perkj@webrtc.org
Change-Id: I6f720078ce21bd172e0a6471bae8c4c011e4a657
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8254
Reviewed-on: https://webrtc-review.googlesource.com/38860
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21558}
This reverts commit 588c548657.
Reason for revert:
Breaks Chrome FYI:
/b/c/b/Linux_Builder/src/buildtools/linux64/gn gen //out/Release --check
-> returned 1
ERROR at //build/split_static_library.gni:12:5: Dependency not allowed.
static_library(target_name) {
^----------------------------
The item //content/renderer:renderer
can not depend on //third_party/webrtc/media:rtc_internal_video_codecs
because it is not in //third_party/webrtc/media:rtc_internal_video_codecs's visibility list: [
//third_party/webrtc/*
//third_party/webrtc_overrides/*
]
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.webrtc.fyi%2FLinux_Builder%2F23560%2F%2B%2Frecipes%2Fsteps%2Fgenerate_build_files%2F0%2Fstdout
Original change's description:
> GN rtc_* templates: Set default visibility to webrtc_root + "/*"
>
> This means that by default, targets are visible to everything under
> the WebRTC root, but not visible to anything else.
>
> API targets are manually tagged with visibility "*", so that targets
> outside the WebRTC tree can see them.
>
> BUG=webrtc:8254
>
> Change-Id: Icdbee6e0d22d93240ff2fb530c8f9dc48e351509
> Reviewed-on: https://webrtc-review.googlesource.com/24140
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21548}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org
Change-Id: I06620ce3d6f67482935c22efa231dd6cab91625a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8254
Reviewed-on: https://webrtc-review.googlesource.com/38760
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21555}
This means that by default, targets are visible to everything under
the WebRTC root, but not visible to anything else.
API targets are manually tagged with visibility "*", so that targets
outside the WebRTC tree can see them.
BUG=webrtc:8254
Change-Id: Icdbee6e0d22d93240ff2fb530c8f9dc48e351509
Reviewed-on: https://webrtc-review.googlesource.com/24140
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21548}
One reason for the circular deps is that common_types.h is a
historical dumping ground for various structs and defines that
are believed to be generally useful. I tried moving things out
that did not appear to be used downstream (StreamCounters,
RtpCounters etc) and moved the things that seemed used
(RtpHeader + supporting structs) to a new file api/rtp_headers.h.
This makes their place in the api more clear while moving out
the things that don't belong in the API in the first place.
I had to extract out typedefs.h from webrtc_common to resolve
another circular dependency. I believe checks includes typedefs,
but common depends on checks.
Bug: webrtc:7745
Change-Id: I725d49616b1ec0cdc8b74be7c078f7a4d46f084b
Reviewed-on: https://webrtc-review.googlesource.com/33001
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21295}
This splits things out of rtc_base and makes dependencies explicit.
Bug: webrtc:6828
Change-Id: Id521896c3c43595349021c857bec216e429a0c8d
Reviewed-on: https://webrtc-review.googlesource.com/32780
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21264}
This splits things out of rtc_base and makes dependencies explicit.
Bug: webrtc:6828
Change-Id: Ib813c7bd9e4de7ab015acb917bc09ee7204ba7bd
Reviewed-on: https://webrtc-review.googlesource.com/31940
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21245}