diff options
author | Segher Boessenkool <segher@xiph.org> | 2001-12-19 23:13:33 +0000 |
---|---|---|
committer | Segher Boessenkool <segher@xiph.org> | 2001-12-19 23:13:33 +0000 |
commit | 944ed8b3c710c8f40e7b4ec70f5cd7228016ee66 (patch) | |
tree | 8cdcf38a4ef5b6350f7a48863756dca0953bfe94 /lib | |
parent | 8a1271e8f02b09e28b6c2179abe6751304210a80 (diff) | |
download | libvorbis-git-944ed8b3c710c8f40e7b4ec70f5cd7228016ee66.tar.gz |
Kill some warnings. Oh, and make examples compile again under
CodeWarrior. Oops.
svn path=/trunk/vorbis/; revision=2862
Diffstat (limited to 'lib')
-rw-r--r-- | lib/codebook.c | 6 | ||||
-rw-r--r-- | lib/envelope.c | 4 | ||||
-rw-r--r-- | lib/floor1.c | 4 | ||||
-rw-r--r-- | lib/res0.c | 8 | ||||
-rw-r--r-- | lib/sharedbook.c | 6 | ||||
-rw-r--r-- | lib/vorbisenc.c | 6 |
6 files changed, 18 insertions, 16 deletions
diff --git a/lib/codebook.c b/lib/codebook.c index 3b00681d..a298e081 100644 --- a/lib/codebook.c +++ b/lib/codebook.c @@ -11,7 +11,7 @@ ******************************************************************** function: basic codebook pack/unpack/code/decode operations - last mod: $Id: codebook.c,v 1.32 2001/12/16 04:15:46 xiphmont Exp $ + last mod: $Id: codebook.c,v 1.33 2001/12/19 23:13:33 segher Exp $ ********************************************************************/ @@ -222,7 +222,7 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){ s->q_sequencep=oggpack_read(opb,1); { - int quantvals; + int quantvals=0; switch(s->maptype){ case 1: quantvals=_book_maptype1_quantvals(s); @@ -237,7 +237,7 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){ for(i=0;i<quantvals;i++) s->quantlist[i]=oggpack_read(opb,s->q_quant); - if(s->quantlist[quantvals-1]==-1)goto _eofout; + if(quantvals&&s->quantlist[quantvals-1]==-1)goto _eofout; } break; default: diff --git a/lib/envelope.c b/lib/envelope.c index 38b50741..7f26ed34 100644 --- a/lib/envelope.c +++ b/lib/envelope.c @@ -11,7 +11,7 @@ ******************************************************************** function: PCM data envelope analysis and manipulation - last mod: $Id: envelope.c,v 1.39 2001/12/12 09:45:24 xiphmont Exp $ + last mod: $Id: envelope.c,v 1.40 2001/12/19 23:13:33 segher Exp $ Preecho calculation. @@ -84,8 +84,8 @@ void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi){ codec_setup_info *ci=vi->codec_setup; vorbis_info_psy_global *gi=&ci->psy_g_param; int ch=vi->channels; - int window=e->winlength=ci->blocksizes[0]/2; /* not random */ int i; + e->winlength=ci->blocksizes[0]/2; /* not random */ e->minenergy=fromdB(gi->preecho_minenergy); e->iir=_ogg_calloc(ch*4,sizeof(*e->iir)); e->filtered=_ogg_calloc(ch*4,sizeof(*e->filtered)); diff --git a/lib/floor1.c b/lib/floor1.c index f6372a23..c243079b 100644 --- a/lib/floor1.c +++ b/lib/floor1.c @@ -11,7 +11,7 @@ ******************************************************************** function: floor backend 1 implementation - last mod: $Id: floor1.c,v 1.18 2001/12/12 09:45:25 xiphmont Exp $ + last mod: $Id: floor1.c,v 1.19 2001/12/19 23:13:33 segher Exp $ ********************************************************************/ @@ -1121,7 +1121,7 @@ static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo, if(memo){ /* render the lines */ int *fit_value=(int *)memo; - int hx; + int hx=0; int lx=0; int ly=fit_value[0]*info->mult; for(j=1;j<look->posts;j++){ @@ -11,7 +11,7 @@ ******************************************************************** function: residue backend 0, 1 and 2 implementation - last mod: $Id: res0.c,v 1.40 2001/12/19 01:08:15 xiphmont Exp $ + last mod: $Id: res0.c,v 1.41 2001/12/19 23:13:33 segher Exp $ ********************************************************************/ @@ -302,6 +302,7 @@ vorbis_look_residue *res0_look(vorbis_dsp_state *vd,vorbis_info_mode *vm, } +#if 0 /* does not guard against invalid settings; eg, a subn of 16 and a subgroup request of 32. Max subn of 128 */ static int _interleaved_testhack(float *vec,int n,vorbis_look_residue0 *look, @@ -344,6 +345,8 @@ static int _interleaved_testhack(float *vec,int n,vorbis_look_residue0 *look, return(i); } +#endif + static int _testhack(float *vec,int n,vorbis_look_residue0 *look, int auxparts,int auxpartnum){ @@ -584,12 +587,11 @@ static int _01forward(vorbis_block *vb,vorbis_look_residue *vl, /* training hack */ if(val<look->phrasebook->entries) - ret=vorbis_book_encode(look->phrasebook,val,&vb->opb); + look->phrasebits+=vorbis_book_encode(look->phrasebook,val,&vb->opb); #ifdef TRAIN_RES else fprintf(stderr,"!"); #endif - look->phrasebits+=ret; } } diff --git a/lib/sharedbook.c b/lib/sharedbook.c index 4f572820..42479899 100644 --- a/lib/sharedbook.c +++ b/lib/sharedbook.c @@ -11,7 +11,7 @@ ******************************************************************** function: basic shared codebook operations - last mod: $Id: sharedbook.c,v 1.19 2001/12/12 09:45:25 xiphmont Exp $ + last mod: $Id: sharedbook.c,v 1.20 2001/12/19 23:13:33 segher Exp $ ********************************************************************/ @@ -413,7 +413,7 @@ int _best(codebook *book, float *a, int step){ if(pt){ const static_codebook *c=book->c; int i,besti=-1; - float best; + float best=0.f; int entry=0; /* dealing with sequentialness is a pain in the ass */ @@ -476,7 +476,7 @@ int _best(codebook *book, float *a, int step){ { const static_codebook *c=book->c; int i,besti=-1; - float best; + float best=0.f; float *e=book->valuelist; for(i=0;i<book->entries;i++){ if(c->lengthlist[i]>0){ diff --git a/lib/vorbisenc.c b/lib/vorbisenc.c index f2613a1c..123f36cf 100644 --- a/lib/vorbisenc.c +++ b/lib/vorbisenc.c @@ -11,7 +11,7 @@ ******************************************************************** function: simple programmatic interface for encoder mode setup - last mod: $Id: vorbisenc.c,v 1.27 2001/12/19 08:10:03 xiphmont Exp $ + last mod: $Id: vorbisenc.c,v 1.28 2001/12/19 23:13:33 segher Exp $ ********************************************************************/ @@ -393,8 +393,8 @@ static int vorbis_encode_residue_setup(vorbis_info *vi,double q,int block, int i,iq=q*10; int n,k; - int partition_position; - int res_position; + int partition_position=0; + int res_position=0; int iterations=1; int amplitude_select=0; |