[xiph-cvs] cvs commit: vorbis/lib codebook.c envelope.c floor1.c res0.c sharedbook.c vorbisenc.c

Segher Boessenkool segher at xiph.org
Wed Dec 19 15:13:35 PST 2001



segher      01/12/19 15:13:35

  Modified:    examples decoder_example.c
               lib      codebook.c envelope.c floor1.c res0.c sharedbook.c
                        vorbisenc.c
  Log:
  Kill some warnings.  Oh, and make examples compile again under
  CodeWarrior.  Oops.

Revision  Changes    Path
1.24      +7 -4      vorbis/examples/decoder_example.c

Index: decoder_example.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/examples/decoder_example.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- decoder_example.c	2001/12/18 01:07:53	1.23
+++ decoder_example.c	2001/12/19 23:13:32	1.24
@@ -11,7 +11,7 @@
  ********************************************************************
 
  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 $
 
  ********************************************************************/
 
@@ -62,9 +62,12 @@
 #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 ************/

1.33      +3 -3      vorbis/lib/codebook.c

Index: codebook.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/codebook.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- codebook.c	2001/12/16 04:15:46	1.32
+++ codebook.c	2001/12/19 23:13:33	1.33
@@ -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 @@
     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 @@
       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:

1.40      +2 -2      vorbis/lib/envelope.c

Index: envelope.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/envelope.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- envelope.c	2001/12/12 09:45:24	1.39
+++ envelope.c	2001/12/19 23:13:33	1.40
@@ -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 @@
   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));

1.19      +2 -2      vorbis/lib/floor1.c

Index: floor1.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/floor1.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- floor1.c	2001/12/12 09:45:25	1.18
+++ floor1.c	2001/12/19 23:13:33	1.19
@@ -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 @@
   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++){

1.41      +5 -3      vorbis/lib/res0.c

Index: res0.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/res0.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- res0.c	2001/12/19 01:08:15	1.40
+++ res0.c	2001/12/19 23:13:33	1.41
@@ -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 @@
 }
 
 
+#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 @@
 
   return(i);
 }
+#endif
+
 
 static int _testhack(float *vec,int n,vorbis_look_residue0 *look,
                      int auxparts,int auxpartnum){
@@ -584,12 +587,11 @@
 
           /* 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;
         
         }
       }

1.20      +3 -3      vorbis/lib/sharedbook.c

Index: sharedbook.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/sharedbook.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- sharedbook.c	2001/12/12 09:45:25	1.19
+++ sharedbook.c	2001/12/19 23:13:33	1.20
@@ -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 @@
   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 @@
   {
     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){

1.28      +3 -3      vorbis/lib/vorbisenc.c

Index: vorbisenc.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/vorbisenc.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- vorbisenc.c	2001/12/19 08:10:03	1.27
+++ vorbisenc.c	2001/12/19 23:13:33	1.28
@@ -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 @@
 
   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;
 

--- >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