[Vorbis-dev] [PATCH] psy.c tweak
Michael W. Bombardieri
mb at ii.net
Wed Dec 12 00:48:01 PST 2012
Hi,
I am submitting a small patch for Vorbis psy.c...
* Make use of NEGINF constant where possible
Does this look OK?
- Michael
Index: psy.c
===================================================================
--- psy.c (revision 18737)
+++ psy.c (working copy)
@@ -29,7 +29,7 @@
#include "scales.h"
#include "misc.h"
-#define NEGINF -9999.f
+#define NEGINF (-9999.f)
static const double stereo_threshholds[]={0.0, .5, 1.0, 1.5, 2.5, 4.5, 8.5, 16.5, 9e10};
static const double stereo_threshholds_limited[]={0.0, .5, 1.0, 1.5, 2.0, 2.5, 4.5, 8.5, 9e10};
@@ -40,7 +40,7 @@
look->channels=vi->channels;
- look->ampmax=-9999.;
+ look->ampmax=NEGINF;
look->gi=gi;
return(look);
}
@@ -836,7 +836,7 @@
float secs=(float)n/vi->rate;
amp+=secs*gi->ampmax_att_per_sec;
- if(amp<-9999)amp=-9999;
+ if(amp<NEGINF)amp=NEGINF;
return(amp);
}
More information about the Vorbis-dev
mailing list