CodeWarrior. Oops.
svn path=/trunk/vorbis/; revision=2862
********************************************************************
function: simple example decoder
- last mod: $Id: decoder_example.c,v 1.23 2001/12/18 01:07:53 segher Exp $
+ last mod: $Id: decoder_example.c,v 1.24 2001/12/19 23:13:32 segher Exp $
********************************************************************/
#endif
#if defined(macintosh) && defined(__MWERKS__)
-
- argc = ccommand(&argv); /* get a "command line" from the Mac user */
- /* this also lets the user set stdin and stdout */
+ {
+ int argc;
+ char **argv;
+ argc=ccommand(&argv); /* get a "command line" from the Mac user */
+ /* this also lets the user set stdin and stdout */
+ }
#endif
/********** Decode setup ************/
********************************************************************
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 $
********************************************************************/
s->q_sequencep=oggpack_read(opb,1);
{
- int quantvals;
+ int quantvals=0;
switch(s->maptype){
case 1:
quantvals=_book_maptype1_quantvals(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:
********************************************************************
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.
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));
********************************************************************
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 $
********************************************************************/
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++){
********************************************************************
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 $
********************************************************************/
}
+#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,
return(i);
}
+#endif
+
static int _testhack(float *vec,int n,vorbis_look_residue0 *look,
int auxparts,int auxpartnum){
/* 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;
}
}
********************************************************************
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 $
********************************************************************/
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 */
{
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){
********************************************************************
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 $
********************************************************************/
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;