| 1 |
The WebRtc source is cloned from the repo: |
| 2 |
https://webrtc.googlesource.com/src |
| 3 |
dated Apr 21 2021 |
| 4 |
license: third_party/webrtc_aec3/LICENSE |
| 5 |
|
| 6 |
The abseil's source in src/absl is not part of WebRtc and taken separately from: |
| 7 |
https://github.com/abseil/abseil-cpp |
| 8 |
dated Apr 20 2021 |
| 9 |
abseil's license: src/absl/LICENSE |
| 10 |
|
| 11 |
src/third_party's source is obtained from: |
| 12 |
* rnnoise |
| 13 |
https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/rnnoise |
| 14 |
dated Apr 30 2021 |
| 15 |
license: src/third_party/rnnoise/COPYING |
| 16 |
|
| 17 |
* pffft |
| 18 |
https://bitbucket.org/jpommier/pffft/src/master/ |
| 19 |
dated Apr 30 2021 |
| 20 |
license: src/third_party/pffft/README.txt |
| 21 |
|
| 22 |
Local changes: |
| 23 |
1. Undeclared PR_SET_NAME on Android. |
| 24 |
diff --git a/third_party/webrtc_aec3/src/rtc_base/platform_thread_types.cc b/third_party/webrtc_aec3/src/rtc_base/platform_thread_types.cc |
| 25 |
index b0243b41d..fc7a09000 100644 |
| 26 |
--- a/third_party/webrtc_aec3/src/rtc_base/platform_thread_types.cc |
| 27 |
+++ b/third_party/webrtc_aec3/src/rtc_base/platform_thread_types.cc |
| 28 |
@@ -105,7 +105,7 @@ void SetCurrentThreadName(const char* name) { |
| 29 |
} __except (EXCEPTION_EXECUTE_HANDLER) { // NOLINT |
| 30 |
} |
| 31 |
#pragma warning(pop) |
| 32 |
-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID) |
| 33 |
+#elif defined(WEBRTC_LINUX) // || defined(WEBRTC_ANDROID) |
| 34 |
prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); // NOLINT |
| 35 |
#elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS) |
| 36 |
pthread_setname_np(name); |
| 37 |
|
| 38 |
2. Error: 'unique_ptr' is not a member of 'std' on Linux. |
| 39 |
diff --git a/third_party/webrtc_aec3/src/modules/audio_processing/aec3/reverb_model_estimator.h b/third_party/webrtc_aec3/src/modules/audio_processing/aec3/reverb_model_estimator.h |
| 40 |
index 3b9971aba..e4e954067 100644 |
| 41 |
--- a/third_party/webrtc_aec3/src/modules/audio_processing/aec3/reverb_model_estimator.h |
| 42 |
+++ b/third_party/webrtc_aec3/src/modules/audio_processing/aec3/reverb_model_estimator.h |
| 43 |
@@ -12,6 +12,7 @@ |
| 44 |
#define MODULES_AUDIO_PROCESSING_AEC3_REVERB_MODEL_ESTIMATOR_H_ |
| 45 |
|
| 46 |
#include <array> |
| 47 |
+#include <memory> |
| 48 |
#include <vector> |
| 49 |
|
| 50 |
3. Visual Studio will choose one implementation from the source code with the same file name. |
| 51 |
Rename these files: |
| 52 |
- third_party/webrtc_aec3/src/common_audio/signal_processing/{splitting_filter.c => splitting_filter2.c} |
| 53 |
- third_party/webrtc_aec3/src/modules/audio_processing/agc2/rnn_vad/{vector_math_avx2.cc => rnn_vector_math_avx2.cc} |
| 54 |
- third_party/webrtc_aec3/src/system_wrappers/source/{cpu_features.cc => cpu_features2.cc} |
| 55 |
|
| 56 |
4. error C2011: 'sockaddr': 'struct' type redefinition |
| 57 |
diff --git a/third_party/webrtc_aec3/src/rtc_base/logging.cc b/third_party/webrtc_aec3/src/rtc_base/logging.cc |
| 58 |
index a333d8397..e0e669b5e 100644 |
| 59 |
--- a/third_party/webrtc_aec3/src/rtc_base/logging.cc |
| 60 |
+++ b/third_party/webrtc_aec3/src/rtc_base/logging.cc |
| 61 |
@@ -15,6 +15,7 @@ |
| 62 |
#if RTC_LOG_ENABLED() |
| 63 |
|
| 64 |
#if defined(WEBRTC_WIN) |
| 65 |
+#include <winsock2.h> |
| 66 |
|
| 67 |
5. ARM64 support build for Visual Studio. |
| 68 |
diff --git a/third_party/webrtc_aec3/src/third_party/pffft/src/pffft.c b/third_party/webrtc_aec3/src/third_party/pffft/src/pffft.c |
| 69 |
index d76d35167..2d8b1037f 100644 |
| 70 |
--- a/third_party/webrtc_aec3/src/third_party/pffft/src/pffft.c |
| 71 |
+++ b/third_party/webrtc_aec3/src/third_party/pffft/src/pffft.c |
| 72 |
@@ -148,7 +148,7 @@ typedef __m128 v4sf; |
| 73 |
/* |
| 74 |
ARM NEON support macros |
| 75 |
*/ |
| 76 |
-#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__arm__) || defined(__aarch64__) || defined(__arm64__)) |
| 77 |
+#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__arm__) || defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64)) |
| 78 |
# include <arm_neon.h> |
| 79 |
typedef float32x4_t v4sf; |
| 80 |
# define SIMD_SZ 4 |
| 81 |
|
| 82 |
6. Add support for loongarch64 |
| 83 |
diff --git a/third_party/webrtc_aec3/src/rtc_base/system/arch.h b/third_party/webrtc_aec3/src/rtc_base/system/arch.h |
| 84 |
index be2367b85..62aaba88b 100644 |
| 85 |
--- a/third_party/webrtc_aec3/src/rtc_base/system/arch.h |
| 86 |
+++ b/third_party/webrtc_aec3/src/rtc_base/system/arch.h |
| 87 |
@@ -73,6 +73,9 @@ |
| 88 |
#elif defined(__riscv) && __riscv_xlen == 32 |
| 89 |
#define WEBRTC_ARCH_32_BITS |
| 90 |
#define WEBRTC_ARCH_LITTLE_ENDIAN |
| 91 |
+#elif defined(__loongarch64) || defined(__loongarch64__) |
| 92 |
+#define WEBRTC_ARCH_LITTLE_ENDIAN |
| 93 |
+#define WEBRTC_ARCH_64_BITS |
| 94 |
#elif defined(__pnacl__) |
| 95 |
#define WEBRTC_ARCH_32_BITS |
| 96 |
#define WEBRTC_ARCH_LITTLE_ENDIAN |