ArrayView is an alias to std::span. This change switch to use
std::span directly instead of through the alias.
Search&Replace MakeArrayView and ArrayView with std::span
Search&Replace include "api/array_view.h" with include <span>
Remove <span> include where std::span is not mentioned in the file
Remove build dependencies on array_view target
Bug: webrtc:439801349
Change-Id: I64bbdcf1300126286158ccbeda62c49e0c3ec83f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/460501
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47294}
VAD Split filter is design such that, in some specific cases, signed
integer overflow can occurs. Those are fine and will only affect the
output audio making some clicks and/or digital noise.
Bug: webrtc:490331112
Change-Id: Ib4a2eb01a84f6b11e7be0d3df55a892379018178
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/457301
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47173}
Added a check to ensure element_count * element_size does not overflow
size_t. Subsequent writes to the buffer could result in out-of-bounds
heap writes if the multiplication wraps around to a small number.
Bug: None
Change-Id: I0a37dfdf19fcee8b19765e8aec316d0886876d09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/456460
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47164}
This is achieved by moving most anonymous namespaces inside the
webrtc namespace and modifying as appropriate.
Bug: None
Change-Id: Iff299c45f92ae5aaa736722ed6630df9ad5525bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/454240
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47077}
This uncovered the fact that its descent into third_party was
not yet prevented; added running gclient sync -f to the script so that
changes outside our repo would be reverted.
Bug: None
Change-Id: I18f4e75c57174b765ed941a062ed00613874f324
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/441061
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46602}
This CL eliminates the issue of quantization in the 2-band splitfilter
in WebRTC APM
The code change has been tested offline on recordings and shown to
perform well.
Change-Id: Ic9b5cf35e040429afb7d0077a8dac6a6e208b4f9
Bug: webrtc:454152425
Change-Id: Ic9b5cf35e040429afb7d0077a8dac6a6e208b4f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/419200
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46022}
These have now been approved.
Bug: chromium:419413343
Bug: chromium:419413497
Change-Id: I1191aa46e7893fa2e0469b90ed9ba53b168b4af9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/410780
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Jordan Brown <rop@google.com>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45813}
this generally produces too many false positives, in particular for ArrayView, doing it once produced some useful results.
drive-by: fix double typo "ConvertsToTimeDela" to "ConvertToTimeDelta".
Bug: webrtc:424706384
Change-Id: I7f05f1985b5778fcaef6317984602ebcd75f430d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/403508
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45334}
This CL also takes out NOLINT statements that were
added because I was running a too-old clang-tidy.
Suggestions for better algorithms welcome.
Bug: webrtc:424706384
Change-Id: Ib4f237e15ee65168d65d17c7bda9ec3f1a881b7f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/404160
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45328}
Drive-by: Exclude from analysis a couple of .get() that clang-tidy is wrong about removing.
Bug: webrtc:424706384
Change-Id: I843170b04ceed70f4eb6f131cc1f0ad72394c5b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/403540
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45317}
https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-smartptr-get.html
and
https://clang.llvm.org/extra/clang-tidy/checks/readability/named-parameter.html (which resulted only in a single change)
Done using
tools/clang/scripts/build_clang_tools_extra.py \
--fetch out/Default clang-tidy clang-apply-replacements
ninja -C out/Default
gn gen out/Default --export-compile-commands
cd out/Default
tools/clang/third_party/llvm/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -p . \
-clang-tidy-binary tools/clang/third_party/llvm/build/bin/clang-tidy \
-clang-apply-replacements-binary \
tools/clang/third_party/llvm/build/bin/clang-apply-replacements \
-checks='-*,readability-redundant-smartptr-get,readability-named-parameter' \
-fix
followed by
git cl format
Bug: webrtc:424706384
Change-Id: Ie5a4077286d34c1363a1d341aca50a7047f6543b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/402584
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#45247}
Done using
tools/clang/scripts/build_clang_tools_extra.py \
--fetch out/Default clang-tidy clang-apply-replacements
ninja -C out/Default
gn gen out/Default --export-compile-commands
cd out/Default
tools/clang/third_party/llvm/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -p . \
-clang-tidy-binary out/Default/tools/clang/third_party/llvm/build/bin/clang-tidy \
-clang-apply-replacements-binary \
out/Default/tools/clang/third_party/llvm/build/bin/clang-apply-replacements \
-checks='-*,modernize-deprecated-headers' \
-fix
followed by
git cl format
and a round of IWYU followed by more git cl format.
Bug: webrtc:424706384
Change-Id: Icd004fa4c834002416f2196261b6ef215ebe47d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/401145
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#45196}
et al followed by
find common_audio/ -name "*.h" -o -name "*.cc" | xargs tools_webrtc/iwyu/apply-include-cleaner
followed by
tools_webrtc/gn_check_autofix.py -C out/Default/
and
git cl format
C style headers were replaced with their C++ equivalents where they
showed up in the diff.
Bug: webrtc:42226242
Change-Id: Ic3f87925c93141c72dc8ce2ed7cf673dfd74851a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/397062
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45135}
Fold GetCPUFeaturesARM() functionality into webrtc::cpu_info::Supports(), since it was only used to test for Neon support.
Bug: webrtc:42228262
Change-Id: If72a90e4d4edd695256cb36f8e074e7c15f43f75
No-iwyu: Avoid unrelated changes
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/393783
Auto-Submit: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44783}
This test utility can be used for performance critical code that
must either perform no or a known quantity of heap allocations.
AllocationCounter can be used to count the number of allocations
done within a specific scope and pass/fail a test based on the
expected number of heap allocations.
To begin with there's one test included:
common_audio_unittests \
--gtest_filter=AllocationCounterTest.CountsHeapAllocations
Bug: webrtc:0
Change-Id: Id349b33d10e147388b65319c63233bd3652d833c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/393040
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44745}
Since we're using views, there's liberal checking that the dimensions
are correct when calling methods such as CopySamples().
This allows us to remove error checks when calling Resample methods.
Bug: chromium:335805780
Change-Id: Ib7af879d3e7e7a84e4f10148ccc264b95134ef19
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/390922
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44669}
Part of modernizing to C++20.
Bug: None
No-IWYU: Other cleanup
Change-Id: I2c53789d845486436f37c887b216e7d502c915ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/392104
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44662}
A follow up change will remove the version with raw pointers.
Bug: chromium:335805780
Change-Id: I8f5a18b152222daf5ce0abfb230f3e38a4e9e25e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369741
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44608}
WebRTC has unified all namespaces to webrtc, and the rtc:: and cricket::
name specifiers need to be replaced with webrtc::. This was generated using
a combination of clang AST rewriting tools and sed.
This CL was uploaded by git cl split.
Bug: webrtc:42232595
Change-Id: I001340df7e3724ad53e608875dd71e1c3a10b8ee
No-Iwyu: LSC
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/386680
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44394}
After applying this change, I reformatted the previously formatted files
and verified no changes were applied.
Bug: webrtc:42225392
Change-Id: I6079e1e85d94ae2bc892db1db81bc8223b3a08b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374040
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43698}
I'm now going to format all C files as well. Formatting done via:
git ls-files | grep -E '^common_audio/signal_processing.*\.c$' | xargs clang-format -i
I split it because there are many formatting changes, so its easier to
review.
No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: Ic0f1752aa670984f8cda665dc2ef03ad32581797
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373886
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43697}
There were a few typos in the README file.
Bug: chromium:362397579
Change-Id: Ib0aa84f57f3d83851f085e595ffa72a53ec8311d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370880
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43525}
Set use_default_launcher=false in rtc_test on android
Bug: webrtc:42223878
Change-Id: If05da40b420d5da8f9e0f39560eb07380ebada14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368921
Owners-Override: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43505}
Also CHECK in OutputPathWithRandomDirectory. This function is used in tests that need a unique folder to avoid interaction with other tests that may run in parallel. Continuing with a non-unique folder if the creation fails, is likely to cause surprising errors later on.
Bug: webrtc:379973428
Change-Id: I6a30ef9034be8132e2362eff5e46e3b99b30acd2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368542
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43431}