[vlc-devel] commit: Workaround spatializer bugs. (Jean-Baptiste Kempf )

git version control git at videolan.org
Sun Sep 14 04:26:20 CEST 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Sep 13 19:14:02 2008 -0700| [8a486daed7bf38d6b336869685e49c0bbfa133db] | committer: Jean-Baptiste Kempf 

Workaround spatializer bugs.
(cherry picked from commit 77cc89e3d9349f3d5a2de947f9be478dd28436dd)
(cherry picked from commit 6d4830b864af38d7126aee103a6bcfe76bc80e89)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8a486daed7bf38d6b336869685e49c0bbfa133db
---

 modules/audio_filter/spatializer/comb.hpp    |    8 ++++++++
 modules/audio_filter/spatializer/denormals.h |    6 +++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/modules/audio_filter/spatializer/comb.hpp b/modules/audio_filter/spatializer/comb.hpp
index 8d35e90..71d4ef0 100644
--- a/modules/audio_filter/spatializer/comb.hpp
+++ b/modules/audio_filter/spatializer/comb.hpp
@@ -35,6 +35,13 @@ private:
 
 inline float comb::process(float input)
 {
+
+#if 1
+    /* FIXME FIXME FIXME
+     * comb::process is completly broken so ignore it for now */
+    return 0.0;
+
+#else
     float output;
 
     output = undenormalise( buffer[bufidx] );
@@ -46,6 +53,7 @@ inline float comb::process(float input)
     if(++bufidx>=bufsize) bufidx = 0;
 
     return output;
+#endif
 }
 
 #endif //_comb_
diff --git a/modules/audio_filter/spatializer/denormals.h b/modules/audio_filter/spatializer/denormals.h
index bab45c6..749c7cb 100644
--- a/modules/audio_filter/spatializer/denormals.h
+++ b/modules/audio_filter/spatializer/denormals.h
@@ -10,11 +10,11 @@
 
 #include <stdint.h>
 
+#include <math.h>
+
 static inline float undenormalise( float f )
 {
-    union { float f; uint32_t u; } data;
-    data.f = f;
-    if( (data.u & 0x7f800000) == 0 )
+    if( fpclassify( f ) == FP_SUBNORMAL  )
         return 0.0;
     return f;
 }




More information about the vlc-devel mailing list