********************************************************************
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 $
********************************************************************/
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;
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;
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);
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
********************************************************************
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 $
********************************************************************/
#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];
float nearDC_partialacc;
int nearptr;
- float markers[1024];
} envelope_filter_state;
typedef struct {