[xiph-cvs] cvs commit: vorbis/lib psy.c
Monty
xiphmont at xiph.org
Mon Dec 17 18:57:34 PST 2001
xiphmont 01/12/17 18:57:33
Modified: lib psy.c
Log:
Segher,
"You may remove the // comments" != "You may make 'optimizations' that
make your machine slightly faster and everything else slower the night
before a stable release".
Do not cause me extra work during deadlines in the future.
psy.c rolled back to 1.57
Monty
Revision Changes Path
1.59 +4 -2 vorbis/lib/psy.c
Index: psy.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psy.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- psy.c 2001/12/18 01:58:15 1.58
+++ psy.c 2001/12/18 02:57:30 1.59
@@ -11,7 +11,7 @@
********************************************************************
function: psychoacoustics not including preecho
- last mod: $Id: psy.c,v 1.58 2001/12/18 01:58:15 segher Exp $
+ last mod: $Id: psy.c,v 1.59 2001/12/18 02:57:30 xiphmont Exp $
********************************************************************/
@@ -925,18 +925,20 @@
float granule,float igranule,
float fmag, float *mag, float *ang){
- float corr;
+ float origmag=FAST_HYPOT(A*fA,B*fB),corr;
if(fmag!=0.f){
+
if(fabs(A)>fabs(B)){
*mag=A;
}else{
*mag=B;
}
- corr=sqrt((A*A*fA*fA+B*B*fB*fB)/(fA*fA+fB*fB))/fmag;
+ corr=origmag/FAST_HYPOT(fmag*fA,fmag*fB);
*mag=rint(*mag*corr*igranule)*granule;
*ang=0.f;
+
}else{
*mag=0.f;
*ang=0.f;
--- >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