- Update to version 1.3: * build: Bump version to 1.3 * meson: Fix generation of pkgconfig files * build: Bump version to 1.2 * meson: Update minimum version based on what abseil wrap needs * build: Expose absl as a dependency of webrtc-audio-processing * meson: Update to latest wrap, install required absl headers * doc: Update tarball generation process * file_utils.h: Fix build with gcc-13 * meson: Fixes for MSVC build * meson: Ensure that abseil is built with c++17 too * More changes not listed by upstream. Check the following link to see them: https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/commits/v1.3 - Add patch that fixes some compiler "control reaches end of non-void function" errors: * fix-build.patch - Add patch that fixes i586 build: * fix-i586.patch - Disable patches until they're rebased to the current codebase: * big_endian_support.patch * big_endian_support_2.patch - Rebased patches: * webrtc-ppc64.patch * webrtc-s390x.patch OBS-URL: https://build.opensuse.org/request/show/1111520 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/webrtc-audio-processing?expand=0&rev=19
127 lines
6.2 KiB
Diff
127 lines
6.2 KiB
Diff
Index: webrtc-audio-processing-1.3/webrtc/third_party/pffft/src/pffft.c
|
|
===================================================================
|
|
--- webrtc-audio-processing-1.3.orig/webrtc/third_party/pffft/src/pffft.c
|
|
+++ webrtc-audio-processing-1.3/webrtc/third_party/pffft/src/pffft.c
|
|
@@ -131,7 +131,7 @@ inline v4sf ld_ps1(const float *p) { v4s
|
|
/*
|
|
SSE1 support macros
|
|
*/
|
|
-#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__x86_64__) || defined(_M_X64) || defined(i386) || defined(__i386__) || defined(_M_IX86))
|
|
+#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__x86_64__) || defined(_M_X64) || defined(i386) || defined(__i386__) || defined(_M_IX86)) && defined(__SSE2__)
|
|
|
|
#include <xmmintrin.h>
|
|
typedef __m128 v4sf;
|
|
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
|
|
===================================================================
|
|
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
|
|
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
|
|
@@ -88,6 +88,7 @@ void ComputeFrequencyResponse_Neon(
|
|
|
|
#if defined(WEBRTC_ARCH_X86_FAMILY)
|
|
// Computes and stores the frequency response of the filter.
|
|
+__attribute__((target("sse2")))
|
|
void ComputeFrequencyResponse_Sse2(
|
|
size_t num_partitions,
|
|
const std::vector<std::vector<FftData>>& H,
|
|
@@ -207,9 +208,10 @@ void AdaptPartitions_Neon(const RenderBu
|
|
} while (p < lim2);
|
|
}
|
|
#endif
|
|
-
|
|
+
|
|
#if defined(WEBRTC_ARCH_X86_FAMILY)
|
|
// Adapts the filter partitions. (SSE2 variant)
|
|
+__attribute__((target("sse2")))
|
|
void AdaptPartitions_Sse2(const RenderBuffer& render_buffer,
|
|
const FftData& G,
|
|
size_t num_partitions,
|
|
@@ -375,6 +377,7 @@ void ApplyFilter_Neon(const RenderBuffer
|
|
|
|
#if defined(WEBRTC_ARCH_X86_FAMILY)
|
|
// Produces the filter output (SSE2 variant).
|
|
+__attribute__((target("sse2")))
|
|
void ApplyFilter_Sse2(const RenderBuffer& render_buffer,
|
|
size_t num_partitions,
|
|
const std::vector<std::vector<FftData>>& H,
|
|
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/matched_filter.cc
|
|
===================================================================
|
|
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/aec3/matched_filter.cc
|
|
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/matched_filter.cc
|
|
@@ -143,7 +143,7 @@ void MatchedFilterCore_NEON(size_t x_sta
|
|
#endif
|
|
|
|
#if defined(WEBRTC_ARCH_X86_FAMILY)
|
|
-
|
|
+__attribute__((target("sse2")))
|
|
void MatchedFilterCore_SSE2(size_t x_start_index,
|
|
float x2_sum_threshold,
|
|
float smoothing,
|
|
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/fft_data.h
|
|
===================================================================
|
|
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/aec3/fft_data.h
|
|
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/fft_data.h
|
|
@@ -48,7 +48,7 @@ struct FftData {
|
|
rtc::ArrayView<float> power_spectrum) const {
|
|
RTC_DCHECK_EQ(kFftLengthBy2Plus1, power_spectrum.size());
|
|
switch (optimization) {
|
|
-#if defined(WEBRTC_ARCH_X86_FAMILY)
|
|
+#if defined(WEBRTC_ARCH_X86_FAMILY) && defined(__SSE2__)
|
|
case Aec3Optimization::kSse2: {
|
|
constexpr int kNumFourBinBands = kFftLengthBy2 / 4;
|
|
constexpr int kLimit = kNumFourBinBands * 4;
|
|
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/vector_math.h
|
|
===================================================================
|
|
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/aec3/vector_math.h
|
|
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/vector_math.h
|
|
@@ -43,7 +43,7 @@ class VectorMath {
|
|
void SqrtAVX2(rtc::ArrayView<float> x);
|
|
void Sqrt(rtc::ArrayView<float> x) {
|
|
switch (optimization_) {
|
|
-#if defined(WEBRTC_ARCH_X86_FAMILY)
|
|
+#if defined(WEBRTC_ARCH_X86_FAMILY) && defined(__SSE2__)
|
|
case Aec3Optimization::kSse2: {
|
|
const int x_size = static_cast<int>(x.size());
|
|
const int vector_limit = x_size >> 2;
|
|
@@ -123,7 +123,7 @@ class VectorMath {
|
|
RTC_DCHECK_EQ(z.size(), x.size());
|
|
RTC_DCHECK_EQ(z.size(), y.size());
|
|
switch (optimization_) {
|
|
-#if defined(WEBRTC_ARCH_X86_FAMILY)
|
|
+#if defined(WEBRTC_ARCH_X86_FAMILY) && defined(__SSE2__)
|
|
case Aec3Optimization::kSse2: {
|
|
const int x_size = static_cast<int>(x.size());
|
|
const int vector_limit = x_size >> 2;
|
|
@@ -173,7 +173,7 @@ class VectorMath {
|
|
void Accumulate(rtc::ArrayView<const float> x, rtc::ArrayView<float> z) {
|
|
RTC_DCHECK_EQ(z.size(), x.size());
|
|
switch (optimization_) {
|
|
-#if defined(WEBRTC_ARCH_X86_FAMILY)
|
|
+#if defined(WEBRTC_ARCH_X86_FAMILY) && defined(__SSE2__)
|
|
case Aec3Optimization::kSse2: {
|
|
const int x_size = static_cast<int>(x.size());
|
|
const int vector_limit = x_size >> 2;
|
|
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/rnn_vad/rnn.cc
|
|
===================================================================
|
|
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/agc2/rnn_vad/rnn.cc
|
|
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/rnn_vad/rnn.cc
|
|
@@ -229,6 +229,7 @@ void ComputeFullyConnectedLayerOutput(
|
|
|
|
#if defined(WEBRTC_ARCH_X86_FAMILY)
|
|
// Fully connected layer SSE2 implementation.
|
|
+__attribute__((target("sse2")))
|
|
void ComputeFullyConnectedLayerOutputSse2(
|
|
size_t input_size,
|
|
size_t output_size,
|
|
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl.cc
|
|
===================================================================
|
|
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl.cc
|
|
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl.cc
|
|
@@ -57,6 +57,7 @@ void ErlComputer_NEON(
|
|
#if defined(WEBRTC_ARCH_X86_FAMILY)
|
|
// Computes and stores the echo return loss estimate of the filter, which is the
|
|
// sum of the partition frequency responses.
|
|
+__attribute__((target("sse2")))
|
|
void ErlComputer_SSE2(
|
|
const std::vector<std::array<float, kFftLengthBy2Plus1>>& H2,
|
|
rtc::ArrayView<float> erl) {
|