[xiph-cvs] cvs commit: vorbis/lib/modes mode_A.h mode_D.h

Monty xiphmont at xiph.org
Mon Nov 13 16:05:36 PST 2000



xiphmont    00/11/13 16:05:35

  Modified:    lib      analysis.c block.c envelope.c floor0.c iir.c info.c
                        mapping0.c mdct.c misc.c misc.h psy.c psytune.c
                        res0.c sharedbook.c smallft.c tone.c vorbisfile.c
                        window.c
               lib/modes mode_A.h mode_D.h
  Log:
  Two fixes:
          s/sizeof(double)/sizeof(float)/ in floor0.c
          forgot to free tab and tabl in decode book.
  
  Also, convert all free() to _ogg_free() (duh)
  
  Monty

Revision  Changes    Path
1.38      +3 -3      vorbis/lib/analysis.c

Index: analysis.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/analysis.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- analysis.c	2000/11/08 13:16:27	1.37
+++ analysis.c	2000/11/14 00:05:30	1.38
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: single-block PCM analysis mode dispatch
- last mod: $Id: analysis.c,v 1.37 2000/11/08 13:16:27 xiphmont Exp $
+ last mod: $Id: analysis.c,v 1.38 2000/11/14 00:05:30 xiphmont Exp $
 
  ********************************************************************/
 
@@ -55,9 +55,9 @@
   if(vb->W){
     oggpack_write(&vb->opb,vb->lW,1);
     oggpack_write(&vb->opb,vb->nW,1);
-    /*fprintf(stderr,"*");
+    fprintf(stderr,"*");
   }else{
-  fprintf(stderr,".");*/
+    fprintf(stderr,".");
   }
 
   if((ret=_mapping_P[type]->forward(vb,b->mode[mode])))

1.41      +25 -25    vorbis/lib/block.c

Index: block.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/block.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- block.c	2000/11/06 00:07:00	1.40
+++ block.c	2000/11/14 00:05:30	1.41
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: PCM data vector blocking, windowing and dis/reassembly
- last mod: $Id: block.c,v 1.40 2000/11/06 00:07:00 xiphmont Exp $
+ last mod: $Id: block.c,v 1.41 2000/11/14 00:05:30 xiphmont Exp $
 
  Handle windowing, overlap-add, etc of the PCM vectors.  This is made
  more amusing by Vorbis' current two allowed block sizes.
@@ -131,9 +131,9 @@
   struct alloc_chain *reap=vb->reap;
   while(reap){
     struct alloc_chain *next=reap->next;
-    free(reap->ptr);
+    _ogg_free(reap->ptr);
     memset(reap,0,sizeof(struct alloc_chain));
-    free(reap);
+    _ogg_free(reap);
     reap=next;
   }
   /* consolidate storage */
@@ -153,7 +153,7 @@
     if(vb->vd->analysisp)
       oggpack_writeclear(&vb->opb);
   _vorbis_block_ripcord(vb);
-  if(vb->localstore)free(vb->localstore);
+  if(vb->localstore)_ogg_free(vb->localstore);
 
   memset(vb,0,sizeof(vorbis_block));
   return(0);
@@ -279,40 +279,40 @@
     if(b){
       if(b->window[0][0][0]){
         for(i=0;i<VI_WINDOWB;i++)
-	  if(b->window[0][0][0][i])free(b->window[0][0][0][i]);
-	free(b->window[0][0][0]);
+	  if(b->window[0][0][0][i])_ogg_free(b->window[0][0][0][i]);
+	_ogg_free(b->window[0][0][0]);
         
         for(j=0;j<2;j++)
           for(k=0;k<2;k++){
             for(i=0;i<VI_WINDOWB;i++)
-	      if(b->window[1][j][k][i])free(b->window[1][j][k][i]);
-	    free(b->window[1][j][k]);
+	      if(b->window[1][j][k][i])_ogg_free(b->window[1][j][k][i]);
+	    _ogg_free(b->window[1][j][k]);
           }
       }
 
       if(b->ve){
         _ve_envelope_clear(b->ve);
-	free(b->ve);
+	_ogg_free(b->ve);
       }
 
       if(b->transform[0]){
         mdct_clear(b->transform[0][0]);
-	free(b->transform[0][0]);
-	free(b->transform[0]);
+	_ogg_free(b->transform[0][0]);
+	_ogg_free(b->transform[0]);
       }
       if(b->transform[1]){
         mdct_clear(b->transform[1][0]);
-	free(b->transform[1][0]);
-	free(b->transform[1]);
+	_ogg_free(b->transform[1][0]);
+	_ogg_free(b->transform[1]);
       }
       
     }
     
     if(v->pcm){
       for(i=0;i<vi->channels;i++)
-	if(v->pcm[i])free(v->pcm[i]);
-      free(v->pcm);
-      if(v->pcmret)free(v->pcmret);
+	if(v->pcm[i])_ogg_free(v->pcm[i]);
+      _ogg_free(v->pcm);
+      if(v->pcmret)_ogg_free(v->pcmret);
     }
 
     /* free mode lookups; these are actually vorbis_look_mapping structs */
@@ -328,14 +328,14 @@
     }
 
     if(b){
-      if(b->mode)free(b->mode);    
-      if(b->fullbooks)free(b->fullbooks);
+      if(b->mode)_ogg_free(b->mode);    
+      if(b->fullbooks)_ogg_free(b->fullbooks);
       
       /* free header, header1, header2 */
-      if(b->header)free(b->header);
-      if(b->header1)free(b->header1);
-      if(b->header2)free(b->header2);
-      free(b);
+      if(b->header)_ogg_free(b->header);
+      if(b->header1)_ogg_free(b->header1);
+      if(b->header2)_ogg_free(b->header2);
+      _ogg_free(b);
     }
     
     memset(v,0,sizeof(vorbis_dsp_state));
@@ -348,9 +348,9 @@
   backend_lookup_state *b=v->backend_state;
 
   /* free header, header1, header2 */
-  if(b->header)free(b->header);b->header=NULL;
-  if(b->header1)free(b->header1);b->header1=NULL;
-  if(b->header2)free(b->header2);b->header2=NULL;
+  if(b->header)_ogg_free(b->header);b->header=NULL;
+  if(b->header1)_ogg_free(b->header1);b->header1=NULL;
+  if(b->header2)_ogg_free(b->header2);b->header2=NULL;
 
   /* Do we have enough storage space for the requested buffer? If not,
      expand the PCM (and envelope) storage */

1.26      +4 -4      vorbis/lib/envelope.c

Index: envelope.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/envelope.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- envelope.c	2000/11/07 09:51:42	1.25
+++ envelope.c	2000/11/14 00:05:30	1.26
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: PCM data envelope analysis and manipulation
- last mod: $Id: envelope.c,v 1.25 2000/11/07 09:51:42 xiphmont Exp $
+ last mod: $Id: envelope.c,v 1.26 2000/11/14 00:05:30 xiphmont Exp $
 
  Preecho calculation.
 
@@ -100,11 +100,11 @@
   int i;
   for(i=0;i<e->ch;i++){
     IIR_clear((e->iir+i));
-    free(e->filtered[i]);
+    _ogg_free(e->filtered[i]);
   }
   drft_clear(&e->drft);
-  free(e->window);
-  free(e->filtered);
+  _ogg_free(e->window);
+  _ogg_free(e->filtered);
   memset(e,0,sizeof(envelope_lookup));
 }
 

1.28      +6 -6      vorbis/lib/floor0.c

Index: floor0.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/floor0.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- floor0.c	2000/11/07 09:51:42	1.27
+++ floor0.c	2000/11/14 00:05:31	1.28
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: floor backend 0 implementation
- last mod: $Id: floor0.c,v 1.27 2000/11/07 09:51:42 xiphmont Exp $
+ last mod: $Id: floor0.c,v 1.28 2000/11/14 00:05:31 xiphmont Exp $
 
  ********************************************************************/
 
@@ -80,18 +80,18 @@
 static void floor0_free_info(vorbis_info_floor *i){
   if(i){
     memset(i,0,sizeof(vorbis_info_floor0));
-    free(i);
+    _ogg_free(i);
   }
 }
 
 static void floor0_free_look(vorbis_look_floor *i){
   vorbis_look_floor0 *look=(vorbis_look_floor0 *)i;
   if(i){
-    if(look->linearmap)free(look->linearmap);
-    if(look->lsp_look)free(look->lsp_look);
+    if(look->linearmap)_ogg_free(look->linearmap);
+    if(look->lsp_look)_ogg_free(look->lsp_look);
     lpc_clear(&look->lpclook);
     memset(look,0,sizeof(vorbis_look_floor0));
-    free(look);
+    _ogg_free(look);
   }
 }
 
@@ -385,7 +385,7 @@
       codebook *b=be->fullbooks+info->books[booknum];
       float last=0.;
       
-      memset(out,0,sizeof(double)*look->m);    
+      memset(out,0,sizeof(float)*look->m);    
       
       for(j=0;j<look->m;j+=b->dim)
         if(vorbis_book_decodevs(b,lsp+j,&vb->opb,1,-1)==-1)goto eop;

1.5       +4 -4      vorbis/lib/iir.c

Index: iir.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/iir.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- iir.c	2000/11/07 09:51:43	1.4
+++ iir.c	2000/11/14 00:05:31	1.5
@@ -12,7 +12,7 @@
  ********************************************************************
 
   function: Direct Form I, II IIR filters, plus some specializations
-  last mod: $Id: iir.c,v 1.4 2000/11/07 09:51:43 xiphmont Exp $
+  last mod: $Id: iir.c,v 1.5 2000/11/14 00:05:31 xiphmont Exp $
 
  ********************************************************************/
 
@@ -39,9 +39,9 @@
 
 void IIR_clear(IIR_state *s){
   if(s){
-    free(s->coeff_A);
-    free(s->coeff_B);
-    free(s->z_A);
+    _ogg_free(s->coeff_A);
+    _ogg_free(s->coeff_B);
+    _ogg_free(s->z_A);
     memset(s,0,sizeof(IIR_state));
   }
 }

1.33      +13 -13    vorbis/lib/info.c

Index: info.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/info.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- info.c	2000/11/06 00:07:00	1.32
+++ info.c	2000/11/14 00:05:31	1.33
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: maintain the info structure, info <-> header packets
- last mod: $Id: info.c,v 1.32 2000/11/06 00:07:00 xiphmont Exp $
+ last mod: $Id: info.c,v 1.33 2000/11/14 00:05:31 xiphmont Exp $
 
  ********************************************************************/
 
@@ -130,10 +130,10 @@
   if(vc){
     long i;
     for(i=0;i<vc->comments;i++)
-      if(vc->user_comments[i])free(vc->user_comments[i]);
-    if(vc->user_comments)free(vc->user_comments);
-	if(vc->comment_lengths)free(vc->comment_lengths);
-    if(vc->vendor)free(vc->vendor);
+      if(vc->user_comments[i])_ogg_free(vc->user_comments[i]);
+    if(vc->user_comments)_ogg_free(vc->user_comments);
+	if(vc->comment_lengths)_ogg_free(vc->comment_lengths);
+    if(vc->vendor)_ogg_free(vc->vendor);
   }
   memset(vc,0,sizeof(vorbis_comment));
 }
@@ -151,7 +151,7 @@
   if(ci){
 
     for(i=0;i<ci->modes;i++)
-      if(ci->mode_param[i])free(ci->mode_param[i]);
+      if(ci->mode_param[i])_ogg_free(ci->mode_param[i]);
 
     for(i=0;i<ci->maps;i++) /* unpack does the range checking */
       _mapping_P[ci->map_type[i]]->free_info(ci->map_param[i]);
@@ -175,7 +175,7 @@
     for(i=0;i<ci->psys;i++)
       _vi_psy_free(ci->psy_param[i]);
 
-    free(ci);
+    _ogg_free(ci);
   }
 
   memset(vi,0,sizeof(vorbis_info));
@@ -515,7 +515,7 @@
   if(_vorbis_pack_info(&opb,vi))goto err_out;
 
   /* build the packet */
-  if(b->header)free(b->header);
+  if(b->header)_ogg_free(b->header);
   b->header=_ogg_malloc(oggpack_bytes(&opb));
   memcpy(b->header,opb.buffer,oggpack_bytes(&opb));
   op->packet=b->header;
@@ -529,7 +529,7 @@
   oggpack_reset(&opb);
   if(_vorbis_pack_comment(&opb,vc))goto err_out;
 
-  if(b->header1)free(b->header1);
+  if(b->header1)_ogg_free(b->header1);
   b->header1=_ogg_malloc(oggpack_bytes(&opb));
   memcpy(b->header1,opb.buffer,oggpack_bytes(&opb));
   op_comm->packet=b->header1;
@@ -543,7 +543,7 @@
   oggpack_reset(&opb);
   if(_vorbis_pack_books(&opb,vi))goto err_out;
 
-  if(b->header2)free(b->header2);
+  if(b->header2)_ogg_free(b->header2);
   b->header2=_ogg_malloc(oggpack_bytes(&opb));
   memcpy(b->header2,opb.buffer,oggpack_bytes(&opb));
   op_code->packet=b->header2;
@@ -560,9 +560,9 @@
   memset(op_comm,0,sizeof(ogg_packet));
   memset(op_code,0,sizeof(ogg_packet));
 
-  if(b->header)free(b->header);
-  if(b->header1)free(b->header1);
-  if(b->header2)free(b->header2);
+  if(b->header)_ogg_free(b->header);
+  if(b->header1)_ogg_free(b->header1);
+  if(b->header2)_ogg_free(b->header2);
   b->header=NULL;
   b->header1=NULL;
   b->header2=NULL;

1.19      +12 -12    vorbis/lib/mapping0.c

Index: mapping0.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/mapping0.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- mapping0.c	2000/11/07 09:51:43	1.18
+++ mapping0.c	2000/11/14 00:05:31	1.19
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: channel mapping 0 implementation
- last mod: $Id: mapping0.c,v 1.18 2000/11/07 09:51:43 xiphmont Exp $
+ last mod: $Id: mapping0.c,v 1.19 2000/11/14 00:05:31 xiphmont Exp $
 
  ********************************************************************/
 
@@ -67,7 +67,7 @@
 static void mapping0_free_info(vorbis_info_mapping *i){
   if(i){
     memset(i,0,sizeof(vorbis_info_mapping0));
-    free(i);
+    _ogg_free(i);
   }
 }
 
@@ -84,20 +84,20 @@
 
     if(l->decay){
       for(i=0;i<l->ch;i++){
-	if(l->decay[i])free(l->decay[i]);
+	if(l->decay[i])_ogg_free(l->decay[i]);
       }
-      free(l->decay);
+      _ogg_free(l->decay);
     }
 
-    free(l->time_func);
-    free(l->floor_func);
-    free(l->residue_func);
-    free(l->time_look);
-    free(l->floor_look);
-    free(l->residue_look);
-    if(l->psy_look)free(l->psy_look);
+    _ogg_free(l->time_func);
+    _ogg_free(l->floor_func);
+    _ogg_free(l->residue_func);
+    _ogg_free(l->time_look);
+    _ogg_free(l->floor_look);
+    _ogg_free(l->residue_look);
+    if(l->psy_look)_ogg_free(l->psy_look);
     memset(l,0,sizeof(vorbis_look_mapping0));
-    free(l);
+    _ogg_free(l);
   }
 }
 

1.19      +3 -3      vorbis/lib/mdct.c

Index: mdct.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/mdct.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- mdct.c	2000/11/06 00:07:01	1.18
+++ mdct.c	2000/11/14 00:05:31	1.19
@@ -13,7 +13,7 @@
 
  function: normalized modified discrete cosine transform
            power of two length transform only [16 <= n ]
- last mod: $Id: mdct.c,v 1.18 2000/11/06 00:07:01 xiphmont Exp $
+ last mod: $Id: mdct.c,v 1.19 2000/11/14 00:05:31 xiphmont Exp $
 
  Algorithm adapted from _The use of multirate filter banks for coding
  of high quality digital audio_, by T. Sporer, K. Brandenburg and
@@ -90,8 +90,8 @@
 
 void mdct_clear(mdct_lookup *l){
   if(l){
-    if(l->trig)free(l->trig);
-    if(l->bitrev)free(l->bitrev);
+    if(l->trig)_ogg_free(l->trig);
+    if(l->bitrev)_ogg_free(l->bitrev);
     memset(l,0,sizeof(mdct_lookup));
   }
 }

1.3       +7 -7      vorbis/lib/misc.c

Index: misc.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/misc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- misc.c	2000/11/06 00:07:01	1.2
+++ misc.c	2000/11/14 00:05:31	1.3
@@ -42,11 +42,11 @@
   if(pinsert>=palloced){
     palloced+=64;
     if(pointers){
-      pointers=(void **)_ogg_realloc(pointers,sizeof(void **)*palloced);
-      insertlist=(long *)_ogg_realloc(insertlist,sizeof(long *)*palloced);
+      pointers=(void **)realloc(pointers,sizeof(void **)*palloced);
+      insertlist=(long *)realloc(insertlist,sizeof(long *)*palloced);
     }else{
-      pointers=(void **)_ogg_malloc(sizeof(void **)*palloced);
-      insertlist=(long *)_ogg_malloc(sizeof(long *)*palloced);
+      pointers=(void **)malloc(sizeof(void **)*palloced);
+      insertlist=(long *)malloc(sizeof(long *)*palloced);
     }
   }
 
@@ -84,14 +84,14 @@
   pthread_mutex_unlock(&memlock);
 }
 
-extern void *_VDBG__ogg_malloc(void *ptr,long bytes,char *file,long line){
+extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line){
   bytes+=HEAD_ALIGN;
   if(ptr){
     ptr-=HEAD_ALIGN;
     _ripremove(ptr);
-    ptr=_ogg_realloc(ptr,bytes);
+    ptr=realloc(ptr,bytes);
   }else{
-    ptr=_ogg_malloc(bytes);
+    ptr=malloc(bytes);
     memset(ptr,0,bytes);
   }
   return _insert(ptr,file,line);

1.7       +4 -4      vorbis/lib/misc.h

Index: misc.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/misc.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- misc.h	2000/11/06 00:07:01	1.6
+++ misc.h	2000/11/14 00:05:31	1.7
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: miscellaneous prototypes
- last mod: $Id: misc.h,v 1.6 2000/11/06 00:07:01 xiphmont Exp $
+ last mod: $Id: misc.h,v 1.7 2000/11/14 00:05:31 xiphmont Exp $
 
  ********************************************************************/
 
@@ -25,19 +25,19 @@
 extern void _analysis_output(char *base,int i,float *v,int n,int bark,int dB);
 
 #ifdef DEBUG_LEAKS
-extern void *_VDBG__ogg_malloc(void *ptr,long bytes,char *file,long line); 
+extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line); 
 extern void _VDBG_free(void *ptr,char *file,long line); 
 
 #ifndef MISC_C 
 #undef _ogg_malloc
 #undef _ogg_calloc
 #undef _ogg_realloc
-#undef free
+#undef _ogg_free
 
 #define _ogg_malloc(x) _VDBG__ogg_malloc(NULL,(x),__FILE__,__LINE__)
 #define _ogg_calloc(x,y) _VDBG__ogg_malloc(NULL,(x)*(y),__FILE__,__LINE__)
 #define _ogg_realloc(x,y) _VDBG__ogg_malloc((x),(y),__FILE__,__LINE__)
-#define free(x) _VDBG_free((x),__FILE__,__LINE__)
+#define _ogg_free(x) _VDBG__ogg_free((x),__FILE__,__LINE__)
 #endif
 #endif
 

1.32      +11 -11    vorbis/lib/psy.c

Index: psy.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psy.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- psy.c	2000/11/08 06:08:11	1.31
+++ psy.c	2000/11/14 00:05:31	1.32
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: psychoacoustics not including preecho
- last mod: $Id: psy.c,v 1.31 2000/11/08 06:08:11 xiphmont Exp $
+ last mod: $Id: psy.c,v 1.32 2000/11/14 00:05:31 xiphmont Exp $
 
  ********************************************************************/
 
@@ -37,7 +37,7 @@
 void _vi_psy_free(vorbis_info_psy *i){
   if(i){
     memset(i,0,sizeof(vorbis_info_psy));
-    free(i);
+    _ogg_free(i);
   }
 }
 
@@ -290,20 +290,20 @@
 void _vp_psy_clear(vorbis_look_psy *p){
   int i,j;
   if(p){
-    if(p->ath)free(p->ath);
-    if(p->octave)free(p->octave);
+    if(p->ath)_ogg_free(p->ath);
+    if(p->octave)_ogg_free(p->octave);
     if(p->tonecurves){
       for(i=0;i<P_BANDS;i++){
         for(j=0;j<P_LEVELS;j++){
-	  free(p->tonecurves[i][j]);
+	  _ogg_free(p->tonecurves[i][j]);
         }
-	free(p->noiseatt[i]);
-	free(p->tonecurves[i]);
-	free(p->peakatt[i]);
+	_ogg_free(p->noiseatt[i]);
+	_ogg_free(p->tonecurves[i]);
+	_ogg_free(p->peakatt[i]);
       }
-      free(p->tonecurves);
-      free(p->noiseatt);
-      free(p->peakatt);
+      _ogg_free(p->tonecurves);
+      _ogg_free(p->noiseatt);
+      _ogg_free(p->peakatt);
     }
     memset(p,0,sizeof(vorbis_look_psy));
   }

1.10      +3 -3      vorbis/lib/psytune.c

Index: psytune.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psytune.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- psytune.c	2000/11/08 06:08:12	1.9
+++ psytune.c	2000/11/14 00:05:31	1.10
@@ -13,7 +13,7 @@
 
  function: simple utility that runs audio through the psychoacoustics
            without encoding
- last mod: $Id: psytune.c,v 1.9 2000/11/08 06:08:12 xiphmont Exp $
+ last mod: $Id: psytune.c,v 1.10 2000/11/14 00:05:31 xiphmont Exp $
 
  ********************************************************************/
 
@@ -44,7 +44,7 @@
   /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
   /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
 
-   1,/* tonemaskp */
+   0,/* 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*/
@@ -65,7 +65,7 @@
    {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*16000*/
   },
 
-  0,/* peakattp */
+  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*/

1.21      +7 -7      vorbis/lib/res0.c

Index: res0.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/res0.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- res0.c	2000/11/08 13:16:27	1.20
+++ res0.c	2000/11/14 00:05:31	1.21
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: residue backend 0 implementation
- last mod: $Id: res0.c,v 1.20 2000/11/08 13:16:27 xiphmont Exp $
+ last mod: $Id: res0.c,v 1.21 2000/11/14 00:05:31 xiphmont Exp $
 
  ********************************************************************/
 
@@ -55,7 +55,7 @@
 void res0_free_info(vorbis_info_residue *i){
   if(i){
     memset(i,0,sizeof(vorbis_info_residue0));
-    free(i);
+    _ogg_free(i);
   }
 }
 
@@ -64,13 +64,13 @@
   if(i){
     vorbis_look_residue0 *look=(vorbis_look_residue0 *)i;
     for(j=0;j<look->parts;j++)
-      if(look->partbooks[j])free(look->partbooks[j]);
-    free(look->partbooks);
+      if(look->partbooks[j])_ogg_free(look->partbooks[j]);
+    _ogg_free(look->partbooks);
     for(j=0;j<look->partvals;j++)
-      free(look->decodemap[j]);
-    free(look->decodemap);
+      _ogg_free(look->decodemap[j]);
+    _ogg_free(look->decodemap);
     memset(i,0,sizeof(vorbis_look_residue0));
-    free(i);
+    _ogg_free(i);
   }
 }
 

1.12      +22 -19    vorbis/lib/sharedbook.c

Index: sharedbook.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/sharedbook.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- sharedbook.c	2000/11/08 13:16:27	1.11
+++ sharedbook.c	2000/11/14 00:05:31	1.12
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: basic shared codebook operations
- last mod: $Id: sharedbook.c,v 1.11 2000/11/08 13:16:27 xiphmont Exp $
+ last mod: $Id: sharedbook.c,v 1.12 2000/11/14 00:05:31 xiphmont Exp $
 
  ********************************************************************/
 
@@ -89,7 +89,7 @@
       /* update ourself */
       if(length<32 && (entry>>length)){
         /* error condition; the lengths must specify an overpopulated tree */
-	free(r);
+	_ogg_free(r);
         return(NULL);
       }
       r[i]=entry;
@@ -171,7 +171,7 @@
         ptr1[ptr]=-i;
     }
   }
-  free(codelist);
+  _ogg_free(codelist);
 
   t->tabn = _ilog(c->entries)-4; /* this is magic */
   if(t->tabn<5)t->tabn=5;
@@ -283,21 +283,21 @@
 
 void vorbis_staticbook_clear(static_codebook *b){
   if(b->allocedp){
-    if(b->quantlist)free(b->quantlist);
-    if(b->lengthlist)free(b->lengthlist);
+    if(b->quantlist)_ogg_free(b->quantlist);
+    if(b->lengthlist)_ogg_free(b->lengthlist);
     if(b->nearest_tree){
-      free(b->nearest_tree->ptr0);
-      free(b->nearest_tree->ptr1);
-      free(b->nearest_tree->p);
-      free(b->nearest_tree->q);
+      _ogg_free(b->nearest_tree->ptr0);
+      _ogg_free(b->nearest_tree->ptr1);
+      _ogg_free(b->nearest_tree->p);
+      _ogg_free(b->nearest_tree->q);
       memset(b->nearest_tree,0,sizeof(encode_aux_nearestmatch));
-      free(b->nearest_tree);
+      _ogg_free(b->nearest_tree);
     }
     if(b->thresh_tree){
-      free(b->thresh_tree->quantthresh);
-      free(b->thresh_tree->quantmap);
+      _ogg_free(b->thresh_tree->quantthresh);
+      _ogg_free(b->thresh_tree->quantmap);
       memset(b->thresh_tree,0,sizeof(encode_aux_threshmatch));
-      free(b->thresh_tree);
+      _ogg_free(b->thresh_tree);
     }
 
     memset(b,0,sizeof(static_codebook));
@@ -307,7 +307,7 @@
 void vorbis_staticbook_destroy(static_codebook *b){
   if(b->allocedp){
     vorbis_staticbook_clear(b);
-    free(b);
+    _ogg_free(b);
   }
 }
 
@@ -315,13 +315,16 @@
   /* static book is not cleared; we're likely called on the lookup and
      the static codebook belongs to the info struct */
   if(b->decode_tree){
-    free(b->decode_tree->ptr0);
-    free(b->decode_tree->ptr1);
+    _ogg_free(b->decode_tree->tab);
+    _ogg_free(b->decode_tree->tabl);
+
+    _ogg_free(b->decode_tree->ptr0);
+    _ogg_free(b->decode_tree->ptr1);
     memset(b->decode_tree,0,sizeof(decode_aux));
-    free(b->decode_tree);
+    _ogg_free(b->decode_tree);
   }
-  if(b->valuelist)free(b->valuelist);
-  if(b->codelist)free(b->codelist);
+  if(b->valuelist)_ogg_free(b->valuelist);
+  if(b->codelist)_ogg_free(b->codelist);
   memset(b,0,sizeof(codebook));
 }
 

1.11      +3 -3      vorbis/lib/smallft.c

Index: smallft.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/smallft.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- smallft.c	2000/11/06 00:07:02	1.10
+++ smallft.c	2000/11/14 00:05:31	1.11
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: *unnormalized* fft transform
- last mod: $Id: smallft.c,v 1.10 2000/11/06 00:07:02 xiphmont Exp $
+ last mod: $Id: smallft.c,v 1.11 2000/11/14 00:05:31 xiphmont Exp $
 
 ********************************************************************/
 
@@ -1248,8 +1248,8 @@
 
 void drft_clear(drft_lookup *l){
   if(l){
-    if(l->trigcache)free(l->trigcache);
-    if(l->splitcache)free(l->splitcache);
+    if(l->trigcache)_ogg_free(l->trigcache);
+    if(l->splitcache)_ogg_free(l->splitcache);
     memset(l,0,sizeof(drft_lookup));
   }
 }

1.4       +2 -0      vorbis/lib/tone.c

Index: tone.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/tone.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- tone.c	2000/11/08 06:08:12	1.3
+++ tone.c	2000/11/14 00:05:32	1.4
@@ -28,6 +28,8 @@
     else
       amp[i]=32767.;
 
+    fprintf(stderr,"%g Hz, %g amp\n",f[i],amp[i]);
+
     i++;
   }
 

1.32      +7 -7      vorbis/lib/vorbisfile.c

Index: vorbisfile.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/vorbisfile.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- vorbisfile.c	2000/11/06 00:07:02	1.31
+++ vorbisfile.c	2000/11/14 00:05:32	1.32
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id: vorbisfile.c,v 1.31 2000/11/06 00:07:02 xiphmont Exp $
+ last mod: $Id: vorbisfile.c,v 1.32 2000/11/14 00:05:32 xiphmont Exp $
 
  ********************************************************************/
 
@@ -567,13 +567,13 @@
         vorbis_info_clear(vf->vi+i);
         vorbis_comment_clear(vf->vc+i);
       }
-      free(vf->vi);
-      free(vf->vc);
+      _ogg_free(vf->vi);
+      _ogg_free(vf->vc);
     }
-    if(vf->dataoffsets)free(vf->dataoffsets);
-    if(vf->pcmlengths)free(vf->pcmlengths);
-    if(vf->serialnos)free(vf->serialnos);
-    if(vf->offsets)free(vf->offsets);
+    if(vf->dataoffsets)_ogg_free(vf->dataoffsets);
+    if(vf->pcmlengths)_ogg_free(vf->pcmlengths);
+    if(vf->serialnos)_ogg_free(vf->serialnos);
+    if(vf->offsets)_ogg_free(vf->offsets);
     ogg_sync_clear(&vf->oy);
     if(vf->datasource)(vf->callbacks.close_func)(vf->datasource);
     memset(vf,0,sizeof(OggVorbis_File));

1.10      +2 -2      vorbis/lib/window.c

Index: window.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/window.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- window.c	2000/11/06 00:07:03	1.9
+++ window.c	2000/11/14 00:05:32	1.10
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: window functions
- last mod: $Id: window.c,v 1.9 2000/11/06 00:07:03 xiphmont Exp $
+ last mod: $Id: window.c,v 1.10 2000/11/14 00:05:32 xiphmont Exp $
 
  ********************************************************************/
 
@@ -55,7 +55,7 @@
     }
     break;
   default:
-    free(ret);
+    _ogg_free(ret);
     return(NULL);
   }
   return(ret);

1.4       +2 -2      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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mode_A.h	2000/11/08 06:08:16	1.3
+++ mode_A.h	2000/11/14 00:05:35	1.4
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: predefined encoding modes
- last mod: $Id: mode_A.h,v 1.3 2000/11/08 06:08:16 xiphmont Exp $
+ last mod: $Id: mode_A.h,v 1.4 2000/11/14 00:05:35 xiphmont Exp $
 
  ********************************************************************/
 
@@ -129,7 +129,7 @@
 
 /* with GNUisms, this could be short and readable. Oh well */
 static vorbis_info_time0 _time_set0A={0};
-static vorbis_info_floor0 _floor_set0A={12, 44100,  64, 12,150, 1, {0} };
+static vorbis_info_floor0 _floor_set0A={30, 44100, 256, 12,150, 1, {1} };
 static vorbis_info_floor0 _floor_set1A={30, 44100, 256, 12,150, 1, {1} };
 static vorbis_info_residue0 _residue_set0A={0,128, 32,6,2,
                                             {0,1,1,1,1,1},

1.4       +3 -3      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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mode_D.h	2000/11/08 13:16:33	1.3
+++ mode_D.h	2000/11/14 00:05:35	1.4
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: predefined encoding modes
- last mod: $Id: mode_D.h,v 1.3 2000/11/08 13:16:33 xiphmont Exp $
+ last mod: $Id: mode_D.h,v 1.4 2000/11/14 00:05:35 xiphmont Exp $
 
  ********************************************************************/
 
@@ -107,7 +107,7 @@
 
 /* with GNUisms, this could be short and readable. Oh well */
 static vorbis_info_time0 _time_set0_256={0};
-static vorbis_info_floor0 _floor_set0_256={12, 44100,  64, 12,150, 1, {0} };
+static vorbis_info_floor0 _floor_set0_256={30, 44100, 256, 12,150, 1, {1} };
 static vorbis_info_floor0 _floor_set1_256={30, 44100, 256, 12,150, 1, {1} };
 static vorbis_info_residue0 _residue_set0_256={0,128, 32,6,2,
                                            {0,1,1,1,1,1},
@@ -172,7 +172,7 @@
   /* psy */
   {&_psy_set_256},
   /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
-  256, 24, 6, -96.
+  256, 0, 6, -96.
 };
 
 #define PREDEF_INFO_MAX 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