[xiph-cvs] cvs commit: vorbis/vq Makefile.am bookutil.c build.c cascade.c genericdata.c latticehint.c latticepare.c lspdata.c metrics.c residuedata.c residuesplit.c train.c vqgen.c vqsplit.c
Monty
xiphmont at xiph.org
Thu Dec 21 13:04:53 PST 2000
xiphmont 00/12/21 13:04:51
Modified: examples decoder_example.c encoder_example.c
lib analysis.c barkmel.c bitbuffer.c block.c codebook.c
envelope.c floor0.c iir.c lookup.c lookup_data.h
lpc.c lsp.c mapping0.c masking.h mdct.c mdct.h os.h
psy.c psytune.c res0.c scales.h sharedbook.c
smallft.c tone.c vorbisfile.c window.c
lib/modes mode_A.h mode_AA.h mode_B.h mode_C.h mode_D.h
mode_E.h
vq Makefile.am bookutil.c build.c cascade.c
genericdata.c latticehint.c latticepare.c lspdata.c
metrics.c residuedata.c residuesplit.c train.c
vqgen.c vqsplit.c
Log:
Commit minor speed patch (sliding window in vorbis_blockin)
Commit Segher floating constant patch
Commit addition of vq targets to vq/ Makefile.am
Revision Changes Path
1.15 +3 -3 vorbis/examples/decoder_example.c
Index: decoder_example.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/examples/decoder_example.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- decoder_example.c 2000/11/06 00:06:53 1.14
+++ decoder_example.c 2000/12/21 21:04:37 1.15
@@ -12,7 +12,7 @@
********************************************************************
function: simple example decoder
- last mod: $Id: decoder_example.c,v 1.14 2000/11/06 00:06:53 xiphmont Exp $
+ last mod: $Id: decoder_example.c,v 1.15 2000/12/21 21:04:37 xiphmont Exp $
********************************************************************/
@@ -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){
1.17 +3 -3 vorbis/examples/encoder_example.c
Index: encoder_example.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/examples/encoder_example.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- encoder_example.c 2000/12/12 08:54:26 1.16
+++ encoder_example.c 2000/12/21 21:04:37 1.17
@@ -12,7 +12,7 @@
********************************************************************
function: simple example encoder
- last mod: $Id: encoder_example.c,v 1.16 2000/12/12 08:54:26 xiphmont Exp $
+ last mod: $Id: encoder_example.c,v 1.17 2000/12/21 21:04:37 xiphmont Exp $
********************************************************************/
@@ -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 */
1.40 +2 -2 vorbis/lib/analysis.c
Index: analysis.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/analysis.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- analysis.c 2000/11/16 22:15:28 1.39
+++ analysis.c 2000/12/21 21:04:38 1.40
@@ -12,7 +12,7 @@
********************************************************************
function: single-block PCM analysis mode dispatch
- last mod: $Id: analysis.c,v 1.39 2000/11/16 22:15:28 xiphmont Exp $
+ last mod: $Id: analysis.c,v 1.40 2000/12/21 21:04:38 xiphmont Exp $
********************************************************************/
@@ -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);
1.3 +8 -8 vorbis/lib/barkmel.c
Index: barkmel.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/barkmel.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- barkmel.c 2000/11/06 00:07:00 1.2
+++ barkmel.c 2000/12/21 21:04:38 1.3
@@ -12,7 +12,7 @@
********************************************************************
function: bark scale utility
- last mod: $Id: barkmel.c,v 1.2 2000/11/06 00:07:00 xiphmont Exp $
+ last mod: $Id: barkmel.c,v 1.3 2000/12/21 21:04:38 xiphmont Exp $
********************************************************************/
@@ -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));
1.2 +1 -2 vorbis/lib/bitbuffer.c
Index: bitbuffer.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/bitbuffer.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- bitbuffer.c 2000/11/17 11:57:49 1.1
+++ bitbuffer.c 2000/12/21 21:04:38 1.2
@@ -12,7 +12,7 @@
********************************************************************
function: flexible, delayed bitpacking abstraction
- last mod: $Id: bitbuffer.c,v 1.1 2000/11/17 11:57:49 xiphmont Exp $
+ last mod: $Id: bitbuffer.c,v 1.2 2000/12/21 21:04:38 xiphmont Exp $
********************************************************************/
@@ -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;
1.42 +9 -6 vorbis/lib/block.c
Index: block.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/block.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- block.c 2000/11/14 00:05:30 1.41
+++ block.c 2000/12/21 21:04:38 1.42
@@ -12,15 +12,11 @@
********************************************************************
function: PCM data vector blocking, windowing and dis/reassembly
- last mod: $Id: block.c,v 1.41 2000/11/14 00:05:30 xiphmont Exp $
+ last mod: $Id: block.c,v 1.42 2000/12/21 21:04:38 xiphmont Exp $
Handle windowing, overlap-add, etc of the PCM vectors. This is made
more amusing by Vorbis' current two allowed block sizes.
- Vorbis manipulates the dynamic range of the incoming PCM data
- envelope to minimise time-domain energy leakage from percussive and
- plosive waveforms being quantized in the MDCT domain.
-
********************************************************************/
#include <stdio.h>
@@ -614,7 +610,12 @@
/* Shift out any PCM that we returned previously */
/* centerW is currently the center of the last block added */
- if(v->pcm_returned && v->centerW>ci->blocksizes[1]/2){
+
+ if(v->centerW>ci->blocksizes[1]/2 &&
+ /* Quick additional hack; to avoid *alot* of shifts, use an
+ oversized buffer. This increases memory usage, but doesn't make
+ much difference wrt L1/L2 cache pressure. */
+ v->pcm_returned>8192){
/* don't shift too much; we need to have a minimum PCM buffer of
1/2 long block */
@@ -677,6 +678,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++){
1.20 +52 -50 vorbis/lib/codebook.c
Index: codebook.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/codebook.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- codebook.c 2000/11/06 00:07:00 1.19
+++ codebook.c 2000/12/21 21:04:39 1.20
@@ -12,7 +12,7 @@
********************************************************************
function: basic codebook pack/unpack/code/decode operations
- last mod: $Id: codebook.c,v 1.19 2000/11/06 00:07:00 xiphmont Exp $
+ last mod: $Id: codebook.c,v 1.20 2000/12/21 21:04:39 xiphmont Exp $
********************************************************************/
@@ -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 +431,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]={
1.28 +31 -30 vorbis/lib/envelope.c
Index: envelope.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/envelope.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- envelope.c 2000/12/13 07:37:20 1.27
+++ envelope.c 2000/12/21 21:04:39 1.28
@@ -12,7 +12,7 @@
********************************************************************
function: PCM data envelope analysis and manipulation
- last mod: $Id: envelope.c,v 1.27 2000/12/13 07:37:20 msmith Exp $
+ last mod: $Id: envelope.c,v 1.28 2000/12/21 21:04:39 xiphmont Exp $
Preecho calculation.
@@ -41,36 +41,38 @@
#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,1f};
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;
@@ -109,13 +111,13 @@
memset(e,0,sizeof(envelope_lookup));
}
-static float _ve_deltai(envelope_lookup *ve,IIR_state *iir,
+static float _ve_deltai(envelope_lookup *ve,
float *pre,float *post){
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;
/*_analysis_output("A",granulepos,pre,n,0,0);
@@ -196,8 +198,7 @@
while(j+ve->winlength<=v->pcm_current){
for(i=0;i<ve->ch;i++){
float *filtered=ve->filtered[i]+j;
- IIR_state *iir=ve->iir+i;
- float m=_ve_deltai(ve,iir,filtered-ve->winlength,filtered);
+ float m=_ve_deltai(ve,filtered-ve->winlength,filtered);
if(m>ci->preecho_thresh){
/*granulepos++;*/
1.34 +8 -8 vorbis/lib/floor0.c
Index: floor0.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/floor0.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- floor0.c 2000/12/12 08:54:27 1.33
+++ floor0.c 2000/12/21 21:04:39 1.34
@@ -12,7 +12,7 @@
********************************************************************
function: floor backend 0 implementation
- last mod: $Id: floor0.c,v 1.33 2000/12/12 08:54:27 xiphmont Exp $
+ last mod: $Id: floor0.c,v 1.34 2000/12/21 21:04:39 xiphmont Exp $
********************************************************************/
@@ -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,7 +173,7 @@
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;
@@ -224,7 +224,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;
@@ -318,7 +318,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];
@@ -389,7 +389,7 @@
oggpack_write(&vb->opb,0,info->ampbits);
bitbuf_pack(&vb->opb,vbb);
}
- return(0.);
+ return(0.f);
}
@@ -408,7 +408,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);
1.6 +146 -146 vorbis/lib/iir.c
Index: iir.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/iir.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- iir.c 2000/11/14 00:05:31 1.5
+++ iir.c 2000/12/21 21:04:39 1.6
@@ -12,7 +12,7 @@
********************************************************************
function: Direct Form I, II IIR filters, plus some specializations
- last mod: $Id: iir.c,v 1.5 2000/11/14 00:05:31 xiphmont Exp $
+ last mod: $Id: iir.c,v 1.6 2000/12/21 21:04:39 xiphmont Exp $
********************************************************************/
@@ -99,154 +99,154 @@
#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};
+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,1f};
+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.05176e-05f,
+ -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]);
}
1.4 +8 -8 vorbis/lib/lookup.c
Index: lookup.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/lookup.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- lookup.c 2000/11/06 00:07:01 1.3
+++ lookup.c 2000/12/21 21:04:39 1.4
@@ -12,7 +12,7 @@
********************************************************************
function: lookup based functions
- last mod: $Id: lookup.c,v 1.3 2000/11/06 00:07:01 xiphmont Exp $
+ last mod: $Id: lookup.c,v 1.4 2000/12/21 21:04:39 xiphmont Exp $
********************************************************************/
@@ -33,8 +33,8 @@
/* 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;
- int i=vorbis_ftoi(d-.5);
+ double d=a*(2.f*(float)INVSQ_LOOKUP_SZ)-(float)INVSQ_LOOKUP_SZ;
+ int i=vorbis_ftoi(d-.5f);
return INVSQ_LOOKUP[i]+ (d-i)*(INVSQ_LOOKUP[i+1]-INVSQ_LOOKUP[i]);
}
@@ -46,9 +46,9 @@
#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]);
}
@@ -77,8 +77,8 @@
/* 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]);
}
1.4 +127 -127 vorbis/lib/lookup_data.h
Index: lookup_data.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/lookup_data.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- lookup_data.h 2000/11/06 00:07:01 1.3
+++ lookup_data.h 2000/12/21 21:04:39 1.4
@@ -12,7 +12,7 @@
********************************************************************
function: lookup data; generated by lookups.pl; edit there
- last mod: $Id: lookup_data.h,v 1.3 2000/11/06 00:07:01 xiphmont Exp $
+ last mod: $Id: lookup_data.h,v 1.4 2000/12/21 21:04:39 xiphmont Exp $
********************************************************************/
@@ -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,
+ 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 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,
+ 65536f, 46340.95001f, 32768f, 23170.47501f,
+ 16384f, 11585.2375f, 8192f, 5792.618751f,
+ 4096f, 2896.309376f, 2048f, 1448.154688f,
+ 1024f, 724.0773439f, 512f, 362.038672f,
+ 256f, 181.019336f, 128f, 90.50966799f,
+ 64f, 45.254834f, 32f, 22.627417f,
+ 16f, 11.3137085f, 8f, 5.656854249f,
+ 4f, 2.828427125f, 2f, 1.414213562f,
+ 1f, 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
1.28 +4 -4 vorbis/lib/lpc.c
Index: lpc.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/lpc.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- lpc.c 2000/11/06 00:07:01 1.27
+++ lpc.c 2000/12/21 21:04:39 1.28
@@ -12,7 +12,7 @@
********************************************************************
function: LPC low level routines
- last mod: $Id: lpc.c,v 1.27 2000/11/06 00:07:01 xiphmont Exp $
+ last mod: $Id: lpc.c,v 1.28 2000/12/21 21:04:39 xiphmont Exp $
********************************************************************/
@@ -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
@@ -118,7 +118,7 @@
int n=l->ln;
int m=l->m;
float *work=alloca(sizeof(float)*(n+n));
- float fscale=.5/n;
+ float fscale=.5f/n;
int i,j;
/* input is a real curve. make it complex-real */
@@ -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];
1.13 +20 -20 vorbis/lib/lsp.c
Index: lsp.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/lsp.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- lsp.c 2000/11/06 00:07:01 1.12
+++ lsp.c 2000/12/21 21:04:39 1.13
@@ -12,7 +12,7 @@
********************************************************************
function: LSP (also called LSF) conversion routines
- last mod: $Id: lsp.c,v 1.12 2000/11/06 00:07:01 xiphmont Exp $
+ last mod: $Id: lsp.c,v 1.13 2000/12/21 21:04:39 xiphmont Exp $
The LSP generation code is taken (with minimal modification) from
"On the Computation of the LSP Frequencies" by Joseph Rothweiler
@@ -52,7 +52,7 @@
ARM family. */
/* undefine both for the 'old' but more precise implementation */
-#define FLOAT_LOOKUP
+#undef FLOAT_LOOKUP
#undef INT_LOOKUP
#ifdef FLOAT_LOOKUP
@@ -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,7 +86,7 @@
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)-
@@ -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];
@@ -284,7 +284,7 @@
for(i=0; i<ord;i++) root[i] = 2.0 * (i+0.5) / ord - 1.0;
- 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];
1.22 +4 -4 vorbis/lib/mapping0.c
Index: mapping0.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/mapping0.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- mapping0.c 2000/12/12 08:54:27 1.21
+++ mapping0.c 2000/12/21 21:04:39 1.22
@@ -12,7 +12,7 @@
********************************************************************
function: channel mapping 0 implementation
- last mod: $Id: mapping0.c,v 1.21 2000/12/12 08:54:27 xiphmont Exp $
+ last mod: $Id: mapping0.c,v 1.22 2000/12/21 21:04:39 xiphmont Exp $
********************************************************************/
@@ -337,7 +337,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]){
@@ -362,7 +362,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;
@@ -441,7 +441,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);
}
1.8 +2 -2 vorbis/lib/masking.h
Index: masking.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/masking.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- masking.h 2000/11/17 11:47:18 1.7
+++ masking.h 2000/12/21 21:04:39 1.8
@@ -12,7 +12,7 @@
********************************************************************
function: masking curve data for psychoacoustics
- last mod: $Id: masking.h,v 1.7 2000/11/17 11:47:18 xiphmont Exp $
+ last mod: $Id: masking.h,v 1.8 2000/12/21 21:04:39 xiphmont Exp $
********************************************************************/
@@ -22,7 +22,7 @@
/* 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
1.23 +2 -2 vorbis/lib/mdct.c
Index: mdct.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/mdct.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- mdct.c 2000/12/17 08:50:27 1.22
+++ mdct.c 2000/12/21 21:04:39 1.23
@@ -13,7 +13,7 @@
function: normalized modified discrete cosine transform
power of two length transform only [64 <= n ]
- last mod: $Id: mdct.c,v 1.22 2000/12/17 08:50:27 xiphmont Exp $
+ last mod: $Id: mdct.c,v 1.23 2000/12/21 21:04:39 xiphmont Exp $
Original algorithm adapted long ago from _The use of multirate filter
banks for coding of high quality digital audio_, by T. Sporer,
@@ -87,7 +87,7 @@
}
}
- lookup->scale=FLOAT_CONV(4./n);
+ lookup->scale=FLOAT_CONV(4.f/n);
}
/* 8 point butterfly (in place, 4 register) */
1.16 +2 -2 vorbis/lib/mdct.h
Index: mdct.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/mdct.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- mdct.h 2000/12/17 01:07:45 1.15
+++ mdct.h 2000/12/21 21:04:39 1.16
@@ -12,7 +12,7 @@
********************************************************************
function: modified discrete cosine transform prototypes
- last mod: $Id: mdct.h,v 1.15 2000/12/17 01:07:45 xiphmont Exp $
+ last mod: $Id: mdct.h,v 1.16 2000/12/21 21:04:39 xiphmont Exp $
********************************************************************/
@@ -45,7 +45,7 @@
#define FLOAT_CONV(x) (x)
#define MULT_NORM(x) (x)
-#define HALVE(x) ((x)*.5)
+#define HALVE(x) ((x)*.5f)
#endif
1.19 +11 -3 vorbis/lib/os.h
Index: os.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/os.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- os.h 2000/12/17 08:47:46 1.18
+++ os.h 2000/12/21 21:04:40 1.19
@@ -14,7 +14,7 @@
********************************************************************
function: #ifdef jail to whip a few platforms into the UNIX ideal.
- last mod: $Id: os.h,v 1.18 2000/12/17 08:47:46 xiphmont Exp $
+ last mod: $Id: os.h,v 1.19 2000/12/21 21:04:40 xiphmont Exp $
********************************************************************/
@@ -25,18 +25,26 @@
#define _V_IFDEFJAIL_H_
#ifndef M_PI
-#define M_PI (3.14159265358979323846)
+#define M_PI (3.1415926536f)
#endif
#ifndef __GNUC__
#ifdef _WIN32
# include <malloc.h>
-# define rint(x) (floor((x)+0.5))
+# define rint(x) (floor((x)+0.5f))
#endif
#define STIN static
#else
#define STIN static inline
+#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
1.34 +30 -30 vorbis/lib/psy.c
Index: psy.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psy.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- psy.c 2000/12/13 07:37:20 1.33
+++ psy.c 2000/12/21 21:04:40 1.34
@@ -12,7 +12,7 @@
********************************************************************
function: psychoacoustics not including preecho
- last mod: $Id: psy.c,v 1.33 2000/12/13 07:37:20 msmith Exp $
+ last mod: $Id: psy.c,v 1.34 2000/12/21 21:04:40 xiphmont Exp $
********************************************************************/
@@ -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+.5)*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;
@@ -314,7 +314,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];
@@ -359,7 +359,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);
@@ -369,7 +369,7 @@
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];
@@ -389,7 +389,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;
@@ -471,9 +471,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;
@@ -497,7 +497,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.f; /* +1 is important, else bin 0 is
discarded in short frames */
}
if(endpos>n)endpos=n;
@@ -514,7 +514,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));
@@ -522,14 +522,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;
@@ -547,20 +547,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;
}
@@ -583,7 +583,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;
@@ -597,7 +597,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);
@@ -691,7 +691,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++;
@@ -708,7 +708,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];
}
1.11 +11 -27 vorbis/lib/psytune.c
Index: psytune.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psytune.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- psytune.c 2000/11/14 00:05:31 1.10
+++ psytune.c 2000/12/21 21:04:40 1.11
@@ -13,7 +13,7 @@
function: simple utility that runs audio through the psychoacoustics
without encoding
- last mod: $Id: psytune.c,v 1.10 2000/11/14 00:05:31 xiphmont Exp $
+ last mod: $Id: psytune.c,v 1.11 2000/12/21 21:04:40 xiphmont Exp $
********************************************************************/
@@ -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);
@@ -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;
@@ -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++){
@@ -297,22 +297,6 @@
analysis("floor",frameno,floor,framesize/2,1,1);
analysis("decay",frameno,decay[i],framesize/2,1,1);
- /*for(j=0;j<framesize/2;){
- float energy=0.;
- float acc=0.;
- float *v=pcm[i]+j;
- int flag=0;
- for(k=0;k<32;k++){
- energy+=v[k]*v[k];
- if(fabs(v[k]/floor[j+k])>.5)acc+=v[k]*v[k];
- }
- if(acc*2<energy){
- if(acc>0.)fprintf(stderr,"culling\n");
- for(k=0;k<32;k++)v[k]=0;
- }
- j+=k;
- }*/
-
_vp_apply_floor(&p_look,pcm[i],floor);
@@ -324,10 +308,10 @@
tot++;
if(val){
nonz++;
- acc+=log(fabs(val)*2.+1.)/log(2);
+ acc+=log(fabs(val)*2.f+1.f)/log(2);
pcm[i][j]=val*floor[j];
}else{
- pcm[i][j]=0;
+ pcm[i][j]=0.f;
}
}
1.23 +3 -3 vorbis/lib/res0.c
Index: res0.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/res0.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- res0.c 2000/11/17 11:47:18 1.22
+++ res0.c 2000/12/21 21:04:41 1.23
@@ -12,7 +12,7 @@
********************************************************************
function: residue backend 0 implementation
- last mod: $Id: res0.c,v 1.22 2000/11/17 11:47:18 xiphmont Exp $
+ last mod: $Id: res0.c,v 1.23 2000/12/21 21:04:41 xiphmont Exp $
********************************************************************/
@@ -175,7 +175,7 @@
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];
}
1.9 +11 -11 vorbis/lib/scales.h
Index: scales.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/scales.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- scales.h 2000/11/07 00:15:08 1.8
+++ scales.h 2000/12/21 21:04:41 1.9
@@ -12,7 +12,7 @@
********************************************************************
function: linear scale -> dB, Bark and Mel scales
- last mod: $Id: scales.h,v 1.8 2000/11/07 00:15:08 xiphmont Exp $
+ last mod: $Id: scales.h,v 1.9 2000/12/21 21:04:41 xiphmont Exp $
********************************************************************/
@@ -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?-9e20f: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
1.13 +8 -8 vorbis/lib/sharedbook.c
Index: sharedbook.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/sharedbook.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- sharedbook.c 2000/11/14 00:05:31 1.12
+++ sharedbook.c 2000/12/21 21:04:41 1.13
@@ -12,7 +12,7 @@
********************************************************************
function: basic shared codebook operations
- last mod: $Id: sharedbook.c,v 1.12 2000/11/14 00:05:31 xiphmont Exp $
+ last mod: $Id: sharedbook.c,v 1.13 2000/12/21 21:04:41 xiphmont Exp $
********************************************************************/
@@ -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];
1.12 +14 -14 vorbis/lib/smallft.c
Index: smallft.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/smallft.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- smallft.c 2000/11/14 00:05:31 1.11
+++ smallft.c 2000/12/21 21:04:41 1.12
@@ -12,7 +12,7 @@
********************************************************************
function: *unnormalized* fft transform
- last mod: $Id: smallft.c,v 1.11 2000/11/14 00:05:31 xiphmont Exp $
+ last mod: $Id: smallft.c,v 1.12 2000/12/21 21:04:41 xiphmont Exp $
********************************************************************/
@@ -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.28318530717958648f;
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);
@@ -168,7 +168,7 @@
static void dradf4(int ido,int l1,float *cc,float *ch,float *wa1,
float *wa2,float *wa3){
- static float hsqt2 = .70710678118654752440084436210485;
+ static float hsqt2 = .70710678118654752f;
int i,k,t0,t1,t2,t3,t4,t5,t6;
float ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4;
t0=l1*ido;
@@ -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.283185307179586f;
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;
@@ -685,8 +685,8 @@
static void dradb3(int ido,int l1,float *cc,float *ch,float *wa1,
float *wa2){
- static float taur = -.5;
- static float taui = .86602540378443864676372317075293618;
+ static float taur = -.5f;
+ static float taui = .8660254037844386f;
int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
float ci2,ci3,di2,di3,cr2,cr3,dr2,dr3,ti2,tr2;
t0=l1*ido;
@@ -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.414213562373095f;
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.283185307179586f;
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;
1.5 +5 -5 vorbis/lib/tone.c
Index: tone.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/tone.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- tone.c 2000/11/14 00:05:32 1.4
+++ tone.c 2000/12/21 21:04:41 1.5
@@ -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),
1.34 +11 -11 vorbis/lib/vorbisfile.c
Index: vorbisfile.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/vorbisfile.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- vorbisfile.c 2000/11/29 21:13:34 1.33
+++ vorbisfile.c 2000/12/21 21:04:41 1.34
@@ -12,7 +12,7 @@
********************************************************************
function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id: vorbisfile.c,v 1.33 2000/11/29 21:13:34 xiphmont Exp $
+ last mod: $Id: vorbisfile.c,v 1.34 2000/12/21 21:04:41 xiphmont Exp $
********************************************************************/
@@ -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;
1.11 +6 -6 vorbis/lib/window.c
Index: window.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/window.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- window.c 2000/11/14 00:05:32 1.10
+++ window.c 2000/12/21 21:04:42 1.11
@@ -12,7 +12,7 @@
********************************************************************
function: window functions
- last mod: $Id: window.c,v 1.10 2000/11/14 00:05:32 xiphmont Exp $
+ last mod: $Id: window.c,v 1.11 2000/12/21 21:04:42 xiphmont Exp $
********************************************************************/
@@ -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.;
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.;
x=sin(x);
x*=x;
- x*=M_PI/2.;
+ x*=M_PI/2.f;
x=sin(x);
ret[i+rightbegin]=x;
}
1.7 +62 -61 vorbis/lib/modes/mode_A.h
Index: mode_A.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/mode_A.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mode_A.h 2000/11/17 11:47:38 1.6
+++ mode_A.h 2000/12/21 21:04:47 1.7
@@ -12,7 +12,7 @@
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_A.h,v 1.6 2000/11/17 11:47:38 xiphmont Exp $
+ last mod: $Id: mode_A.h,v 1.7 2000/12/21 21:04:47 xiphmont Exp $
********************************************************************/
@@ -49,10 +49,10 @@
1,/*athp*/
1,/*decayp*/
1,/*smoothp*/
- 0,.1,
+ 0,.1f,
- -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 */
@@ -60,70 +60,70 @@
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, -.004f /* 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.f,1.5f,2.5f,6.5f,12.5f},
{5,5,5,5,5},
{99,99,99,99,99}};
@@ -146,7 +146,8 @@
{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.f,1.5f,1.5f,2.5f,2.5f,
+ 4.f,4.f,6.5f,12.5f},
{5,5,5,5,5,5,5,5,5},
{99,99,99,99,99,99,99,99,99}};
@@ -199,7 +200,7 @@
/* psy */
{&_psy_set_A},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 32, 6, -96.
+ 256, 32.f, 6.f, -96.f
};
#define PREDEF_INFO_MAX 0
1.3 +61 -61 vorbis/lib/modes/mode_AA.h
Index: mode_AA.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/mode_AA.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mode_AA.h 2000/11/17 11:47:38 1.2
+++ mode_AA.h 2000/12/21 21:04:47 1.3
@@ -12,7 +12,7 @@
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_AA.h,v 1.2 2000/11/17 11:47:38 xiphmont Exp $
+ last mod: $Id: mode_AA.h,v 1.3 2000/12/21 21:04:47 xiphmont Exp $
********************************************************************/
@@ -48,10 +48,10 @@
1,/*athp*/
1,/*decayp*/
1,/*smoothp*/
- 0,.1,
+ 0,.1f,
- -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 */
@@ -59,70 +59,70 @@
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, -.004f /* 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.f,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.f,2.f,2.f,4.f,4.f,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.f, 6.f, -96.f
};
#define PREDEF_INFO_MAX 0
1.6 +62 -61 vorbis/lib/modes/mode_B.h
Index: mode_B.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/mode_B.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mode_B.h 2000/11/17 11:47:38 1.5
+++ mode_B.h 2000/12/21 21:04:47 1.6
@@ -12,7 +12,7 @@
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_B.h,v 1.5 2000/11/17 11:47:38 xiphmont Exp $
+ last mod: $Id: mode_B.h,v 1.6 2000/12/21 21:04:47 xiphmont Exp $
********************************************************************/
@@ -49,10 +49,10 @@
1,/*athp*/
1,/*decayp*/
1,/*smoothp*/
- 0,.1,
+ 0,.1f,
- -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 */
@@ -60,70 +60,70 @@
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, -.004f /* 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.f,1.5f,2.5f,6.5f,12.5f},
{5,5,5,5,5},
{99,99,99,99,99}};
@@ -145,7 +145,8 @@
{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.f,1.5f,1.5f,2.5f,2.5f,
+ 4.f,4.f,6.5f,12.5f},
{5,5,5,5,5,5,5,5,5},
{99,99,99,99,99,99,99,99,99}};
@@ -198,7 +199,7 @@
/* psy */
{&_psy_set_B},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 32, 6, -96.
+ 256, 32.f, 6.f, -96.f
};
#define PREDEF_INFO_MAX 0
1.6 +118 -118 vorbis/lib/modes/mode_C.h
Index: mode_C.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/mode_C.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mode_C.h 2000/11/17 11:47:38 1.5
+++ mode_C.h 2000/12/21 21:04:47 1.6
@@ -12,7 +12,7 @@
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_C.h,v 1.5 2000/11/17 11:47:38 xiphmont Exp $
+ last mod: $Id: mode_C.h,v 1.6 2000/12/21 21:04:47 xiphmont Exp $
********************************************************************/
@@ -45,10 +45,10 @@
1,/*athp*/
0,/*decayp*/
1,/*smoothp*/
- 0,.1,
+ 0,.1f,
- -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 */
@@ -56,80 +56,80 @@
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, -.006f /* attack/decay control */
};
static vorbis_info_psy _psy_set_C1={
1,/*athp*/
0,/*decayp*/
1,/*smoothp*/
- 0,.1,
+ 0,.1f,
- -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 */
@@ -137,70 +137,70 @@
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, -.006f /* 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.f,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.f,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.f, 6.f, -96.f
};
#define PREDEF_INFO_MAX 0
1.7 +65 -65 vorbis/lib/modes/mode_D.h
Index: mode_D.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/mode_D.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mode_D.h 2000/11/17 11:47:38 1.6
+++ mode_D.h 2000/12/21 21:04:47 1.7
@@ -12,7 +12,7 @@
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_D.h,v 1.6 2000/11/17 11:47:38 xiphmont Exp $
+ last mod: $Id: mode_D.h,v 1.7 2000/12/21 21:04:47 xiphmont Exp $
********************************************************************/
@@ -47,10 +47,10 @@
1,/*athp*/
0,/*decayp*/
1,/*smoothp*/
- 0,.1,
+ 0,.1f,
- -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 */
@@ -61,41 +61,41 @@
{{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, -.004f /* attack/decay control */
};
static vorbis_info_psy _psy_set_D1 ={
1,/*athp*/
0,/*decayp*/
1,/*smoothp*/
- 0,.1,
+ 0,.1f,
- -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 */
@@ -103,52 +103,52 @@
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, -.004f /* 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.f,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.f,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.f, 6.f, -96.f
};
#define PREDEF_INFO_MAX 0
1.4 +26 -26 vorbis/lib/modes/mode_E.h
Index: mode_E.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/mode_E.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mode_E.h 2000/11/17 11:47:38 1.3
+++ mode_E.h 2000/12/21 21:04:47 1.4
@@ -12,7 +12,7 @@
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_E.h,v 1.3 2000/11/17 11:47:38 xiphmont Exp $
+ last mod: $Id: mode_E.h,v 1.4 2000/12/21 21:04:47 xiphmont Exp $
********************************************************************/
@@ -47,10 +47,10 @@
1,/*athp*/
0,/*decayp*/
1,/*smoothp*/
- 0,.1,
+ 0,.1f,
- -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 */
@@ -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, -.004f /* 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.f,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.f,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.f, 6.f, -96.f
};
#define PREDEF_INFO_MAX 0
1.2 +8 -5 vorbis/vq/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile.am 2000/11/18 05:02:35 1.1
+++ Makefile.am 2000/12/21 21:04:49 1.2
@@ -13,7 +13,7 @@
LDADD = ../lib/libvorbis.la
lspvqtrain_SOURCES = lspdata.c train.c vqgen.c bookutil.c\
- vqgen.h bookutil.h vqext.h
+ vqgen.h bookutil.h vqext.h
genericvqtrain_SOURCES = genericdata.c train.c vqgen.c bookutil.c\
vqgen.h bookutil.h vqext.h
residuevqtrain_SOURCES = residuedata.c train.c vqgen.c bookutil.c\
@@ -38,9 +38,12 @@
vqgen.h bookutil.h
EXTRA_DIST = residue_entropy auxpartition.pl
+
+debugvq:
+ $(MAKE) vq CFLAGS="@DEBUG@"
-debug:
- $(MAKE) all CFLAGS="@DEBUG@"
+profilevq:
+ $(MAKE) vq CFLAGS="@PROFILE@"
-profile:
- $(MAKE) all CFLAGS="@PROFILE@"
+vq:
+ $(MAKE) $(EXTRA_PROGRAMS)
\ No newline at end of file
1.20 +4 -4 vorbis/vq/bookutil.c
Index: bookutil.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/bookutil.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- bookutil.c 2000/11/08 03:23:23 1.19
+++ bookutil.c 2000/12/21 21:04:49 1.20
@@ -12,7 +12,7 @@
********************************************************************
function: utility functions for loading .vqh and .vqd files
- last mod: $Id: bookutil.c,v 1.19 2000/11/08 03:23:23 xiphmont Exp $
+ last mod: $Id: bookutil.c,v 1.20 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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);
1.18 +2 -2 vorbis/vq/build.c
Index: build.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/build.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- build.c 2000/11/08 03:23:23 1.17
+++ build.c 2000/12/21 21:04:49 1.18
@@ -12,7 +12,7 @@
********************************************************************
function: utility main for building codebooks from training sets
- last mod: $Id: build.c,v 1.17 2000/11/08 03:23:23 xiphmont Exp $
+ last mod: $Id: build.c,v 1.18 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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);
1.10 +3 -3 vorbis/vq/cascade.c
Index: cascade.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/cascade.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- cascade.c 2000/11/08 03:23:23 1.9
+++ cascade.c 2000/12/21 21:04:49 1.10
@@ -12,7 +12,7 @@
********************************************************************
function: function call to do simple data cascading
- last mod: $Id: cascade.c,v 1.9 2000/11/08 03:23:23 xiphmont Exp $
+ last mod: $Id: cascade.c,v 1.10 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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;
1.8 +2 -2 vorbis/vq/genericdata.c
Index: genericdata.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/genericdata.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- genericdata.c 2000/11/06 00:07:25 1.7
+++ genericdata.c 2000/12/21 21:04:49 1.8
@@ -12,7 +12,7 @@
********************************************************************
function: generic euclidian distance metric for VQ codebooks
- last mod: $Id: genericdata.c,v 1.7 2000/11/06 00:07:25 xiphmont Exp $
+ last mod: $Id: genericdata.c,v 1.8 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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;
1.6 +6 -6 vorbis/vq/latticehint.c
Index: latticehint.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/latticehint.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- latticehint.c 2000/11/08 03:23:23 1.5
+++ latticehint.c 2000/12/21 21:04:49 1.6
@@ -12,7 +12,7 @@
********************************************************************
function: utility main for building thresh/pigeonhole encode hints
- last mod: $Id: latticehint.c,v 1.5 2000/11/08 03:23:23 xiphmont Exp $
+ last mod: $Id: latticehint.c,v 1.6 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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;
1.8 +3 -3 vorbis/vq/latticepare.c
Index: latticepare.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/latticepare.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- latticepare.c 2000/11/08 03:23:23 1.7
+++ latticepare.c 2000/12/21 21:04:49 1.8
@@ -12,7 +12,7 @@
********************************************************************
function: utility for paring low hit count cells from lattice codebook
- last mod: $Id: latticepare.c,v 1.7 2000/11/08 03:23:23 xiphmont Exp $
+ last mod: $Id: latticepare.c,v 1.8 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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;
}
}
1.16 +6 -6 vorbis/vq/lspdata.c
Index: lspdata.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/lspdata.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- lspdata.c 2000/11/08 03:23:23 1.15
+++ lspdata.c 2000/12/21 21:04:49 1.16
@@ -12,7 +12,7 @@
********************************************************************
function: metrics and quantization code for LSP VQ codebooks
- last mod: $Id: lspdata.c,v 1.15 2000/11/08 03:23:23 xiphmont Exp $
+ last mod: $Id: lspdata.c,v 1.16 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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,7 +141,7 @@
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.;
1.12 +11 -11 vorbis/vq/metrics.c
Index: metrics.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/metrics.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- metrics.c 2000/11/08 03:23:23 1.11
+++ metrics.c 2000/12/21 21:04:49 1.12
@@ -12,7 +12,7 @@
********************************************************************
function: function calls to collect codebook metrics
- last mod: $Id: metrics.c,v 1.11 2000/11/08 03:23:23 xiphmont Exp $
+ last mod: $Id: metrics.c,v 1.12 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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,7 +93,7 @@
void cell_spacing(codebook *c){
int j,k;
- float min=-1,max=-1,mean=0.,meansq=0.;
+ float min=-1.f,max=-1.f,mean=0.f,meansq=0.f;
long total=0;
/* minimum, maximum, mean, ms cell spacing */
@@ -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++)
1.7 +4 -4 vorbis/vq/residuedata.c
Index: residuedata.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/residuedata.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- residuedata.c 2000/11/08 03:23:23 1.6
+++ residuedata.c 2000/12/21 21:04:49 1.7
@@ -12,7 +12,7 @@
********************************************************************
function: metrics and quantization code for residue VQ codebooks
- last mod: $Id: residuedata.c,v 1.6 2000/11/08 03:23:23 xiphmont Exp $
+ last mod: $Id: residuedata.c,v 1.7 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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;
1.8 +9 -9 vorbis/vq/residuesplit.c
Index: residuesplit.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/residuesplit.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- residuesplit.c 2000/11/08 03:23:23 1.7
+++ residuesplit.c 2000/12/21 21:04:49 1.8
@@ -12,7 +12,7 @@
********************************************************************
function: residue backend 0 partitioner/classifier
- last mod: $Id: residuesplit.c,v 1.7 2000/11/08 03:23:23 xiphmont Exp $
+ last mod: $Id: residuesplit.c,v 1.8 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -26,7 +26,7 @@
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++)
@@ -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");
1.21 +2 -2 vorbis/vq/train.c
Index: train.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/train.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- train.c 2000/11/06 00:07:26 1.20
+++ train.c 2000/12/21 21:04:49 1.21
@@ -12,7 +12,7 @@
********************************************************************
function: utility main for training codebooks
- last mod: $Id: train.c,v 1.20 2000/11/06 00:07:26 xiphmont Exp $
+ last mod: $Id: train.c,v 1.21 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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;
1.37 +11 -11 vorbis/vq/vqgen.c
Index: vqgen.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/vqgen.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- vqgen.c 2000/11/08 03:23:23 1.36
+++ vqgen.c 2000/12/21 21:04:49 1.37
@@ -12,7 +12,7 @@
********************************************************************
function: train a VQ codebook
- last mod: $Id: vqgen.c,v 1.36 2000/11/08 03:23:23 xiphmont Exp $
+ last mod: $Id: vqgen.c,v 1.37 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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;
@@ -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;
}
}
}
1.23 +7 -7 vorbis/vq/vqsplit.c
Index: vqsplit.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/vqsplit.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- vqsplit.c 2000/11/08 03:23:24 1.22
+++ vqsplit.c 2000/12/21 21:04:49 1.23
@@ -12,7 +12,7 @@
********************************************************************
function: build a VQ codebook and the encoding decision 'tree'
- last mod: $Id: vqsplit.c,v 1.22 2000/11/08 03:23:24 xiphmont Exp $
+ last mod: $Id: vqsplit.c,v 1.23 2000/12/21 21:04:49 xiphmont Exp $
********************************************************************/
@@ -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*1024){
/* 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);
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list