From c32025ec884b09efd71624f55eb3e64584b76452 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 9 Jun 2024 19:52:15 +0200 Subject: [PATCH] update to 0.2 (epoch bump) [release 0.2-1mamba;Thu Jun 06 2024] --- ...e-0.2-upsteam-fix-compilation-errors.patch | 144 ++++++++++++++++++ rnnoise.spec | 10 +- 2 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 rnnoise-0.2-upsteam-fix-compilation-errors.patch diff --git a/rnnoise-0.2-upsteam-fix-compilation-errors.patch b/rnnoise-0.2-upsteam-fix-compilation-errors.patch new file mode 100644 index 0000000..e0016fd --- /dev/null +++ b/rnnoise-0.2-upsteam-fix-compilation-errors.patch @@ -0,0 +1,144 @@ +From 372f7b4b76cde4ca1ec4605353dd17898a99de38 Mon Sep 17 00:00:00 2001 +From: "Timothy B. Terriberry" +Date: Mon, 15 Apr 2024 11:27:25 -0700 +Subject: [PATCH] Fix compilation errors. + +vec_avx.h needs x86cpu.h, and x86cpu.h needs to detect SSE2 (or + greater) without the Opus macros. +Also, nobody was defining OPUS_CLEAR (but several things were + including the non-existent os_support.h where it is defined in + libopus), so replace those calls with RNN_CLEAR and remove the + erroneous includes. +Take the opportunity to hoist OPUS_GNUC_PREREQ to common.h, too, + since it is needed in multiple places now. + +Fixes GitHub #222 +--- + src/common.h | 8 ++++++++ + src/vec.h | 9 ++++----- + src/vec_avx.h | 2 +- + src/vec_neon.h | 5 +++-- + src/x86/x86cpu.h | 4 ++-- + 5 files changed, 18 insertions(+), 10 deletions(-) + +diff --git a/src/common.h b/src/common.h +index 5005bff..f9095ca 100644 +--- a/src/common.h ++++ b/src/common.h +@@ -43,6 +43,14 @@ static RNN_INLINE void rnnoise_free (void *ptr) + #define RNN_CLEAR(dst, n) (memset((dst), 0, (n)*sizeof(*(dst)))) + #endif + ++# if !defined(OPUS_GNUC_PREREQ) ++# if defined(__GNUC__)&&defined(__GNUC_MINOR__) ++# define OPUS_GNUC_PREREQ(_maj,_min) \ ++ ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min)) ++# else ++# define OPUS_GNUC_PREREQ(_maj,_min) 0 ++# endif ++# endif + + + #endif +diff --git a/src/vec.h b/src/vec.h +index 8e96cbf..71b7afb 100644 +--- a/src/vec.h ++++ b/src/vec.h +@@ -30,6 +30,7 @@ + #define VEC_H + + #include "opus_types.h" ++#include "common.h" + #include + #include "arch.h" + #include "x86/x86_arch_macros.h" +@@ -41,8 +42,6 @@ + #include "vec_neon.h" + #else + +-#include "os_support.h" +- + #define MAX_INPUTS (2048) + + #define NO_OPTIMIZATIONS +@@ -50,7 +49,7 @@ + static inline void sgemv16x1(float *out, const float *weights, int rows, int cols, int col_stride, const float *x) + { + int i, j; +- OPUS_CLEAR(out, rows); ++ RNN_CLEAR(out, rows); + for (i=0;i + #include +-/*#include "celt/x86/x86cpu.h"*/ ++#include "x86/x86cpu.h" + + #define MAX_INPUTS (2048) + +diff --git a/src/vec_neon.h b/src/vec_neon.h +index e6432e2..31b736c 100644 +--- a/src/vec_neon.h ++++ b/src/vec_neon.h +@@ -32,7 +32,8 @@ + #define VEC_NEON_H + + #include +-#include "os_support.h" ++#include "opus_types.h" ++#include "common.h" + + #if defined(__arm__) && !defined(__aarch64__) && (__ARM_ARCH < 8 || !defined(__clang__)) + /* Emulate vcvtnq_s32_f32() for ARMv7 Neon. */ +@@ -302,7 +303,7 @@ static inline void sgemv(float *out, const float *weights, int rows, int cols, i + static inline void sparse_sgemv8x4(float *out, const float *w, const int *idx, int rows, const float *x) + { + int i, j; +- OPUS_CLEAR(out, rows); ++ RNN_CLEAR(out, rows); + for (i=0;i URL: https://gitlab.xiph.org/xiph/rnnoise -Source: https://gitlab.xiph.org/xiph/rnnoise.git/master/rnnoise-%{version}.tar.bz2 +Source: https://gitlab.xiph.org/xiph/rnnoise.git/v%{version}/rnnoise-%{version}.tar.bz2 +Patch0: rnnoise-0.2-upsteam-fix-compilation-errors.patch License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -37,6 +39,7 @@ This package contains libraries and header files for developing applications tha %prep %setup -q +%patch 0 -p1 -b .upsteam-fix-compilation-errors ./autogen.sh %build @@ -69,6 +72,9 @@ This package contains libraries and header files for developing applications tha %doc README %changelog +* Thu Jun 06 2024 Silvan Calarco 0.2-1mamba +- update to 0.2 (epoch bump) + * Sun Jul 02 2023 Automatic Build System 1.79-1mamba - automatic version update by autodist