Commit cbf28777 authored by Monty's avatar Monty

Remove trailing whitespace


svn path=/trunk/vorbis/; revision=16227
parent 321cfc8e
......@@ -5,12 +5,12 @@
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: libvorbis backend and mapping structures; needed for
function: libvorbis backend and mapping structures; needed for
static mode headers
last mod: $Id$
......@@ -68,16 +68,16 @@ typedef struct{
int class_subbook[VIF_CLASS][8]; /* [VIF_CLASS][subs] */
int mult; /* 1 2 3 or 4 */
int postlist[VIF_POSIT+2]; /* first two implicit */
int mult; /* 1 2 3 or 4 */
int postlist[VIF_POSIT+2]; /* first two implicit */
/* encode side analysis parameters */
float maxover;
float maxunder;
float maxerr;
float maxover;
float maxunder;
float maxerr;
float twofitweight;
float twofitweight;
float twofitatten;
int n;
......@@ -113,8 +113,8 @@ typedef struct vorbis_info_residue0{
int secondstages[64]; /* expanded out to pointers in lookup */
int booklist[256]; /* list of second stage books */
const float classmetric1[64];
const float classmetric2[64];
const float classmetric1[64];
const float classmetric2[64];
} vorbis_info_residue0;
/* Mapping backend generic *****************************************/
......@@ -130,7 +130,7 @@ typedef struct{
typedef struct vorbis_info_mapping0{
int submaps; /* <= 16 */
int chmuxlist[256]; /* up to 256 channels in a Vorbis stream */
int floorsubmap[16]; /* [mux] submap to floors */
int residuesubmap[16]; /* [mux] submap to residue */
......@@ -141,5 +141,3 @@ typedef struct vorbis_info_mapping0{
} vorbis_info_mapping0;
#endif
......@@ -5,7 +5,7 @@
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
......@@ -31,7 +31,7 @@ void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bm){
bitrate_manager_info *bi=&ci->bi;
memset(bm,0,sizeof(*bm));
if(bi && (bi->reservoir_bits>0)){
long ratesamples=vi->rate;
int halfsamples=ci->blocksizes[0]>>1;
......@@ -42,8 +42,8 @@ void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bm){
bm->avg_bitsper= rint(1.*bi->avg_rate*halfsamples/ratesamples);
bm->min_bitsper= rint(1.*bi->min_rate*halfsamples/ratesamples);
bm->max_bitsper= rint(1.*bi->max_rate*halfsamples/ratesamples);
bm->avgfloat=PACKETBLOBS/2;
bm->avgfloat=PACKETBLOBS/2;
/* not a necessary fix, but one that leads to a more balanced
typical initialization */
......@@ -53,7 +53,7 @@ void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bm){
bm->avg_reservoir=desired_fill;
}
}
}
}
void vorbis_bitrate_clear(bitrate_manager_state *bm){
......@@ -63,7 +63,7 @@ void vorbis_bitrate_clear(bitrate_manager_state *bm){
int vorbis_bitrate_managed(vorbis_block *vb){
vorbis_dsp_state *vd=vb->vd;
private_state *b=vd->backend_state;
private_state *b=vd->backend_state;
bitrate_manager_state *bm=&b->bms;
if(bm && bm->managed)return(1);
......@@ -74,7 +74,7 @@ int vorbis_bitrate_managed(vorbis_block *vb){
int vorbis_bitrate_addblock(vorbis_block *vb){
vorbis_block_internal *vbi=vb->internal;
vorbis_dsp_state *vd=vb->vd;
private_state *b=vd->backend_state;
private_state *b=vd->backend_state;
bitrate_manager_state *bm=&b->bms;
vorbis_info *vi=vd->vi;
codec_setup_info *ci=vi->codec_setup;
......@@ -89,7 +89,7 @@ int vorbis_bitrate_addblock(vorbis_block *vb){
if(!bm->managed){
/* not a bitrate managed stream, but for API simplicity, we'll
buffer the packet to keep the code path clean */
if(bm->vb)return(-1); /* one has been submitted without
being claimed */
bm->vb=vb;
......@@ -97,7 +97,7 @@ int vorbis_bitrate_addblock(vorbis_block *vb){
}
bm->vb=vb;
/* look ahead for avg floater */
if(bm->avg_bitsper>0){
double slew=0.;
......@@ -149,7 +149,7 @@ int vorbis_bitrate_addblock(vorbis_block *vb){
}
}
}
/* enforce max (if used) on the current floater (if used) */
if(bm->max_bitsper>0){
/* do we need to force the bitrate down? */
......@@ -170,9 +170,9 @@ int vorbis_bitrate_addblock(vorbis_block *vb){
frame will need to be truncated */
long maxsize=(max_target_bits+(bi->reservoir_bits-bm->minmax_reservoir))/8;
bm->choice=choice=0;
if(oggpack_bytes(vbi->packetblob[choice])>maxsize){
oggpack_writetrunc(vbi->packetblob[choice],maxsize*8);
this_bits=oggpack_bytes(vbi->packetblob[choice])*8;
}
......@@ -220,7 +220,7 @@ int vorbis_bitrate_addblock(vorbis_block *vb){
/* avg reservoir */
if(bm->avg_bitsper>0){
long avg_target_bits=(vb->W?bm->avg_bitsper*bm->short_per_long:bm->avg_bitsper);
long avg_target_bits=(vb->W?bm->avg_bitsper*bm->short_per_long:bm->avg_bitsper);
bm->avg_reservoir+=this_bits-avg_target_bits;
}
......@@ -236,7 +236,7 @@ int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,ogg_packet *op){
if(op){
vorbis_block_internal *vbi=vb->internal;
if(vorbis_bitrate_managed(vb))
choice=bm->choice;
......@@ -247,7 +247,7 @@ int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,ogg_packet *op){
op->granulepos=vb->granulepos;
op->packetno=vb->sequence; /* for sake of completeness */
}
bm->vb=0;
return(1);
}
This diff is collapsed.
......@@ -5,7 +5,7 @@
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
......@@ -38,11 +38,11 @@ int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *opb){
/* pack the codewords. There are two packings; length ordered and
length random. Decide between the two now. */
for(i=1;i<c->entries;i++)
if(c->lengthlist[i-1]==0 || c->lengthlist[i]<c->lengthlist[i-1])break;
if(i==c->entries)ordered=1;
if(ordered){
/* length ordered. We only need to say how many codewords of
each length. The actual codewords are generated
......@@ -63,12 +63,12 @@ int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *opb){
}
}
oggpack_write(opb,i-count,_ilog(c->entries-count));
}else{
/* length random. Again, we don't code the codeword itself, just
the length. This time, though, we have to encode each length */
oggpack_write(opb,0,1); /* unordered */
/* algortihmic mapping has use for 'unused entries', which we tag
here. The algorithmic mapping happens as usual, but the unused
entry has no codeword. */
......@@ -102,18 +102,18 @@ int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *opb){
case 1:case 2:
/* implicitly populated value mapping */
/* explicitly populated value mapping */
if(!c->quantlist){
/* no quantlist? error */
return(-1);
}
/* values that define the dequantization */
oggpack_write(opb,c->q_min,32);
oggpack_write(opb,c->q_delta,32);
oggpack_write(opb,c->q_quant-1,4);
oggpack_write(opb,c->q_sequencep,1);
{
int quantvals;
switch(c->maptype){
......@@ -187,7 +187,7 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){
s->lengthlist[i]=num+1;
}
}
break;
case 1:
/* ordered */
......@@ -208,7 +208,7 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){
/* EOF */
return(-1);
}
/* Do we have a mapping to unpack? */
switch((s->maptype=oggpack_read(opb,4))){
case 0:
......@@ -234,12 +234,12 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){
quantvals=s->entries*s->dim;
break;
}
/* quantized values */
s->quantlist=_ogg_malloc(sizeof(*s->quantlist)*quantvals);
for(i=0;i<quantvals;i++)
s->quantlist[i]=oggpack_read(opb,s->q_quant);
if(quantvals&&s->quantlist[quantvals-1]==-1)goto _eofout;
}
break;
......@@ -249,11 +249,11 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){
/* all set */
return(0);
_errout:
_eofout:
vorbis_staticbook_clear(s);
return(-1);
return(-1);
}
/* returns the number of bits ************************************************/
......@@ -314,7 +314,7 @@ STIN long decode_packed_entry_number(codebook *book, oggpack_buffer *b){
int read=book->dec_maxlength;
long lo,hi;
long lok = oggpack_look(b,book->dec_firsttablen);
if (lok >= 0) {
long entry = book->dec_firsttable[lok];
if(entry&0x80000000UL){
......@@ -328,30 +328,30 @@ STIN long decode_packed_entry_number(codebook *book, oggpack_buffer *b){
lo=0;
hi=book->used_entries;
}
lok = oggpack_look(b, read);
while(lok<0 && read>1)
lok = oggpack_look(b, --read);
if(lok<0)return -1;
/* bisect search for the codeword in the ordered list */
{
ogg_uint32_t testword=bitreverse((ogg_uint32_t)lok);
while(hi-lo>1){
long p=(hi-lo)>>1;
long test=book->codelist[lo+p]>testword;
long test=book->codelist[lo+p]>testword;
lo+=p&(test-1);
hi-=p&(-test);
}
if(book->dec_codelengths[lo]<=read){
oggpack_adv(b, book->dec_codelengths[lo]);
return(lo);
}
}
oggpack_adv(b, read);
return(-1);
......@@ -360,13 +360,13 @@ STIN long decode_packed_entry_number(codebook *book, oggpack_buffer *b){
/* Decode side is specced and easier, because we don't need to find
matches using different criteria; we simply read and map. There are
two things we need to do 'depending':
We may need to support interleave. We don't really, but it's
convenient to do it here rather than rebuild the vector later.
Cascades may be additive or multiplicitive; this is not inherent in
the codebook, but set in the code using the codebook. Like
interleaving, it's easiest to do it here.
interleaving, it's easiest to do it here.
addmul==0 -> declarative (set the value)
addmul==1 -> additive
addmul==2 -> multiplicitive */
......@@ -390,7 +390,7 @@ long vorbis_book_decodevs_add(codebook *book,float *a,oggpack_buffer *b,int n){
long *entry = alloca(sizeof(*entry)*step);
float **t = alloca(sizeof(*t)*step);
int i,j,o;
for (i = 0; i < step; i++) {
entry[i]=decode_packed_entry_number(book,b);
if(entry[i]==-1)return(-1);
......@@ -407,7 +407,7 @@ long vorbis_book_decodev_add(codebook *book,float *a,oggpack_buffer *b,int n){
if(book->used_entries>0){
int i,j,entry;
float *t;
if(book->dim>8){
for(i=0;i<n;){
entry = decode_packed_entry_number(book,b);
......@@ -443,7 +443,7 @@ long vorbis_book_decodev_add(codebook *book,float *a,oggpack_buffer *b,int n){
break;
}
}
}
}
}
return(0);
}
......@@ -452,7 +452,7 @@ long vorbis_book_decodev_set(codebook *book,float *a,oggpack_buffer *b,int n){
if(book->used_entries>0){
int i,j,entry;
float *t;
for(i=0;i<n;){
entry = decode_packed_entry_number(book,b);
if(entry==-1)return(-1);
......@@ -462,7 +462,7 @@ long vorbis_book_decodev_set(codebook *book,float *a,oggpack_buffer *b,int n){
}
}else{
int i,j;
for(i=0;i<n;){
for (j=0;j<book->dim;)
a[i++]=0.f;
......@@ -574,7 +574,7 @@ int main(){
oggpack_buffer read;
long ptr=0,i;
oggpack_writeinit(&write);
fprintf(stderr,"Testing codebook abstraction...:\n");
while(testlist[ptr]){
......@@ -598,7 +598,7 @@ int main(){
vorbis_book_encodev(&c,best,qv+i,&write);
}
vorbis_book_clear(&c);
fprintf(stderr,"OK.\n");
fprintf(stderr,"\tunpacking/decoding %ld... ",ptr);
......@@ -624,7 +624,7 @@ int main(){
iv[i],qv[i],i);
exit(1);
}
fprintf(stderr,"OK\n");
ptr++;
}
......
......@@ -5,7 +5,7 @@
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
......@@ -40,7 +40,7 @@ typedef struct static_codebook{
/* mapping ***************************************************************/
int maptype; /* 0=none
1=implicitly populated values from map column
1=implicitly populated values from map column
2=listed arbitrary values */
/* The below does a linear, single monotonic sequence mapping. */
......@@ -71,15 +71,15 @@ typedef struct encode_aux_nearestmatch{
long *p; /* decision points (each is an entry) */
long *q; /* decision points (each is an entry) */
long aux; /* number of tree entries */
long alloc;
long alloc;
} encode_aux_nearestmatch;
/* assumes a maptype of 1; encode side only, so that's OK */
typedef struct encode_aux_threshmatch{
float *quantthresh;
long *quantmap;
int quantvals;
int threshvals;
int quantvals;
int threshvals;
} encode_aux_threshmatch;
typedef struct encode_aux_pigeonhole{
......@@ -105,7 +105,7 @@ typedef struct codebook{
/* for encode, the below are entry-ordered, fully populated */
/* for decode, the below are ordered by bitreversed codeword and only
used entries are populated */
float *valuelist; /* list of dim*entries actual entry values */
float *valuelist; /* list of dim*entries actual entry values */
ogg_uint32_t *codelist; /* list of bitstream codewords for each entry */
int *dec_index; /* only used if sparseness collapsed */
......@@ -141,18 +141,18 @@ extern int vorbis_staticbook_unpack(oggpack_buffer *b,static_codebook *c);
extern int vorbis_book_encode(codebook *book, int a, oggpack_buffer *b);
extern int vorbis_book_errorv(codebook *book, float *a);
extern int vorbis_book_encodev(codebook *book, int best,float *a,
extern int vorbis_book_encodev(codebook *book, int best,float *a,
oggpack_buffer *b);
extern long vorbis_book_decode(codebook *book, oggpack_buffer *b);
extern long vorbis_book_decodevs_add(codebook *book, float *a,
extern long vorbis_book_decodevs_add(codebook *book, float *a,
oggpack_buffer *b,int n);
extern long vorbis_book_decodev_set(codebook *book, float *a,
extern long vorbis_book_decodev_set(codebook *book, float *a,
oggpack_buffer *b,int n);
extern long vorbis_book_decodev_add(codebook *book, float *a,
extern long vorbis_book_decodev_add(codebook *book, float *a,
oggpack_buffer *b,int n);
extern long vorbis_book_decodevv_add(codebook *book, float **a,
long off,int ch,
long off,int ch,
oggpack_buffer *b,int n);
......
......@@ -5,7 +5,7 @@
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
......@@ -23,19 +23,19 @@
#define BLOCKTYPE_IMPULSE 0
#define BLOCKTYPE_PADDING 1
#define BLOCKTYPE_TRANSITION 0
#define BLOCKTYPE_TRANSITION 0
#define BLOCKTYPE_LONG 1
#define PACKETBLOBS 15
typedef struct vorbis_block_internal{
float **pcmdelay; /* this is a pointer into local storage */
float **pcmdelay; /* this is a pointer into local storage */
float ampmax;
int blocktype;
oggpack_buffer *packetblob[PACKETBLOBS]; /* initialized, must be freed;
oggpack_buffer *packetblob[PACKETBLOBS]; /* initialized, must be freed;
blob [PACKETBLOBS/2] points to
the oggpack_buffer in the
the oggpack_buffer in the
main vorbis_block */
} vorbis_block_internal;
......@@ -60,7 +60,7 @@ typedef void vorbis_info_mapping;
typedef struct private_state {
/* local lookup storage */
envelope_lookup *ve; /* envelope lookup */
envelope_lookup *ve; /* envelope lookup */
int window[2];
vorbis_look_transform **transform[2]; /* block, type */
drft_lookup fft_look[2];
......@@ -87,7 +87,7 @@ typedef struct private_state {
/* codec_setup_info contains all the setup information specific to the
specific compression/decompression mode in progress (eg,
psychoacoustic settings, channel setup, options, codebook
etc).
etc).
*********************************************************************/
#include "highlevel.h"
......@@ -127,7 +127,7 @@ typedef struct codec_setup_info {
highlevel_encode_setup hi; /* used only by vorbisenc.c. It's a
highly redundant structure, but
improves clarity of program flow. */
int halfrate_flag; /* painless downsample for decode */
int halfrate_flag; /* painless downsample for decode */
} codec_setup_info;
extern vorbis_look_psy_global *_vp_global_look(vorbis_info *vi);
......@@ -139,7 +139,7 @@ typedef struct {
int sorted_index[VIF_POSIT+2];
int forward_index[VIF_POSIT+2];
int reverse_index[VIF_POSIT+2];
int hineighbor[VIF_POSIT];
int loneighbor[VIF_POSIT];
int posts;
......@@ -165,4 +165,3 @@ extern int floor1_encode(oggpack_buffer *opb,vorbis_block *vb,
vorbis_look_floor1 *look,
int *post,int *ilogmask);
#endif
......@@ -5,12 +5,12 @@
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: PCM data envelope analysis
function: PCM data envelope analysis
last mod: $Id$
********************************************************************/
......@@ -67,7 +67,7 @@ void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi){
}
e->band[j].total=1./e->band[j].total;
}
e->filter=_ogg_calloc(VE_BANDS*ch,sizeof(*e->filter));
e->mark=_ogg_calloc(e->storage,sizeof(*e->mark));
......@@ -110,15 +110,15 @@ static int _ve_amp(envelope_lookup *ve,
float penalty=gi->stretch_penalty-(ve->stretch/2-VE_MINSTRETCH);
if(penalty<0.f)penalty=0.f;
if(penalty>gi->stretch_penalty)penalty=gi->stretch_penalty;
/*_analysis_output_always("lpcm",seq2,data,n,0,0,
totalshift+pos*ve->searchstep);*/
/* window and transform */
for(i=0;i<n;i++)
vec[i]=data[i]*ve->mdct_win[i];
mdct_forward(&ve->mdct,vec,vec);
/*_analysis_output_always("mdct",seq2,vec,n/2,0,1,0); */
/* near-DC spreading function; this has nothing to do with
......@@ -144,7 +144,7 @@ static int _ve_amp(envelope_lookup *ve,
if(filters->nearptr>=VE_NEARDC)filters->nearptr=0;
decay=todB(&decay)*.5-15.f;
}
/* perform spreading and limiting, also smooth the spectrum. yes,
the MDCT results in all real coefficients, but it still *behaves*
like real/imaginary pairs */
......@@ -158,7 +158,7 @@ static int _ve_amp(envelope_lookup *ve,
}
/*_analysis_output_always("spread",seq2++,vec,n/4,0,0,0);*/
/* perform preecho/postecho triggering by band */
for(j=0;j<VE_BANDS;j++){
float acc=0.;
......@@ -167,27 +167,27 @@ static int _ve_amp(envelope_lookup *ve,
/* accumulate amplitude */
for(i=0;i<bands[j].end;i++)
acc+=vec[i+bands[j].begin]*bands[j].window[i];
acc*=bands[j].total;
/* convert amplitude to delta */
{
int p,this=filters[j].ampptr;
float postmax,postmin,premax=-99999.f,premin=99999.f;
p=this;
p--;
if(p<0)p+=VE_AMP;
postmax=max(acc,filters[j].ampbuf[p]);
postmin=min(acc,filters[j].ampbuf[p]);
for(i=0;i<stretch;i++){
p--;
if(p<0)p+=VE_AMP;
premax=max(premax,filters[j].ampbuf[p]);
premin=min(premin,filters[j].ampbuf[p]);
}
valmin=postmin-premin;
valmax=postmax-premax;
......@@ -204,7 +204,7 @@ static int _ve_amp(envelope_lookup *ve,
}
if(valmin<gi->postecho_thresh[j]-penalty)ret|=2;
}
return(ret);
}
......@@ -236,7 +236,7 @@ long _ve_envelope_search(vorbis_dsp_state *v){
ve->stretch++;
if(ve->stretch>VE_MAXSTRETCH*2)
ve->stretch=VE_MAXSTRETCH*2;
for(i=0;i<ve->ch;i++){
float *pcm=v->pcm[i]+ve->searchstep*(j);
ret|=_ve_amp(ve,gi,pcm,ve->band,ve->filter+i*VE_BANDS);
......@@ -265,13 +265,13 @@ long _ve_envelope_search(vorbis_dsp_state *v){
ci->blocksizes[v->W]/4+
ci->blocksizes[1]/2+
ci->blocksizes[0]/4;
j=ve->cursor;
while(j<ve->current-(ve->searchstep)){/* account for postecho
working back one window */
if(j>=testW)return(1);
ve->cursor=j;
if(ve->mark[j/ve->searchstep]){
......@@ -291,7 +291,7 @@ long _ve_envelope_search(vorbis_dsp_state *v){
_analysis_output_always("markL",seq,v->pcm[0],j,0,0,totalshift);
_analysis_output_always("markR",seq,v->pcm[1],j,0,0,totalshift);
for(m=0;m<VE_BANDS;m++){
char buf[80];
sprintf(buf,"delL%d",m);
......@@ -308,10 +308,10 @@ long _ve_envelope_search(vorbis_dsp_state *v){
for(l=0;l<last;l++)marker[l*ve->searchstep]=ve->mark[l]*.4;
_analysis_output_always("mark",seq,marker,v->pcm_current,0,0,totalshift);
seq++;
}
#endif
......@@ -323,7 +323,7 @@ long _ve_envelope_search(vorbis_dsp_state *v){
j+=ve->searchstep;
}
}
return(-1);
}
......@@ -359,23 +359,17 @@ void _ve_envelope_shift(envelope_lookup *e,long shift){
int smallshift=shift/e->searchstep;
memmove(e->mark,e->mark+smallshift,(smallsize-smallshift)*sizeof(*e->mark));
#if 0
for(i=0;i<VE_BANDS*e->ch;i++)
memmove(e->filter[i].markers,
e->filter[i].markers+smallshift,
(1024-smallshift)*sizeof(*(*e->filter).markers));
totalshift+=shift;
#endif
#endif
e->current-=shift;
if(e->curmark>=0)
e->curmark-=shift;
e->cursor-=shift;
}
......@@ -5,7 +5,7 @@
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *