public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libbs2b] rawhide: add patch not to clip floating point samples (rhbz#2261991)
@ 2026-09-22 11:42 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-09-22 11:42 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/libbs2b
Branch : rawhide
Commit : aa33b3d34459a0add1639bc86de128e258f32768
Author : Karel Volný <kvolny@redhat.com>
Date   : 2026-09-22T13:42:30+02:00
Stats  : +97/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/libbs2b/c/aa33b3d34459a0add1639bc86de128e258f32768?branch=rawhide

Log:
add patch not to clip floating point samples (rhbz#2261991)

---
diff --git a/libbs2b-dont-clip-samples.patch b/libbs2b-dont-clip-samples.patch
new file mode 100644
index 0000000..f3ae18c
--- /dev/null
+++ b/libbs2b-dont-clip-samples.patch
@@ -0,0 +1,91 @@
+From 5ca2d59888df047f1e4b028e3a2fd5be8b5a7277 Mon Sep 17 00:00:00 2001
+From: Alex Marsev <alex.marsev@gmail.com>
+Date: Fri, 17 Oct 2014 11:09:04 +0300
+Subject: [PATCH] Don't clip floating point samples
+
+---
+ src/bs2b.c | 36 ------------------------------------
+ 1 file changed, 36 deletions(-)
+
+diff --git a/src/bs2b.c b/src/bs2b.c
+index 623ca77..b87680c 100644
+--- a/src/bs2b.c
++++ b/src/bs2b.c
+@@ -350,12 +350,6 @@ void bs2b_cross_feed_d( t_bs2bdp bs2bdp, double *sample, int n )
+ 		{
+ 			cross_feed_d( bs2bdp, sample );
+ 			
+-			/* Clipping of overloaded samples */
+-			if( sample[ 0 ] >  1.0 ) sample[ 0 ] =  1.0;
+-			if( sample[ 0 ] < -1.0 ) sample[ 0 ] = -1.0;
+-			if( sample[ 1 ] >  1.0 ) sample[ 1 ] =  1.0;
+-			if( sample[ 1 ] < -1.0 ) sample[ 1 ] = -1.0;
+-
+ 			sample += 2;
+ 		} /* while */
+ 	} /* if */
+@@ -374,12 +368,6 @@ void bs2b_cross_feed_dbe( t_bs2bdp bs2bdp, double *sample, int n )
+ 
+ 			cross_feed_d( bs2bdp, sample );
+ 
+-			/* Clipping of overloaded samples */
+-			if( sample[ 0 ] >  1.0 ) sample[ 0 ] =  1.0;
+-			if( sample[ 0 ] < -1.0 ) sample[ 0 ] = -1.0;
+-			if( sample[ 1 ] >  1.0 ) sample[ 1 ] =  1.0;
+-			if( sample[ 1 ] < -1.0 ) sample[ 1 ] = -1.0;
+-
+ 			#ifndef WORDS_BIGENDIAN
+ 			int64swap( ( uint32_t * )sample );
+ 			int64swap( ( uint32_t * )( sample + 1 ) );
+@@ -403,12 +391,6 @@ void bs2b_cross_feed_dle( t_bs2bdp bs2bdp, double *sample, int n )
+ 
+ 			cross_feed_d( bs2bdp, sample );
+ 
+-			/* Clipping of overloaded samples */
+-			if( sample[ 0 ] >  1.0 ) sample[ 0 ] =  1.0;
+-			if( sample[ 0 ] < -1.0 ) sample[ 0 ] = -1.0;
+-			if( sample[ 1 ] >  1.0 ) sample[ 1 ] =  1.0;
+-			if( sample[ 1 ] < -1.0 ) sample[ 1 ] = -1.0;
+-
+ 			#ifdef WORDS_BIGENDIAN
+ 			int64swap( ( uint32_t * )sample );
+ 			int64swap( ( uint32_t * )( sample + 1 ) );
+@@ -432,12 +414,6 @@ void bs2b_cross_feed_f( t_bs2bdp bs2bdp, float *sample, int n )
+ 
+ 			cross_feed_d( bs2bdp, sample_d );
+ 
+-			/* Clipping of overloaded samples */
+-			if( sample_d[ 0 ] >  1.0 ) sample_d[ 0 ] =  1.0;
+-			if( sample_d[ 0 ] < -1.0 ) sample_d[ 0 ] = -1.0;
+-			if( sample_d[ 1 ] >  1.0 ) sample_d[ 1 ] =  1.0;
+-			if( sample_d[ 1 ] < -1.0 ) sample_d[ 1 ] = -1.0;
+-
+ 			sample[ 0 ] = ( float )sample_d[ 0 ];
+ 			sample[ 1 ] = ( float )sample_d[ 1 ];
+ 
+@@ -464,12 +440,6 @@ void bs2b_cross_feed_fbe( t_bs2bdp bs2bdp, float *sample, int n )
+ 
+ 			cross_feed_d( bs2bdp, sample_d );
+ 
+-			/* Clipping of overloaded samples */
+-			if( sample_d[ 0 ] >  1.0 ) sample_d[ 0 ] =  1.0;
+-			if( sample_d[ 0 ] < -1.0 ) sample_d[ 0 ] = -1.0;
+-			if( sample_d[ 1 ] >  1.0 ) sample_d[ 1 ] =  1.0;
+-			if( sample_d[ 1 ] < -1.0 ) sample_d[ 1 ] = -1.0;
+-
+ 			sample[ 0 ] = ( float )sample_d[ 0 ];
+ 			sample[ 1 ] = ( float )sample_d[ 1 ];
+ 
+@@ -501,12 +471,6 @@ void bs2b_cross_feed_fle( t_bs2bdp bs2bdp, float *sample, int n )
+ 
+ 			cross_feed_d( bs2bdp, sample_d );
+ 
+-			/* Clipping of overloaded samples */
+-			if( sample_d[ 0 ] >  1.0 ) sample_d[ 0 ] =  1.0;
+-			if( sample_d[ 0 ] < -1.0 ) sample_d[ 0 ] = -1.0;
+-			if( sample_d[ 1 ] >  1.0 ) sample_d[ 1 ] =  1.0;
+-			if( sample_d[ 1 ] < -1.0 ) sample_d[ 1 ] = -1.0;
+-
+ 			sample[ 0 ] = ( float )sample_d[ 0 ];
+ 			sample[ 1 ] = ( float )sample_d[ 1 ];
+ 

diff --git a/libbs2b.spec b/libbs2b.spec
index 6a18994..44e9b08 100644
--- a/libbs2b.spec
+++ b/libbs2b.spec
@@ -1,12 +1,13 @@
 Name:		libbs2b
 Version:	3.1.0
-Release:	38%{?dist}
+Release:	39%{?dist}
 Summary:	Bauer stereophonic-to-binaural DSP library
 
 License:	MIT
 URL:		http://bs2b.sourceforge.net/
 Source0:	http://downloads.sourceforge.net/project/bs2b/libbs2b/%{version}/%{name}-%{version}.tar.lzma
 Patch0:		libbs2b-security.patch
+Patch1:		libbs2b-dont-clip-samples.patch
 
 BuildRequires:  gcc-c++
 BuildRequires:	autoconf automake libtool
@@ -36,6 +37,7 @@ stereophonic-to-binaural (bs2b) DSP effect library.
 %prep
 %setup -q
 %patch -P0 -p1
+%patch -P1 -p1
 
 # automake 1.12 removes support for lzma, it has been replaced by xz
 # it is safe to substitute xz for lzma to get rid of autoreconf errors,
@@ -74,6 +76,9 @@ rm %{buildroot}/%{_libdir}/%{name}.la
 
 
 %changelog
+* Tue Sep 22 2026 Karel Volný <kvolny@redhat.com> 3.1.0-39
+- add patch not to clip floating point samples (rhbz#2261991)
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-38
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-22 11:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 11:42 [rpms/libbs2b] rawhide: add patch not to clip floating point samples (rhbz#2261991) 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox