Sync from SUSE:ALP:Source:Standard:1.0 webrtc-audio-processing revision 3359b25363aa46aa70faf001800fca6a

This commit is contained in:
Adrian Schröter 2023-12-28 01:18:45 +01:00
commit d20e6ece78
14 changed files with 770 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

20
_service Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<services>
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing.git</param>
<param name="revision">v1.3</param>
<param name="versionformat">1.3</param>
<!--
<param name="revision">master</param>
<param name="versionformat">@PARENT_TAG@+git%cd.%h</param>
-->
</service>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="manual" />
</services>

2
baselibs.conf Normal file
View File

@ -0,0 +1,2 @@
libwebrtc-audio-processing-1-3
libwebrtc-audio-coding-1-3

90
big_endian_support.patch Normal file
View File

@ -0,0 +1,90 @@
diff -up webrtc-audio-processing-0.2/webrtc/common_audio/wav_file.cc.than webrtc-audio-processing-0.2/webrtc/common_audio/wav_file.cc
--- webrtc-audio-processing-0.2/webrtc/common_audio/wav_file.cc.than 2016-05-24 08:28:45.749940095 -0400
+++ webrtc-audio-processing-0.2/webrtc/common_audio/wav_file.cc 2016-05-24 08:50:30.361020010 -0400
@@ -64,9 +64,6 @@ WavReader::~WavReader() {
size_t WavReader::ReadSamples(const size_t num_samples,
int16_t* const samples) {
-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
-#error "Need to convert samples to big-endian when reading from WAV file"
-#endif
size_t num_samples_left_to_read = num_samples;
size_t next_chunk_start = 0;
@@ -76,6 +73,12 @@ size_t WavReader::ReadSamples(size_t num
num_samples_left_to_read -= num_samples_read;
}
+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
+ //convert to big-endian
+ for(size_t idx = 0; idx < num_samples; idx++) {
+ samples[idx] = (samples[idx]<<8) | (samples[idx]>>8);
+ }
+#endif
return num_samples - num_samples_left_to_read;
}
@@ -120,10 +123,17 @@ WavWriter::~WavWriter() {
void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) {
#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
-#error "Need to convert samples to little-endian when writing to WAV file"
-#endif
+ int16_t * le_samples = new int16_t[num_samples];
+ for(size_t idx = 0; idx < num_samples; idx++) {
+ le_samples[idx] = (samples[idx]<<8) | (samples[idx]>>8);
+ }
+ const size_t written =
+ fwrite(le_samples, sizeof(*le_samples), num_samples, file_handle_);
+ delete []le_samples;
+#else
const size_t written =
fwrite(samples, sizeof(*samples), num_samples, file_handle_);
+#endif
RTC_CHECK_EQ(num_samples, written);
num_samples_ += static_cast<uint32_t>(written);
RTC_CHECK(written <= std::numeric_limits<uint32_t>::max() ||
diff -up webrtc-audio-processing-0.2/webrtc/common_audio/wav_header.cc.than webrtc-audio-processing-0.2/webrtc/common_audio/wav_header.cc
--- webrtc-audio-processing-0.2/webrtc/common_audio/wav_header.cc.than 2016-05-24 08:50:52.591379263 -0400
+++ webrtc-audio-processing-0.2/webrtc/common_audio/wav_header.cc 2016-05-24 08:52:08.552606848 -0400
@@ -129,7 +129,39 @@ static inline std::string ReadFourCC(uin
return std::string(reinterpret_cast<char*>(&x), 4);
}
#else
-#error "Write be-to-le conversion functions"
+static inline void WriteLE16(uint16_t* f, uint16_t x) {
+ *f = ((x << 8) & 0xff00) | ( ( x >> 8) & 0x00ff);
+}
+
+static inline void WriteLE32(uint32_t* f, uint32_t x) {
+ *f = ( (x & 0x000000ff) << 24 )
+ | ((x & 0x0000ff00) << 8)
+ | ((x & 0x00ff0000) >> 8)
+ | ((x & 0xff000000) >> 24 );
+}
+
+static inline void WriteFourCC(uint32_t* f, char a, char b, char c, char d) {
+ *f = (static_cast<uint32_t>(a) << 24 )
+ | (static_cast<uint32_t>(b) << 16)
+ | (static_cast<uint32_t>(c) << 8)
+ | (static_cast<uint32_t>(d) );
+}
+
+static inline uint16_t ReadLE16(uint16_t x) {
+ return (( x & 0x00ff) << 8 )| ((x & 0xff00)>>8);
+}
+
+static inline uint32_t ReadLE32(uint32_t x) {
+ return ( (x & 0x000000ff) << 24 )
+ | ( (x & 0x0000ff00) << 8 )
+ | ( (x & 0x00ff0000) >> 8)
+ | ( (x & 0xff000000) >> 24 );
+}
+
+static inline std::string ReadFourCC(uint32_t x) {
+ x = ReadLE32(x);
+ return std::string(reinterpret_cast<char*>(&x), 4);
+}
#endif
static inline uint32_t RiffChunkSize(uint32_t bytes_in_payload) {

View File

@ -0,0 +1,24 @@
diff -up webrtc-audio-processing-0.2/webrtc/typedefs.h.typedef webrtc-audio-processing-0.2/webrtc/typedefs.h
--- webrtc-audio-processing-0.2/webrtc/typedefs.h.typedef 2016-05-12 09:08:53.885000410 -0500
+++ webrtc-audio-processing-0.2/webrtc/typedefs.h 2016-05-12 09:12:38.006851953 -0500
@@ -48,7 +48,19 @@
#define WEBRTC_ARCH_32_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN
#else
-#error Please add support for your architecture in typedefs.h
+/* instead of failing, use typical unix defines... */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define WEBRTC_ARCH_BIG_ENDIAN
+#else
+#error __BYTE_ORDER__ is not defined
+#endif
+#if defined(__LP64__)
+#define WEBRTC_ARCH_64_BITS
+#else
+#define WEBRTC_ARCH_32_BITS
+#endif
#endif
#if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN))

60
fix-build.patch Normal file
View File

@ -0,0 +1,60 @@
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc
@@ -39,6 +39,7 @@ float GetLevel(const VadLevelAnalyzer::R
return vad_level.rms_dbfs;
break;
case LevelEstimatorType::kPeak:
+ default:
return vad_level.peak_dbfs;
break;
}
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -112,6 +112,7 @@ GainControl::Mode Agc1ConfigModeToInterf
case Agc1Config::kAdaptiveDigital:
return GainControl::kAdaptiveDigital;
case Agc1Config::kFixedDigital:
+ default:
return GainControl::kFixedDigital;
}
}
@@ -1852,6 +1853,7 @@ void AudioProcessingImpl::InitializeNois
return NsConfig::SuppressionLevel::k21dB;
default:
RTC_NOTREACHED();
+ return NsConfig::SuppressionLevel::k21dB; // Just to keep the compiler happy
}
};
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/include/audio_processing.cc
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/include/audio_processing.cc
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/include/audio_processing.cc
@@ -26,6 +26,7 @@ std::string NoiseSuppressionLevelToStrin
case AudioProcessing::Config::NoiseSuppression::Level::kHigh:
return "High";
case AudioProcessing::Config::NoiseSuppression::Level::kVeryHigh:
+ default:
return "VeryHigh";
}
}
@@ -38,6 +39,7 @@ std::string GainController1ModeToString(
case AudioProcessing::Config::GainController1::Mode::kAdaptiveDigital:
return "AdaptiveDigital";
case AudioProcessing::Config::GainController1::Mode::kFixedDigital:
+ default:
return "FixedDigital";
}
}
@@ -48,6 +50,7 @@ std::string GainController2LevelEstimato
case AudioProcessing::Config::GainController2::LevelEstimator::kRms:
return "Rms";
case AudioProcessing::Config::GainController2::LevelEstimator::kPeak:
+ default:
return "Peak";
}
}

126
fix-i586.patch Normal file
View File

@ -0,0 +1,126 @@
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) {

12
reduce-meson-dep.patch Normal file
View File

@ -0,0 +1,12 @@
Index: webrtc-audio-processing-1.3/meson.build
===================================================================
--- webrtc-audio-processing-1.3.orig/meson.build
+++ webrtc-audio-processing-1.3/meson.build
@@ -1,6 +1,6 @@
project('webrtc-audio-processing', 'c', 'cpp',
version : '1.3',
- meson_version : '>= 0.63',
+ meson_version : '>= 0.59.4',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized',
'c_std=c11',

BIN
webrtc-audio-processing-1.3.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,172 @@
-------------------------------------------------------------------
Mon Oct 30 16:42:04 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
- ExcludeArch s390, s390x and ppc64 since big endian support is
not implemented.
-------------------------------------------------------------------
Wed Sep 20 09:49:19 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
- Remove the tar.xz file. Having the obscpio file is enough
-------------------------------------------------------------------
Wed Sep 20 09:38:21 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
- Use also dashes instead of underscores in the manual Requires
-------------------------------------------------------------------
Wed Sep 20 09:04:13 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
- Rename the generated library package names to add a dash between
the name and soname (libwebrtc*-1-3 instead of libwebrtc*1-3)
- Rename the generated packages to use dashes instead of underscores
- Change baselibs.conf accordingly
- Add patch to reduce the required meson version so the package
builds in Leap 15.4/15.5:
* reduce-meson-dep.patch
-------------------------------------------------------------------
Fri Sep 08 10:40:12 UTC 2023 - alarrosa@suse.com
- 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
-------------------------------------------------------------------
Mon Aug 17 15:30:03 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 0.3.1:
* doc: file invalid reference to pulseaudio mailing list
* various build system fixes
- spec-cleaner run
-------------------------------------------------------------------
Fri Aug 2 08:23:00 UTC 2019 - Martin Liška <mliska@suse.cz>
- Use FAT LTO objects in order to provide proper static library.
-------------------------------------------------------------------
Thu Jan 12 08:32:04 UTC 2017 - olaf@aepfle.de
- Add baselibs.conf for gstreamer-plugins-bad-32bit
-------------------------------------------------------------------
Sat Jun 25 10:39:08 UTC 2016 - oholecek@suse.com
- Remove webrtc-aarch64.patch, no longer needed
- Adapt the rest of webrtc- patches to new arch naming
-------------------------------------------------------------------
Thu Jun 23 13:31:14 UTC 2016 - oholecek@suse.com
- Remove unneeded explicit version dependency for automake
-------------------------------------------------------------------
Wed Jun 22 11:55:11 UTC 2016 - oholecek@suse.com
- Update to 0.3
* build: enforce linking with --no-undefined, add explicit -lpthread
* build: Make sure files with SSE2 code are compiled with -msse2
- Remove no-undefined.patch
- Remove webrtc-audio-processing-0.2-x86_msse2.patch
-------------------------------------------------------------------
Mon Jun 20 13:02:06 UTC 2016 - oholecek@suse.com
- Add no-undefined.patch patch
https://cgit.freedesktop.org/pulseaudio/webrtc-audio-processing/patch/?id=d58164e4d87854233564b59e76259b72e21507f6
- Add big_endian_support_2.patch https://bugs.freedesktop.org/show_bug.cgi?id=95738
- Adapt webrtc-audio-processing-0.2-x86_msse2.patch to new version
- Adapt big_endian_support.patch to new version
-------------------------------------------------------------------
Mon May 30 09:00:51 UTC 2016 - oholecek@suse.com
- Add webrtc-audio-processing-0.2-x86_msse2.patch patch fixing 386 build
https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-May/026294.html
- Add big_endian_support.patch
https://bugs.freedesktop.org/show_bug.cgi?id=95738
- New automake version dependency >= 1.5
-------------------------------------------------------------------
Thu May 26 21:19:28 UTC 2016 - oholecek@suse.com
- Update to 0.2:
Contains API breaking changes.
Upstream changes include:
* Rewritten AGC and voice activity detection
* Intelligibility enhancer
* Extended AEC filter
* Beamformer
* Transient suppressor
* ARM, NEON and MIPS optimisations (MIPS optimisations are not hooked up)
API changes:
* We no longer include a top-level audio_processing.h. The webrtc tree format
is used, so use webrtc/modules/audio_processing/include/audio_processing.h
* The top-level module_common_types.h has also been moved to
webrtc/modules/interface/module_common_types.h
* C++11 support is now required while compiling client code
* AudioProcessing::Create() does not take any arguments any more
* AudioProcessing::Destroy() is gone, use standard C++ "delete" instead
* Stream parameters are now configured via StreamConfig and ProcessingConfig
rather than set_sample_rate(), set_num_channels(), etc.
* AudioFrame field names have changed
* Use config API for newer audio processing options
* Use ProcessReverseStream() instead of AnalyzeReverseStream(), particularly
when using the intelligibility enhancer
* GainControl::set_analog_level_limits() is broken. The AGC implementation
hard codes 0-255 as the volume range
Other notes:
* The new audio processing parameters are not all tested, and a few are not
enabled upstream (in Chromium) either
* The rewritten AGC appears to be less sensitive, and it might make sense to
initialise the capture volume to something reasonable (33% or 50%, for
example) to make sure there is sufficient energy in the stream to trigger
the AGC mechanism
- Adapted all 3 arch patches
-------------------------------------------------------------------
Thu Mar 7 13:51:31 UTC 2013 - idonmez@suse.com
- Add patch webrtc-aarch64.patch from algraf to add aarch64 support
-------------------------------------------------------------------
Wed Dec 19 10:39:23 CET 2012 - ro@suse.de
- add s390 and s390x to known platforms
by adding webrtc-s390x.patch
-------------------------------------------------------------------
Tue Jul 3 15:00:06 UTC 2012 - dvaleev@suse.com
- add ppc64 to known platforms
-------------------------------------------------------------------
Tue May 15 10:40:38 CET 2012 - pascal.bleser@opensuse.org
- initial version (0.1)

View File

@ -0,0 +1,4 @@
name: webrtc-audio-processing
version: 1.3
mtime: 1693927187
commit: 8e258a1933d405073c9e6465628a69ac7d2a1f13

View File

@ -0,0 +1,190 @@
# vim: set sw=4 ts=4 et nu:
#
# spec file for package webrtc-audio-processing
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pkg_soname 1-3
%define soname 3
# Please submit bugfixes or comments via http://bugs.opensuse.org/
Name: webrtc-audio-processing
Version: 1.3
Release: 0
Summary: Real-Time Communication Library for Web Browsers
License: BSD-3-Clause
Group: System/Libraries
URL: https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/
Source: webrtc-audio-processing-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-UPSTREAM fix-build.patch alarrosa@suse.com -- Fix a number of "control reaches end of non-void function" errors
Patch0: fix-build.patch
# PATCH-FIX-UPSTREAN big_endian_support.patch https://bugs.freedesktop.org/show_bug.cgi?id=95738
Patch1: big_endian_support.patch
# PATCH-FIX-UPSTREAN big_endian_support.patch https://bugs.freedesktop.org/show_bug.cgi?id=95738
Patch2: big_endian_support_2.patch
Patch3: fix-i586.patch
# PATCH-FIX-OPENSUSE webrtc-(ppc64|s390x|aarch64).patch
Patch100: webrtc-ppc64.patch
Patch101: webrtc-s390x.patch
# PATCH-FIX-OPENSUSE reduce-meson-dep.patch
Patch102: reduce-meson-dep.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: glibc-devel
BuildRequires: libtool
BuildRequires: make
BuildRequires: meson >= 0.59.4
BuildRequires: pkgconfig
BuildRequires: xz
BuildRequires: cmake(absl)
ExcludeArch: s390 s390x ppc64
%description
WebRTC is an open source project that enables web browsers with Real-Time
Communications (RTC) capabilities via simple Javascript APIs. The WebRTC
components have been optimized to best serve this purpose.
WebRTC implements the W3C's proposal for video conferencing on the web.
%package -n libwebrtc-audio-processing-%{pkg_soname}
Summary: Real-Time Communication Library for Web Browsers
Group: System/Libraries
%description -n libwebrtc-audio-processing-%{pkg_soname}
WebRTC is an open source project that enables web browsers with Real-Time
Communications (RTC) capabilities via simple Javascript APIs. The WebRTC
components have been optimized to best serve this purpose.
WebRTC implements the W3C's proposal for video conferencing on the web.
%package -n libwebrtc-audio-processing-devel
Summary: Real-Time Communication Library for Web Browsers
Group: Development/Libraries/C and C++
Requires: libwebrtc-audio-processing-%{pkg_soname} = %{version}
%description -n libwebrtc-audio-processing-devel
WebRTC is an open source project that enables web browsers with Real-Time
Communications (RTC) capabilities via simple Javascript APIs. The WebRTC
components have been optimized to best serve this purpose.
WebRTC implements the W3C's proposal for video conferencing on the web.
%package -n libwebrtc-audio-processing-devel-static
Summary: Real-Time Communication Library for Web Browsers
Group: Development/Libraries/C and C++
Requires: libwebrtc-audio-processing-devel = %{version}
%description -n libwebrtc-audio-processing-devel-static
WebRTC is an open source project that enables web browsers with Real-Time
Communications (RTC) capabilities via simple Javascript APIs. The WebRTC
components have been optimized to best serve this purpose.
WebRTC implements the W3C's proposal for video conferencing on the web.
%package -n libwebrtc-audio-coding-%{pkg_soname}
Summary: Real-Time Communication Library for Web Browsers
Group: System/Libraries
%description -n libwebrtc-audio-coding-%{pkg_soname}
WebRTC is an open source project that enables web browsers with Real-Time
Communications (RTC) capabilities via simple Javascript APIs. The WebRTC
components have been optimized to best serve this purpose.
WebRTC implements the W3C's proposal for video conferencing on the web.
%package -n libwebrtc-audio-coding-devel
Summary: Real-Time Communication Library for Web Browsers
Group: Development/Libraries/C and C++
Requires: libwebrtc-audio-coding-%{pkg_soname} = %{version}
%description -n libwebrtc-audio-coding-devel
WebRTC is an open source project that enables web browsers with Real-Time
Communications (RTC) capabilities via simple Javascript APIs. The WebRTC
components have been optimized to best serve this purpose.
WebRTC implements the W3C's proposal for video conferencing on the web.
%package -n libwebrtc-audio-coding-devel-static
Summary: Real-Time Communication Library for Web Browsers
Group: Development/Libraries/C and C++
Requires: libwebrtc-audio-coding-devel = %{version}
%description -n libwebrtc-audio-coding-devel-static
WebRTC is an open source project that enables web browsers with Real-Time
Communications (RTC) capabilities via simple Javascript APIs. The WebRTC
components have been optimized to best serve this purpose.
WebRTC implements the W3C's proposal for video conferencing on the web.
%prep
%autosetup -p1 -N
sed -i 's/\r$//' AUTHORS
%patch0 -p1
#%%patch1 -p1
#%%patch2 -p1
%patch3 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
%meson \
-Dc_std=gnu11 \
-Dcpp_std=gnu++17 \
-Ddefault_library=both \
-Dc_args="${CFLAGS} ${LDFLAGS}" \
-Dcpp_args="${CXXFLAGS} ${LDFLAGS}" \
%{nil}
%meson_build
%install
%meson_install
find %{buildroot} -type f -name "*.la" -delete -print
%post -n libwebrtc-audio-processing-%{pkg_soname} -p /sbin/ldconfig
%postun -n libwebrtc-audio-processing-%{pkg_soname} -p /sbin/ldconfig
%post -n libwebrtc-audio-coding-%{pkg_soname} -p /sbin/ldconfig
%postun -n libwebrtc-audio-coding-%{pkg_soname} -p /sbin/ldconfig
%files -n libwebrtc-audio-processing-%{pkg_soname}
%license COPYING
%doc AUTHORS NEWS README.md UPDATING.md
%{_libdir}/libwebrtc-audio-processing-1.so.%{soname}*
%files -n libwebrtc-audio-processing-devel
%{_includedir}/webrtc-audio-processing-1
%{_libdir}/libwebrtc-audio-processing-1.so
%{_libdir}/pkgconfig/webrtc-audio-processing-1.pc
%files -n libwebrtc-audio-processing-devel-static
%{_libdir}/libwebrtc-audio-processing-1.a
%files -n libwebrtc-audio-coding-%{pkg_soname}
%license COPYING
%doc AUTHORS NEWS README.md UPDATING.md
%{_libdir}/libwebrtc-audio-coding-1.so.%{soname}*
%files -n libwebrtc-audio-coding-devel
%{_libdir}/libwebrtc-audio-coding-1.so
%{_libdir}/pkgconfig/webrtc-audio-coding-1.pc
%files -n libwebrtc-audio-coding-devel-static
%{_libdir}/libwebrtc-audio-coding-1.a
%changelog

26
webrtc-ppc64.patch Normal file
View File

@ -0,0 +1,26 @@
Index: webrtc/typedefs.h
===================================================================
--- a/webrtc/rtc_base/system/arch.h.orig
+++ b/webrtc/rtc_base/system/arch.h
@@ -57,6 +57,15 @@
# #elif defined(__pnacl__)
# #define WEBRTC_ARCH_32_BITS
# #define WEBRTC_ARCH_LITTLE_ENDIAN
#elif defined(__EMSCRIPTEN__)
#define WEBRTC_ARCH_32_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#define WEBRTC_ARCH_64_BITS
+#elif defined(__powerpc64__)
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_ARCH_64_BITS
+#elif defined(__powerpc__)
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_ARCH_32_BITS
#else
#error Please add support for your architecture in rtc_base/system/arch.h
#endif
# #else
# /* instead of failing, use typical unix defines... */
# #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__

18
webrtc-s390x.patch Normal file
View File

@ -0,0 +1,18 @@
--- a/webrtc/rtc_base/system/arch.h.orig
+++ b/webrtc/rtc_base/system/arch.h
@@ -63,6 +63,12 @@
#elif defined(__powerpc__)
#define WEBRTC_ARCH_BIG_ENDIAN
#define WEBRTC_ARCH_32_BITS
+#elif defined(__s390x__)
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_ARCH_64_BITS
+#elif defined(__s390__)
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_ARCH_32_BITS
#else
#error Please add support for your architecture in rtc_base/system/arch.h
#endif
# #else
# /* instead of failing, use typical unix defines... */
# #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__