[xiph-cvs] cvs commit: vorbis/lib mapping0.c

Monty xiphmont at xiph.org
Mon Feb 26 05:31:31 PST 2001



xiphmont    01/02/26 05:31:31

  Modified:    lib      mapping0.c
  Log:
  make sure |fft[0]| can't be negative (eits todB_nn)

Revision  Changes    Path
1.27      +2 -2      vorbis/lib/mapping0.c

Index: mapping0.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/mapping0.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- mapping0.c	2001/02/26 03:50:42	1.26
+++ mapping0.c	2001/02/26 13:31:31	1.27
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: channel mapping 0 implementation
- last mod: $Id: mapping0.c,v 1.26 2001/02/26 03:50:42 xiphmont Exp $
+ last mod: $Id: mapping0.c,v 1.27 2001/02/26 13:31:31 xiphmont Exp $
 
  ********************************************************************/
 
@@ -242,7 +242,7 @@
     /* FFT yields more accurate tonal estimation (not phase sensitive) */
     drft_forward(&look->fft_look,additional);
     
-    additional[0]*=scale;
+    additional[0]=fabs(additional[0]*scale);
     for(j=1;j<n-1;j+=2)
       additional[(j+1)>>1]=scale*FAST_HYPOT(additional[j],additional[j+1]);
 

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list