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

Michael Smith msmith at xiph.org
Thu Sep 7 06:23:45 PDT 2000



msmith      00/09/07 06:23:45

  Modified:    lib      psy.c
  Log:
  Backport of sqrt() domain fix to mainline.

Revision  Changes    Path
1.28      +2 -1      vorbis/lib/psy.c

Index: psy.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psy.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- psy.c	2000/08/31 08:01:34	1.27
+++ psy.c	2000/09/07 13:23:44	1.28
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: psychoacoustics not including preecho
- last mod: $Id: psy.c,v 1.27 2000/08/31 08:01:34 xiphmont Exp $
+ last mod: $Id: psy.c,v 1.28 2000/09/07 13:23:44 msmith Exp $
 
  ********************************************************************/
 
@@ -623,6 +623,7 @@
       acc-=prev*prev;
       prev=this;
     }
+	if(acc<0)acc=0; /* in case it happens on the final iteration */
     smooth[n-1]=sqrt(acc);
   }
 

--- >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