Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package iir for openSUSE:Factory checked in at 2026-10-28 17:48:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/iir (Old) and /work/SRC/openSUSE:Factory/.iir.new.2252680 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "iir" Wed Oct 28 17:48:56 2026 rev:6 rq:1393296 version:1.11.1 Changes: -------- --- /work/SRC/openSUSE:Factory/iir/iir.changes 2026-10-22 17:00:15.192855654 +0200 +++ /work/SRC/openSUSE:Factory/.iir.new.2252680/iir.changes 2026-10-28 17:49:04.363402539 +0100 @@ -1,0 +2,6 @@ +Wed Oct 28 08:11:28 UTC 2026 - Илья Индиго <[email protected]> + +- Updated to 1.11.1 + * https://github.com/berndporr/iir1/releases/tag/1.11.1 + +------------------------------------------------------------------- Old: ---- iir1-1.11.0.tar.gz New: ---- iir1-1.11.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ iir.spec ++++++ --- /var/tmp/diff_new_pack.4j1V6p/_old 2026-10-28 17:49:05.239439187 +0100 +++ /var/tmp/diff_new_pack.4j1V6p/_new 2026-10-28 17:49:05.242439313 +0100 @@ -19,7 +19,7 @@ %define sover 1 %define sname %{name}%{sover} Name: iir -Version: 1.11.0 +Version: 1.11.1 Release: 0 Summary: DSP infinite impulse response realtime C++ filter library License: MIT ++++++ iir1-1.11.0.tar.gz -> iir1-1.11.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iir1-1.11.0/CMakeLists.txt new/iir1-1.11.1/CMakeLists.txt --- old/iir1-1.11.0/CMakeLists.txt 2026-10-22 00:02:35.000000000 +0200 +++ new/iir1-1.11.1/CMakeLists.txt 2026-10-25 10:54:00.000000000 +0100 @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10.0) -project(iir VERSION 1.11.0 LANGUAGES CXX) +project(iir VERSION 1.11.1 LANGUAGES CXX) set (CMAKE_EXPORT_COMPILE_COMMANDS 1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iir1-1.11.0/iir/Biquad.cpp new/iir1-1.11.1/iir/Biquad.cpp --- old/iir1-1.11.0/iir/Biquad.cpp 2026-10-22 00:02:35.000000000 +0200 +++ new/iir1-1.11.1/iir/Biquad.cpp 2026-10-25 10:54:00.000000000 +0100 @@ -162,16 +162,16 @@ const char errMsgPole[] = "imaginary parts of both poles need to be 0 or complex conjugate"; const char errMsgZero[] = "imaginary parts of both zeros need to be 0 or complex conjugate"; - if (pole1.imag() != 0) + if (std::abs (pole1.imag()) > ComplexPair::epsilon) { - if (pole2 != std::conj (pole1)) + if (std::abs (pole2 - std::conj (pole1)) > ComplexPair::epsilon) throw_invalid_argument(errMsgPole); a1 = -2 * pole1.real(); a2 = std::norm (pole1); } else { - if (pole2.imag() != 0) + if (std::abs (pole2.imag()) > ComplexPair::epsilon) throw_invalid_argument(errMsgPole); a1 = -(pole1.real() + pole2.real()); a2 = pole1.real() * pole2.real(); @@ -181,16 +181,16 @@ double b1; double b2; - if (zero1.imag() != 0) + if (std::abs (zero1.imag()) > ComplexPair::epsilon) { - if (zero2 != std::conj (zero1)) + if (std::abs (zero2 - std::conj (zero1)) > ComplexPair::epsilon) throw_invalid_argument(errMsgZero); b1 = -2 * zero1.real(); b2 = std::norm (zero1); } else { - if (zero2.imag() != 0) + if (std::abs (zero2.imag()) > ComplexPair::epsilon) throw_invalid_argument(errMsgZero); b1 = -(zero1.real() + zero2.real()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iir1-1.11.0/iir/Butterworth.cpp new/iir1-1.11.1/iir/Butterworth.cpp --- old/iir1-1.11.0/iir/Butterworth.cpp 2026-10-22 00:02:35.000000000 +0200 +++ new/iir1-1.11.1/iir/Butterworth.cpp 2026-10-25 10:54:00.000000000 +0100 @@ -34,6 +34,7 @@ **/ #include "Common.h" +#include "MathSupplement.h" #include "Butterworth.h" namespace Iir { @@ -58,12 +59,12 @@ const int pairs = numPoles / 2; for (int i = 0; i < pairs; ++i) { - complex_t c = std::polar (1., doublePi_2 + (2 * i + 1) * doublePi / n2); + const complex_t c = std::polar (1., doublePi_2 + (2 * i + 1) * doublePi / n2); addPoleZeroConjugatePairs (c, infinity()); } if (numPoles & 1) - add (-1, infinity()); + add (complex_t(-1), infinity()); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iir1-1.11.0/iir/ChebyshevI.cpp new/iir1-1.11.1/iir/ChebyshevI.cpp --- old/iir1-1.11.0/iir/ChebyshevI.cpp 2026-10-22 00:02:35.000000000 +0200 +++ new/iir1-1.11.1/iir/ChebyshevI.cpp 2026-10-25 10:54:00.000000000 +0100 @@ -34,6 +34,7 @@ **/ #include "Common.h" +#include "MathSupplement.h" #include "ChebyshevI.h" namespace Iir { @@ -66,15 +67,15 @@ for (int i = 0; i < pairs; ++i) { const int k = 2 * i + 1 - numPoles; - double a = sinh_v0 * cos (k * doublePi / n2); - double b = cosh_v0 * sin (k * doublePi / n2); + const double a = sinh_v0 * cos (k * doublePi / n2); + const double b = cosh_v0 * sin (k * doublePi / n2); addPoleZeroConjugatePairs (complex_t (a, b), infinity()); } if (numPoles & 1) { - add (complex_t (sinh_v0, 0), infinity()); + add (complex_t (sinh_v0), infinity()); setNormal (0, 1); } else @@ -150,7 +151,7 @@ } if (numPoles & 1) - add (-sinh_u, -sinh_v); + add (complex_t(-sinh_u), complex_t(-sinh_v)); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iir1-1.11.0/iir/ChebyshevII.cpp new/iir1-1.11.1/iir/ChebyshevII.cpp --- old/iir1-1.11.0/iir/ChebyshevII.cpp 2026-10-22 00:02:35.000000000 +0200 +++ new/iir1-1.11.1/iir/ChebyshevII.cpp 2026-10-25 10:54:00.000000000 +0100 @@ -34,6 +34,7 @@ **/ #include "Common.h" +#include "MathSupplement.h" #include "ChebyshevII.h" namespace Iir { @@ -79,7 +80,7 @@ if (numPoles & 1) { - add (1 / sinh_v0, infinity()); + add (complex_t(1 / sinh_v0), infinity()); } } } @@ -151,7 +152,7 @@ } if (numPoles & 1) - add (-sinh_u, -sinh_v); + add (complex_t(-sinh_u), complex_t(-sinh_v)); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iir1-1.11.0/iir/Layout.h new/iir1-1.11.1/iir/Layout.h --- old/iir1-1.11.0/iir/Layout.h 2026-10-22 00:02:35.000000000 +0200 +++ new/iir1-1.11.1/iir/Layout.h 2026-10-25 10:54:00.000000000 +0100 @@ -37,6 +37,7 @@ #include "Common.h" #include "MathSupplement.h" +#include "Types.h" /** * Describes a filter as a collection of poles and zeros along with diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iir1-1.11.0/iir/PoleFilter.cpp new/iir1-1.11.1/iir/PoleFilter.cpp --- old/iir1-1.11.0/iir/PoleFilter.cpp 2026-10-22 00:02:35.000000000 +0200 +++ new/iir1-1.11.1/iir/PoleFilter.cpp 2026-10-25 10:54:00.000000000 +0100 @@ -34,6 +34,7 @@ **/ #include "Common.h" +#include "MathSupplement.h" #include "PoleFilter.h" namespace Iir { @@ -47,7 +48,7 @@ complex_t LowPassTransform::transform (complex_t c) { if (c == infinity()) - return complex_t (-1, 0); + return complex_t (-1); // frequency transform c = f * c; @@ -94,7 +95,7 @@ complex_t HighPassTransform::transform (complex_t c) { if (c == infinity()) - return complex_t (1, 0); + return complex_t (1); // frequency transform c = f * c; @@ -195,11 +196,11 @@ ComplexPair BandPassTransform::transform (complex_t c) { if (c == infinity()) - return ComplexPair (-1, 1); + return ComplexPair (complex_t(-1), complex_t(1)); c = (1. + c) / (1. - c); // bilinear - complex_t v = 0; + complex_t v = complex_t(0); v = addmul (v, 4 * (b2 * (a2 - 1) + 1), c); v += 8 * (b2 * (a2 - 1) - 1); v *= c; @@ -213,7 +214,7 @@ v = addmul (v, ab_2, c); v += ab_2; - complex_t d = 0; + complex_t d = complex_t(0); d = addmul (d, 2 * (b - 1), c) + 2 * (1 + b); return ComplexPair (u/d, v/d); @@ -281,7 +282,7 @@ ComplexPair BandStopTransform::transform (complex_t c) { if (c == infinity()) - c = -1; + c = complex_t(-1); else c = (1. + c) / (1. - c); // bilinear diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iir1-1.11.0/iir/Types.h new/iir1-1.11.1/iir/Types.h --- old/iir1-1.11.0/iir/Types.h 2026-10-22 00:02:35.000000000 +0200 +++ new/iir1-1.11.1/iir/Types.h 2026-10-25 10:54:00.000000000 +0100 @@ -38,87 +38,85 @@ #include "Common.h" #include "MathSupplement.h" -namespace Iir { +namespace Iir +{ /** * A conjugate or real pair **/ - struct IIR_EXPORT ComplexPair : complex_pair_t - { - ComplexPair() = default; - - explicit ComplexPair (const complex_t& c1) - : complex_pair_t (c1, 0.) - { - if (!isReal()) throw_invalid_argument("A single complex number needs to be real."); - } - - ComplexPair (const complex_t& c1, - const complex_t& c2) - : complex_pair_t (c1, c2) - { - } - - bool isReal () const - { - return first.imag() == 0 && second.imag() == 0; - } - - /** - * Returns true if this is either a conjugate pair, - * or a pair of reals where neither is zero. - */ - bool isMatchedPair () const - { - if (first.imag() != 0) - return second == std::conj (first); - else - return second.imag () == 0 && - second.real () != 0 && - first.real () != 0; - } - - bool is_nan () const - { - return Iir::is_nan (first) || Iir::is_nan (second); - } - }; - +struct IIR_EXPORT ComplexPair : complex_pair_t +{ + ComplexPair () = default; + + static constexpr double epsilon = 1E-10; + + explicit ComplexPair (const complex_t &c1) : complex_pair_t (c1, complex_t(0)) + { + if (!isReal ()) + throw_invalid_argument ( + "A single complex number needs to be real."); + } + + ComplexPair (const complex_t &c1, const complex_t &c2) + : complex_pair_t (c1, c2) + { + } + + bool isReal () const + { + return (std::abs (first.imag ()) < epsilon) + && (std::abs (second.imag ()) < epsilon); + } + + /** + * Returns true if this is either a conjugate pair, + * or a pair of reals where neither is zero. + */ + bool isMatchedPair () const + { + if ((isReal () && (std::abs (first.real ()) > epsilon)) + && (std::abs (second.real ()) > epsilon)) + return true; + return std::abs(second - std::conj (first)) < epsilon; + } + + bool is_nan () const + { + return Iir::is_nan (first) || Iir::is_nan (second); + } +}; /** * A pair of pole/zeros. This fits in a biquad (but is missing the gain) **/ - struct IIR_EXPORT PoleZeroPair - { - ComplexPair poles = ComplexPair(); - ComplexPair zeros = ComplexPair(); - - PoleZeroPair () = default; - - // single pole/zero - PoleZeroPair (const complex_t& p, const complex_t& z) - : poles (p), zeros (z) - { - } - - // pole/zero pair - PoleZeroPair (const complex_t& p1, const complex_t& z1, - const complex_t& p2, const complex_t& z2) - : poles (p1, p2) - , zeros (z1, z2) - { - } - - bool isSinglePole () const - { - return poles.second == 0. && zeros.second == 0.; - } - - bool is_nan () const - { - return poles.is_nan() || zeros.is_nan(); - } - }; +struct IIR_EXPORT PoleZeroPair +{ + ComplexPair poles = ComplexPair (); + ComplexPair zeros = ComplexPair (); + + PoleZeroPair () = default; + + static constexpr double epsilon = 1E-10; + + // single pole/zero + PoleZeroPair (const complex_t &p, const complex_t &z) + : poles (p), zeros (z) + { + } + + // pole/zero pair + PoleZeroPair (const complex_t &p1, const complex_t &z1, + const complex_t &p2, const complex_t &z2) + : poles (p1, p2), zeros (z1, z2) + { + } + + bool isSinglePole () const + { + return (std::abs(poles.second) < epsilon) && (std::abs(zeros.second) < epsilon); + } + bool is_nan () const { return poles.is_nan () || zeros.is_nan (); } +}; }
