[xiph-cvs] cvs commit: vorbis/lib envelope.c envelope.h

Monty xiphmont at xiph.org
Sun Mar 31 16:49:42 PST 2002



xiphmont    02/03/31 16:49:41

  Modified:    lib      envelope.c envelope.h
  Log:
  minor preecho tweak

Revision  Changes    Path
1.48      +8 -5      vorbis/lib/envelope.c

Index: envelope.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/envelope.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- envelope.c	2002/03/30 01:56:58	1.47
+++ envelope.c	2002/04/01 00:49:41	1.48
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: PCM data envelope analysis 
- last mod: $Id: envelope.c,v 1.47 2002/03/30 01:56:58 xiphmont Exp $
+ last mod: $Id: envelope.c,v 1.48 2002/04/01 00:49:41 xiphmont Exp $
 
  ********************************************************************/
 
@@ -192,8 +192,6 @@
       valmin=postmin-premin;
       valmax=postmax-premax;
 
-      filters[j].markers[pos]=valmax;
-
       filters[j].ampbuf[this]=acc;
       filters[j].ampptr++;
       if(filters[j].ampptr>=VE_AMP)filters[j].ampptr=0;
@@ -274,7 +272,7 @@
       if(ve->mark[j/ve->searchstep]){
         if(j>centerW){
 
-#if 0
+	  #if 0
           if(j>ve->curmark){
             float *marker=alloca(v->pcm_current*sizeof(*marker));
             int l,m;
@@ -302,11 +300,15 @@
               for(l=0;l<last;l++)marker[l*ve->searchstep]=ve->filter[m+VE_BANDS].markers[l]*.1;
               _analysis_output_always(buf,seq,marker,v->pcm_current,0,0,totalshift);
             }
+
+
+	    for(l=0;l<last;l++)marker[l*ve->searchstep]=ve->stretchm[l]*.1;
+	    _analysis_output_always("stretch",seq,marker,v->pcm_current,0,0,totalshift);
             
             seq++;
             
           }
-#endif
+	  #endif
 
           ve->curmark=j;
           if(j>=testW)return(1);
@@ -358,6 +360,7 @@
     memmove(e->filter[i].markers,
             e->filter[i].markers+smallshift,
             (1024-smallshift)*sizeof(*(*e->filter).markers));
+  memmove(e->stretchm,e->stretchm+smallshift,(smallsize-smallshift)*sizeof(*e->stretchm));
   totalshift+=shift;
 #endif 
 

<p><p>1.24      +2 -3      vorbis/lib/envelope.h

Index: envelope.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/envelope.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- envelope.h	2002/03/30 01:56:58	1.23
+++ envelope.h	2002/04/01 00:49:41	1.24
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: PCM data envelope analysis and manipulation
- last mod: $Id: envelope.h,v 1.23 2002/03/30 01:56:58 xiphmont Exp $
+ last mod: $Id: envelope.h,v 1.24 2002/04/01 00:49:41 xiphmont Exp $
 
  ********************************************************************/
 
@@ -29,7 +29,7 @@
 #define VE_NEARDC 15
 
 #define VE_MINSTRETCH 2   /* a bit less than short block */
-#define VE_MAXSTRETCH 31  /* one full block */
+#define VE_MAXSTRETCH 12  /* one-third full block */
 
 typedef struct {
   float ampbuf[VE_AMP];
@@ -40,7 +40,6 @@
   float nearDC_partialacc;
   int   nearptr;
 
-  float markers[1024];
 } envelope_filter_state;
 
 typedef struct {

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