diff options
Diffstat (limited to 'audio/webrtc-audio-processing')
-rw-r--r-- | audio/webrtc-audio-processing/Makefile | 14 | ||||
-rw-r--r-- | audio/webrtc-audio-processing/distinfo | 12 | ||||
-rw-r--r-- | audio/webrtc-audio-processing/files/patch-meson.build | 13 | ||||
-rw-r--r-- | audio/webrtc-audio-processing/files/patch-powerpc64 | 67 | ||||
-rw-r--r-- | audio/webrtc-audio-processing/files/patch-powerpc64.patch | 140 | ||||
-rw-r--r-- | audio/webrtc-audio-processing/pkg-descr | 2 | ||||
-rw-r--r-- | audio/webrtc-audio-processing/pkg-plist | 4 |
7 files changed, 80 insertions, 172 deletions
diff --git a/audio/webrtc-audio-processing/Makefile b/audio/webrtc-audio-processing/Makefile index 5cb33df236ff..51a02818ff06 100644 --- a/audio/webrtc-audio-processing/Makefile +++ b/audio/webrtc-audio-processing/Makefile @@ -1,29 +1,27 @@ PORTNAME= webrtc-audio-processing -DISTVERSION= 1.0 -PORTREVISION= 1 +DISTVERSION= 1.3 CATEGORIES= audio MASTER_SITES= https://freedesktop.org/software/pulseaudio/${PORTNAME}/ PATCH_SITES= https://gitlab.freedesktop.org/pulseaudio/${PORTNAME}/-/commit/ PATCHFILES+= 2083c9a5dd34.patch:-p1 # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/6 -PATCHFILES+= 3f9907f93d39.patch:-p1 # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/13 -PATCHFILES+= b34c1d5746ea.patch:-p1 # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/14 PATCHFILES+= d49a0855a33b.patch:-p1 # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/17 PATCHFILES+= f29ff57d6ccd.patch:-p1 # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/17 +PATCHFILES+= c18b3945a1cc.patch:-p1 # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/17 MAINTAINER= jbeich@FreeBSD.org COMMENT= AudioProcessing module from WebRTC project +WWW= https://freedesktop.org/software/pulseaudio/webrtc-audio-processing/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING BROKEN_powerpc= fails to compile: ./webrtc/rtc_base/system/arch.h:54:2: Please add support for your architecture in rtc_base/system/arch.h -BROKEN_riscv64= fails to compile: ./webrtc/rtc_base/system/arch.h:54:2: Please add support for your architecture in rtc_base/system/arch.h -BUILD_DEPENDS= cmake:devel/cmake -LIB_DEPENDS= libabsl_strings.so:devel/abseil +BUILD_DEPENDS= abseil>0:devel/abseil +RUN_DEPENDS= abseil>0:devel/abseil # pkgconfig -USES= compiler:c++17-lang meson +USES= compiler:c++17-lang meson pkgconfig USE_LDCONFIG= yes CFLAGS_i386= -msse # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5 diff --git a/audio/webrtc-audio-processing/distinfo b/audio/webrtc-audio-processing/distinfo index 9458f9e257de..9ae200b99b1c 100644 --- a/audio/webrtc-audio-processing/distinfo +++ b/audio/webrtc-audio-processing/distinfo @@ -1,13 +1,11 @@ -TIMESTAMP = 1645899872 -SHA256 (webrtc-audio-processing-1.0.tar.gz) = 441a30d2717b2eb4145c6eb96c2d5a270fe0b4bc71aebf76716750c47be1936f -SIZE (webrtc-audio-processing-1.0.tar.gz) = 856721 +TIMESTAMP = 1693927187 +SHA256 (webrtc-audio-processing-1.3.tar.gz) = 95552fc17faa0202133707bbb3727e8c2cf64d4266fe31bfdb2298d769c1db75 +SIZE (webrtc-audio-processing-1.3.tar.gz) = 879768 SHA256 (2083c9a5dd34.patch) = 3c34cc248c0292032b26ef67f078505037e51e84b6c7955162cac058aed54360 SIZE (2083c9a5dd34.patch) = 4496 -SHA256 (3f9907f93d39.patch) = 8e300c0ab9e85463ed0aebc7c69c95c293a14ef2ca0f50c7b7c539754c0109ef -SIZE (3f9907f93d39.patch) = 2049 -SHA256 (b34c1d5746ea.patch) = b50edddb93a5bd4fdcc5110702111fe4ac000867358b7131e2ccce883a4c8dee -SIZE (b34c1d5746ea.patch) = 923 SHA256 (d49a0855a33b.patch) = fe8a4421a664108e7f5223f61278cd5a9096d8d0f33d1d648ac2c952d4c633b4 SIZE (d49a0855a33b.patch) = 1388 SHA256 (f29ff57d6ccd.patch) = 9200b95da26ee34ef106cb3f2eed75d95eed7e9911a7632923b3d885409f9406 SIZE (f29ff57d6ccd.patch) = 858 +SHA256 (c18b3945a1cc.patch) = 3293a0f2a77e568efa1c1d6f6c845e9e31cd72491306c0b65e80db42bc261073 +SIZE (c18b3945a1cc.patch) = 5238 diff --git a/audio/webrtc-audio-processing/files/patch-meson.build b/audio/webrtc-audio-processing/files/patch-meson.build deleted file mode 100644 index a006f0ca07e7..000000000000 --- a/audio/webrtc-audio-processing/files/patch-meson.build +++ /dev/null @@ -1,13 +0,0 @@ -- Sync -std= with devel/abseil to match ABI - ---- meson.build.orig 2020-12-12 16:13:37 UTC -+++ meson.build -@@ -4,7 +4,7 @@ project('webrtc-audio-processing-1', 'c', 'cpp', - default_options : [ 'warning_level=1', - 'buildtype=debugoptimized', - 'c_std=c11', -- 'cpp_std=c++14', -+ 'cpp_std=c++17', - ] - ) - diff --git a/audio/webrtc-audio-processing/files/patch-powerpc64 b/audio/webrtc-audio-processing/files/patch-powerpc64 new file mode 100644 index 000000000000..b9982cf783a1 --- /dev/null +++ b/audio/webrtc-audio-processing/files/patch-powerpc64 @@ -0,0 +1,67 @@ +Modified https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/17/diffs?commit_id=c18b3945a1cc for FreeBSD + pffft patch to include altivec.h. +--- webrtc/common_audio/wav_file.cc.orig 2020-11-27 19:30:53 UTC ++++ webrtc/common_audio/wav_file.cc +@@ -14,7 +14,7 @@ + + #include <algorithm> + #include <array> +-#include <byteswap.h> ++#include <sys/endian.h> + #include <cstdio> + #include <type_traits> + #include <utility> +@@ -123,7 +123,7 @@ size_t WavReader::ReadSamples(const size_t num_samples + } + #ifndef WEBRTC_ARCH_LITTLE_ENDIAN + for (size_t i = 0; i < num_samples; i++) { +- samples[i] = bswap_16(samples[i]); ++ samples[i] = bswap16(samples[i]); + } + #endif + +@@ -171,7 +171,7 @@ size_t WavReader::ReadSamples(const size_t num_samples + #ifndef WEBRTC_ARCH_LITTLE_ENDIAN + // TODO: is this the right place for this? + for (size_t i = 0; i < num_samples; i++) { +- samples[i] = bswap_16(samples[i]); ++ samples[i] = bswap16(samples[i]); + } + #endif + +@@ -229,7 +229,7 @@ void WavWriter::WriteSamples(const int16_t* samples, s + #else + std::array<int16_t, kMaxChunksize> converted_samples; + for (size_t j = 0; j < num_samples_to_write; ++j) { +- converted_samples[j] = bswap_16(samples[i + j]); ++ converted_samples[j] = bswap16(samples[i + j]); + } + RTC_CHECK( + file_.Write(converted_samples.data(), +@@ -241,7 +241,7 @@ void WavWriter::WriteSamples(const int16_t* samples, s + for (size_t j = 0; j < num_samples_to_write; ++j) { + int16_t sample = samples[i + j]; + #ifndef WEBRTC_ARCH_LITTLE_ENDIAN +- sample = bswap_16(sample); ++ sample = bswap16(sample); + #endif + converted_samples[j] = S16ToFloat(sample); + } +@@ -267,7 +267,7 @@ void WavWriter::WriteSamples(const float* samples, siz + for (size_t j = 0; j < num_samples_to_write; ++j) { + int16_t sample = FloatS16ToS16(samples[i + j]); + #ifndef WEBRTC_ARCH_LITTLE_ENDIAN +- sample = bswap_16(sample); ++ sample = bswap16(sample); + #endif + converted_samples[j] = sample; + } +--- webrtc/third_party/pffft/src/pffft.c.orig 2020-11-27 19:30:53 UTC ++++ webrtc/third_party/pffft/src/pffft.c +@@ -100,6 +100,7 @@ + Altivec support macros + */ + #if !defined(PFFFT_SIMD_DISABLE) && (defined(__ppc__) || defined(__ppc64__)) ++#include <altivec.h> + typedef vector float v4sf; + # define SIMD_SZ 4 + # define VZERO() ((vector float) vec_splat_u8(0)) diff --git a/audio/webrtc-audio-processing/files/patch-powerpc64.patch b/audio/webrtc-audio-processing/files/patch-powerpc64.patch deleted file mode 100644 index c7eba0e841cd..000000000000 --- a/audio/webrtc-audio-processing/files/patch-powerpc64.patch +++ /dev/null @@ -1,140 +0,0 @@ -Modified https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/17/diffs?commit_id=d49a0855a33bb56cc1935642c0d4bf7a3f474fbd for FreeBSD + pffft patch to include altivec.h. ---- webrtc/common_audio/wav_file.cc -+++ webrtc/common_audio/wav_file.cc -@@ -14,6 +14,7 @@ - - #include <algorithm> - #include <array> -+#include <sys/endian.h> - #include <cstdio> - #include <type_traits> - #include <utility> -@@ -89,10 +90,6 @@ void WavReader::Reset() { - - 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; - while (num_samples_left_to_read > 0 && num_unread_samples_ > 0) { -@@ -124,15 +121,16 @@ size_t WavReader::ReadSamples(const size_t num_samples, - num_unread_samples_ -= num_samples_read; - num_samples_left_to_read -= num_samples_read; - } -+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN -+ for (size_t i = 0; i < num_samples; i++) { -+ samples[i] = bswap16(samples[i]); -+ } -+#endif - - return num_samples - num_samples_left_to_read; - } - - size_t WavReader::ReadSamples(const size_t num_samples, float* 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; - while (num_samples_left_to_read > 0 && num_unread_samples_ > 0) { -@@ -170,6 +168,12 @@ size_t WavReader::ReadSamples(const size_t num_samples, float* const samples) { - num_unread_samples_ -= num_samples_read; - num_samples_left_to_read -= num_samples_read; - } -+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN -+ // TODO: is this the right place for this? -+ for (size_t i = 0; i < num_samples; i++) { -+ samples[i] = bswap16(samples[i]); -+ } -+#endif - - return num_samples - num_samples_left_to_read; - } -@@ -213,23 +217,33 @@ WavWriter::WavWriter(FileWrapper file, - } - - 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 -- - for (size_t i = 0; i < num_samples; i += kMaxChunksize) { - const size_t num_remaining_samples = num_samples - i; - const size_t num_samples_to_write = - std::min(kMaxChunksize, num_remaining_samples); - - if (format_ == WavFormat::kWavFormatPcm) { -+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN - RTC_CHECK( - file_.Write(&samples[i], num_samples_to_write * sizeof(samples[0]))); -+#else -+ std::array<int16_t, kMaxChunksize> converted_samples; -+ for (size_t j = 0; j < num_samples_to_write; ++j) { -+ converted_samples[j] = bswap16(samples[i + j]); -+ } -+ RTC_CHECK( -+ file_.Write(converted_samples.data(), -+ num_samples_to_write * sizeof(converted_samples[0]))); -+#endif - } else { - RTC_CHECK_EQ(format_, WavFormat::kWavFormatIeeeFloat); - std::array<float, kMaxChunksize> converted_samples; - for (size_t j = 0; j < num_samples_to_write; ++j) { -- converted_samples[j] = S16ToFloat(samples[i + j]); -+ int16_t sample = samples[i + j]; -+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN -+ sample = bswap16(sample); -+#endif -+ converted_samples[j] = S16ToFloat(sample); - } - RTC_CHECK( - file_.Write(converted_samples.data(), -@@ -243,10 +257,6 @@ void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) { - } - - void WavWriter::WriteSamples(const float* samples, size_t num_samples) { --#ifndef WEBRTC_ARCH_LITTLE_ENDIAN --#error "Need to convert samples to little-endian when writing to WAV file" --#endif -- - for (size_t i = 0; i < num_samples; i += kMaxChunksize) { - const size_t num_remaining_samples = num_samples - i; - const size_t num_samples_to_write = -@@ -255,7 +265,11 @@ void WavWriter::WriteSamples(const float* samples, size_t num_samples) { - if (format_ == WavFormat::kWavFormatPcm) { - std::array<int16_t, kMaxChunksize> converted_samples; - for (size_t j = 0; j < num_samples_to_write; ++j) { -- converted_samples[j] = FloatS16ToS16(samples[i + j]); -+ int16_t sample = FloatS16ToS16(samples[i + j]); -+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN -+ sample = bswap16(sample); -+#endif -+ converted_samples[j] = sample; - } - RTC_CHECK( - file_.Write(converted_samples.data(), -@@ -264,6 +278,7 @@ void WavWriter::WriteSamples(const float* samples, size_t num_samples) { - RTC_CHECK_EQ(format_, WavFormat::kWavFormatIeeeFloat); - std::array<float, kMaxChunksize> converted_samples; - for (size_t j = 0; j < num_samples_to_write; ++j) { -+ // TODO: is swap needed for big-endian here? - converted_samples[j] = FloatS16ToFloat(samples[i + j]); - } - RTC_CHECK( --- -GitLab - ---- webrtc/third_party/pffft/src/pffft.c.orig 2022-02-26 18:37:29 UTC -+++ webrtc/third_party/pffft/src/pffft.c -@@ -100,6 +100,7 @@ - Altivec support macros - */ - #if !defined(PFFFT_SIMD_DISABLE) && (defined(__ppc__) || defined(__ppc64__)) -+#include <altivec.h> - typedef vector float v4sf; - # define SIMD_SZ 4 - # define VZERO() ((vector float) vec_splat_u8(0)) diff --git a/audio/webrtc-audio-processing/pkg-descr b/audio/webrtc-audio-processing/pkg-descr index 625fcd90b737..8557233345ef 100644 --- a/audio/webrtc-audio-processing/pkg-descr +++ b/audio/webrtc-audio-processing/pkg-descr @@ -8,5 +8,3 @@ standalone library. It provides the following features: - Level estimator - Noise suppression - Voice activity detection - -WWW: https://freedesktop.org/software/pulseaudio/webrtc-audio-processing/ diff --git a/audio/webrtc-audio-processing/pkg-plist b/audio/webrtc-audio-processing/pkg-plist index f03f4397d672..f29cd7631420 100644 --- a/audio/webrtc-audio-processing/pkg-plist +++ b/audio/webrtc-audio-processing/pkg-plist @@ -22,8 +22,8 @@ include/webrtc-audio-processing-1/system_wrappers/include/cpu_features_wrapper.h include/webrtc-audio-processing-1/system_wrappers/include/metrics.h include/webrtc-audio-processing-1/system_wrappers/include/sleep.h lib/libwebrtc-audio-coding-1.so -lib/libwebrtc-audio-coding-1.so.0 +lib/libwebrtc-audio-coding-1.so.3 lib/libwebrtc-audio-processing-1.so -lib/libwebrtc-audio-processing-1.so.0 +lib/libwebrtc-audio-processing-1.so.3 libdata/pkgconfig/webrtc-audio-coding-1.pc libdata/pkgconfig/webrtc-audio-processing-1.pc |