From nobody Fri Jun 02 18:32:16 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QXs6m61drz4YNs8; Fri, 2 Jun 2023 18:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QXs6m5blkz3ssD; Fri, 2 Jun 2023 18:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685730736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QCsqaA27D2i5bqtvJFOg+INHSZVfKLPiccbygiNpZqY=; b=BrUIjDRiRCYsOUuEeJVJ+UO6ltSpsFE7uLazOum+3FIswKlzHEnEQ5KRw+pyxlziTXFaAU +rB3vQQLSljOqYoOjhghRMSZvGfGv/fDTsnpFqTH8XMTJ1zfPJAE83uLHARDLLm/Gsd5ls vUfXpNCIJqFZa0E2/9wUvas/l8vpwy0WgpjMmfW72lL3O1pENpPv5HIcOrBdEBcl5+G6fy /p0qn4JXk2dmwZhZ6g6dqMKrFKj4aMLMyRsjCti0KVfOgxxZWTIC8KXO0/uzIU9lHxLVA2 cjwpBrpKtREtqhyvDxZvdY8ah163JU/pKnuXlgcdDWlyXLIMRPPymnjItu6L2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685730736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QCsqaA27D2i5bqtvJFOg+INHSZVfKLPiccbygiNpZqY=; b=mxwK4DEUYEBfR4+a/EnNIRqB+u0S6uRHK3RsNu7aLP+QVjV31tGz9EWK4AlvTFEXvSCkN4 WSth1hTO+9kUUDj5T7kpZvUvcy5XlfWQkE3WXiiDBeB6Vp7XdBC5LVuMylKuyAM2MIz4H7 +VLzzu9dBGwHTAaWff3ZNYPmPDFJQA07CKRqhubqbfOUzfEXyHoWuq2xwMYSQzozjAVNny D8rwyuGroUxulG+7vyvq0AQ+TzRwDBBnw9Bjjz4/PN0BdKWVxsBj0EqcyPZeh0x7RZeLsU N0MhtOPIXTf0aeHpGfx9pvQXRX/fS9+LSnRYNrzL6juuBzDfyW/v130ig18RZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685730736; a=rsa-sha256; cv=none; b=L7zkLNIxqJ//kZTJMdMzBey40qtsL5t6kTOrPHe6gxQal33aDhXkB5rqF9VKiPN8uGWlbL sI7WccxsYgLLMZMIBT8j2/UcCNrpRF6IyuRrz18US0fd9OtxU5ndK6EDePTRUAATK3uUZZ PEFaJe0wF/+UmPx9MkB4NWuAJQURaYavoxYZi0LJH+N2eLmThG2clnGW24YvWBVf+SxfLz 9qcu2OeDOvd3IMkSjr9dYV+x7ffeioSyIC9soFuV/U8XT0jcm4iJIWZ4wBr/QTkC7zvz3I xjZLhx3dTz2Zgq1nqY+UUdgogGcSTe7hcS5xJeob4ET5PovqLzJIxUHNk9ZV7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QXs6m4h3Rz18SR; Fri, 2 Jun 2023 18:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 352IWGBd087259; Fri, 2 Jun 2023 18:32:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 352IWGsC087258; Fri, 2 Jun 2023 18:32:16 GMT (envelope-from git) Date: Fri, 2 Jun 2023 18:32:16 GMT Message-Id: <202306021832.352IWGsC087258@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jan Beich Subject: git: f151b7fa349a - main - audio/webrtc-audio-processing: rebase c9bdb0ca7d0f on top of upstream List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f151b7fa349aa9ba465a3526d1c7d569a422d728 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=f151b7fa349aa9ba465a3526d1c7d569a422d728 commit f151b7fa349aa9ba465a3526d1c7d569a422d728 Author: Jan Beich AuthorDate: 2023-06-02 17:44:47 +0000 Commit: Jan Beich CommitDate: 2023-06-02 18:31:24 +0000 audio/webrtc-audio-processing: rebase c9bdb0ca7d0f on top of upstream --- audio/webrtc-audio-processing/Makefile | 1 + audio/webrtc-audio-processing/distinfo | 2 + .../webrtc-audio-processing/files/patch-powerpc64 | 67 ++++++++++ .../files/patch-powerpc64.patch | 140 --------------------- 4 files changed, 70 insertions(+), 140 deletions(-) diff --git a/audio/webrtc-audio-processing/Makefile b/audio/webrtc-audio-processing/Makefile index 3ee52ce0cf06..ed81695cabdc 100644 --- a/audio/webrtc-audio-processing/Makefile +++ b/audio/webrtc-audio-processing/Makefile @@ -10,6 +10,7 @@ PATCHFILES+= 3f9907f93d39.patch:-p1 # https://gitlab.freedesktop.org/pulseaudio/ 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 diff --git a/audio/webrtc-audio-processing/distinfo b/audio/webrtc-audio-processing/distinfo index 9458f9e257de..67c99850c4f7 100644 --- a/audio/webrtc-audio-processing/distinfo +++ b/audio/webrtc-audio-processing/distinfo @@ -11,3 +11,5 @@ SHA256 (d49a0855a33b.patch) = fe8a4421a664108e7f5223f61278cd5a9096d8d0f33d1d648a 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-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 + #include +-#include ++#include + #include + #include + #include +@@ -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 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 + 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 - #include -+#include - #include - #include - #include -@@ -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 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 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 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 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 - typedef vector float v4sf; - # define SIMD_SZ 4 - # define VZERO() ((vector float) vec_splat_u8(0))