[vorbis-dev] RESEND: Optimization patches!
Monty
xiphmont at xiph.org
Thu Dec 14 17:51:58 PST 2000
This is a multi-part message in MIME format.
--------------BE8F32D86CCA67A4673AA4B1
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sorry, I'd upped the limit on the wrong list.
From: Segher Boessenkool <segher at wanadoo.nl>
X-Mailer: Mozilla 4.73C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC)
X-Accept-Language: en
MIME-Version: 1.0
To: vorbis-dev at xiph.org
Subject:
Hello all,
Here are the first two patches in a series of many.
The 1st one is called "d.o.n", as in "diff old new";
the 2nd is called "d.n.m". I hope I won't need to
go any further than "d.b.a" ;-)
1st patch doesn't change bitstream (save from rounding
differences); 2nd doesn't change it _much_, it has
some small changes to the psycha.
The 1st adds a convenience Makefile as well.
Cheers,
Segher
--------------BE8F32D86CCA67A4673AA4B1
Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="74747874";
name="d.o.n"
Content-Transfer-Encoding: 7bit
Content-Description: Unknown Document
Content-Disposition: inline;
filename="d.o.n"
diff -ruN o/prof.make f/prof.make
--- o/prof.make Thu Jan 1 01:00:00 1970
+++ f/prof.make Sat Dec 9 23:47:18 2000
@@ -0,0 +1,72 @@
+DEFS=
+CC=gcc
+CFLAGS=-Ivorbis/lib \
+ -O9 -Wall -W -ffast-math -pg -fno-inline -static \
+ -mcpu=750 -mpowerpc -mfused-madd -mpowerpc-gpopt -mpowerpc-gfxopt
+LDFLAGS=-lm -pg -static
+
+SRCS=\
+ ogg/src/bitwise.c \
+ ogg/src/framing.c \
+ vorbis/lib/analysis.c \
+ vorbis/lib/bitbuffer.c \
+ vorbis/lib/block.c \
+ vorbis/lib/codebook.c \
+ vorbis/lib/envelope.c \
+ vorbis/lib/floor0.c \
+ vorbis/lib/iir.c \
+ vorbis/lib/info.c \
+ vorbis/lib/lpc.c \
+ vorbis/lib/lsp.c \
+ vorbis/lib/mdct.c \
+ vorbis/lib/mapping0.c \
+ vorbis/lib/psy.c \
+ vorbis/lib/registry.c \
+ vorbis/lib/res0.c \
+ vorbis/lib/sharedbook.c \
+ vorbis/lib/smallft.c \
+ vorbis/lib/synthesis.c \
+ vorbis/lib/time0.c \
+ vorbis/lib/vorbisenc.c \
+ vorbis/lib/window.c
+
+# vorbis/lib/barkmel.c \
+# vorbis/lib/lookup.c \
+# vorbis/lib/misc.c \
+# vorbis/lib/psytune.c \
+# vorbis/lib/tone.c \
+# vorbis/lib/vorbisfile.c \
+
+DESRCS=vorbis/examples/decoder_example.c
+ENSRCS=vorbis/examples/encoder_example.c
+
+OBJS=$(SRCS:.c=.o)
+DEOBJS=$(DESRCS:.c=.o)
+ENOBJS=$(ENSRCS:.c=.o)
+
+ASMS=$(SRCS:.c=.s)
+
+PRGS=decoder encoder
+
+all: $(PRGS)
+
+decoder: $(OBJS) $(DEOBJS)
+ $(CC) -o decoder $(OBJS) $(DEOBJS) $(LDFLAGS)
+
+encoder: $(OBJS) $(ENOBJS)
+ $(CC) -o encoder $(OBJS) $(ENOBJS) $(LDFLAGS)
+
+%.o: %.c
+ $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
+
+%.s: %.c
+ $(CC) $(DEFS) $(CFLAGS) -fverbose-asm -S $< -o $@
+
+asm: $(ASMS)
+
+clean:
+ rm -f $(OBJS) $(DEOBJS) $(ENOBJS) core $(PRGS)
+
+veryclean: clean
+ rm -f $(ASMS)
+
diff -ruN o/vorbis/examples/decoder_example.c f/vorbis/examples/decoder_example.c
--- o/vorbis/examples/decoder_example.c Mon Nov 6 01:06:53 2000
+++ f/vorbis/examples/decoder_example.c Sat Dec 9 22:39:52 2000
@@ -240,9 +240,9 @@
float *mono=pcm[i];
for(j=0;j<bout;j++){
#if 1
- int val=mono[j]*32767.;
+ int val=mono[j]*32767.f;
#else /* optional dither */
- int val=mono[j]*32767.+drand48()-0.5;
+ int val=mono[j]*32767.f+drand48()-0.5f;
#endif
/* might as well guard against clipping */
if(val>32767){
diff -ruN o/vorbis/examples/encoder_example.c f/vorbis/examples/encoder_example.c
--- o/vorbis/examples/encoder_example.c Mon Nov 6 01:06:53 2000
+++ f/vorbis/examples/encoder_example.c Sat Dec 9 22:39:57 2000
@@ -147,9 +147,9 @@
/* uninterleave samples */
for(i=0;i<bytes/4;i++){
buffer[0][i]=((readbuffer[i*4+1]<<8)|
- (0x00ff&(int)readbuffer[i*4]))/32768.;
+ (0x00ff&(int)readbuffer[i*4]))/32768.f;
buffer[1][i]=((readbuffer[i*4+3]<<8)|
- (0x00ff&(int)readbuffer[i*4+2]))/32768.;
+ (0x00ff&(int)readbuffer[i*4+2]))/32768.f;
}
/* tell the library how much we actually submitted */
diff -ruN o/vorbis/lib/analysis.c f/vorbis/lib/analysis.c
--- o/vorbis/lib/analysis.c Thu Nov 16 23:15:28 2000
+++ f/vorbis/lib/analysis.c Sat Dec 9 22:46:14 2000
@@ -91,7 +91,7 @@
fprintf(of,"\n\n");
else{
if(bark)
- fprintf(of,"%g ",toBARK(22050.*j/n));
+ fprintf(of,"%g ",toBARK(22050.f*j/n));
else
fprintf(of,"%g ",(double)j);
@@ -103,5 +103,7 @@
}
}
fclose(of);
+#else
+ (void)base, (void)i, (void)v, (void)n, (void)bark, (void)dB;
#endif
}
diff -ruN o/vorbis/lib/barkmel.c f/vorbis/lib/barkmel.c
--- o/vorbis/lib/barkmel.c Mon Nov 6 01:07:00 2000
+++ f/vorbis/lib/barkmel.c Sat Dec 9 22:40:18 2000
@@ -22,31 +22,31 @@
int i;
double rate;
for(i=64;i<32000;i*=2){
- rate=48000.;
+ rate=48000.f;
fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
- rate=44100.;
+ rate=44100.f;
fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
- rate=32000.;
+ rate=32000.f;
fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
- rate=22050.;
+ rate=22050.f;
fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
- rate=16000.;
+ rate=16000.f;
fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
- rate=11025.;
+ rate=11025.f;
fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
- rate=8000.;
+ rate=8000.f;
fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n\n",
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
diff -ruN o/vorbis/lib/bitbuffer.c f/vorbis/lib/bitbuffer.c
--- o/vorbis/lib/bitbuffer.c Fri Nov 17 12:57:49 2000
+++ f/vorbis/lib/bitbuffer.c Sat Dec 9 22:46:52 2000
@@ -46,7 +46,6 @@
}
void bitbuf_pack(oggpack_buffer *dest,vorbis_bitbuffer *vbb){
- vorbis_block *vb=vbb->vb;
vorbis_bitbuffer_chain *vbc=vbb->first;
int i;
diff -ruN o/vorbis/lib/block.c f/vorbis/lib/block.c
--- o/vorbis/lib/block.c Tue Nov 14 01:05:30 2000
+++ f/vorbis/lib/block.c Sat Dec 9 22:50:43 2000
@@ -677,6 +677,8 @@
beginSl=ci->blocksizes[1]/4-ci->blocksizes[v->lW]/4;
endSl=beginSl+ci->blocksizes[v->lW]/2;
break;
+ default:
+ return(-1);
}
for(j=0;j<vi->channels;j++){
diff -ruN o/vorbis/lib/codebook.c f/vorbis/lib/codebook.c
--- o/vorbis/lib/codebook.c Mon Nov 6 01:07:00 2000
+++ f/vorbis/lib/codebook.c Sat Dec 9 23:16:22 2000
@@ -127,6 +127,8 @@
/* every value (c->entries*c->dim total) specified explicitly */
quantvals=c->entries*c->dim;
break;
+ default: /* NOT_REACHABLE */
+ quantvals=-1;
}
/* quantized values */
@@ -429,55 +432,55 @@
#define TESTSIZE 40
float test1[TESTSIZE]={
- 0.105939,
- 0.215373,
- 0.429117,
- 0.587974,
-
- 0.181173,
- 0.296583,
- 0.515707,
- 0.715261,
-
- 0.162327,
- 0.263834,
- 0.342876,
- 0.406025,
-
- 0.103571,
- 0.223561,
- 0.368513,
- 0.540313,
-
- 0.136672,
- 0.395882,
- 0.587183,
- 0.652476,
-
- 0.114338,
- 0.417300,
- 0.525486,
- 0.698679,
-
- 0.147492,
- 0.324481,
- 0.643089,
- 0.757582,
-
- 0.139556,
- 0.215795,
- 0.324559,
- 0.399387,
-
- 0.120236,
- 0.267420,
- 0.446940,
- 0.608760,
-
- 0.115587,
- 0.287234,
- 0.571081,
- 0.708603,
+ 0.105939f,
+ 0.215373f,
+ 0.429117f,
+ 0.587974f,
+
+ 0.181173f,
+ 0.296583f,
+ 0.515707f,
+ 0.715261f,
+
+ 0.162327f,
+ 0.263834f,
+ 0.342876f,
+ 0.406025f,
+
+ 0.103571f,
+ 0.223561f,
+ 0.368513f,
+ 0.540313f,
+
+ 0.136672f,
+ 0.395882f,
+ 0.587183f,
+ 0.652476f,
+
+ 0.114338f,
+ 0.417300f,
+ 0.525486f,
+ 0.698679f,
+
+ 0.147492f,
+ 0.324481f,
+ 0.643089f,
+ 0.757582f,
+
+ 0.139556f,
+ 0.215795f,
+ 0.324559f,
+ 0.399387f,
+
+ 0.120236f,
+ 0.267420f,
+ 0.446940f,
+ 0.608760f,
+
+ 0.115587f,
+ 0.287234f,
+ 0.571081f,
+ 0.708603f,
};
float test3[TESTSIZE]={
diff -ruN o/vorbis/lib/envelope.c f/vorbis/lib/envelope.c
--- o/vorbis/lib/envelope.c Tue Nov 14 01:05:30 2000
+++ f/vorbis/lib/envelope.c Sat Dec 9 23:08:06 2000
@@ -41,36 +41,36 @@
#if 0
static int cheb_bandpass_stages=10;
-static float cheb_bandpass_gain=5.589612458e+01;
-static float cheb_bandpass_B[]={-1.,0.,5.,0.,-10.,0.,10.,0.,-5.,0.,1};
+static float cheb_bandpass_gain=5.589612458e+01f;
+static float cheb_bandpass_B[]={-1.f,0.f,5.f,0.f,-10.f,0.f,10.f,0.f,-5.f,0.f,1.f};
static float cheb_bandpass_A[]={
- -0.1917409386,
- 0.0078657069,
- -0.7126903444,
- 0.0266343467,
- -1.4047174730,
- 0.0466964232,
- -1.9032773429,
- 0.0451493360,
- -1.4471447397,
- 0.0303413711};
+ -0.1917409386f,
+ 0.0078657069f,
+ -0.7126903444f,
+ 0.0266343467f,
+ -1.4047174730f,
+ 0.0466964232f,
+ -1.9032773429f,
+ 0.0451493360f,
+ -1.4471447397f,
+ 0.0303413711f};
#endif
static int cheb_highpass_stages=10;
-static float cheb_highpass_gain= 5.291963434e+01;
+static float cheb_highpass_gain= 5.291963434e+01f;
/* z^-stage, z^-stage+1... */
-static float cheb_highpass_B[]={1,-10,45,-120,210,-252,210,-120,45,-10,1};
+static float cheb_highpass_B[]={1.f,-10.f,45.f,-120.f,210.f,-252.f,210.f,-120.f,45.f,-10.f,1.f};
static float cheb_highpass_A[]={
- -0.1247628029,
- 0.1334086523,
- -0.3997715614,
- 0.3213011089,
- -1.1131924119,
- 1.7692446626,
- -3.6241199038,
- 4.1950871291,
- -4.2771757867,
- 2.3920318913};
+ -0.1247628029f,
+ 0.1334086523f,
+ -0.3997715614f,
+ 0.3213011089f,
+ -1.1131924119f,
+ 1.7692446626f,
+ -3.6241199038f,
+ 4.1950871291f,
+ -4.2771757867f,
+ 2.3920318913f};
void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi){
codec_setup_info *ci=vi->codec_setup;
@@ -113,9 +113,11 @@
long n2=ve->winlength*2;
long n=ve->winlength;
- float *workA=alloca(sizeof(float)*n2),A=0.;
- float *workB=alloca(sizeof(float)*n2),B=0.;
+ float *workA=alloca(sizeof(float)*n2),A=0.f;
+ float *workB=alloca(sizeof(float)*n2),B=0.f;
long i;
+
+ (void)iir;
/*_analysis_output("A",granulepos,pre,n,0,0);
_analysis_output("B",granulepos,post,n,0,0);*/
diff -ruN o/vorbis/lib/floor0.c f/vorbis/lib/floor0.c
--- o/vorbis/lib/floor0.c Thu Dec 7 08:26:20 2000
+++ f/vorbis/lib/floor0.c Sat Dec 9 23:08:51 2000
@@ -51,7 +51,7 @@
float *workfit,
int cursor){
int dim=book->dim;
- float norm,base=0.;
+ float norm,base=0.f;
int i,best=0;
float *lsp=workfit+cursor;
@@ -163,7 +163,7 @@
/* we choose a scaling constant so that:
floor(bark(rate/2-1)*C)=mapped-1
floor(bark(rate/2)*C)=mapped */
- scale=look->ln/toBARK(info->rate/2.);
+ scale=look->ln/toBARK(info->rate/2.f);
/* the mapping from a linear scale to a smaller bark scale is
straightforward. We do *not* make sure that the linear mapping
@@ -173,11 +173,11 @@
accurate */
look->linearmap=_ogg_malloc((look->n+1)*sizeof(int));
for(j=0;j<look->n;j++){
- int val=floor( toBARK((info->rate/2.)/look->n*j)
+ int val=floor( toBARK((info->rate/2.f)/look->n*j)
*scale); /* bark numbers represent band edges */
if(val>=look->ln)val=look->ln; /* guard against the approximation */
look->linearmap[j]=val;
- fprintf(stderr,"%ld:%ld ",val,j);
+ fprintf(stderr,"%d:%d ",val,j);
}
fprintf(stderr,"\n");
look->linearmap[j]=-1;
@@ -226,7 +226,7 @@
long span=bark-last;
for(j=1;j<span;j++){
float del=(float)j/span;
- work[j+last]=work[bark]*del+work[last]*(1.-del);
+ work[j+last]=work[bark]*del+work[last]*(1.f-del);
}
}
last=bark;
@@ -320,7 +320,7 @@
#if 1
#ifdef TRAIN_LSP
{
- float last=0.;
+ float last=0.f;
for(j=0;j<look->m;j++){
fprintf(of,"%.12g, ",out[j]-last);
last=out[j];
@@ -388,7 +388,7 @@
bitbuf_pack(&vb->opb,vbb);
return(fromdB((float)adj/maxval*info->ampdB));
}
- return(0.);
+ return(0.f);
}
@@ -407,7 +407,7 @@
if(booknum!=-1){
backend_lookup_state *be=vb->vd->backend_state;
codebook *b=be->fullbooks+info->books[booknum];
- float last=0.;
+ float last=0.f;
memset(out,0,sizeof(float)*look->m);
diff -ruN o/vorbis/lib/iir.c f/vorbis/lib/iir.c
--- o/vorbis/lib/iir.c Tue Nov 14 01:05:31 2000
+++ f/vorbis/lib/iir.c Sat Dec 9 22:40:55 2000
@@ -98,155 +98,155 @@
#ifdef _V_SELFTEST
-/* z^-stage, z^-stage+1... */
-static float cheb_bandpass_B[]={-1.,0.,5.,0.,-10.,0.,10.,0.,-5.,0.,1};
-static float cheb_bandpass_A[]={-0.6665900311,
- 1.0070146601,
- -3.1262875409,
- 3.5017171569,
- -6.2779211945,
- 5.2966481740,
- -6.7570216587,
- 4.0760335768,
- -3.9134284363,
- 1.3997338886};
+/* z^-stage, z^-stage+1... */
+static float cheb_bandpass_B[]={-1.f,0.f,5.f,0.f,-10.f,0.f,10.f,0.f,-5.f,0.f,1};
+static float cheb_bandpass_A[]={-0.6665900311f,
+ 1.0070146601f,
+ -3.1262875409f,
+ 3.5017171569f,
+ -6.2779211945f,
+ 5.2966481740f,
+ -6.7570216587f,
+ 4.0760335768f,
+ -3.9134284363f,
+ 1.3997338886f};
static float data[128]={
- 0.0426331,
- 0.0384521,
- 0.0345764,
- 0.0346069,
- 0.0314636,
- 0.0310059,
- 0.0318604,
- 0.0336304,
- 0.036438,
- 0.0348511,
- 0.0354919,
- 0.0343628,
- 0.0325623,
- 0.0318909,
- 0.0263367,
- 0.0225525,
- 0.0195618,
- 0.0160828,
- 0.0168762,
- 0.0145569,
- 0.0126343,
- 0.0127258,
- 0.00820923,
- 0.00787354,
- 0.00558472,
- 0.00204468,
- 3.05176e-05,
- -0.00357056,
- -0.00570679,
- -0.00991821,
- -0.0101013,
- -0.00881958,
- -0.0108948,
- -0.0110168,
- -0.0119324,
- -0.0161438,
- -0.0194702,
- -0.0229187,
- -0.0260315,
- -0.0282288,
- -0.0306091,
- -0.0330505,
- -0.0364685,
- -0.0385742,
- -0.0428772,
- -0.043457,
- -0.0425415,
- -0.0462341,
- -0.0467529,
- -0.0489807,
- -0.0520325,
- -0.0558167,
- -0.0596924,
- -0.0591431,
- -0.0612793,
- -0.0618591,
- -0.0615845,
- -0.0634155,
- -0.0639648,
- -0.0683594,
- -0.0718079,
- -0.0729675,
- -0.0791931,
- -0.0860901,
- -0.0885315,
- -0.088623,
- -0.089386,
- -0.0899353,
- -0.0886841,
- -0.0910645,
- -0.0948181,
- -0.0919495,
- -0.0891418,
- -0.0916443,
- -0.096344,
- -0.100464,
- -0.105499,
- -0.108612,
- -0.112213,
- -0.117676,
- -0.120911,
- -0.124329,
- -0.122162,
- -0.120605,
- -0.12326,
- -0.12619,
- -0.128998,
- -0.13205,
- -0.134247,
- -0.137939,
- -0.143555,
- -0.14389,
- -0.14859,
- -0.153717,
- -0.159851,
- -0.164551,
- -0.162811,
- -0.164276,
- -0.156952,
- -0.140564,
- -0.123291,
- -0.10321,
- -0.0827637,
- -0.0652466,
- -0.053772,
- -0.0509949,
- -0.0577698,
- -0.0818176,
- -0.114929,
- -0.148895,
- -0.181122,
- -0.200714,
- -0.21048,
- -0.203644,
- -0.179413,
- -0.145325,
- -0.104492,
- -0.0658264,
- -0.0332031,
- -0.0106201,
- -0.00363159,
- -0.00909424,
- -0.0244141,
- -0.0422058,
- -0.0537415,
- -0.0610046,
- -0.0609741,
- -0.0547791};
+ 0.0426331f,
+ 0.0384521f,
+ 0.0345764f,
+ 0.0346069f,
+ 0.0314636f,
+ 0.0310059f,
+ 0.0318604f,
+ 0.0336304f,
+ 0.036438f,
+ 0.0348511f,
+ 0.0354919f,
+ 0.0343628f,
+ 0.0325623f,
+ 0.0318909f,
+ 0.0263367f,
+ 0.0225525f,
+ 0.0195618f,
+ 0.0160828f,
+ 0.0168762f,
+ 0.0145569f,
+ 0.0126343f,
+ 0.0127258f,
+ 0.00820923f,
+ 0.00787354f,
+ 0.00558472f,
+ 0.00204468f,
+ 3.05176fe-05,
+ -0.00357056f,
+ -0.00570679f,
+ -0.00991821f,
+ -0.0101013f,
+ -0.00881958f,
+ -0.0108948f,
+ -0.0110168f,
+ -0.0119324f,
+ -0.0161438f,
+ -0.0194702f,
+ -0.0229187f,
+ -0.0260315f,
+ -0.0282288f,
+ -0.0306091f,
+ -0.0330505f,
+ -0.0364685f,
+ -0.0385742f,
+ -0.0428772f,
+ -0.043457f,
+ -0.0425415f,
+ -0.0462341f,
+ -0.0467529f,
+ -0.0489807f,
+ -0.0520325f,
+ -0.0558167f,
+ -0.0596924f,
+ -0.0591431f,
+ -0.0612793f,
+ -0.0618591f,
+ -0.0615845f,
+ -0.0634155f,
+ -0.0639648f,
+ -0.0683594f,
+ -0.0718079f,
+ -0.0729675f,
+ -0.0791931f,
+ -0.0860901f,
+ -0.0885315f,
+ -0.088623f,
+ -0.089386f,
+ -0.0899353f,
+ -0.0886841f,
+ -0.0910645f,
+ -0.0948181f,
+ -0.0919495f,
+ -0.0891418f,
+ -0.0916443f,
+ -0.096344f,
+ -0.100464f,
+ -0.105499f,
+ -0.108612f,
+ -0.112213f,
+ -0.117676f,
+ -0.120911f,
+ -0.124329f,
+ -0.122162f,
+ -0.120605f,
+ -0.12326f,
+ -0.12619f,
+ -0.128998f,
+ -0.13205f,
+ -0.134247f,
+ -0.137939f,
+ -0.143555f,
+ -0.14389f,
+ -0.14859f,
+ -0.153717f,
+ -0.159851f,
+ -0.164551f,
+ -0.162811f,
+ -0.164276f,
+ -0.156952f,
+ -0.140564f,
+ -0.123291f,
+ -0.10321f,
+ -0.0827637f,
+ -0.0652466f,
+ -0.053772f,
+ -0.0509949f,
+ -0.0577698f,
+ -0.0818176f,
+ -0.114929f,
+ -0.148895f,
+ -0.181122f,
+ -0.200714f,
+ -0.21048f,
+ -0.203644f,
+ -0.179413f,
+ -0.145325f,
+ -0.104492f,
+ -0.0658264f,
+ -0.0332031f,
+ -0.0106201f,
+ -0.00363159f,
+ -0.00909424f,
+ -0.0244141f,
+ -0.0422058f,
+ -0.0537415f,
+ -0.0610046f,
+ -0.0609741f,
+ -0.0547791f};
/* comparison test code from http://www-users.cs.york.ac.uk/~fisher/mkfilter/
(the above page kicks ass, BTW)*/
#define NZEROS 10
#define NPOLES 10
-#define GAIN 4.599477515e+02
+#define GAIN 4.599477515e+02f
static float xv[NZEROS+1], yv[NPOLES+1];
@@ -257,11 +257,11 @@
yv[0] = yv[1]; yv[1] = yv[2]; yv[2] = yv[3]; yv[3] = yv[4]; yv[4] = yv[5];
yv[5] = yv[6]; yv[6] = yv[7]; yv[7] = yv[8]; yv[8] = yv[9]; yv[9] = yv[10];
yv[10] = (xv[10] - xv[0]) + 5 * (xv[2] - xv[8]) + 10 * (xv[6] - xv[4])
- + ( -0.6665900311 * yv[0]) + ( 1.0070146601 * yv[1])
- + ( -3.1262875409 * yv[2]) + ( 3.5017171569 * yv[3])
- + ( -6.2779211945 * yv[4]) + ( 5.2966481740 * yv[5])
- + ( -6.7570216587 * yv[6]) + ( 4.0760335768 * yv[7])
- + ( -3.9134284363 * yv[8]) + ( 1.3997338886 * yv[9]);
+ + ( -0.6665900311f * yv[0]) + ( 1.0070146601f * yv[1])
+ + ( -3.1262875409f * yv[2]) + ( 3.5017171569f * yv[3])
+ + ( -6.2779211945f * yv[4]) + ( 5.2966481740f * yv[5])
+ + ( -6.7570216587f * yv[6]) + ( 4.0760335768f * yv[7])
+ + ( -3.9134284363f * yv[8]) + ( 1.3997338886f * yv[9]);
return(yv[10]);
}
diff -ruN o/vorbis/lib/lookup.c f/vorbis/lib/lookup.c
--- o/vorbis/lib/lookup.c Mon Nov 6 01:07:01 2000
+++ f/vorbis/lib/lookup.c Sat Dec 9 22:41:04 2000
@@ -31,40 +31,40 @@
return COS_LOOKUP[i]+ (d-i)*(COS_LOOKUP[i+1]-COS_LOOKUP[i]);
}
-/* interpolated 1./sqrt(p) where .5 <= p < 1. */
+/* interpolated 1./sqrt(p) where .5 <= p < 1. */
float vorbis_invsqlook(float a){
- double d=a*(2.*(float)INVSQ_LOOKUP_SZ)-(float)INVSQ_LOOKUP_SZ;
+ double d=a*(2.f*(float)INVSQ_LOOKUP_SZ)-(float)INVSQ_LOOKUP_SZ;
int i=vorbis_ftoi(d-.5);
return INVSQ_LOOKUP[i]+ (d-i)*(INVSQ_LOOKUP[i+1]-INVSQ_LOOKUP[i]);
}
-/* interpolated 1./sqrt(p) where .5 <= p < 1. */
-float vorbis_invsq2explook(int a){
- return INVSQ2EXP_LOOKUP[a-INVSQ2EXP_LOOKUP_MIN];
+/* interpolated 1./sqrt(p) where .5 <= p < 1. */
+float vorbis_invsq2efxplook(int a){
+ return INVSQ2EfXP_LOOKUP[a-INVSQ2EfXP_LOOKUP_MIN];
}
#include <stdio.h>
/* interpolated lookup based fromdB function, domain -140dB to 0dB only */
float vorbis_fromdBlook(float a){
- int i=vorbis_ftoi(a*((float)(-(1<<FROMdB2_SHIFT)))-5.);
- return (i<0)?1.:
- ((i>=(FROMdB_LOOKUP_SZ<<FROMdB_SHIFT))?0.:
+ int i=vorbis_ftoi(a*((float)(-(1<<FROMdB2_SHIFT)))-5.f);
+ return (i<0)?1.f:
+ ((i>=(FROMdB_LOOKUP_SZ<<FROMdB_SHIFT))?0.f:
FROMdB_LOOKUP[i>>FROMdB_SHIFT]*FROMdB2_LOOKUP[i&FROMdB2_MASK]);
}
#endif
#ifdef INT_LOOKUP
-/* interpolated 1./sqrt(p) where .5 <= a < 1. (.100000... to .111111...) in
- 16.16 format
+/* interpolated 1./sqrt(p) where .5 <= a < 1. (.100000... to .111111...) in
+ 16.16 format
returns in m.8 format */
long vorbis_invsqlook_i(long a,long e){
long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1);
- long d=(a&INVSQ_LOOKUP_I_MASK)<<(16-INVSQ_LOOKUP_I_SHIFT); /* 0.16 */
- long val=INVSQ_LOOKUP_I[i]- /* 1.16 */
- (((INVSQ_LOOKUP_I[i]-INVSQ_LOOKUP_I[i+1])* /* 0.16 */
- d)>>16); /* result 1.16 */
+ long d=(a&INVSQ_LOOKUP_I_MASK)<<(16-INVSQ_LOOKUP_I_SHIFT); /* 0.16 */
+ long val=INVSQ_LOOKUP_I[i]- /* 1.16 */
+ (((INVSQ_LOOKUP_I[i]-INVSQ_LOOKUP_I[i+1])* /* 0.16 */
+ d)>>16); /* result 1.16 */
e+=32;
if(e&1)val=(val*5792)>>13; /* multiply val by 1/sqrt(2) */
@@ -77,13 +77,13 @@
/* a is in n.12 format */
float vorbis_fromdBlook_i(long a){
int i=(-a)>>(12-FROMdB2_SHIFT);
- return (i<0)?1.:
- ((i>=(FROMdB_LOOKUP_SZ<<FROMdB_SHIFT))?0.:
+ return (i<0)?1.f:
+ ((i>=(FROMdB_LOOKUP_SZ<<FROMdB_SHIFT))?0.f:
FROMdB_LOOKUP[i>>FROMdB_SHIFT]*FROMdB2_LOOKUP[i&FROMdB2_MASK]);
}
/* interpolated lookup based cos function, domain 0 to PI only */
-/* a is in 0.16 format, where 0==0, 2^^16-1==PI, return 0.14 */
+/* a is in 0.16 format, where 0==0, 2^^16-1==PI, return 0.14 */
long vorbis_coslook_i(long a){
int i=a>>COS_LOOKUP_I_SHIFT;
int d=a&COS_LOOKUP_I_MASK;
diff -ruN o/vorbis/lib/lookup_data.h f/vorbis/lib/lookup_data.h
--- o/vorbis/lib/lookup_data.h Mon Nov 6 01:07:01 2000
+++ f/vorbis/lib/lookup_data.h Sat Dec 9 22:21:35 2000
@@ -21,75 +21,75 @@
#ifdef FLOAT_LOOKUP
#define COS_LOOKUP_SZ 128
static float COS_LOOKUP[COS_LOOKUP_SZ+1]={
- +1.0000000000000,+0.9996988186962,+0.9987954562052,+0.9972904566787,
- +0.9951847266722,+0.9924795345987,+0.9891765099648,+0.9852776423889,
- +0.9807852804032,+0.9757021300385,+0.9700312531945,+0.9637760657954,
- +0.9569403357322,+0.9495281805930,+0.9415440651830,+0.9329927988347,
- +0.9238795325113,+0.9142097557035,+0.9039892931234,+0.8932243011955,
- +0.8819212643484,+0.8700869911087,+0.8577286100003,+0.8448535652497,
- +0.8314696123025,+0.8175848131516,+0.8032075314806,+0.7883464276266,
- +0.7730104533627,+0.7572088465065,+0.7409511253550,+0.7242470829515,
- +0.7071067811865,+0.6895405447371,+0.6715589548470,+0.6531728429538,
- +0.6343932841636,+0.6152315905806,+0.5956993044924,+0.5758081914178,
- +0.5555702330196,+0.5349976198871,+0.5141027441932,+0.4928981922298,
- +0.4713967368260,+0.4496113296546,+0.4275550934303,+0.4052413140050,
- +0.3826834323651,+0.3598950365350,+0.3368898533922,+0.3136817403989,
- +0.2902846772545,+0.2667127574749,+0.2429801799033,+0.2191012401569,
- +0.1950903220161,+0.1709618887603,+0.1467304744554,+0.1224106751992,
- +0.0980171403296,+0.0735645635997,+0.0490676743274,+0.0245412285229,
- +0.0000000000000,-0.0245412285229,-0.0490676743274,-0.0735645635997,
- -0.0980171403296,-0.1224106751992,-0.1467304744554,-0.1709618887603,
- -0.1950903220161,-0.2191012401569,-0.2429801799033,-0.2667127574749,
- -0.2902846772545,-0.3136817403989,-0.3368898533922,-0.3598950365350,
- -0.3826834323651,-0.4052413140050,-0.4275550934303,-0.4496113296546,
- -0.4713967368260,-0.4928981922298,-0.5141027441932,-0.5349976198871,
- -0.5555702330196,-0.5758081914178,-0.5956993044924,-0.6152315905806,
- -0.6343932841636,-0.6531728429538,-0.6715589548470,-0.6895405447371,
- -0.7071067811865,-0.7242470829515,-0.7409511253550,-0.7572088465065,
- -0.7730104533627,-0.7883464276266,-0.8032075314806,-0.8175848131516,
- -0.8314696123025,-0.8448535652497,-0.8577286100003,-0.8700869911087,
- -0.8819212643484,-0.8932243011955,-0.9039892931234,-0.9142097557035,
- -0.9238795325113,-0.9329927988347,-0.9415440651830,-0.9495281805930,
- -0.9569403357322,-0.9637760657954,-0.9700312531945,-0.9757021300385,
- -0.9807852804032,-0.9852776423889,-0.9891765099648,-0.9924795345987,
- -0.9951847266722,-0.9972904566787,-0.9987954562052,-0.9996988186962,
- -1.0000000000000,
+ +1.0000000000000f,+0.9996988186962f,+0.9987954562052f,+0.9972904566787f,
+ +0.9951847266722f,+0.9924795345987f,+0.9891765099648f,+0.9852776423889f,
+ +0.9807852804032f,+0.9757021300385f,+0.9700312531945f,+0.9637760657954f,
+ +0.9569403357322f,+0.9495281805930f,+0.9415440651830f,+0.9329927988347f,
+ +0.9238795325113f,+0.9142097557035f,+0.9039892931234f,+0.8932243011955f,
+ +0.8819212643484f,+0.8700869911087f,+0.8577286100003f,+0.8448535652497f,
+ +0.8314696123025f,+0.8175848131516f,+0.8032075314806f,+0.7883464276266f,
+ +0.7730104533627f,+0.7572088465065f,+0.7409511253550f,+0.7242470829515f,
+ +0.7071067811865f,+0.6895405447371f,+0.6715589548470f,+0.6531728429538f,
+ +0.6343932841636f,+0.6152315905806f,+0.5956993044924f,+0.5758081914178f,
+ +0.5555702330196f,+0.5349976198871f,+0.5141027441932f,+0.4928981922298f,
+ +0.4713967368260f,+0.4496113296546f,+0.4275550934303f,+0.4052413140050f,
+ +0.3826834323651f,+0.3598950365350f,+0.3368898533922f,+0.3136817403989f,
+ +0.2902846772545f,+0.2667127574749f,+0.2429801799033f,+0.2191012401569f,
+ +0.1950903220161f,+0.1709618887603f,+0.1467304744554f,+0.1224106751992f,
+ +0.0980171403296f,+0.0735645635997f,+0.0490676743274f,+0.0245412285229f,
+ +0.0000000000000f,-0.0245412285229f,-0.0490676743274f,-0.0735645635997f,
+ -0.0980171403296f,-0.1224106751992f,-0.1467304744554f,-0.1709618887603f,
+ -0.1950903220161f,-0.2191012401569f,-0.2429801799033f,-0.2667127574749f,
+ -0.2902846772545f,-0.3136817403989f,-0.3368898533922f,-0.3598950365350f,
+ -0.3826834323651f,-0.4052413140050f,-0.4275550934303f,-0.4496113296546f,
+ -0.4713967368260f,-0.4928981922298f,-0.5141027441932f,-0.5349976198871f,
+ -0.5555702330196f,-0.5758081914178f,-0.5956993044924f,-0.6152315905806f,
+ -0.6343932841636f,-0.6531728429538f,-0.6715589548470f,-0.6895405447371f,
+ -0.7071067811865f,-0.7242470829515f,-0.7409511253550f,-0.7572088465065f,
+ -0.7730104533627f,-0.7883464276266f,-0.8032075314806f,-0.8175848131516f,
+ -0.8314696123025f,-0.8448535652497f,-0.8577286100003f,-0.8700869911087f,
+ -0.8819212643484f,-0.8932243011955f,-0.9039892931234f,-0.9142097557035f,
+ -0.9238795325113f,-0.9329927988347f,-0.9415440651830f,-0.9495281805930f,
+ -0.9569403357322f,-0.9637760657954f,-0.9700312531945f,-0.9757021300385f,
+ -0.9807852804032f,-0.9852776423889f,-0.9891765099648f,-0.9924795345987f,
+ -0.9951847266722f,-0.9972904566787f,-0.9987954562052f,-0.9996988186962f,
+ -1.0000000000000f,
};
#define INVSQ_LOOKUP_SZ 32
static float INVSQ_LOOKUP[INVSQ_LOOKUP_SZ+1]={
- 1.414213562373,1.392621247646,1.371988681140,1.352246807566,
- 1.333333333333,1.315191898443,1.297771369046,1.281025230441,
- 1.264911064067,1.249390095109,1.234426799697,1.219988562661,
- 1.206045378311,1.192569588000,1.179535649239,1.166919931983,
- 1.154700538379,1.142857142857,1.131370849898,1.120224067222,
- 1.109400392450,1.098884511590,1.088662107904,1.078719779941,
- 1.069044967650,1.059625885652,1.050451462878,1.041511287847,
- 1.032795558989,1.024295039463,1.016001016002,1.007905261358,
- 1.000000000000,
-};
-
-#define INVSQ2EXP_LOOKUP_MIN -32
-#define INVSQ2EXP_LOOKUP_MAX 32
-static float INVSQ2EXP_LOOKUP[INVSQ2EXP_LOOKUP_MAX-\
- INVSQ2EXP_LOOKUP_MIN+1]={
- 65536, 46340.95001, 32768, 23170.47501,
- 16384, 11585.2375, 8192, 5792.618751,
- 4096, 2896.309376, 2048, 1448.154688,
- 1024, 724.0773439, 512, 362.038672,
- 256, 181.019336, 128, 90.50966799,
- 64, 45.254834, 32, 22.627417,
- 16, 11.3137085, 8, 5.656854249,
- 4, 2.828427125, 2, 1.414213562,
- 1, 0.7071067812, 0.5, 0.3535533906,
- 0.25, 0.1767766953, 0.125, 0.08838834765,
- 0.0625, 0.04419417382, 0.03125, 0.02209708691,
- 0.015625, 0.01104854346, 0.0078125, 0.005524271728,
- 0.00390625, 0.002762135864, 0.001953125, 0.001381067932,
- 0.0009765625, 0.000690533966, 0.00048828125, 0.000345266983,
- 0.000244140625,0.0001726334915,0.0001220703125,8.631674575e-05,
- 6.103515625e-05,4.315837288e-05,3.051757812e-05,2.157918644e-05,
- 1.525878906e-05,
+ 1.414213562373f,1.392621247646f,1.371988681140f,1.352246807566f,
+ 1.333333333333f,1.315191898443f,1.297771369046f,1.281025230441f,
+ 1.264911064067f,1.249390095109f,1.234426799697f,1.219988562661f,
+ 1.206045378311f,1.192569588000f,1.179535649239f,1.166919931983f,
+ 1.154700538379f,1.142857142857f,1.131370849898f,1.120224067222f,
+ 1.109400392450f,1.098884511590f,1.088662107904f,1.078719779941f,
+ 1.069044967650f,1.059625885652f,1.050451462878f,1.041511287847f,
+ 1.032795558989f,1.024295039463f,1.016001016002f,1.007905261358f,
+ 1.000000000000f,
+};
+
+#define INVSQ2EfXP_LOOKUP_MIN -32
+#define INVSQ2EfXP_LOOKUP_MAX 32
+static float INVSQ2EfXP_LOOKUP[INVSQ2EfXP_LOOKUP_MAX-\
+ INVSQ2EfXP_LOOKUP_MIN+1]={
+ 65536.f, 46340.95001f, 32768.f, 23170.47501f,
+ 16384.f, 11585.2375f, 8192.f, 5792.618751f,
+ 4096.f, 2896.309376f, 2048.f, 1448.154688f,
+ 1024.f, 724.0773439f, 512.f, 362.038672f,
+ 256.f, 181.019336f, 128.f, 90.50966799f,
+ 64.f, 45.254834f, 32.f, 22.627417f,
+ 16.f, 11.3137085f, 8.f, 5.656854249f,
+ 4.f, 2.828427125f, 2.f, 1.414213562f,
+ 1.f, 0.7071067812f, 0.5f, 0.3535533906f,
+ 0.25f, 0.1767766953f, 0.125f, 0.08838834765f,
+ 0.0625f, 0.04419417382f, 0.03125f, 0.02209708691f,
+ 0.015625f, 0.01104854346f, 0.0078125f, 0.005524271728f,
+ 0.00390625f, 0.002762135864f, 0.001953125f, 0.001381067932f,
+ 0.0009765625f, 0.000690533966f, 0.00048828125f, 0.000345266983f,
+ 0.000244140625f,0.0001726334915f,0.0001220703125f,8.631674575e-05f,
+ 6.103515625e-05f,4.315837288e-05f,3.051757812e-05f,2.157918644e-05f,
+ 1.525878906e-05f,
};
#endif
@@ -100,26 +100,26 @@
#define FROMdB2_SHIFT 3
#define FROMdB2_MASK 31
static float FROMdB_LOOKUP[FROMdB_LOOKUP_SZ]={
- 1, 0.6309573445, 0.3981071706, 0.2511886432,
- 0.1584893192, 0.1, 0.06309573445, 0.03981071706,
- 0.02511886432, 0.01584893192, 0.01, 0.006309573445,
- 0.003981071706, 0.002511886432, 0.001584893192, 0.001,
- 0.0006309573445,0.0003981071706,0.0002511886432,0.0001584893192,
- 0.0001,6.309573445e-05,3.981071706e-05,2.511886432e-05,
- 1.584893192e-05, 1e-05,6.309573445e-06,3.981071706e-06,
- 2.511886432e-06,1.584893192e-06, 1e-06,6.309573445e-07,
- 3.981071706e-07,2.511886432e-07,1.584893192e-07,
+ 1.f, 0.6309573445f, 0.3981071706f, 0.2511886432f,
+ 0.1584893192f, 0.1f, 0.06309573445f, 0.03981071706f,
+ 0.02511886432f, 0.01584893192f, 0.01f, 0.006309573445f,
+ 0.003981071706f, 0.002511886432f, 0.001584893192f, 0.001f,
+ 0.0006309573445f,0.0003981071706f,0.0002511886432f,0.0001584893192f,
+ 0.0001f,6.309573445e-05f,3.981071706e-05f,2.511886432e-05f,
+ 1.584893192e-05f, 1e-05f,6.309573445e-06f,3.981071706e-06f,
+ 2.511886432e-06f,1.584893192e-06f, 1e-06f,6.309573445e-07f,
+ 3.981071706e-07f,2.511886432e-07f,1.584893192e-07f,
};
static float FROMdB2_LOOKUP[FROMdB2_LOOKUP_SZ]={
- 0.9928302478, 0.9786445908, 0.9646616199, 0.9508784391,
- 0.9372921937, 0.92390007, 0.9106992942, 0.8976871324,
- 0.8848608897, 0.8722179097, 0.8597555737, 0.8474713009,
- 0.835362547, 0.8234268041, 0.8116616003, 0.8000644989,
- 0.7886330981, 0.7773650302, 0.7662579617, 0.755309592,
- 0.7445176537, 0.7338799116, 0.7233941627, 0.7130582353,
- 0.7028699885, 0.6928273125, 0.6829281272, 0.6731703824,
- 0.6635520573, 0.6540711597, 0.6447257262, 0.6355138211,
+ 0.9928302478f, 0.9786445908f, 0.9646616199f, 0.9508784391f,
+ 0.9372921937f, 0.92390007f, 0.9106992942f, 0.8976871324f,
+ 0.8848608897f, 0.8722179097f, 0.8597555737f, 0.8474713009f,
+ 0.835362547f, 0.8234268041f, 0.8116616003f, 0.8000644989f,
+ 0.7886330981f, 0.7773650302f, 0.7662579617f, 0.755309592f,
+ 0.7445176537f, 0.7338799116f, 0.7233941627f, 0.7130582353f,
+ 0.7028699885f, 0.6928273125f, 0.6829281272f, 0.6731703824f,
+ 0.6635520573f, 0.6540711597f, 0.6447257262f, 0.6355138211f,
};
#ifdef INT_LOOKUP
@@ -127,62 +127,62 @@
#define INVSQ_LOOKUP_I_SHIFT 10
#define INVSQ_LOOKUP_I_MASK 1023
static long INVSQ_LOOKUP_I[64+1]={
- 92682, 91966, 91267, 90583,
- 89915, 89261, 88621, 87995,
- 87381, 86781, 86192, 85616,
- 85051, 84497, 83953, 83420,
- 82897, 82384, 81880, 81385,
- 80899, 80422, 79953, 79492,
- 79039, 78594, 78156, 77726,
- 77302, 76885, 76475, 76072,
- 75674, 75283, 74898, 74519,
- 74146, 73778, 73415, 73058,
- 72706, 72359, 72016, 71679,
- 71347, 71019, 70695, 70376,
- 70061, 69750, 69444, 69141,
- 68842, 68548, 68256, 67969,
- 67685, 67405, 67128, 66855,
- 66585, 66318, 66054, 65794,
- 65536,
+ 92682l, 91966l, 91267l, 90583l,
+ 89915l, 89261l, 88621l, 87995l,
+ 87381l, 86781l, 86192l, 85616l,
+ 85051l, 84497l, 83953l, 83420l,
+ 82897l, 82384l, 81880l, 81385l,
+ 80899l, 80422l, 79953l, 79492l,
+ 79039l, 78594l, 78156l, 77726l,
+ 77302l, 76885l, 76475l, 76072l,
+ 75674l, 75283l, 74898l, 74519l,
+ 74146l, 73778l, 73415l, 73058l,
+ 72706l, 72359l, 72016l, 71679l,
+ 71347l, 71019l, 70695l, 70376l,
+ 70061l, 69750l, 69444l, 69141l,
+ 68842l, 68548l, 68256l, 67969l,
+ 67685l, 67405l, 67128l, 66855l,
+ 66585l, 66318l, 66054l, 65794l,
+ 65536l,
};
#define COS_LOOKUP_I_SHIFT 9
#define COS_LOOKUP_I_MASK 511
#define COS_LOOKUP_I_SZ 128
static long COS_LOOKUP_I[COS_LOOKUP_I_SZ+1]={
- 16384, 16379, 16364, 16340,
- 16305, 16261, 16207, 16143,
- 16069, 15986, 15893, 15791,
- 15679, 15557, 15426, 15286,
- 15137, 14978, 14811, 14635,
- 14449, 14256, 14053, 13842,
- 13623, 13395, 13160, 12916,
- 12665, 12406, 12140, 11866,
- 11585, 11297, 11003, 10702,
- 10394, 10080, 9760, 9434,
- 9102, 8765, 8423, 8076,
- 7723, 7366, 7005, 6639,
- 6270, 5897, 5520, 5139,
- 4756, 4370, 3981, 3590,
- 3196, 2801, 2404, 2006,
- 1606, 1205, 804, 402,
- 0, -401, -803, -1204,
- -1605, -2005, -2403, -2800,
- -3195, -3589, -3980, -4369,
- -4755, -5138, -5519, -5896,
- -6269, -6638, -7004, -7365,
- -7722, -8075, -8422, -8764,
- -9101, -9433, -9759, -10079,
- -10393, -10701, -11002, -11296,
- -11584, -11865, -12139, -12405,
- -12664, -12915, -13159, -13394,
- -13622, -13841, -14052, -14255,
- -14448, -14634, -14810, -14977,
- -15136, -15285, -15425, -15556,
- -15678, -15790, -15892, -15985,
- -16068, -16142, -16206, -16260,
- -16304, -16339, -16363, -16378,
- -16383,
+ 16384l, 16379l, 16364l, 16340l,
+ 16305l, 16261l, 16207l, 16143l,
+ 16069l, 15986l, 15893l, 15791l,
+ 15679l, 15557l, 15426l, 15286l,
+ 15137l, 14978l, 14811l, 14635l,
+ 14449l, 14256l, 14053l, 13842l,
+ 13623l, 13395l, 13160l, 12916l,
+ 12665l, 12406l, 12140l, 11866l,
+ 11585l, 11297l, 11003l, 10702l,
+ 10394l, 10080l, 9760l, 9434l,
+ 9102l, 8765l, 8423l, 8076l,
+ 7723l, 7366l, 7005l, 6639l,
+ 6270l, 5897l, 5520l, 5139l,
+ 4756l, 4370l, 3981l, 3590l,
+ 3196l, 2801l, 2404l, 2006l,
+ 1606l, 1205l, 804l, 402l,
+ 0l, -401l, -803l, -1204l,
+ -1605l, -2005l, -2403l, -2800l,
+ -3195l, -3589l, -3980l, -4369l,
+ -4755l, -5138l, -5519l, -5896l,
+ -6269l, -6638l, -7004l, -7365l,
+ -7722l, -8075l, -8422l, -8764l,
+ -9101l, -9433l, -9759l, -10079l,
+ -10393l, -10701l, -11002l, -11296l,
+ -11584l, -11865l, -12139l, -12405l,
+ -12664l, -12915l, -13159l, -13394l,
+ -13622l, -13841l, -14052l, -14255l,
+ -14448l, -14634l, -14810l, -14977l,
+ -15136l, -15285l, -15425l, -15556l,
+ -15678l, -15790l, -15892l, -15985l,
+ -16068l, -16142l, -16206l, -16260l,
+ -16304l, -16339l, -16363l, -16378l,
+ -16383l,
};
#endif
diff -ruN o/vorbis/lib/lpc.c f/vorbis/lib/lpc.c
--- o/vorbis/lib/lpc.c Mon Nov 6 01:07:01 2000
+++ f/vorbis/lib/lpc.c Sat Dec 9 22:41:07 2000
@@ -102,7 +102,7 @@
}
if(i%2)lpc[j]+=lpc[j]*r;
- error*=1.0-r*r;
+ error*=1.0f-r*r;
}
/* we need the error value to know how big an impulse to hit the
@@ -178,7 +178,7 @@
if(!prime)
for(i=0;i<m;i++)
- work[i]=0.;
+ work[i]=0.f;
else
for(i=0;i<m;i++)
work[i]=prime[i];
diff -ruN o/vorbis/lib/lsp.c f/vorbis/lib/lsp.c
--- o/vorbis/lib/lsp.c Mon Nov 6 01:07:01 2000
+++ f/vorbis/lib/lsp.c Sat Dec 9 22:30:50 2000
@@ -74,8 +74,8 @@
while(i<n){
int k=map[i];
int qexp;
- float p=.7071067812;
- float q=.7071067812;
+ float p=.7071067812f;
+ float q=.7071067812f;
float w=vorbis_coslook(wdel*k);
float *ftmp=lsp;
int c=m>>1;
@@ -86,10 +86,10 @@
ftmp+=2;
}while(--c);
- q=frexp(p*p*(1.+w)+q*q*(1.-w),&qexp);
+ q=frexp(p*p*(1.f+w)+q*q*(1.f-w),&qexp);
q=vorbis_fromdBlook(amp*
vorbis_invsqlook(q)*
- vorbis_invsq2explook(qexp+m)-
+ vorbis_invsq2explook(qexp+m)-
ampoffset);
do{
@@ -131,10 +131,10 @@
/* set up for using all int later */
int i;
- int ampoffseti=rint(ampoffset*4096.);
- int ampi=rint(amp*16.);
+ int ampoffseti=rint(ampoffset*4096.f);
+ int ampi=rint(amp*16.f);
long *ilsp=alloca(m*sizeof(long));
- for(i=0;i<m;i++)ilsp[i]=vorbis_coslook_i(lsp[i]/M_PI*65536.+.5);
+ for(i=0;i<m;i++)ilsp[i]=vorbis_coslook_i(lsp[i]/M_PI*65536.f+.5f);
i=0;
while(i<n){
@@ -208,20 +208,20 @@
float amp,float ampoffset){
int i;
float wdel=M_PI/ln;
- for(i=0;i<m;i++)lsp[i]=2*cos(lsp[i]);
+ for(i=0;i<m;i++)lsp[i]=2.f*cos(lsp[i]);
i=0;
while(i<n){
int j,k=map[i];
- float p=.5;
- float q=.5;
- float w=2*cos(wdel*k);
+ float p=.5f;
+ float q=.5f;
+ float w=2.f*cos(wdel*k);
for(j=0;j<m;j+=2){
p *= w-lsp[j];
q *= w-lsp[j+1];
}
- p*=p*(2.+w);
- q*=q*(2.-w);
+ p*=p*(2.f+w);
+ q*=q*(2.f-w);
q=fromdB(amp/sqrt(p+q)-ampoffset);
curve[i]=q;
@@ -235,7 +235,7 @@
static void cheby(float *g, int ord) {
int i, j;
- g[0] *= 0.5;
+ g[0] *= .5f;
for(i=2; i<= ord; i++) {
for(j=ord; j >= i; j--) {
g[j-2] -= g[j];
@@ -282,9 +282,9 @@
double error=1.,besterror=1.;
double *root=alloca(ord*sizeof(double));
- for(i=0; i<ord;i++) root[i] = 2.0 * (i+0.5) / ord - 1.0;
+ for(i=0; i<ord;i++) root[i] = 2. * (i+.5) / ord - 1.;
- while(error>1.e-20){
+ while(error>1e-20){
error=0;
for(i=0; i<ord; i++) { /* Update each point. */
@@ -304,7 +304,7 @@
/* don't allow the correction to scream off into infinity if we
happened to polish right at a local mini/maximum */
- if(delta<-3)delta=-3;
+ if(delta<-3.)delta=-3.;
if(delta>3.)delta=3.; /* 3 is not a random choice; it's large
enough to make sure the first pass
can't accidentally limit two poles to
@@ -321,7 +321,7 @@
if(!count || error<besterror){
for(i=0; i<ord; i++) r[i]=root[i];
besterror=error;
- if(error<1.e-6){ /* rough minimum criteria */
+ if(error<1e-6){ /* rough minimum criteria */
maxiter=count*2+10;
if(maxiter>100)maxiter=100;
}
@@ -351,9 +351,9 @@
/* Compute half of the symmetric and antisymmetric polynomials. */
/* Remove the roots at +1 and -1. */
- g1[order2] = 1.0;
+ g1[order2] = 1.f;
for(i=0;i<order2;i++) g1[order2-i-1] = lpc[i]+lpc[m-i-1];
- g2[order2] = 1.0;
+ g2[order2] = 1.f;
for(i=0;i<order2;i++) g2[order2-i-1] = lpc[i]-lpc[m-i-1];
for(i=0; i<order2;i++) g1[order2-i-1] -= g1[order2-i];
diff -ruN o/vorbis/lib/mapping0.c f/vorbis/lib/mapping0.c
--- o/vorbis/lib/mapping0.c Fri Nov 17 12:47:18 2000
+++ f/vorbis/lib/mapping0.c Sat Dec 9 22:41:15 2000
@@ -338,7 +338,7 @@
float *pcmori=vb->pcm[i]+n/2;
float *orig=nonquant[i];
float *quant=floor[i];
- float num=0.,den=0.;
+ float num=0.f,den=0.f;
int submap=info->chmuxlist[i];
if(nonzero[i]){
@@ -363,7 +363,7 @@
num=look->floor_func[submap]->
forward2(vb,look->floor_look[submap],
- nonzero[i],den==0.?0:num/den,vbb_flr+i);
+ nonzero[i],den==0.f?0:num/den,vbb_flr+i);
/*for(j=0;j<n;j++)
pcm[j]*=num;
@@ -442,7 +442,7 @@
pcm[j]*=window[j];
else
for(j=0;j<n;j++)
- pcm[j]=0.;
+ pcm[j]=0.f;
_analysis_output("final",seq++,pcm,n,0,0);
}
diff -ruN o/vorbis/lib/masking.h f/vorbis/lib/masking.h
--- o/vorbis/lib/masking.h Fri Nov 17 12:47:18 2000
+++ f/vorbis/lib/masking.h Sat Dec 9 22:10:38 2000
@@ -22,11 +22,11 @@
/* Not really an ATH, more a bottom curve to limit LSP dynamic range */
float ATH_Bark_dB[]={
15, 15, 15, 15, 11, 10, 8, 7, 7, 7,
- 6, 2, 0, 0, -3, -5, -6, -6, -4.5, 2.5,
+ 6, 2, 0, 0, -3, -5, -6, -6, -4.5f, 2.5f,
10, 15, 15, 15, 15, 15, 15};
/* The below masking curves are straight from the R. Ehmer
- (J. Acoustical Society of America) papers ca 1958-59. I modified
+ (J. Acoustical Society of America) papers ca 1958-59. I modified
them slightly as Ehmer does not correct for the Absolute Threshold
of Hearing, and the low dB portions of the curves are thus highly
suspect. */
diff -ruN o/vorbis/lib/mdct.c f/vorbis/lib/mdct.c
--- o/vorbis/lib/mdct.c Tue Nov 14 01:05:31 2000
+++ f/vorbis/lib/mdct.c Sat Dec 9 22:41:18 2000
@@ -291,7 +291,7 @@
{
float *B=init->trig+n2;
float *out2=out+n2;
- float scale=4./n;
+ float scale=4.f/n;
for(i=0;i<n4;i++){
out[i] =(xx[0]*B[0]+xx[1]*B[1])*scale;
*(--out2)=(xx[0]*B[1]-xx[1]*B[0])*scale;
diff -ruN o/vorbis/lib/modes/mode_A.h f/vorbis/lib/modes/mode_A.h
--- o/vorbis/lib/modes/mode_A.h Fri Nov 17 12:47:38 2000
+++ f/vorbis/lib/modes/mode_A.h Sat Dec 9 22:32:55 2000
@@ -51,79 +51,79 @@
1,/*smoothp*/
0,.1,
- -100.,
- -140.,
+ -100.f,
+ -140.f,
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
+ /* x: 63 88 125 175 250 350 500 700 1k 1.4fk 2k 2.8fk 4k 5.6fk 8k 11.5fk 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
1,/* tonemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/
- {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/
- {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/
- {-30.,-30.,-35.,-37.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/
- {-20.,-25.,-30.,-35.,-35.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/
- {-20.,-25.,-30.,-33.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*11500*/
- {-20.,-24.,-26.,-32.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*16000*/
+ {{-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*63*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*88*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*125*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*175*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*250*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*350*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*500*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*700*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1000*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1400*/
+ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2000*/
+ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2800*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*4000*/
+ {-30.f,-30.f,-35.f,-37.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*5600*/
+ {-20.f,-25.f,-30.f,-35.f,-35.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*8000*/
+ {-20.f,-25.f,-30.f,-33.f,-35.f,-45.f,-55.f,-65.f,-75.f,-90.f,-100.f}, /*11500*/
+ {-20.f,-24.f,-26.f,-32.f,-35.f,-45.f,-55.f,-65.f,-75.f,-90.f,-100.f}, /*16000*/
},
1,/* peakattp */
- {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*63*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*88*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*125*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-18.,-28.,-28.,-28.}, /*175*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-18.,-28.,-28.,-28.}, /*250*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-18.,-28.,-28.,-28.}, /*350*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-28.,-28.,-28.,-28.}, /*500*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*700*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*1000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*1400*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*2000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*2400*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*4000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*5600*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/
- { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/
- { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/
+ {{-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*63*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*88*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*125*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-18.f,-28.f,-28.f,-28.f}, /*175*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-18.f,-28.f,-28.f,-28.f}, /*250*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-18.f,-28.f,-28.f,-28.f}, /*350*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-28.f,-28.f,-28.f,-28.f}, /*500*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*700*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1400*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2400*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*4000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*5600*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-16.f,-17.f}, /*8000*/
+ { -6.f, -7.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f,-13.f,-14.f}, /*11500*/
+ { -6.f, -6.f, -9.f, -9.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f}, /*16000*/
},
1,/*noisemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/
- { 6., 6., 6., 2., 2., 2., 2., 2., 2., 1., 0.}, /*700*/
-
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1000*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1400*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2000*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2800*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*4000*/
- { 10., 10., 10., 10., 10., 10., 8., 8., 6., 6., 6.}, /*5600*/
- { 10., 10., 10., 10., 10., 10., 8., 8., 8., 8., 8.}, /*8000*/
- { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*11500*/
- { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*16000*/
+ {{-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*63*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*88*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*125*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*175*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*250*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*350*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*500*/
+ { 6.f, 6.f, 6.f, 2.f, 2.f, 2.f, 2.f, 2.f, 2.f, 1.f, 0.f}, /*700*/
+
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*1000*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*1400*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*2000*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*2800*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*4000*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 8.f, 8.f, 6.f, 6.f, 6.f}, /*5600*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 8.f, 8.f, 8.f, 8.f, 8.f}, /*8000*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f}, /*11500*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f}, /*16000*/
},
- 100.,
+ 100.f,
- -0., -.004 /* attack/decay control */
+ -0.f, -.004 /* attack/decay control */
};
@@ -136,7 +136,7 @@
{4,5,6,7,8},
{0,99999,9999,9999,9999},
- {99,1.5,2.5,6.5,12.5},
+ {99,1.5f,2.5f,6.5f,12.5f},
{5,5,5,5,5},
{99,99,99,99,99}};
@@ -146,7 +146,7 @@
{0,8,9999,17,9999,
28,9999,9999,9999},
- {99,1.5,1.5,2.5,2.5,4,4,6.5,12.5},
+ {99,1.5f,1.5f,2.5f,2.5f,4,4,6.5f,12.5f},
{5,5,5,5,5,5,5,5,5},
{99,99,99,99,99,99,99,99,99}};
@@ -199,7 +199,7 @@
/* psy */
{&_psy_set_A},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 32, 6, -96.
+ 256, 32, 6, -96.f
};
#define PREDEF_INFO_MAX 0
diff -ruN o/vorbis/lib/modes/mode_AA.h f/vorbis/lib/modes/mode_AA.h
--- o/vorbis/lib/modes/mode_AA.h Fri Nov 17 12:47:38 2000
+++ f/vorbis/lib/modes/mode_AA.h Sat Dec 9 22:33:05 2000
@@ -50,79 +50,79 @@
1,/*smoothp*/
0,.1,
- -100.,
- -140.,
+ -100.f,
+ -140.f,
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
+ /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
1,/* tonemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/
- {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/
- {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/
- {-30.,-30.,-35.,-37.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/
- {-20.,-25.,-30.,-35.,-35.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/
- {-20.,-25.,-30.,-33.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*11500*/
- {-20.,-24.,-26.,-32.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*16000*/
+ {{-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*63*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*88*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*125*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*175*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*250*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*350*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*500*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*700*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1000*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1400*/
+ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2000*/
+ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2800*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*4000*/
+ {-30.f,-30.f,-35.f,-37.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*5600*/
+ {-20.f,-25.f,-30.f,-35.f,-35.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*8000*/
+ {-20.f,-25.f,-30.f,-33.f,-35.f,-45.f,-55.f,-65.f,-75.f,-90.f,-100.f}, /*11500*/
+ {-20.f,-24.f,-26.f,-32.f,-35.f,-45.f,-55.f,-65.f,-75.f,-90.f,-100.f}, /*16000*/
},
1,/* peakattp */
- {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*175*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*250*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*350*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*500*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*700*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*1000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*1400*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*2000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*2800*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*4000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*5600*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/
- { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/
- { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/
+ {{-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*63*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*88*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*125*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*175*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*250*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*350*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*500*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*700*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1400*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2800*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*4000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*5600*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-16.f,-17.f}, /*8000*/
+ { -6.f, -7.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f,-13.f,-14.f}, /*11500*/
+ { -6.f, -6.f, -9.f, -9.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f}, /*16000*/
},
1,/*noisemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/
- { 6., 6., 6., 2., 2., 2., 2., 2., 2., 1., 0.}, /*700*/
-
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1000*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1400*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2000*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2800*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*4000*/
- { 10., 10., 10., 10., 10., 10., 8., 8., 6., 6., 6.}, /*5600*/
- { 10., 10., 10., 10., 10., 10., 8., 8., 8., 8., 8.}, /*8000*/
- { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*11500*/
- { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*16000*/
+ {{-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*63*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*88*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*125*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*175*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*250*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*350*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*500*/
+ { 6.f, 6.f, 6.f, 2.f, 2.f, 2.f, 2.f, 2.f, 2.f, 1.f, 0.f}, /*700*/
+
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*1000*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*1400*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*2000*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*2800*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*4000*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 8.f, 8.f, 6.f, 6.f, 6.f}, /*5600*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 8.f, 8.f, 8.f, 8.f, 8.f}, /*8000*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f}, /*11500*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f}, /*16000*/
},
- 95.,
+ 95.f,
- -0., -.004 /* attack/decay control */
+ -0.f, -.004 /* attack/decay control */
};
@@ -135,7 +135,7 @@
{4,5,6,7,8},
{0,99999,9999,9999,9999},
- {99,1.5,2.5,6.5,12.5},
+ {99,1.5f,2.5f,6.5f,12.5f},
{5,5,5,5,5},
{99,99,99,99,99}};
@@ -146,7 +146,7 @@
{0,9,9999,21,9999,
9999,9999,9999},
- {99,2,2,4,4,9.5,15.5},
+ {99,2,2,4,4,9.5f,15.5f},
{5,5,5,5,5,5,5},
{99,99,99,99,99,99,99}};
@@ -197,7 +197,7 @@
/* psy */
{&_psy_set_AA},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 32, 6, -96.
+ 256, 32, 6, -96.f
};
#define PREDEF_INFO_MAX 0
diff -ruN o/vorbis/lib/modes/mode_B.h f/vorbis/lib/modes/mode_B.h
--- o/vorbis/lib/modes/mode_B.h Fri Nov 17 12:47:38 2000
+++ f/vorbis/lib/modes/mode_B.h Sat Dec 9 22:33:12 2000
@@ -51,79 +51,79 @@
1,/*smoothp*/
0,.1,
- -100.,
- -140.,
+ -100.f,
+ -140.f,
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
+ /* x: 63 88 125 175 250 350 500 700 1k 1.4fk 2k 2.8fk 4k 5.6fk 8k 11.5fk 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
1,/* tonemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/
- {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/
- {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/
- {-30.,-30.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/
- {-30.,-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/
- {-30.,-30.,-35.,-33.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*11500*/
- {-30.,-28.,-30.,-32.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*16000*/
+ {{-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*63*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*88*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*125*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*175*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*250*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*350*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*500*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*700*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1000*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1400*/
+ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2000*/
+ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2800*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*4000*/
+ {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*5600*/
+ {-30.f,-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*8000*/
+ {-30.f,-30.f,-35.f,-33.f,-35.f,-45.f,-55.f,-65.f,-75.f,-90.f,-100.f}, /*11500*/
+ {-30.f,-28.f,-30.f,-32.f,-35.f,-45.f,-55.f,-65.f,-75.f,-90.f,-100.f}, /*16000*/
},
1,/* peakattp */
- {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*63*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*88*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*125*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-28.,-28.,-28.}, /*175*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-28.,-28.,-28.}, /*250*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-28.,-28.,-28.}, /*350*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-28.,-28.,-28.}, /*500*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*700*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*1000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*1400*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*2000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*2800*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*4000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*5600*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/
- { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/
- { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/
+ {{-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*63*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*88*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*125*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-28.f,-28.f,-28.f}, /*175*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-28.f,-28.f,-28.f}, /*250*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-28.f,-28.f,-28.f}, /*350*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-28.f,-28.f,-28.f}, /*500*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*700*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1400*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2800*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*4000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*5600*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-16.f,-17.f}, /*8000*/
+ { -6.f, -7.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f,-13.f,-14.f}, /*11500*/
+ { -6.f, -6.f, -9.f, -9.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f}, /*16000*/
},
1,/*noisemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*700*/
-
- { 4., 4., 4., 4., 4., 2., 1., 0., -1., -2., -3.}, /*1000*/
- { 4., 4., 4., 4., 4., 2., 1., 0., 0., -2., -3.}, /*1400*/
- { 4., 4., 4., 4., 2., 2., 1., 0., 0., -2., -3.}, /*2000*/
- { 4., 4., 4., 4., 2., 2., 1., 0., 0., -2., -3.}, /*2800*/
- { 4., 4., 4., 4., 4., 4., 2., 0., 0., 0., 0.}, /*4000*/
- { 4., 4., 4., 4., 4., 4., 2., 2., 2., 2., 2.}, /*5600*/
- { 6., 6., 6., 6., 4., 4., 4., 4., 4., 2., 2.}, /*8000*/
- { 8., 8., 8., 8., 6., 6., 6., 6., 6., 4., 4.}, /*11500*/
- { 8., 8., 8., 8., 8., 8., 8., 6., 6., 6., 4.}, /*16000*/
+ {{-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*63*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*88*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*125*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*175*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*250*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*350*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*500*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*700*/
+
+ { 4.f, 4.f, 4.f, 4.f, 4.f, 2.f, 1.f, 0.f, -1.f, -2.f, -3.f}, /*1000*/
+ { 4.f, 4.f, 4.f, 4.f, 4.f, 2.f, 1.f, 0.f, 0.f, -2.f, -3.f}, /*1400*/
+ { 4.f, 4.f, 4.f, 4.f, 2.f, 2.f, 1.f, 0.f, 0.f, -2.f, -3.f}, /*2000*/
+ { 4.f, 4.f, 4.f, 4.f, 2.f, 2.f, 1.f, 0.f, 0.f, -2.f, -3.f}, /*2800*/
+ { 4.f, 4.f, 4.f, 4.f, 4.f, 4.f, 2.f, 0.f, 0.f, 0.f, 0.f}, /*4000*/
+ { 4.f, 4.f, 4.f, 4.f, 4.f, 4.f, 2.f, 2.f, 2.f, 2.f, 2.f}, /*5600*/
+ { 6.f, 6.f, 6.f, 6.f, 4.f, 4.f, 4.f, 4.f, 4.f, 2.f, 2.f}, /*8000*/
+ { 8.f, 8.f, 8.f, 8.f, 6.f, 6.f, 6.f, 6.f, 6.f, 4.f, 4.f}, /*11500*/
+ { 8.f, 8.f, 8.f, 8.f, 8.f, 8.f, 8.f, 6.f, 6.f, 6.f, 4.f}, /*16000*/
},
- 110.,
+ 110.f,
- -3., -.004 /* attack/decay control */
+ -3.f, -.004 /* attack/decay control */
};
/* with GNUisms, this could be short and readable. Oh well */
@@ -135,7 +135,7 @@
{4,5,6,7,8},
{0,99999,9999,9999,9999},
- {99,1.5,2.5,6.5,12.5},
+ {99,1.5f,2.5f,6.5f,12.5f},
{5,5,5,5,5},
{99,99,99,99,99}};
@@ -145,7 +145,7 @@
{0,8,9999,17,9999,
22,9999,9999,9999},
- {99,1.5,1.5,2.5,2.5,4,4,6.5,12.5},
+ {99,1.5f,1.5f,2.5f,2.5f,4,4,6.5f,12.5f},
{5,5,5,5,5,5,5,5,5},
{99,99,99,99,99,99,99,99,99}};
@@ -198,7 +198,7 @@
/* psy */
{&_psy_set_B},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 32, 6, -96.
+ 256, 32, 6, -96.f
};
#define PREDEF_INFO_MAX 0
diff -ruN o/vorbis/lib/modes/mode_C.h f/vorbis/lib/modes/mode_C.h
--- o/vorbis/lib/modes/mode_C.h Fri Nov 17 12:47:38 2000
+++ f/vorbis/lib/modes/mode_C.h Sat Dec 9 22:33:20 2000
@@ -47,79 +47,79 @@
1,/*smoothp*/
0,.1,
- -100.,
- -140.,
+ -100.f,
+ -140.f,
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
+ /* x: 63 88 125 175 250 350 500 700 1k 1.4fk 2k 2.8fk 4k 5.6fk 8k 11.5fk 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
0,/* tonemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*63*/
- {-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*88*/
- {-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*125*/
- {-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*175*/
- {-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*250*/
- {-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*350*/
- {-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*500*/
- {-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*700*/
- {-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*1000*/
- {-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*1400*/
- {-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*2000*/
- {-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*2800*/
- {-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*4000*/
- {-30.,-30.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*5600*/
- {-30.,-30.,-35.,-35.,-50.,-60.,-70.,-80.,-90.,-100.,-110.}, /*8000*/
- {-30.,-30.,-35.,-33.,-45.,-55.,-65.,-75.,-85.,-100.,-110.}, /*11500*/
- {-30.,-28.,-30.,-32.,-45.,-55.,-65.,-75.,-85.,-100.,-110.}, /*16000*/
+ {{-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*63*/
+ {-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*88*/
+ {-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*125*/
+ {-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*175*/
+ {-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*250*/
+ {-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*350*/
+ {-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*500*/
+ {-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*700*/
+ {-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*1000*/
+ {-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*1400*/
+ {-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*2000*/
+ {-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*2800*/
+ {-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*4000*/
+ {-30.f,-30.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*5600*/
+ {-30.f,-30.f,-35.f,-35.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*8000*/
+ {-30.f,-30.f,-35.f,-33.f,-45.f,-55.f,-65.f,-75.f,-85.f,-100.f,-110.f}, /*11500*/
+ {-30.f,-28.f,-30.f,-32.f,-45.f,-55.f,-65.f,-75.f,-85.f,-100.f,-110.f}, /*16000*/
},
1,/* peakattp */
- {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*63*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*88*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*125*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-28.,-28.,-28.}, /*175*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-28.,-28.,-28.}, /*250*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-28.,-28.,-28.}, /*350*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-28.,-28.,-28.}, /*500*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*700*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*1000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*1400*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*2000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*2800*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*4000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*5600*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/
- { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/
- { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/
+ {{-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*63*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*88*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*125*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-28.f,-28.f,-28.f}, /*175*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-28.f,-28.f,-28.f}, /*250*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-28.f,-28.f,-28.f}, /*350*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-28.f,-28.f,-28.f}, /*500*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*700*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1400*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2800*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*4000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*5600*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-16.f,-17.f}, /*8000*/
+ { -6.f, -7.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f,-13.f,-14.f}, /*11500*/
+ { -6.f, -6.f, -9.f, -9.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f}, /*16000*/
},
1,/*noisemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*700*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*1000*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*1400*/
-
- { 0., -4., -4., -4., -6., -6., -6., -6., -6., -6., -6.}, /*2000*/
- { 0., -3., -4., -4., -4., -5., -6., -6., -6., -6., -6.}, /*2800*/
- { 0., -2., -2., -2., -2., -2., -2., -2., -4., -4., -4.}, /*4000*/
- { 0., -0., -0., -0., -0., -2., -2., -2., -2., -2., -2.}, /*5600*/
- { 0., 0., 0., 0., 0., 0., 0., 0., 0., -2., -4.}, /*8000*/
- { 2., 2., 2., 2., 2., 2., 0., 0., 0., 0., 0.}, /*11500*/
- { 2., 2., 2., 2., 2., 4., 4., 4., 4., 4., 4.}, /*16000*/
+ {{-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*63*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*88*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*125*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*175*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*250*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*350*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*500*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*700*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*1000*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*1400*/
+
+ { 0.f, -4.f, -4.f, -4.f, -6.f, -6.f, -6.f, -6.f, -6.f, -6.f, -6.f}, /*2000*/
+ { 0.f, -3.f, -4.f, -4.f, -4.f, -5.f, -6.f, -6.f, -6.f, -6.f, -6.f}, /*2800*/
+ { 0.f, -2.f, -2.f, -2.f, -2.f, -2.f, -2.f, -2.f, -4.f, -4.f, -4.f}, /*4000*/
+ { 0.f, -0.f, -0.f, -0.f, -0.f, -2.f, -2.f, -2.f, -2.f, -2.f, -2.f}, /*5600*/
+ { 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, -2.f, -4.f}, /*8000*/
+ { 2.f, 2.f, 2.f, 2.f, 2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f}, /*11500*/
+ { 2.f, 2.f, 2.f, 2.f, 2.f, 4.f, 4.f, 4.f, 4.f, 4.f, 4.f}, /*16000*/
},
- 100.,
+ 100.f,
- -6., -.006 /* attack/decay control */
+ -6.f, -.006 /* attack/decay control */
};
static vorbis_info_psy _psy_set_C1={
@@ -128,79 +128,79 @@
1,/*smoothp*/
0,.1,
- -100.,
- -140.,
+ -100.f,
+ -140.f,
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
+ /* x: 63 88 125 175 250 350 500 700 1k 1.4fk 2k 2.8fk 4k 5.6fk 8k 11.5fk 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
1,/* tonemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/
- {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/
- {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/
- {-30.,-30.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/
- {-30.,-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/
- {-30.,-30.,-35.,-33.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*11500*/
- {-30.,-28.,-30.,-32.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*16000*/
+ {{-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*63*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*88*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*125*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*175*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*250*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*350*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*500*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*700*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1000*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1400*/
+ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2000*/
+ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2800*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*4000*/
+ {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*5600*/
+ {-30.f,-30.f,-35.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*8000*/
+ {-30.f,-30.f,-35.f,-33.f,-35.f,-45.f,-55.f,-65.f,-75.f,-90.f,-100.f}, /*11500*/
+ {-30.f,-28.f,-30.f,-32.f,-35.f,-45.f,-55.f,-65.f,-75.f,-90.f,-100.f}, /*16000*/
},
1,/* peakattp */
- {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-28.,-28.}, /*63*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-28.,-28.}, /*88*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-28.,-28.}, /*125*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-18.,-18.,-20.}, /*175*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-18.,-18.,-20.}, /*250*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-18.,-18.,-20.}, /*350*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-18.,-18.,-20.}, /*500*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*700*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*1000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*1400*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*2000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*2800*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*4000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*5600*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/
- { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/
- { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/
+ {{-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-28.f,-28.f}, /*63*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-28.f,-28.f}, /*88*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-28.f,-28.f}, /*125*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-18.f,-18.f,-20.f}, /*175*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-18.f,-18.f,-20.f}, /*250*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-18.f,-18.f,-20.f}, /*350*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-18.f,-18.f,-20.f}, /*500*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*700*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1400*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2800*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*4000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*5600*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-16.f,-17.f}, /*8000*/
+ { -6.f, -7.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f,-13.f,-14.f}, /*11500*/
+ { -6.f, -6.f, -9.f, -9.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f}, /*16000*/
},
1,/*noisemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*700*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*1000*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*1400*/
-
- { 0., -4., -4., -4., -6., -6., -6., -6., -6., -6., -6.}, /*2000*/
- { 0., -3., -4., -4., -4., -5., -6., -6., -6., -6., -6.}, /*2800*/
- { 0., -2., -2., -2., -2., -2., -2., -2., -4., -4., -4.}, /*4000*/
- { 0., -0., -0., -0., -0., -2., -2., -2., -2., -2., -2.}, /*5600*/
- { 0., 0., 0., 0., 0., 0., 0., 0., 0., -2., -4.}, /*8000*/
- { 2., 2., 2., 2., 2., 2., 0., 0., 0., 0., 0.}, /*11500*/
- { 2., 2., 2., 2., 2., 4., 4., 4., 4., 4., 4.}, /*16000*/
+ {{-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*63*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*88*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*125*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*175*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*250*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*350*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*500*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*700*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*1000*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*1400*/
+
+ { 0.f, -4.f, -4.f, -4.f, -6.f, -6.f, -6.f, -6.f, -6.f, -6.f, -6.f}, /*2000*/
+ { 0.f, -3.f, -4.f, -4.f, -4.f, -5.f, -6.f, -6.f, -6.f, -6.f, -6.f}, /*2800*/
+ { 0.f, -2.f, -2.f, -2.f, -2.f, -2.f, -2.f, -2.f, -4.f, -4.f, -4.f}, /*4000*/
+ { 0.f, -0.f, -0.f, -0.f, -0.f, -2.f, -2.f, -2.f, -2.f, -2.f, -2.f}, /*5600*/
+ { 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, -2.f, -4.f}, /*8000*/
+ { 2.f, 2.f, 2.f, 2.f, 2.f, 2.f, 0.f, 0.f, 0.f, 0.f, 0.f}, /*11500*/
+ { 2.f, 2.f, 2.f, 2.f, 2.f, 4.f, 4.f, 4.f, 4.f, 4.f, 4.f}, /*16000*/
},
- 110.,
+ 110.f,
- -6., -.006 /* attack/decay control */
+ -6.f, -.006 /* attack/decay control */
};
/* with GNUisms, this could be short and readable. Oh well */
@@ -212,7 +212,7 @@
{4,5,6,7,8},
{0,99999,9999,9999,9999},
- {99,1.5,2.5,6.5,12.5},
+ {99,1.5f,2.5f,6.5f,12.5f},
{5,5,5,5,5},
{99,99,99,99,99}};
@@ -221,7 +221,7 @@
{9,10,11,12,13},
{0,99999,9999,9999,9999},
- {99,1.5,2.5,6.5,12.5},
+ {99,1.5f,2.5f,6.5f,12.5f},
{5,5,5,5,5},
{99,99,99,99,99}};
@@ -270,7 +270,7 @@
/* psy */
{&_psy_set_C0,&_psy_set_C1},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 24, 6, -96.
+ 256, 24, 6, -96.f
};
#define PREDEF_INFO_MAX 0
diff -ruN o/vorbis/lib/modes/mode_D.h f/vorbis/lib/modes/mode_D.h
--- o/vorbis/lib/modes/mode_D.h Fri Nov 17 12:47:38 2000
+++ f/vorbis/lib/modes/mode_D.h Sat Dec 9 22:33:27 2000
@@ -49,11 +49,11 @@
1,/*smoothp*/
0,.1,
- -100.,
- -140.,
+ -100.f,
+ -140.f,
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
+ /* x: 63 88 125 175 250 350 500 700 1k 1.4fk 2k 2.8fk 4k 5.6fk 8k 11.5fk 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
0,/* tonemaskp */
@@ -61,32 +61,32 @@
{{0}},
1,/* peakattp */
- {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*63*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*88*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*125*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*175*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*250*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*350*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*500*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*700*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*1000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*1400*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*2000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*2800*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*4000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*5600*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*8000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*11500*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*16000*/
+ {{-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*63*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*88*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*125*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*175*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*250*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*350*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*500*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*700*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*1000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*1400*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*2000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*2800*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*4000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*5600*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*8000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*11500*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*16000*/
},
0,/*noisemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
{{0}},
- 110.,
+ 110.f,
- -0., -.004 /* attack/decay control */
+ -0.f, -.004 /* attack/decay control */
};
static vorbis_info_psy _psy_set_D1 ={
1,/*athp*/
@@ -94,61 +94,61 @@
1,/*smoothp*/
0,.1,
- -100.,
- -140.,
+ -100.f,
+ -140.f,
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
+ /* x: 63 88 125 175 250 350 500 700 1k 1.4fk 2k 2.8fk 4k 5.6fk 8k 11.5fk 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
1,/* tonemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*63*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*88*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*125*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*175*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*250*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*350*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*500*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*700*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*1000*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*1400*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*2000*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*2800*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*4000*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*5600*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*8000*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*11500*/
- {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*16000*/
+ {{-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*63*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*88*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*125*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*175*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*250*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*350*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*500*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*700*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*1000*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*1400*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*2000*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*2800*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*4000*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*5600*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*8000*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*11500*/
+ {-40.f,-40.f,-40.f,-45.f,-45.f,-55.f,-65.f,-75.f,-85.f,-95.f,-105.f}, /*16000*/
},
1,/* peakattp */
- {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*63*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*88*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*125*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*175*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*250*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*350*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-28.}, /*500*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*700*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*1000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*1400*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*2000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*2800*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*4000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*5600*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*8000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*11500*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*16000*/
+ {{-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*63*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*88*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*125*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*175*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*250*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*350*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-28.f}, /*500*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*700*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*1000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*1400*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*2000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*2800*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*4000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*5600*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*8000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*11500*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*16000*/
},
0,/*noisemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
{{0}},
- 110.,
+ 110.f,
- -0., -.004 /* attack/decay control */
+ -0.f, -.004 /* attack/decay control */
};
/* with GNUisms, this could be short and readable. Oh well */
@@ -160,7 +160,7 @@
{4,5,6,7,8},
{0,9999,9999,9999,9999},
- {99,2.5,6.5,15.5,29.5},
+ {99,2.5f,6.5f,15.5f,29.5f},
{5,5,5,5,5},
{99,99,99,99,99}};
@@ -169,7 +169,7 @@
{9,10,11,12,13},
{0,9999,9999,9999,9999},
- {99,2.5,6.5,15.5,29.5},
+ {99,2.5f,6.5f,15.5f,29.5f},
{5,5,5,5,5},
{99,99,99,99,99}};
@@ -218,7 +218,7 @@
/* psy */
{&_psy_set_D0,&_psy_set_D1},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 24, 6, -96.
+ 256, 24, 6, -96.f
};
#define PREDEF_INFO_MAX 0
diff -ruN o/vorbis/lib/modes/mode_E.h f/vorbis/lib/modes/mode_E.h
--- o/vorbis/lib/modes/mode_E.h Fri Nov 17 12:47:38 2000
+++ f/vorbis/lib/modes/mode_E.h Sat Dec 9 22:33:32 2000
@@ -49,11 +49,11 @@
1,/*smoothp*/
0,.1,
- -140.,
- -180.,
+ -140.f,
+ -180.f,
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
+ /* x: 63 88 125 175 250 350 500 700 1k 1.4fk 2k 2.8fk 4k 5.6fk 8k 11.5fk 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
0,/* tonemaskp */
@@ -61,32 +61,32 @@
{{0}},
1,/* peakattp */
- {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-30.}, /*63*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-30.}, /*88*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-30.}, /*125*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-30.}, /*175*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-30.}, /*250*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-30.}, /*350*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-28.,-28.,-30.}, /*500*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-28.}, /*700*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-28.}, /*1000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-28.}, /*1400*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-28.}, /*2000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-28.}, /*2800*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-28.}, /*4000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-28.}, /*5600*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-28.}, /*8000*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-28.}, /*11500*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-28.}, /*16000*/
+ {{-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*63*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*88*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*125*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*175*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*250*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*350*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-28.f,-28.f,-30.f}, /*500*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*700*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*1000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*1400*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*2000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*2800*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*4000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*5600*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*8000*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*11500*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-24.f,-28.f}, /*16000*/
},
0,/*noisemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
{{0}},
- 110.,
+ 110.f,
- -0., -.004 /* attack/decay control */
+ -0.f, -.004 /* attack/decay control */
};
/* with GNUisms, this could be short and readable. Oh well */
@@ -98,7 +98,7 @@
{4,5,6,7,8},
{0,9999,9999,9999,9999},
- {99,2.5,6.5,15.5,29.5},
+ {99,2.5f,6.5f,15.5f,29.5f},
{5,5,5,5,5},
{99,99,99,99,99}};
@@ -107,7 +107,7 @@
{9,10,11,12,13},
{0,9999,9999,9999,9999},
- {99,2.5,6.5,15.5,29.5},
+ {99,2.5f,6.5f,15.5f,29.5f},
{5,5,5,5,5},
{99,99,99,99,99}};
@@ -156,7 +156,7 @@
/* psy */
{&_psy_set_E},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 24, 6, -96.
+ 256, 24, 6, -96.f
};
#define PREDEF_INFO_MAX 0
diff -ruN o/vorbis/lib/os.h f/vorbis/lib/os.h
--- o/vorbis/lib/os.h Wed Nov 8 23:45:58 2000
+++ f/vorbis/lib/os.h Sun Dec 10 00:01:27 2000
@@ -24,15 +24,25 @@
#ifndef _V_IFDEFJAIL_H_
#define _V_IFDEFJAIL_H_
-#ifndef M_PI
-#define M_PI (3.1415926539)
+#ifdef M_PI
+#undef M_PI
#endif
+#define M_PI (3.1415926539f)
#ifndef __GNUC__
#ifdef _WIN32
# include <malloc.h>
-# define rint(x) (floor((x)+0.5))
+# define rint(x) (floor((x)+0.5f))
#endif
+#else
+#define sqrt sqrtf
+#define log logf
+#define exp expf
+#define pow powf
+#define acos acosf
+#define atan atanf
+#define frexp frexpf
+#define rint rintf
#endif
#ifdef _WIN32
diff -ruN o/vorbis/lib/psy.c f/vorbis/lib/psy.c
--- o/vorbis/lib/psy.c Tue Nov 14 01:05:31 2000
+++ f/vorbis/lib/psy.c Sat Dec 9 22:41:27 2000
@@ -86,8 +86,8 @@
static void linear_curve(float *c){
int i;
for(i=0;i<EHMER_MAX;i++)
- if(c[i]<=-200.)
- c[i]=0.;
+ if(c[i]<=-200.f)
+ c[i]=0.f;
else
c[i]=fromdB(c[i]);
}
@@ -95,7 +95,7 @@
static void interp_curve(float *c,float *c1,float *c2,float del){
int i;
for(i=0;i<EHMER_MAX;i++)
- c[i]=c2[i]*del+c1[i]*(1.-del);
+ c[i]=c2[i]*del+c1[i]*(1.f-del);
}
static void setup_curve(float **c,
@@ -123,18 +123,18 @@
float ath_min,ath_max;
if(ibark<26)
- ath_min=ATH_Bark_dB[ibark]*(1.-del)+ATH_Bark_dB[ibark+1]*del;
+ ath_min=ATH_Bark_dB[ibark]*(1.f-del)+ATH_Bark_dB[ibark+1]*del;
else
- ath_min=200.;
+ ath_min=200.f;
bark=toBARK(fromOC(oc_max));
ibark=floor(bark);
del=bark-ibark;
if(ibark<26)
- ath_max=ATH_Bark_dB[ibark]*(1.-del)+ATH_Bark_dB[ibark+1]*del;
+ ath_max=ATH_Bark_dB[ibark]*(1.f-del)+ATH_Bark_dB[ibark+1]*del;
else
- ath_max=200.;
+ ath_max=200.f;
ath[i]=min(ath_min,ath_max);
}
@@ -150,7 +150,7 @@
for(i=0;i<P_LEVELS;i++){
attenuate_curve(c[i],curveatt_dB[i]);
memcpy(tempc[i],ath,EHMER_MAX*sizeof(float));
- attenuate_curve(tempc[i],-i*10.);
+ attenuate_curve(tempc[i],-i*10.f);
max_curve(tempc[i],c[i]);
}
@@ -193,7 +193,7 @@
p->bark[i]=toBARK(rate/(2*n)*i);
for(i=0;i<n;i++){
- int oc=toOC((i+.5)*rate/(2*n))*2.+2; /* half octaves, actually */
+ int oc=toOC((i+.5f)*rate/(2.f*n))*2.f+2.f; /* half octaves, actually */
if(oc<0)oc=0;
if(oc>=P_BANDS)oc=P_BANDS-1;
p->octave[i]=oc;
@@ -313,7 +313,7 @@
/* handle decay */
int i;
float decscale=fromdB(p->vi->decay_coeff*n);
- float attscale=1./fromdB(p->vi->attack_coeff);
+ float attscale=1.f/fromdB(p->vi->attack_coeff);
for(i=10;i<n;i++){
float pre=decay[i];
@@ -358,7 +358,7 @@
float *curve;
/* make this attenuation adjustable */
- int choice=(int)((todB(amp)-specmax+specatt)/10.+.5);
+ int choice=(int)((todB(amp)-specmax+specatt)/10.f+.5f);
choice=max(choice,0);
choice=min(choice,P_LEVELS-1);
@@ -368,11 +368,11 @@
curve=curves[choice];
for(;i>=0;i--)
- if(curve[i]>0.)break;
+ if(curve[i]>0.f)break;
for(;i>=0;i--){
float lin=curve[i];
- if(lin>0.){
+ if(lin>0.f){
float *fp=flr+((x*_eights[i])>>12);
lin*=amp;
if(*fp<lin)*fp=lin;
@@ -388,7 +388,7 @@
int prevx=(x*_eights[16])>>12;
/* make this attenuation adjustable */
- int choice=rint((todB(amp)-specmax+specatt)/10.+.5);
+ int choice=rint((todB(amp)-specmax+specatt)/10.f+.5f);
if(choice<0)choice=0;
if(choice>=P_LEVELS)choice=P_LEVELS-1;
@@ -443,7 +443,7 @@
for(i=0;i<n;i++){
/* make this attenuation adjustable */
- int choice=rint((todB(f[i])-specmax+vi->max_curve_dB)/10.+.5);
+ int choice=rint((todB(f[i])-specmax+vi->max_curve_dB)/10.f+.5f);
float lin;
if(choice<0)choice=0;
if(choice>=P_LEVELS)choice=P_LEVELS-1;
@@ -470,9 +470,9 @@
ampstack[stack++]=seeds[i];
break;
}else{
- if(i<posstack[stack-1]*1.0905077080){
+ if(i<posstack[stack-1]*1.0905077080f){
if(stack>1 && ampstack[stack-1]<ampstack[stack-2] &&
- i<posstack[stack-2]*1.0905077080){
+ i<posstack[stack-2]*1.0905077080f){
/* we completely overlap, making stack-1 irrelevant. pop it */
stack--;
continue;
@@ -496,7 +496,7 @@
if(i<stack-1 && ampstack[i+1]>ampstack[i]){
endpos=posstack[i+1];
}else{
- endpos=posstack[i]*1.0905077080+1; /* +1 is important, else bin 0 is
+ endpos=posstack[i]*1.0905077080f+1; /* +1 is important, else bin 0 is
discarded in short frames */
}
if(endpos>n)endpos=n;
@@ -513,7 +513,7 @@
static void bark_noise(long n,float *b,float *f,float *noise){
long i=1,lo=0,hi=2;
- float acc=0.,val,del=0.;
+ float acc=0.f,val,del=0.f;
float *norm=alloca(n*sizeof(float));
@@ -521,14 +521,14 @@
memset(norm,0,n*sizeof(float));
while(hi<n){
- val=todB_nn(f[i]*f[i])+400.;
- del=1./(i-lo);
+ val=todB_nn(f[i]*f[i])+400.f;
+ del=1.f/(i-lo);
noise[lo]+=val*del;
noise[i]-=val*del;
norm[lo]+=del;
norm[i]-=del;
- del=1./(hi-i);
+ del=1.f/(hi-i);
noise[i]-=val*del;
noise[hi]+=val*del;
norm[hi]+=del;
@@ -546,20 +546,20 @@
long hii=hi-i;
for(;i<n;i++){
- val=todB_nn(f[i]*f[i])+400.;
- del=1./(hii);
+ val=todB_nn(f[i]*f[i])+400.f;
+ del=1.f/(hii);
noise[i]-=val*del;
norm[i]-=del;
- del=1./(ilo);
+ del=1.f/(ilo);
noise[i-ilo]+=val*del;
noise[i]-=val*del;
norm[i-ilo]+=del;
norm[i]-=del;
}
for(i=1,lo=n-ilo;lo<n;lo++,i++){
- val=todB_nn(f[n-i]*f[n-i])+400.;
- del=1./ilo;
+ val=todB_nn(f[n-i]*f[n-i])+400.f;
+ del=1.f/ilo;
noise[lo]+=val*del;
norm[lo]+=del;
}
@@ -582,7 +582,7 @@
val+=norm[i];
acc+=noise[i];
if(val==0){
- noise[i]=0.;
+ noise[i]=0.f;
norm[i]=0;
}else{
float v=acc/val-400;
@@ -596,7 +596,7 @@
float *decay){
float *smooth=alloca(sizeof(float)*p->n);
int i,n=p->n;
- float specmax=0.;
+ float specmax=0.f;
static int seq=0;
float *seed=alloca(sizeof(float)*p->n);
@@ -690,7 +690,7 @@
/* doing this here is clean, but we need to find a faster way to do
it than to just tack it on */
- for(i=0;i<n;i++)if(2.*f[i]>flr[i] || -2.*f[i]>flr[i])break;
+ for(i=0;i<n;i++)if(2.f*f[i]>flr[i] || -2.f*f[i]>flr[i])break;
if(i==n)memset(flr,0,sizeof(float)*n);
seq++;
@@ -707,7 +707,7 @@
/* subtract the floor */
for(j=0;j<p->n;j++){
if(flr[j]<=0)
- work[j]=0.;
+ work[j]=0.f;
else
work[j]=f[j]/flr[j];
}
diff -ruN o/vorbis/lib/psy.h f/vorbis/lib/psy.h
--- o/vorbis/lib/psy.h Mon Nov 6 01:07:02 2000
+++ f/vorbis/lib/psy.h Sat Dec 9 22:10:38 2000
@@ -40,7 +40,7 @@
float ath_maxatt;
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
+ /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
int tonemaskp;
diff -ruN o/vorbis/lib/psytune.c f/vorbis/lib/psytune.c
--- o/vorbis/lib/psytune.c Tue Nov 14 01:05:31 2000
+++ f/vorbis/lib/psytune.c Sat Dec 9 22:41:31 2000
@@ -37,80 +37,80 @@
1,/*smoothp*/
0,.2,
- -100.,
- -140.,
+ -100.f,
+ -140.f,
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
+ /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
0,/* tonemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/
- {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/
- {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*11500*/
- {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*16000*/
+ {{-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*63*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*88*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*125*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*175*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*250*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*350*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*500*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*700*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1000*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1400*/
+ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2000*/
+ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2800*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*4000*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*5600*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*8000*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*11500*/
+ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*16000*/
},
1,/* peakattp */
- {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/
- {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
- { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/
- { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/
- { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/
+ {{-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*63*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*88*/
+ {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*125*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*8000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*8000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*8000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*8000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*8000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*8000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*8000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*8000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*8000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*8000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*8000*/
+ { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-16.f,-17.f}, /*8000*/
+ { -6.f, -7.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f,-13.f,-14.f}, /*11500*/
+ { -6.f, -6.f, -9.f, -9.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f}, /*16000*/
},
0,/*noisemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
- {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/
- {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/
- { 6., 6., 6., 2., 2., 2., 2., 2., 2., 1., 0.}, /*700*/
-
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1000*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1400*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2000*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2800*/
- { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*4000*/
- { 10., 10., 10., 10., 10., 10., 8., 8., 6., 6., 6.}, /*5600*/
- { 10., 10., 10., 10., 10., 10., 8., 8., 8., 8., 8.}, /*8000*/
- { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*11500*/
- { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*16000*/
+ {{-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*63*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*88*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*125*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*175*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*250*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*350*/
+ {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*500*/
+ { 6.f, 6.f, 6.f, 2.f, 2.f, 2.f, 2.f, 2.f, 2.f, 1.f, 0.f}, /*700*/
+
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*1000*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*1400*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*2000*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*2800*/
+ { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*4000*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 8.f, 8.f, 6.f, 6.f, 6.f}, /*5600*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 8.f, 8.f, 8.f, 8.f, 8.f}, /*8000*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f}, /*11500*/
+ { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f}, /*16000*/
},
- 100.,
+ 100.f,
- -0., -.004 /* attack/decay control */
+ -0.f, -.004 /* attack/decay control */
};
static int noisy=0;
@@ -127,7 +127,7 @@
fprintf(of,"\n\n");
else{
if(bark)
- fprintf(of,"%g ",toBARK(22050.*j/n));
+ fprintf(of,"%g ",toBARK(22050.f*j/n));
else
fprintf(of,"%g ",(float)j);
@@ -153,7 +153,7 @@
long frameno=0;
-/* hacked from floor0.c */
+/* hacked from floor0.c */
static void floorinit(vorbis_look_floor0 *look,int n,int m,int ln){
int j;
float scale;
@@ -162,11 +162,11 @@
look->ln=ln;
lpc_init(&look->lpclook,look->ln,look->m);
- scale=look->ln/toBARK(22050.);
+ scale=look->ln/toBARK(22050.f);
look->linearmap=_ogg_malloc(look->n*sizeof(int));
for(j=0;j<look->n;j++){
- int val=floor( toBARK(22050./n*j) *scale);
+ int val=floor( toBARK(22050.f/n*j) *scale);
if(val>look->ln)val=look->ln;
look->linearmap[j]=val;
}
@@ -174,9 +174,9 @@
int main(int argc,char *argv[]){
int eos=0;
- float nonz=0.;
- float acc=0.;
- float tot=0.;
+ float nonz=0.f;
+ float acc=0.f;
+ float tot=0.f;
int framesize=2048;
int order=32;
@@ -252,7 +252,7 @@
analysis("Ptonecurve",i*100+j,p_look.tonecurves[i][j],EHMER_MAX,0,1);
/* we cheat on the WAV header; we just bypass 44 bytes and never
- verify that it matches 16bit/stereo/44.1kHz. */
+ verify that it matches 16bit/stereo/44.1kHz. */
fread(buffer,1,44,stdin);
fwrite(buffer,1,44,stdout);
@@ -272,9 +272,9 @@
/* uninterleave samples */
for(i=0;i<framesize;i++){
pcm[0][i]=((buffer[i*4+1]<<8)|
- (0x00ff&(int)buffer[i*4]))/32768.;
+ (0x00ff&(int)buffer[i*4]))/32768.f;
pcm[1][i]=((buffer[i*4+3]<<8)|
- (0x00ff&(int)buffer[i*4+2]))/32768.;
+ (0x00ff&(int)buffer[i*4+2]))/32768.f;
}
for(i=0;i<2;i++){
@@ -298,8 +298,8 @@
analysis("decay",frameno,decay[i],framesize/2,1,1);
/*for(j=0;j<framesize/2;){
- float energy=0.;
- float acc=0.;
+ float energy=0.f;
+ float acc=0.f;
float *v=pcm[i]+j;
int flag=0;
for(k=0;k<32;k++){
@@ -307,7 +307,7 @@
if(fabs(v[k]/floor[j+k])>.5)acc+=v[k]*v[k];
}
if(acc*2<energy){
- if(acc>0.)fprintf(stderr,"culling\n");
+ if(acc>0.f)fprintf(stderr,"culling\n");
for(k=0;k<32;k++)v[k]=0;
}
j+=k;
@@ -324,7 +324,7 @@
tot++;
if(val){
nonz++;
- acc+=log(fabs(val)*2.+1.)/log(2);
+ acc+=log(fabs(val)*2.f+1.f)/log(2.f);
pcm[i][j]=val*floor[j];
}else{
pcm[i][j]=0;
@@ -346,7 +346,7 @@
char *ptr=buffer+i*2;
float *mono=out[i];
for(j=0;j<framesize/2;j++){
- int val=mono[j]*32767.;
+ int val=mono[j]*32767.f;
/* might as well guard against clipping */
if(val>32767)val=32767;
if(val<-32768)val=-32768;
diff -ruN o/vorbis/lib/res0.c f/vorbis/lib/res0.c
--- o/vorbis/lib/res0.c Fri Nov 17 12:47:18 2000
+++ f/vorbis/lib/res0.c Sat Dec 9 22:41:42 2000
@@ -170,12 +170,12 @@
/* does not guard against invalid settings; eg, a subn of 16 and a
- subgroup request of 32. Max subn of 128 */
+ subgroup request of 32. Max subn of 128 */
static int _testhack(float *vec,int n,vorbis_look_residue0 *look,
int auxparts,int auxpartnum){
vorbis_info_residue0 *info=look->info;
int i,j=0;
- float max,localmax=0.;
+ float max,localmax=0.f;
float temp[128];
float entropy[8];
@@ -198,7 +198,7 @@
for(i=0;i<n;i++){
temp[i]+=temp[i+n];
}
- localmax=0.;
+ localmax=0.f;
for(i=0;i<n;i++)
if(temp[i]>localmax)localmax=temp[i];
}
diff -ruN o/vorbis/lib/scales.h f/vorbis/lib/scales.h
--- o/vorbis/lib/scales.h Tue Nov 7 01:15:08 2000
+++ f/vorbis/lib/scales.h Sat Dec 9 22:17:21 2000
@@ -22,10 +22,10 @@
#include <math.h>
/* 20log10(x) */
-#define DYNAMIC_RANGE_dB 200.
-#define todB(x) ((x)==0?-9.e20:log(fabs(x))*8.6858896)
-#define todB_nn(x) ((x)==0?-400:log(x)*8.6858896)
-#define fromdB(x) (exp((x)*.11512925))
+#define DYNAMIC_RANGE_dB 200.f
+#define todB(x) ((x)==0.f?-9.e20f:log(fabs(x))*8.6858896f)
+#define todB_nn(x) ((x)==0.f?-400.f:log(x)*8.6858896f)
+#define fromdB(x) (exp((x)*.11512925f))
/* The bark scale equations are approximations, since the original
@@ -37,16 +37,16 @@
all f in Hz, z in Bark */
-#define toBARK(f) (13.1*atan(.00074*(f))+2.24*atan((f)*(f)*1.85e-8)+1e-4*(f))
-#define fromBARK(z) (102.*(z)-2.*pow(z,2.)+.4*pow(z,3)+pow(1.46,z)-1.)
-#define toMEL(f) (log(1.+(f)*.001)*1442.695)
-#define fromMEL(m) (1000.*exp((m)/1442.695)-1000.)
+#define toBARK(f) (13.1f*atan(.00074f*(f))+2.24f*atan((f)*(f)*1.85e-8f)+1e-4f*(f))
+#define fromBARK(z) (102.f*(z)-2.f*pow(z,2.f)+.4f*pow(z,3.f)+pow(1.46f,z)-1.f)
+#define toMEL(f) (log(1.f+(f)*.001f)*1442.695f)
+#define fromMEL(m) (1000.f*exp((m)/1442.695f)-1000.f)
/* Frequency to octave. We arbitrarily declare 125.0 Hz to be octave
0.0 */
-#define toOC(f) (log(f)*1.442695-6.965784)
-#define fromOC(o) (exp(((o)+6.965784)*.693147))
+#define toOC(f) (log(f)*1.442695f-6.965784f)
+#define fromOC(o) (exp(((o)+6.965784f)*.693147f))
#endif
diff -ruN o/vorbis/lib/sharedbook.c f/vorbis/lib/sharedbook.c
--- o/vorbis/lib/sharedbook.c Tue Nov 14 01:05:31 2000
+++ f/vorbis/lib/sharedbook.c Sat Dec 9 22:41:46 2000
@@ -198,7 +198,7 @@
that's portable and totally safe against roundoff, but I haven't
thought of it. Therefore, we opt on the side of caution */
long _book_maptype1_quantvals(const static_codebook *b){
- long vals=floor(pow(b->entries,1./b->dim));
+ long vals=floor(pow(b->entries,1.f/b->dim));
/* the above *should* be reliable, but we'll not assume that FP is
ever reliable when bitstream sync is at stake; verify via integer
@@ -251,7 +251,7 @@
that */
quantvals=_book_maptype1_quantvals(b);
for(j=0;j<b->entries;j++){
- float last=0.;
+ float last=0.f;
int indexdiv=1;
for(k=0;k<b->dim;k++){
int index= (j/indexdiv)%quantvals;
@@ -265,7 +265,7 @@
break;
case 2:
for(j=0;j<b->entries;j++){
- float last=0.;
+ float last=0.f;
for(k=0;k<b->dim;k++){
float val=b->quantlist[j*b->dim+k];
val=fabs(val)*delta+mindel+last;
@@ -343,7 +343,7 @@
for(j=0;j<s->entries;j++){
int flag=1;
for(k=0;k<s->dim;k++){
- if(fabs(c->valuelist[j*s->dim+k])>1e-12){
+ if(fabs(c->valuelist[j*s->dim+k])>1e-12f){
flag=0;
break;
}
@@ -372,7 +372,7 @@
static float _dist(int el,float *ref, float *b,int step){
int i;
- float acc=0.;
+ float acc=0.f;
for(i=0;i<el;i++){
float val=(ref[i]-b[i*step]);
acc+=val*val;
@@ -458,14 +458,14 @@
if(nt){
/* optimized using the decision tree */
while(1){
- float c=0.;
+ float c=0.f;
float *p=book->valuelist+nt->p[ptr];
float *q=book->valuelist+nt->q[ptr];
for(k=0,o=0;k<dim;k++,o+=step)
c+=(p[k]-q[k])*(a[o]-(p[k]+q[k])*.5);
- if(c>0.) /* in A */
+ if(c>0.f) /* in A */
ptr= -nt->ptr0[ptr];
else /* in B */
ptr= -nt->ptr1[ptr];
diff -ruN o/vorbis/lib/smallft.c f/vorbis/lib/smallft.c
--- o/vorbis/lib/smallft.c Tue Nov 14 01:05:31 2000
+++ f/vorbis/lib/smallft.c Sat Dec 9 22:41:50 2000
@@ -37,7 +37,7 @@
static void drfti1(int n, float *wa, int *ifac){
static int ntryh[4] = { 4,2,3,5 };
- static float tpi = 6.28318530717958647692528676655900577;
+ static float tpi = 6.28318530717958647692528676655900577f;
float arg,argh,argld,fi;
int ntry=0,i,j=-1;
int k1, l1, l2, ib;
@@ -92,9 +92,9 @@
ld+=l1;
i=is;
argld=(float)ld*argh;
- fi=0.;
+ fi=0.f;
for (ii=2;ii<ido;ii+=2){
- fi+=1.;
+ fi+=1.f;
arg=fi*argld;
wa[i++]=cos(arg);
wa[i++]=sin(arg);
@@ -271,7 +271,7 @@
static void dradfg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
float *c2,float *ch,float *ch2,float *wa){
- static float tpi=6.28318530717958647692528676655900577;
+ static float tpi=6.28318530717958647692528676655900577f;
int idij,ipph,i,j,k,l,ic,ik,is;
int t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
float dc2,ai1,ai2,ar1,ar2,ds2;
@@ -405,8 +405,8 @@
}
}
- ar1=1.;
- ai1=0.;
+ ar1=1.f;
+ ai1=0.f;
t1=0;
t2=ipp2*idl1;
t3=(ip-1)*idl1;
@@ -748,7 +748,7 @@
static void dradb4(int ido,int l1,float *cc,float *ch,float *wa1,
float *wa2,float *wa3){
- static float sqrt2=1.4142135623730950488016887242097;
+ static float sqrt2=1.4142135623730950488016887242097f;
int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8;
float ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4;
t0=l1*ido;
@@ -839,7 +839,7 @@
static void dradbg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
float *c2,float *ch,float *ch2,float *wa){
- static float tpi=6.28318530717958647692528676655900577;
+ static float tpi=6.28318530717958647692528676655900577f;
int idij,ipph,i,j,k,l,ik,is,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,
t11,t12;
float dc2,ai1,ai2,ar1,ar2,ds2;
@@ -976,8 +976,8 @@
}
L116:
- ar1=1.;
- ai1=0.;
+ ar1=1.f;
+ ai1=0.f;
t1=0;
t9=(t2=ipp2*idl1);
t3=(ip-1)*idl1;
diff -ruN o/vorbis/lib/tone.c f/vorbis/lib/tone.c
--- o/vorbis/lib/tone.c Tue Nov 14 01:05:32 2000
+++ f/vorbis/lib/tone.c Sat Dec 9 22:10:38 2000
@@ -24,9 +24,9 @@
f[i]=atof(argv[i+1]);
if(pos)
- amp[i]=atof(pos+1)*32767.;
+ amp[i]=atof(pos+1)*32767.f;
else
- amp[i]=32767.;
+ amp[i]=32767.f;
fprintf(stderr,"%g Hz, %g amp\n",f[i],amp[i]);
@@ -37,11 +37,11 @@
float val=0;
int ival;
for(j=0;j<argc-1;j++)
- val+=amp[j]*sin(i/44100.*f[j]*2*M_PI);
+ val+=amp[j]*sin(i/44100.f*f[j]*2*M_PI);
ival=rint(val);
- if(ival>32767.)ival=32767.;
- if(ival<-32768.)ival=-32768.;
+ if(ival>32767.f)ival=32767.f;
+ if(ival<-32768.f)ival=-32768.f;
fprintf(stdout,"%c%c%c%c",
(char)(ival&0xff),
diff -ruN o/vorbis/lib/vorbisfile.c f/vorbis/lib/vorbisfile.c
--- o/vorbis/lib/vorbisfile.c Wed Nov 29 22:13:34 2000
+++ f/vorbis/lib/vorbisfile.c Sat Dec 9 22:42:10 2000
@@ -411,8 +411,8 @@
vorbis_block_clear(&vf->vb);
vf->decode_ready=0;
- vf->bittrack=0.;
- vf->samptrack=0.;
+ vf->bittrack=0.f;
+ vf->samptrack=0.f;
}
/* fetch and process a packet. Handles the case where we're at a
@@ -701,8 +701,8 @@
long ret;
if(vf->samptrack==0)return(OV_FALSE);
ret=vf->bittrack/vf->samptrack*vf->vi[link].rate+.5;
- vf->bittrack=0.;
- vf->samptrack=0.;
+ vf->bittrack=0.f;
+ vf->samptrack=0.f;
return(ret);
}
@@ -1011,7 +1011,7 @@
int link=-1;
ogg_int64_t pcm_total=0;
- double time_total=0.;
+ double time_total=0.f;
if(vf->seekable){
pcm_total=ov_pcm_total(vf,-1);
@@ -1140,7 +1140,7 @@
vorbis_fpu_setround(&fpu);
for(j=0;j<samples;j++)
for(i=0;i<channels;i++){
- val=vorbis_ftoi(pcm[i][j]*128.);
+ val=vorbis_ftoi(pcm[i][j]*128.f);
if(val>127)val=127;
else if(val<-128)val=-128;
*buffer++=val+off;
@@ -1157,7 +1157,7 @@
float *src=pcm[i];
short *dest=((short *)buffer)+i;
for(j=0;j<samples;j++) {
- val=vorbis_ftoi(src[j]*32768.);
+ val=vorbis_ftoi(src[j]*32768.f);
if(val>32767)val=32767;
else if(val<-32768)val=-32768;
*dest=val;
@@ -1173,7 +1173,7 @@
float *src=pcm[i];
short *dest=((short *)buffer)+i;
for(j=0;j<samples;j++) {
- val=vorbis_ftoi(src[j]*32768.);
+ val=vorbis_ftoi(src[j]*32768.f);
if(val>32767)val=32767;
else if(val<-32768)val=-32768;
*dest=val+off;
@@ -1188,7 +1188,7 @@
vorbis_fpu_setround(&fpu);
for(j=0;j<samples;j++)
for(i=0;i<channels;i++){
- val=vorbis_ftoi(pcm[i][j]*32768.);
+ val=vorbis_ftoi(pcm[i][j]*32768.f);
if(val>32767)val=32767;
else if(val<-32768)val=-32768;
val+=off;
@@ -1202,7 +1202,7 @@
vorbis_fpu_setround(&fpu);
for(j=0;j<samples;j++)
for(i=0;i<channels;i++){
- val=vorbis_ftoi(pcm[i][j]*32768.);
+ val=vorbis_ftoi(pcm[i][j]*32768.f);
if(val>32767)val=32767;
else if(val<-32768)val=-32768;
val+=off;
diff -ruN o/vorbis/lib/window.c f/vorbis/lib/window.c
--- o/vorbis/lib/window.c Tue Nov 14 01:05:32 2000
+++ f/vorbis/lib/window.c Sat Dec 9 22:42:16 2000
@@ -33,22 +33,22 @@
int i;
for(i=0;i<left;i++){
- float x=(i+.5)/left*M_PI/2.;
+ float x=(i+.5f)/left*M_PI/2.f;
x=sin(x);
x*=x;
- x*=M_PI/2.;
+ x*=M_PI/2.f;
x=sin(x);
ret[i+leftbegin]=x;
}
for(i=leftbegin+left;i<rightbegin;i++)
- ret[i]=1.;
+ ret[i]=1.f;
for(i=0;i<right;i++){
- float x=(right-i-.5)/right*M_PI/2.;
+ float x=(right-i-.5f)/right*M_PI/2.f;
x=sin(x);
x*=x;
- x*=M_PI/2.;
+ x*=M_PI/2.f;
x=sin(x);
ret[i+rightbegin]=x;
}
diff -ruN o/vorbis/vq/bookutil.c f/vorbis/vq/bookutil.c
--- o/vorbis/vq/bookutil.c Wed Nov 8 04:23:23 2000
+++ f/vorbis/vq/bookutil.c Sat Dec 9 22:42:22 2000
@@ -108,11 +108,11 @@
return(ret);
}
-static float sequence_base=0.;
+static float sequence_base=0.f;
static int v_sofar=0;
void reset_next_value(void){
value_line_buff=NULL;
- sequence_base=0.;
+ sequence_base=0.f;
v_sofar=0;
}
@@ -150,7 +150,7 @@
v_sofar++;
return(0);
}
- sequence_base=0.;
+ sequence_base=0.f;
}
return(-1);
diff -ruN o/vorbis/vq/build.c f/vorbis/vq/build.c
--- o/vorbis/vq/build.c Wed Nov 8 04:23:23 2000
+++ f/vorbis/vq/build.c Sat Dec 9 22:42:30 2000
@@ -131,7 +131,7 @@
}
/* just use it to allocate mem */
- vqgen_init(&v,dim,0,entries,0.,NULL,NULL,0);
+ vqgen_init(&v,dim,0,entries,0.f,NULL,NULL,0);
/* quant */
line=rline(in,out);
diff -ruN o/vorbis/vq/cascade.c f/vorbis/vq/cascade.c
--- o/vorbis/vq/cascade.c Wed Nov 8 04:23:23 2000
+++ f/vorbis/vq/cascade.c Sat Dec 9 22:42:35 2000
@@ -25,7 +25,7 @@
/* set up metrics */
-float count=0.;
+float count=0.f;
void process_preprocess(codebook **bs,char *basename){
@@ -58,7 +58,7 @@
int booknum=0;
while(*bs){
- float base=0.;
+ float base=0.f;
codebook *b=*bs;
int dim=b->dim;
diff -ruN o/vorbis/vq/genericdata.c f/vorbis/vq/genericdata.c
--- o/vorbis/vq/genericdata.c Mon Nov 6 01:07:25 2000
+++ f/vorbis/vq/genericdata.c Sat Dec 9 22:42:38 2000
@@ -39,7 +39,7 @@
/* candidate,actual */
float vqext_metric(vqgen *v,float *e, float *p){
int i;
- float acc=0.;
+ float acc=0.f;
for(i=0;i<v->elements;i++){
float val=p[i]-e[i];
acc+=val*val;
diff -ruN o/vorbis/vq/latticehint.c f/vorbis/vq/latticehint.c
--- o/vorbis/vq/latticehint.c Wed Nov 8 04:23:23 2000
+++ f/vorbis/vq/latticehint.c Sat Dec 9 22:42:49 2000
@@ -70,7 +70,7 @@
long *temptrack,float *tempmin,float *tempmax,
int seqp){
int i;
- float last=0.;
+ float last=0.f;
for(i=0;i<dim;i++){
tempmin[i]=(temptrack[i])*p->del+p->min+last;
tempmax[i]=tempmin[i]+p->del;
@@ -85,9 +85,9 @@
static float minerror(int dim,float *a,encode_aux_pigeonhole *p,
long *temptrack,float *tempmin,float *tempmax){
int i;
- float err=0.;
+ float err=0.f;
for(i=0;i<dim;i++){
- float eval=0.;
+ float eval=0.f;
if(a[i]<tempmin[i]){
eval=tempmin[i]-a[i];
}else if(a[i]>tempmax[i]){
@@ -101,7 +101,7 @@
static float maxerror(int dim,float *a,encode_aux_pigeonhole *p,
long *temptrack,float *tempmin,float *tempmax){
int i;
- float err=0.,eval;
+ float err=0.f,eval;
for(i=0;i<dim;i++){
if(a[i]<tempmin[i]){
eval=tempmax[i]-a[i];
@@ -327,7 +327,7 @@
improbable is determined by c->lengthlist; we assume that
pigeonholing is in sync with the codeword cells, which it is */
/*for(i=0;i<entries;i++){
- float probability= 1./(1<<c->lengthlist[i]);
+ float probability= 1.f/(1<<c->lengthlist[i]);
if(c->lengthlist[i]==0 || probability*entries<cutoff){
totalstack-=tempcount[i];
tempcount[i]=0;
diff -ruN o/vorbis/vq/latticepare.c f/vorbis/vq/latticepare.c
--- o/vorbis/vq/latticepare.c Wed Nov 8 04:23:23 2000
+++ f/vorbis/vq/latticepare.c Sat Dec 9 22:42:53 2000
@@ -59,7 +59,7 @@
static float _dist(int el,float *a, float *b){
int i;
- float acc=0.;
+ float acc=0.f;
for(i=0;i<el;i++){
float val=(a[i]-b[i]);
acc+=val*val;
@@ -358,7 +358,7 @@
qsort(countindex,entries,sizeof(long *),longsort);
for(i=0;i<protect;i++){
int ptr=countindex[i]-cellcount;
- cellerrormax[ptr]=9e50;
+ cellerrormax[ptr]=9e50f;
}
}
diff -ruN o/vorbis/vq/lspdata.c f/vorbis/vq/lspdata.c
--- o/vorbis/vq/lspdata.c Wed Nov 8 04:23:23 2000
+++ f/vorbis/vq/lspdata.c Sat Dec 9 22:43:04 2000
@@ -39,7 +39,7 @@
encoded. Loosen the delta slightly to allow for additional error
during sequence quantization */
- delta=(global_maxdel-global_mindel)/((1<<q->quant)-1.5);
+ delta=(global_maxdel-global_mindel)/((1<<q->quant)-1.5f);
q->min=_float32_pack(global_mindel);
q->delta=_float32_pack(delta);
@@ -89,7 +89,7 @@
float *vqext_weight(vqgen *v,float *p){
int i;
int el=v->elements;
- float lastp=0.;
+ float lastp=0.f;
for(i=0;i<el;i++){
float predist=(p[i]-lastp);
float postdist=(p[i+1]-p[i]);
@@ -99,7 +99,7 @@
return p;
}
#else
-#define FUDGE 1.
+#define FUDGE 1.f
float *vqext_weight(vqgen *v,float *p){
return p;
}
@@ -109,7 +109,7 @@
float vqext_metric(vqgen *v,float *e, float *p){
int i;
int el=v->elements;
- float acc=0.;
+ float acc=0.f;
for(i=0;i<el;i++){
float val=(p[i]-e[i])*FUDGE;
acc+=val*val;
@@ -141,10 +141,10 @@
void vqext_preprocess(vqgen *v){
long j,k;
- global_maxdel=0.;
+ global_maxdel=0.f;
global_mindel=M_PI;
for(j=0;j<v->points;j++){
- float last=0.;
+ float last=0.f;
for(k=0;k<v->elements+v->aux;k++){
float p=_point(v,j)[k];
if(p-last>global_maxdel)global_maxdel=p-last;
diff -ruN o/vorbis/vq/metrics.c f/vorbis/vq/metrics.c
--- o/vorbis/vq/metrics.c Wed Nov 8 04:23:23 2000
+++ f/vorbis/vq/metrics.c Sat Dec 9 22:43:08 2000
@@ -37,18 +37,18 @@
/* set up metrics */
-float meanamplitude_acc=0.;
-float meanamplitudesq_acc=0.;
-float meanerror_acc=0.;
-float meanerrorsq_acc=0.;
+float meanamplitude_acc=0.f;
+float meanamplitudesq_acc=0.f;
+float meanerror_acc=0.f;
+float meanerrorsq_acc=0.f;
float **histogram=NULL;
float **histogram_error=NULL;
float **histogram_errorsq=NULL;
float **histogram_hi=NULL;
float **histogram_lo=NULL;
-float bits=0.;
-float count=0.;
+float bits=0.f;
+float count=0.f;
static float *_now(codebook *c, int i){
return c->valuelist+i*c->c->dim;
@@ -83,7 +83,7 @@
static float _dist(int el,float *a, float *b){
int i;
- float acc=0.;
+ float acc=0.f;
for(i=0;i<el;i++){
float val=(a[i]-b[i]);
acc+=val*val;
@@ -93,13 +93,13 @@
void cell_spacing(codebook *c){
int j,k;
- float min=-1,max=-1,mean=0.,meansq=0.;
+ float min=-1.f,max=-1.,mean=0.f,meansq=0.f;
long total=0;
/* minimum, maximum, mean, ms cell spacing */
for(j=0;j<c->c->entries;j++){
if(c->c->lengthlist[j]>0){
- float localmin=-1.;
+ float localmin=-1.f;
for(k=0;k<c->c->entries;k++){
if(c->c->lengthlist[k]>0){
float this=_dist(c->c->dim,_now(c,j),_now(c,k));
@@ -210,7 +210,7 @@
float process_one(codebook *b,int book,float *a,int dim,int step,int addmul,
float base){
int j,entry;
- float amplitude=0.;
+ float amplitude=0.f;
if(book==0){
float last=base;
@@ -267,7 +267,7 @@
for(bi=0;bi<books;bi++){
codebook *b=bs[bi];
int dim=b->dim;
- float base=0.;
+ float base=0.f;
if(inter){
for(i=0;i<n/dim;i++)
diff -ruN o/vorbis/vq/residuedata.c f/vorbis/vq/residuedata.c
--- o/vorbis/vq/residuedata.c Wed Nov 8 04:23:23 2000
+++ f/vorbis/vq/residuedata.c Sat Dec 9 22:43:12 2000
@@ -25,7 +25,7 @@
#include "../lib/scales.h"
#include "vqext.h"
-float scalequant=3.;
+float scalequant=3.f;
char *vqext_booktype="RESdata";
quant_meta q={0,0,0,0}; /* set sequence data */
int vqext_aux=0;
@@ -77,7 +77,7 @@
information (as we know granularity beforehand and don't need to
maximize it) */
- q->min=_float32_pack(0.);
+ q->min=_float32_pack(0.f);
q->delta=_float32_pack(scalequant);
q->quant=_ilog(max);
@@ -90,7 +90,7 @@
/* candidate,actual */
float vqext_metric(vqgen *v,float *e, float *p){
int i;
- float acc=0.;
+ float acc=0.f;
for(i=0;i<v->elements;i++){
float val=p[i]-e[i];
acc+=val*val;
diff -ruN o/vorbis/vq/residuesplit.c f/vorbis/vq/residuesplit.c
--- o/vorbis/vq/residuesplit.c Wed Nov 8 04:23:23 2000
+++ f/vorbis/vq/residuesplit.c Sat Dec 9 22:43:15 2000
@@ -23,10 +23,10 @@
#include "bookutil.h"
/* does not guard against invalid settings; eg, a subn of 16 and a
- subgroup request of 32. Max subn of 128 */
+ subgroup request of 32. Max subn of 128 */
static void _testhack(float *vec,int n,float *entropy){
int i,j=0;
- float max=0.;
+ float max=0.f;
float temp[128];
/* setup */
@@ -47,7 +47,7 @@
for(i=0;i<n;i++){
temp[i]+=temp[i+n];
}
- max=0.;
+ max=0.f;
for(i=0;i<n;i++)
if(temp[i]>max)max=temp[i];
}
@@ -66,7 +66,7 @@
int aux;
for(i=0;i<=n-subn;i+=subn){
- float max=0.;
+ float max=0.f;
_testhack(res+i,subn,entropy);
for(j=0;j<subn;j++)
@@ -124,8 +124,8 @@
" peak is the maximum amplitude value allowed for membership in a group\n"
" subn is the maximum entropy value allowed for membership in a group\n"
- "eg: residuesplit mask.vqd floor.vqd 0,1024,16 res 0,.5,16 3,1.5,8 \n"
- "produces resaux.vqd and res_0...n.vqd\n\n");
+ "eg: residuesplit mask.vqd floor.vqd 0,1024,16 res 0,.5,16 3,1.5,8 \n"
+ "produces resaux.vqd and res_0...n.vqd\n\n");
exit(1);
}
@@ -168,16 +168,16 @@
for(i=0;i<parts-1;i++){
char *pos=strchr(argv[4+i],',');
if(*argv[4+i]==',')
- ebound[i]=1e50;
+ ebound[i]=1e50f;
else
ebound[i]=atof(argv[4+i]);
if(!pos){
- mbound[i]=1e50;
+ mbound[i]=1e50f;
subgrp[i]=_ilog(subn)-1;
}else{
if(*(pos+1)==',')
- mbound[i]=1e50;
+ mbound[i]=1e50f;
else
mbound[i]=atof(pos+1);
pos=strchr(pos+1,',');
@@ -190,8 +190,8 @@
}
}
- ebound[i]=1e50;
- mbound[i]=1e50;
+ ebound[i]=1e50f;
+ mbound[i]=1e50f;
subgrp[i]=_ilog(subn)-1;
res=fopen(argv[1],"r");
diff -ruN o/vorbis/vq/train.c f/vorbis/vq/train.c
--- o/vorbis/vq/train.c Mon Nov 6 01:07:26 2000
+++ f/vorbis/vq/train.c Sat Dec 9 22:43:21 2000
@@ -79,7 +79,7 @@
int entries=-1,dim=-1;
int start=0,num=-1;
- float desired=.05,mindist=0.;
+ float desired=.05f,mindist=0.f;
int iter=1000;
int biasp=1;
int centroid=0;
diff -ruN o/vorbis/vq/vqgen.c f/vorbis/vq/vqgen.c
--- o/vorbis/vq/vqgen.c Wed Nov 8 04:23:23 2000
+++ f/vorbis/vq/vqgen.c Sat Dec 9 22:43:25 2000
@@ -61,7 +61,7 @@
float _dist(vqgen *v,float *a, float *b){
int i;
int el=v->elements;
- float acc=0.;
+ float acc=0.f;
for(i=0;i<el;i++){
float val=(a[i]-b[i]);
acc+=val*val;
@@ -90,7 +90,7 @@
void vqgen_cellmetric(vqgen *v){
int j,k;
- float min=-1.,max=-1.,mean=0.,acc=0.;
+ float min=-1.f,max=-1.f,mean=0.f,acc=0.f;
long dup=0,unused=0;
#ifdef NOISY
int i;
@@ -104,7 +104,7 @@
/* minimum, maximum, cell spacing */
for(j=0;j<v->entries;j++){
- float localmin=-1.;
+ float localmin=-1.f;
for(k=0;k<v->entries;k++){
if(j!=k){
@@ -177,7 +177,7 @@
mindel=maxdel=_now(v,0)[0];
for(j=0;j<v->entries;j++){
- float last=0.;
+ float last=0.f;
for(k=0;k<v->elements;k++){
if(mindel>_now(v,j)[k]-last)mindel=_now(v,j)[k]-last;
if(maxdel<_now(v,j)[k]-last)maxdel=_now(v,j)[k]-last;
@@ -190,7 +190,7 @@
encoded. Loosen the delta slightly to allow for additional error
during sequence quantization */
- delta=(maxdel-mindel)/((1<<q->quant)-1.5);
+ delta=(maxdel-mindel)/((1<<q->quant)-1.5f);
q->min=_float32_pack(mindel);
q->delta=_float32_pack(delta);
@@ -229,7 +229,7 @@
float delta=_float32_unpack(q->delta);
for(j=0;j<v->entries;j++){
- float last=0.;
+ float last=0.f;
for(k=0;k<v->elements;k++){
float now=_now(v,j)[k];
now=fabs(now)*delta+last+mindel;
@@ -286,7 +286,7 @@
if(v->aux)memcpy(_point(v,v->points)+v->elements,a,sizeof(float)*v->aux);
/* quantize to the density mesh if it's selected */
- if(v->mindist>0.){
+ if(v->mindist>0.f){
/* quantize to the mesh */
for(k=0;k<v->elements+v->aux;k++)
_point(v,v->points)[k]=
@@ -306,7 +306,7 @@
void vqgen_sortmesh(vqgen *v){
sortit=0;
- if(v->mindist>0.){
+ if(v->mindist>0.f){
long i,march=1;
/* sort to make uniqueness detection trivial */
@@ -339,8 +339,8 @@
long desired;
long desired2;
- float asserror=0.;
- float meterror=0.;
+ float asserror=0.f;
+ float meterror=0.f;
float *new;
float *new2;
long *nearcount;
@@ -544,7 +544,7 @@
_now(v,j)[k]=vN(new,j)[k]/v->assigned[j];
}else{
for(k=0;k<v->elements;k++)
- _now(v,j)[k]=(vN(new,j)[k]+vN(new2,j)[k])/2.;
+ _now(v,j)[k]=(vN(new,j)[k]+vN(new2,j)[k])/2.f;
}
}
}
diff -ruN o/vorbis/vq/vqsplit.c f/vorbis/vq/vqsplit.c
--- o/vorbis/vq/vqsplit.c Wed Nov 8 04:23:24 2000
+++ f/vorbis/vq/vqsplit.c Sat Dec 9 22:43:30 2000
@@ -69,7 +69,7 @@
static float _Ndist(int el,float *a, float *b){
int i;
- float acc=0.;
+ float acc=0.f;
for(i=0;i<el;i++){
float val=(a[i]-b[i]);
acc+=val*val;
@@ -197,7 +197,7 @@
/* more than one way to do this part. For small sets, we can brute
force it. */
- if(entries<8 || (float)points*entries*entries<16.*1024*1024){
+ if(entries<8 || (float)points*entries*entries<16.f*1024.f*1024.f){
/* try every pair possibility */
float best=0;
float this;
@@ -231,7 +231,7 @@
}else{
float *p=alloca(dim*sizeof(float));
float *q=alloca(dim*sizeof(float));
- float best=0.;
+ float best=0.f;
/* try COG/normal and furthest pairs */
/* meanpoint */
@@ -240,7 +240,7 @@
for(k=0;k<dim;k++){
spinnit(spinbuf,entries);
- p[k]=0.;
+ p[k]=0.f;
for(j=0;j<entries;j++)
p[k]+=b->valuelist[entryindex[j]*dim+k];
p[k]/=entries;
@@ -253,7 +253,7 @@
for(i=0;i<entries;i++){
float *ppi=_Nnow(entryindex[i]);
- float ref_best=0.;
+ float ref_best=0.f;
float ref_j=-1;
float this;
spinnit(spinbuf,entries-i);
@@ -386,7 +386,7 @@
for(i=0;i<v->entries;){
/* duplicate? if so, eliminate */
for(j=0;j<i;j++){
- if(_Ndist(v->elements,_now(v,i),_now(v,j))==0.){
+ if(_Ndist(v->elements,_now(v,i),_now(v,j))==0.f){
fprintf(stderr,"found a duplicate entry! removing...\n");
v->entries--;
memcpy(_now(v,i),_now(v,v->entries),sizeof(float)*v->elements);
--------------BE8F32D86CCA67A4673AA4B1
Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="74747874";
name="d.n.m"
Content-Transfer-Encoding: 7bit
Content-Description: Unknown Document
Content-Disposition: inline;
filename="d.n.m"
diff -ur n/vorbis/lib/envelope.c m/vorbis/lib/envelope.c
--- n/vorbis/lib/envelope.c Mon Dec 11 04:04:46 2000
+++ m/vorbis/lib/envelope.c Thu Dec 14 01:25:47 2000
@@ -108,7 +108,7 @@
memset(e,0,sizeof(envelope_lookup));
}
-static float _ve_deltai(envelope_lookup *ve,IIR_state *iir,
+static float _ve_deltai_old(envelope_lookup *ve,IIR_state *iir,
float *pre,float *post){
long n2=ve->winlength*2;
long n=ve->winlength;
@@ -154,6 +154,27 @@
B=todB(B);
return(B-A);
+}
+
+static float _ve_deltai(envelope_lookup *ve,IIR_state *iir,
+ float *pre,float *post){
+ long n2=ve->winlength*2;
+ long n=ve->winlength;
+
+ /* 0.4 is quite arbitrary, but not important */
+ float min=ve->minenergy*ve->minenergy*.4f*n;
+ float A=0.f,B=0.f;
+ long i;
+
+ for(i=0;i<n;i++){
+ A+=pre[i]*pre[i]*ve->window[i]*ve->window[i];
+ B+=post[i]*post[i]*ve->window[i]*ve->window[i];
+ }
+
+ if(A<min)A=min;
+ if(B<min)B=min;
+
+ return(todB(B/A));
}
long _ve_envelope_search(vorbis_dsp_state *v,long searchpoint){
diff -ur n/vorbis/lib/psy.c m/vorbis/lib/psy.c
--- n/vorbis/lib/psy.c Mon Dec 11 03:08:52 2000
+++ m/vorbis/lib/psy.c Thu Dec 14 01:23:36 2000
@@ -175,6 +175,8 @@
}
+static float *bark_noise_init(long n,float *b);
+
void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi,int n,long rate){
long i,j;
memset(p,0,sizeof(vorbis_look_psy));
@@ -200,10 +202,14 @@
}
p->tonecurves=_ogg_malloc(P_BANDS*sizeof(float **));
+ p->tonecurveminpos=_ogg_malloc(P_BANDS*sizeof(int *));
+ p->tonecurvemaxpos=_ogg_malloc(P_BANDS*sizeof(int *));
p->noiseatt=_ogg_malloc(P_BANDS*sizeof(float **));
p->peakatt=_ogg_malloc(P_BANDS*sizeof(float *));
for(i=0;i<P_BANDS;i++){
p->tonecurves[i]=_ogg_malloc(P_LEVELS*sizeof(float *));
+ p->tonecurveminpos[i]=_ogg_malloc(P_LEVELS*sizeof(int));
+ p->tonecurvemaxpos[i]=_ogg_malloc(P_LEVELS*sizeof(int));
p->noiseatt[i]=_ogg_malloc(P_LEVELS*sizeof(float));
p->peakatt[i]=_ogg_malloc(P_LEVELS*sizeof(float));
}
@@ -278,6 +284,22 @@
for(i=0;i<P_BANDS;i++)
setup_curve(p->tonecurves[i],i,vi->toneatt[i]);
+ /* find min and max positive value indices of curves */
+ for(i=0;i<P_BANDS;i++)
+ for(j=0;j<P_LEVELS;j++){
+ int min=0,max=EHMER_MAX-1;
+ while(p->tonecurves[i][j][min]<=0.f&&min<EHMER_MAX)
+ min++;
+ if(min>=EHMER_MAX)
+ min=0;
+ while(p->tonecurves[i][j][max]<=0.f&&max>=0)
+ max--;
+ if(max<0)
+ max=0;
+ p->tonecurveminpos[i][j]=min;
+ p->tonecurvemaxpos[i][j]=max;
+ }
+
/* set up attenuation levels */
for(i=0;i<P_BANDS;i++)
for(j=0;j<P_LEVELS;j++){
@@ -285,6 +307,8 @@
p->noiseatt[i][j]=fromdB(p->vi->noiseatt[i][j]);
}
+ p->max_curve_fac=pow(10.f,-.05f*p->vi->max_curve_dB);
+ p->noisenorm=bark_noise_init(n,p->bark);
}
void _vp_psy_clear(vorbis_look_psy *p){
@@ -349,48 +373,68 @@
88752,96785,105545,115097,
125515};
-static int seed_curve(float *flr,
+static int make_choice_old(float amp,float specmax,float specatt){
+ int choice;
+ choice=(int)((todB(amp)-specmax+specatt)/10.f+.5f);
+ choice=max(choice,0);
+ choice=min(choice,P_LEVELS-1);
+ return choice;
+}
+
+static inline int make_choice(float amp,float specfac){
+ int choice;
+ static float root_ten;
+ static int init=1;
+
+ if(init){
+ init=0;
+ root_ten=sqrt(10.f);
+ }
+
+ for(choice=0;amp>=specfac&&choice<P_LEVELS-1;choice++)
+ specfac*=root_ten;
+
+ return choice;
+}
+
+static void seed_curve(float *flr,
float **curves,
- float amp,float specmax,
- int x,int n,float specatt,
- int maxEH){
+ int *mincurvepos,
+ int *maxcurvepos,
+ float amp,
+ int x,int n,
+ float specfac){
int i;
float *curve;
+ int minpos,maxpos;
+ long br;
/* make this attenuation adjustable */
- int choice=(int)((todB(amp)-specmax+specatt)/10.f+.5f);
- choice=max(choice,0);
- choice=min(choice,P_LEVELS-1);
+ int choice=make_choice(amp,specfac);
- for(i=maxEH;i>=0;i--)
- if(((x*_eights[i])>>12)<n)break;
- maxEH=i;
curve=curves[choice];
+ minpos=mincurvepos[choice];
+ maxpos=maxcurvepos[choice];
- for(;i>=0;i--)
- if(curve[i]>0.f)break;
-
- for(;i>=0;i--){
- float lin=curve[i];
- if(lin>0.f){
- float *fp=flr+((x*_eights[i])>>12);
- lin*=amp;
- if(*fp<lin)*fp=lin;
- }else break;
+ br=n<<12;
+ for(i=maxpos;i>=minpos;i--)
+ if((x*_eights[i])<br)break;
+
+ for(;i>=minpos;i--){
+ float *fp=flr+((unsigned)(x*_eights[i])>>12);
+ float lin=curve[i]*amp;
+ if(*fp<lin)*fp=lin;
}
- return(maxEH);
}
static void seed_peak(float *flr,
float *att,
- float amp,float specmax,
- int x,int n,float specatt){
- int prevx=(x*_eights[16])>>12;
+ float amp,
+ int x,int n,float specfac){
+ int prevx=(unsigned)(x*_eights[16])>>12;
/* make this attenuation adjustable */
- int choice=rint((todB(amp)-specmax+specatt)/10.f+.5f);
- if(choice<0)choice=0;
- if(choice>=P_LEVELS)choice=P_LEVELS-1;
+ int choice=make_choice(amp,specfac);
if(prevx<n){
float lin=att[choice];
@@ -401,36 +445,102 @@
}
}
-static void seed_generic(vorbis_look_psy *p,
+static void seed_generic_old(vorbis_look_psy *p,
float ***curves,
+ int **mincurvepos,
+ int **maxcurvepos,
float *f,
float *flr,
float *seeds,
float specmax){
- vorbis_info_psy *vi=p->vi;
long n=p->n,i;
- int maxEH=EHMER_MAX-1;
+ float specfac=pow(10.f,.05f*(specmax+5.f));
/* prime the working vector with peak values */
/* Use the 125 Hz curve up to 125 Hz and 8kHz curve after 8kHz. */
for(i=0;i<n;i++)
if(f[i]>flr[i])
- maxEH=seed_curve(seeds,curves[p->octave[i]],
- f[i],specmax,i,n,vi->max_curve_dB,maxEH);
+ seed_curve(seeds,curves[p->octave[i]],
+ mincurvepos[p->octave[i]],maxcurvepos[p->octave[i]],
+ f[i],i,n,specfac*p->max_curve_fac);
}
-static void seed_att(vorbis_look_psy *p,
+static void seed_generic(vorbis_look_psy *p,
+ float ***curves,
+ int **mincurvepos,
+ int **maxcurvepos,
+ float *f,
+ float *flr,
+ float *seeds,
+ float specmax){
+ long n=p->n,i;
+ float specfac=pow(10.f,.05f*(specmax+5.f))*p->max_curve_fac;
+ long br=n<<12;
+
+ /* prime the working vector with peak values */
+ /* Use the 125 Hz curve up to 125 Hz and 8kHz curve after 8kHz. */
+ for(i=0;i<n;i++)
+ if(f[i]>flr[i]){
+ int j;
+ float *curve;
+ int minpos,maxpos;
+ int octave=p->octave[i];
+
+ /* make this attenuation adjustable */
+ int choice=make_choice(f[i],specfac);
+
+ curve=curves[octave][choice];
+ minpos=mincurvepos[octave][choice];
+ maxpos=maxcurvepos[octave][choice];
+
+ for(j=maxpos;j>=minpos;j--)
+ if((i*_eights[j])<br)break;
+
+ for(;j>=minpos;j--){
+ float *fp=seeds+((unsigned)(i*_eights[j])>>12);
+ float lin=curve[j]*f[i];
+ if(*fp<lin)*fp=lin;
+ }
+ }
+}
+
+static void seed_att_old(vorbis_look_psy *p,
float **att,
float *f,
float *flr,
float specmax){
- vorbis_info_psy *vi=p->vi;
long n=p->n,i;
+ float specfac=pow(10.f,.05f*(specmax+5.f));
for(i=0;i<n;i++)
if(f[i]>flr[i])
seed_peak(flr,att[p->octave[i]],f[i],
- specmax,i,n,vi->max_curve_dB);
+ i,n,specfac*p->max_curve_fac);
+}
+
+static void seed_att(vorbis_look_psy *p,
+ float **att,
+ float *f,
+ float *flr,
+ float specmax){
+ long n=p->n,i;
+ float specfac=pow(10.f,.05f*(specmax+5.f))*p->max_curve_fac;
+
+ for(i=0;i<n;i++)
+ if(f[i]>flr[i]){
+ int prevx=(unsigned)(i*_eights[16])>>12;
+
+ /* make this attenuation adjustable */
+ int choice=make_choice(f[i],specfac);
+
+ if(prevx<n){
+ float lin=att[p->octave[i]][choice];
+ if(lin){
+ lin*=f[i];
+ if(flr[prevx]<lin)flr[prevx]=lin;
+ }
+ }
+ }
}
static void seed_point(vorbis_look_psy *p,
@@ -438,22 +548,20 @@
float *f,
float *flr,
float specmax){
- vorbis_info_psy *vi=p->vi;
long n=p->n,i;
+ float specfac=pow(10.f,.05f*(specmax+5.f));
for(i=0;i<n;i++){
/* make this attenuation adjustable */
- int choice=rint((todB(f[i])-specmax+vi->max_curve_dB)/10.f+.5f);
float lin;
- if(choice<0)choice=0;
- if(choice>=P_LEVELS)choice=P_LEVELS-1;
+ int choice=make_choice(f[i],specfac*p->max_curve_fac);
lin=att[p->octave[i]][choice]*f[i];
if(flr[i]<lin)flr[i]=lin;
}
}
/* bleaugh, this is more complicated than it needs to be */
-static void max_seeds(vorbis_look_psy *p,float *seeds,float *flr){
+static void max_seeds_old(vorbis_look_psy *p,float *seeds,float *flr){
long n=p->n,i,j;
long *posstack=alloca(n*sizeof(long));
float *ampstack=alloca(n*sizeof(float));
@@ -470,13 +578,11 @@
ampstack[stack++]=seeds[i];
break;
}else{
- if(i<posstack[stack-1]*1.0905077080f){
- if(stack>1 && ampstack[stack-1]<ampstack[stack-2] &&
- i<posstack[stack-2]*1.0905077080f){
- /* we completely overlap, making stack-1 irrelevant. pop it */
- stack--;
- continue;
- }
+ if(stack>1 && ampstack[stack-1]<ampstack[stack-2] &&
+ i<posstack[stack-2]*1.0905077080f){
+ /* we completely overlap, making stack-1 irrelevant. pop it */
+ stack--;
+ continue;
}
posstack[stack]=i;
ampstack[stack++]=seeds[i];
@@ -511,7 +617,20 @@
had in Grad Skool... I didn't solve it at the time ;-) */
}
-static void bark_noise(long n,float *b,float *f,float *noise){
+/* this new version has _not_ got identical output, but is a tiny
+ bit more conservative, and thrice as fast */
+static void max_seeds(vorbis_look_psy *p,float *seeds,float *flr){
+ long n=p->n,i,maxi;
+ float val;
+
+ for(i=0;i<n;){
+ maxi=1.0905077080f*i;
+ for(val=seeds[i];val>=seeds[i]&&i<=maxi&&i<n;i++)
+ if(flr[i]<val)flr[i]=val;
+ }
+}
+
+static void bark_noise_old(long n,float *b,float *f,float *noise){
long i=1,lo=0,hi=2;
float acc=0.f,val,del=0.f;
@@ -591,6 +710,127 @@
}
}
+static float *bark_noise_init(long n,float *b){
+ long i=1,lo=0,hi=2;
+ float acc=0.f,del=0.f;
+
+ float *norm=_ogg_malloc(n*sizeof(float));
+
+ memset(norm,0,n*sizeof(float));
+
+ while(hi<n){
+ del=1.f/(i-lo);
+ norm[lo]+=del;
+ norm[i]-=del;
+
+ del=1.f/(hi-i);
+ norm[hi]+=del;
+ norm[i]-=del;
+
+
+ i++;
+ for(;hi<n && b[hi]-.3f<b[i];hi++);
+ for(;lo<i-1 && b[lo]+.3f<b[i];lo++);
+ if(i==hi)hi++;
+ }
+
+ {
+ long ilo=i-lo;
+ long hii=hi-i;
+
+ for(;i<n;i++){
+ del=1.f/(hii);
+ norm[i]-=del;
+
+ del=1.f/(ilo);
+ norm[i-ilo]+=del;
+ norm[i]-=del;
+ }
+ for(i=1,lo=n-ilo;lo<n;lo++,i++){
+ del=1.f/ilo;
+ norm[lo]+=del;
+ }
+ }
+
+
+ acc=0;
+ for(i=0;i<n;i++){
+ acc+=norm[i];
+ norm[i]=acc;
+ }
+
+ acc=0;
+ for(i=0;i<n;i++){
+ acc+=norm[i];
+ norm[i]=acc;
+ }
+
+ return norm;
+}
+
+static void bark_noise(long n,float *b,float *f,float *noise,float *norm){
+ long i=1,lo=0,hi=2;
+ float acc=0.f,val,del=0.f;
+
+ memset(noise,0,n*sizeof(float));
+
+ while(hi<n){
+ val=todB_nn(f[i]*f[i])+400.f;
+ del=1.f/(i-lo);
+ noise[lo]+=val*del;
+ noise[i]-=val*del;
+
+ del=1.f/(hi-i);
+ noise[i]-=val*del;
+ noise[hi]+=val*del;
+
+
+ i++;
+ for(;hi<n && b[hi]-.3f<b[i];hi++);
+ for(;lo<i-1 && b[lo]+.3f<b[i];lo++);
+ if(i==hi)hi++;
+ }
+
+ {
+ long ilo=i-lo;
+ long hii=hi-i;
+
+ for(;i<n;i++){
+ val=todB_nn(f[i]*f[i])+400.f;
+ del=1.f/(hii);
+ noise[i]-=val*del;
+
+ del=1.f/(ilo);
+ noise[i-ilo]+=val*del;
+ noise[i]-=val*del;
+ }
+ for(i=1,lo=n-ilo;lo<n;lo++,i++){
+ val=todB_nn(f[n-i]*f[n-i])+400.f;
+ del=1.f/ilo;
+ noise[lo]+=val*del;
+ }
+ }
+
+
+ acc=0;
+
+ for(i=0;i<n;i++){
+ acc+=noise[i];
+ noise[i]=acc;
+ }
+
+ acc=0;
+ for(i=0;i<n;i++){
+ acc+=noise[i];
+ if(norm[i]==0.f){
+ noise[i]=0.f;
+ }else{
+ float v=acc/norm[i]-400;
+ noise[i]=sqrt(fromdB(v));
+ }
+ }
+}
+
void _vp_compute_mask(vorbis_look_psy *p,float *f,
float *flr,
float *decay){
@@ -608,9 +848,8 @@
/* noise masking */
if(p->vi->noisemaskp){
memset(seed,0,n*sizeof(float));
- bark_noise(n,p->bark,f,seed);
+ bark_noise(n,p->bark,f,seed,p->noisenorm);
seed_point(p,p->noiseatt,seed,flr,specmax);
-
}
/* smooth the data is that's called for ********************************/
@@ -669,13 +908,15 @@
memset(seed,0,n*sizeof(float));
memset(seed2,0,n*sizeof(float));
- seed_generic(p,p->tonecurves,smooth,flr,seed2,specmax);
+ seed_generic(p,p->tonecurves,p->tonecurveminpos,p->tonecurvemaxpos,
+ smooth,flr,seed2,specmax);
max_seeds(p,seed2,seed2);
for(i=0;i<n;i++)if(seed2[i]<flr[i])seed2[i]=flr[i];
for(i=0;i<n;i++)if(seed2[i]<decay[i])seed2[i]=decay[i];
- seed_generic(p,p->tonecurves,smooth,seed2,seed,specmax);
+ seed_generic(p,p->tonecurves,p->tonecurveminpos,p->tonecurvemaxpos,
+ smooth,seed2,seed,specmax);
max_seeds(p,seed,seed);
if(p->vi->decayp)
diff -ur n/vorbis/lib/psy.h m/vorbis/lib/psy.h
--- n/vorbis/lib/psy.h Mon Nov 6 01:07:02 2000
+++ m/vorbis/lib/psy.h Wed Dec 13 23:41:12 2000
@@ -64,6 +64,8 @@
struct vorbis_info_psy *vi;
float ***tonecurves;
+ int **tonecurveminpos;
+ int **tonecurvemaxpos;
float **peakatt;
float **noiseatt;
@@ -71,6 +73,9 @@
int *octave;
float *bark;
+ float max_curve_fac;
+
+ float *noisenorm;
} vorbis_look_psy;
extern void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi,int n,long rate);
--------------BE8F32D86CCA67A4673AA4B1--
--- >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 'vorbis-dev-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 Vorbis-dev
mailing list