48 Commits

Author SHA1 Message Date
Arun Raghavan
0a0050746b Fix up XMM intrinsics usage on MSVC 2024-12-24 12:02:19 -05:00
Arun Raghavan
06157f1659 build: Use Visual Studio-specific flags for AVX
Needed for now, but unstable-simd is likely a better fix for all our
SIMD building.
2024-12-24 12:02:19 -05:00
Arun Raghavan
c6abf6cd3f Bump to WebRTC M120 release
Some API deprecation -- ExperimentalAgc and ExperimentalNs are gone.
We're continuing to carry iSAC even though it's gone upstream, but maybe
we'll want to drop that soon.
2024-12-24 11:05:39 -05:00
L. E. Segovia
9a202fb8c2 file_wrapper.h: Fix build with GCC13
It is a missed instance of cdec109331de34958a892a1418d67806b171b862 (!31).

Fixes #32
2024-04-04 18:32:39 -03:00
Ben Brown
f89958d824 Bring arch.h in line with upstream webrtc
Largely to bring in preprocessor support for additional architectures as
based on 6215ba804eb500f3e28b39088c73af3c4f4cd10a by
Timothy Gu <timothygu99@gmail.com>:

Add preprocessor support for additional architectures

- _M_ARM is used by Microsoft [1]
- __riscv and __riscv_xlen are defined by [2]
- __sparc and __sparc__ are documented at [3]
- __MIPSEB__, __PPC__, __PPC64__ are documented at [3] and used in
  Chromium's build/build_config.h [4]
  Note: Chromium assumes that all PowerPC architectures are 64-bit. This
  is in fact not true.

[1]: https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-160
[2]: feca479356 (cc-preprocessor-definitions)
[3]: https://sourceforge.net/p/predef/wiki/Architectures/
[4]: https://source.chromium.org/chromium/chromium/src/+/master:build/build_config.h;drc=e12bf2e5ff1eacb9aca3e9a26bdeebdbdad5965a
2023-11-29 16:59:12 +00:00
Arun Raghavan
bc401b3cbf build: Expose absl as a dependency of webrtc-audio-processing
This is needed because the audio processing header references
abseil's optional.h. Clean up the declared dependencies while we're at
it.

Fixes: https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/34
2023-08-13 17:42:29 -04:00
Martin Jansa
cdec109331 file_utils.h: Fix build with gcc-13
* add missing include as reported by gcc-13:
webrtc/modules/audio_processing/transient/file_utils.cc:11:
../webrtc-audio-processing-1.0/webrtc/modules/audio_processing/transient/file_utils.h:36:35: error: 'uint8_t' does not name a type
   36 | int ConvertByteArrayToFloat(const uint8_t bytes[4], float* out);
      |                                   ^~~~~~~
webrtc/modules/audio_processing/transient/file_utils.h:17:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   16 | #include "rtc_base/system/file_wrapper.h"
  +++ |+#include <cstdint>
   17 |

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2023-05-25 18:13:04 -04:00
Nirbheek Chauhan
096b0eaed2 meson: Fixes for MSVC build
winsock2.h must be included before windows.h or alternative
definitions of `struct sockaddr` are defined.

```
FAILED: webrtc/rtc_base/liblibbase.a.p/logging.cc.obj
"cl" "-Iwebrtc\rtc_base\liblibbase.a.p" "-Iwebrtc\rtc_base" "-I..\webrtc\rtc_base" "-Iwebrtc" "-I..\webrtc" "-Isubprojects\abseil-cpp-20230125.1" "-I..\subprojects\abseil-cpp-20230125.1" "/MD" "/nologo" "/showIncludes" "/utf-8" "/Zc:__cplusplus" "/W2" "/EHsc" "/std:c++17" "/permissive-" "/O2" "/Zi" "-DWEBRTC_LIBRARY_
IMPL" "-DWEBRTC_ENABLE_SYMBOL_EXPORT" "-DNDEBUG" "-DWEBRTC_WIN" "-D_WIN32" "-U__STRICT_ANSI__" "-D__STDC_FORMAT_MACROS=1" "-DNOMINMAX" "-DWEBRTC_ENABLE_AVX2" "/Fdwebrtc\rtc_base\liblibbase.a.p\logging.cc.pdb" /Fowebrtc/rtc_base/liblibbase.a.p/logging.cc.obj "/c" ../webrtc/rtc_base/logging.cc
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(103): warning C4005: 'AF_IPX': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(457): note: see previous definition of 'AF_IPX'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(147): warning C4005: 'AF_MAX': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(476): note: see previous definition of 'AF_MAX'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(187): warning C4005: 'SO_DONTLINGER': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(399): note: see previous definition of 'SO_DONTLINGER'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(240): error C2011: 'sockaddr': 'struct' type redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(482): note: see declaration of 'sockaddr'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(442): error C2143: syntax error: missing '}' before 'constant'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(442): error C2059: syntax error: 'constant'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C2143: syntax error: missing ';' before '}'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...
```
2023-05-26 03:17:31 +05:30
Arun Raghavan
6064932abf Add missing header for C++17 compatibility
Hopefully we can drop this change with the next update.
2021-10-19 18:06:37 -04:00
Arun Raghavan
ff85c98683 Some fixes for MinGW
* Rename Windows.h uses to windows.h
  * Comment out structured exception handling usage

Makes MinGW happier. Mostly the same as previous work by
Nicolas Dufresne <nicolas.dufresne@collabora.com>, with the exception
that we now don't try to invoke RaiseException which would fail in MinGW
as it raises a Windows structured exception.
2021-10-19 16:09:07 -04:00
Ryo Kawaguchi
57ec282d4f Remove rnn_vad_tool.cc that contains main(). 2021-09-08 12:21:50 +00:00
Arun Raghavan
6e37f37c4e build: Split out iSAC VAD sources into a separate dependency
Avoid having to link webrtc-audio-processing with webrtc-audio-coding,
and makes the required symbols directly available.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/22>
2021-06-19 13:06:12 -04:00
Arun Raghavan
b8ad0dfc22 build: Add framework deps on macOS and iOS
Part-of: <https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/21>
2021-06-18 23:44:18 -04:00
Zhaofeng Li
e47b68df57 arch.h: Add RISC-V support 2021-06-17 01:48:37 +00:00
Arun Raghavan
589a744585 Fix build on Android
There's a bit of system integration that we haven't pulled in (as it has
transitive dependencies), so we manually stub it out.
2021-06-05 18:16:18 -04:00
Arun Raghavan
e5402cd638 build: Fix up some ARM-related mistakes 2020-11-27 14:03:06 -05:00
Arun Raghavan
21d78a4267 build: Make packages versioned
Since we cannot rely on the API to be stable upstream, let's start
making the pkg-config, library, and include dir have a version suffix.
This will allow different downstream projects depending on us to
independently switch versions without packagers having to jump through
hoops.
2020-10-23 13:30:23 -04:00
Arun Raghavan
bcec8b0b21 Update to current webrtc library
This is from the upstream library commit id
3326535126e435f1ba647885ce43a8f0f3d317eb, corresponding to Chromium
88.0.4290.1.
2020-10-23 13:30:23 -04:00
Guillaume Desmottes
34efc689c2 add webrtc-audio-coding public library
This new lib contains the bare minimum to implement an iSAC encoder and
decoder.

The webrtc files have been copied from the revision as the existing
imported files (c8b569e0a7ad0b369e15f0197b3a558699ec8efa).
2020-03-27 14:52:22 +01:00
Guillaume Desmottes
301110c655 remove autotools
In Meson we trust.
2020-03-24 14:10:59 +01:00
Svante Signell
9def8cf10d Add support for non-Linux GNU
GNU/Hurd and GNU/kFreeBSD have basically the same userland as GNU/Linux,
just not the same kernel.
2019-08-31 23:00:29 +02:00
Matthew Waters
eb398328ab Initial meson build files 2018-10-28 23:25:18 +11:00
Nicolas Dufresne
b8be6d1095 build: Use -no-undefined to support both clang and gcc 2016-07-14 12:57:43 +09:00
Nicolas Dufresne
c9cffb9e3d build: Sync defines and libs with build.gn 2016-07-14 12:57:43 +09:00
Nicolas Dufresne
6ad2f51e9e Add missing windows conditions variable
Those are used by generic RW lock implementation.

https://bugs.freedesktop.org/show_bug.cgi?id=96754
2016-07-14 12:57:43 +09:00
Nicolas Dufresne
bf6b9de143 build: Properly select the right system wrappers
This is needed for windows build to be usable.

https://bugs.freedesktop.org/show_bug.cgi?id=96754
2016-07-14 12:57:43 +09:00
Nicolas Dufresne
44cf7726ca build: Don't blindly link to pthread
This otherwise breaks the build on Android and Windows. The flag is
required on some Linux builds, and is readded in a subsequent commit.

https://bugs.freedesktop.org/show_bug.cgi?id=96754
2016-07-14 12:57:28 +09:00
Nicolas Dufresne
560f300a3d build: Add cerbero gnustl support for Android 2016-07-14 12:49:29 +09:00
Nicolas Dufresne
bf25c45e54 Add missing windows specific headers
https://bugs.freedesktop.org/show_bug.cgi?id=96754
2016-07-14 12:38:42 +09:00
Rex Dieter
066cf53da7 build: Make sure files with SSE2 code are compiled with -msse2
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
2016-06-21 16:46:48 +05:30
Rex Dieter
d58164e4d8 build: enforce linking with --no-undefined, add explicit -lpthread
In investigating x86/sse2 issues in recent webrtc-audio-processing-0.2
release, I found that it was possible for libwebrtc_audio_processing to
contain undefined symbols.

Attached is a patch that addresses this:
* adds -Wl,--no-undefined to libwebrtc_audio_processing_la_LDFLAGS
* adds explicit -lpthread linkage (else, there are undefined references
  to pthread-related symbols)

Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
2016-06-01 10:09:45 +05:30
Arun Raghavan
34abadd258 Update code to current Chromium master
This corresponds to:

Chromium: 6555f9456074c0c0e5f7713564b978588ac04a5d
webrtc: c8b569e0a7ad0b369e15f0197b3a558699ec8efa
2015-11-04 13:11:30 +05:30
Arun Raghavan
66cdc2e923 common_audio: Remove extraneous header
This one is left over from a previous version of the code base.
2015-11-04 13:11:30 +05:30
Arun Raghavan
a6e73f4d94 build: Conditionally build C variants of assembler-optimised code 2015-10-19 11:48:52 +05:30
Arun Raghavan
7d9c65b625 build: Define assembler flags where required 2015-10-19 11:41:13 +05:30
Arun Raghavan
2f0b9411d3 system_wrappers: Add missing file for ARM builds 2015-10-19 11:32:48 +05:30
Arun Raghavan
e5a6e18f13 Drop redundant header 2015-10-15 16:18:47 +05:30
Arun Raghavan
9d68f7efef build: Fix distcheck 2015-10-15 16:18:47 +05:30
Arun Raghavan
98454ed265 build: Add architecture checks for x86 and ARM
On x86, SSE optimisations are always compiled in, and used based on
runtime checks.

On ARM, we try to autodetect NEON support (with an option of runtime
detection). This has not been build-tested on ARM yet.

This leaves MIPS to be done.
2015-10-15 16:18:47 +05:30
Arun Raghavan
12e9e1eafd build: Fix up include file paths 2015-10-15 16:18:47 +05:30
Arun Raghavan
9b4e8dc83c debug: Update protobuf file
This isn't used it, but let's keep it up to date
2015-10-15 16:18:47 +05:30
Arun Raghavan
926b543a2f build: Drop old gpyi file 2015-10-15 16:18:47 +05:30
Arun Raghavan
7fcd4d2df5 build: More build fixes and cleanups 2015-10-15 16:18:47 +05:30
Arun Raghavan
e68571d456 build: Some fixes for make distcheck 2015-10-15 16:18:47 +05:30
Arun Raghavan
407bfbf651 build: Make build succeed without test and non-audio deps 2015-10-15 16:18:47 +05:30
Arun Raghavan
753eada3aa Update audio_processing module
Corresponds to upstream commit 524e9b043e7e86fd72353b987c9d5f6a1ebf83e1

Update notes:

 * Pull in third party license file

 * Replace .gypi files with BUILD.gn to keep track of what changes
   upstream

 * Bunch of new filse pulled in as dependencies

 * Won't build yet due to changes needed on top of these
2015-10-15 16:18:45 +05:30
Arun Raghavan
5ae7a5d6cd Update system_wrappers
Corresponds to upstream commit 524e9b043e7e86fd72353b987c9d5f6a1ebf83e1
2015-10-15 16:18:39 +05:30
Arun Raghavan
c4fb4e38de Update common_audio
Corresponds to upstream commit 524e9b043e7e86fd72353b987c9d5f6a1ebf83e1

Update notes:

 * Moved src/ to webrtc/ to easily diff against the third_party/webrtc
   in the chromium tree

 * ARM/NEON/MIPS support is not yet hooked up

 * Tests have not been copied
2015-10-15 16:18:25 +05:30