X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Fres0.c;h=837f5fdc4512331c834c4cf01f21fd4c3169feca;hb=20104ce7e73d9fc0467e0b16f1d0b614836a4f56;hp=a9499e36c68d369825ccee389bcf800db3c97742;hpb=3f5279bec82ff4d5e27a4904d7bfbb39ddde3173;p=platform%2Fupstream%2Flibvorbis.git diff --git a/lib/res0.c b/lib/res0.c index a9499e3..837f5fd 100644 --- a/lib/res0.c +++ b/lib/res0.c @@ -5,13 +5,13 @@ * 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-2002 * - * by the XIPHOPHORUS Company http://www.xiph.org/ * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 * + * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: residue backend 0, 1 and 2 implementation - last mod: $Id: res0.c,v 1.49 2003/01/18 08:28:37 xiphmont Exp $ + last mod: $Id$ ********************************************************************/ @@ -31,13 +31,16 @@ #include "misc.h" #include "os.h" -#ifdef TRAIN_RES +//#define TRAIN_RES 1 +//#define TRAIN_RESAUX 1 + +#if defined(TRAIN_RES) || defined (TRAIN_RESAUX) #include -#endif +#endif typedef struct { vorbis_info_residue0 *info; - + int parts; int stages; codebook *fullbooks; @@ -51,13 +54,14 @@ typedef struct { long phrasebits; long frames; -#ifdef TRAIN_RES +#if defined(TRAIN_RES) || defined(TRAIN_RESAUX) int train_seq; long *training_data[8][64]; float training_max[8][64]; float training_min[8][64]; float tmin; float tmax; + int submap; #endif } vorbis_look_residue0; @@ -80,58 +84,59 @@ void res0_free_look(vorbis_look_residue *i){ { int j,k,l; for(j=0;jparts;j++){ - /*fprintf(stderr,"partition %d: ",j);*/ - for(k=0;k<8;k++) - if(look->training_data[k][j]){ - char buffer[80]; - FILE *of; - codebook *statebook=look->partbooks[j][k]; - - /* long and short into the same bucket by current convention */ - sprintf(buffer,"res_part%d_pass%d.vqd",j,k); - of=fopen(buffer,"a"); - - for(l=0;lentries;l++) - fprintf(of,"%d:%ld\n",l,look->training_data[k][j][l]); - - fclose(of); - - /*fprintf(stderr,"%d(%.2f|%.2f) ",k, - look->training_min[k][j],look->training_max[k][j]);*/ - - _ogg_free(look->training_data[k][j]); - } - /*fprintf(stderr,"\n");*/ + /*fprintf(stderr,"partition %d: ",j);*/ + for(k=0;k<8;k++) + if(look->training_data[k][j]){ + char buffer[80]; + FILE *of; + codebook *statebook=look->partbooks[j][k]; + + /* long and short into the same bucket by current convention */ + sprintf(buffer,"res_sub%d_part%d_pass%d.vqd",look->submap,j,k); + of=fopen(buffer,"a"); + + for(l=0;lentries;l++) + fprintf(of,"%d:%ld\n",l,look->training_data[k][j][l]); + + fclose(of); + + /*fprintf(stderr,"%d(%.2f|%.2f) ",k, + look->training_min[k][j],look->training_max[k][j]);*/ + + _ogg_free(look->training_data[k][j]); + look->training_data[k][j]=NULL; + } + /*fprintf(stderr,"\n");*/ } } fprintf(stderr,"min/max residue: %g::%g\n",look->tmin,look->tmax); /*fprintf(stderr,"residue bit usage %f:%f (%f total)\n", - (float)look->phrasebits/look->frames, - (float)look->postbits/look->frames, - (float)(look->postbits+look->phrasebits)/look->frames);*/ + (float)look->phrasebits/look->frames, + (float)look->postbits/look->frames, + (float)(look->postbits+look->phrasebits)/look->frames);*/ #endif /*vorbis_info_residue0 *info=look->info; fprintf(stderr, - "%ld frames encoded in %ld phrasebits and %ld residue bits " - "(%g/frame) \n",look->frames,look->phrasebits, - look->resbitsflat, - (look->phrasebits+look->resbitsflat)/(float)look->frames); - + "%ld frames encoded in %ld phrasebits and %ld residue bits " + "(%g/frame) \n",look->frames,look->phrasebits, + look->resbitsflat, + (look->phrasebits+look->resbitsflat)/(float)look->frames); + for(j=0;jparts;j++){ long acc=0; fprintf(stderr,"\t[%d] == ",j); for(k=0;kstages;k++) - if((info->secondstages[j]>>k)&1){ - fprintf(stderr,"%ld,",look->resbits[j][k]); - acc+=look->resbits[j][k]; - } + if((info->secondstages[j]>>k)&1){ + fprintf(stderr,"%ld,",look->resbits[j][k]); + acc+=look->resbits[j][k]; + } fprintf(stderr,":: (%ld vals) %1.2fbits/sample\n",look->resvals[j], - acc?(float)acc/(look->resvals[j]*info->grouping):0); + acc?(float)acc/(look->resvals[j]*info->grouping):0); } fprintf(stderr,"\n");*/ @@ -147,15 +152,6 @@ void res0_free_look(vorbis_look_residue *i){ } } -static int ilog(unsigned int v){ - int ret=0; - while(v){ - ret++; - v>>=1; - } - return(ret); -} - static int icount(unsigned int v){ int ret=0; while(v){ @@ -172,8 +168,8 @@ void res0_pack(vorbis_info_residue *vr,oggpack_buffer *opb){ oggpack_write(opb,info->begin,24); oggpack_write(opb,info->end,24); - oggpack_write(opb,info->grouping-1,24); /* residue vectors to group and - code with a partitioned book */ + oggpack_write(opb,info->grouping-1,24); /* residue vectors to group and + code with a partitioned book */ oggpack_write(opb,info->partitions-1,6); /* possible partition choices */ oggpack_write(opb,info->groupbook,8); /* group huffman book */ @@ -181,11 +177,11 @@ void res0_pack(vorbis_info_residue *vr,oggpack_buffer *opb){ bitmask of one indicates this partition class has bits to write this pass */ for(j=0;jpartitions;j++){ - if(ilog(info->secondstages[j])>3){ + if(ov_ilog(info->secondstages[j])>3){ /* yes, this is a minor hack due to not thinking ahead */ - oggpack_write(opb,info->secondstages[j],3); + oggpack_write(opb,info->secondstages[j],3); oggpack_write(opb,1,1); - oggpack_write(opb,info->secondstages[j]>>3,5); + oggpack_write(opb,info->secondstages[j]>>3,5); }else oggpack_write(opb,info->secondstages[j],4); /* trailing zero */ acc+=icount(info->secondstages[j]); @@ -207,20 +203,52 @@ vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){ info->partitions=oggpack_read(opb,6)+1; info->groupbook=oggpack_read(opb,8); + /* check for premature EOP */ + if(info->groupbook<0)goto errout; + for(j=0;jpartitions;j++){ int cascade=oggpack_read(opb,3); - if(oggpack_read(opb,1)) - cascade|=(oggpack_read(opb,5)<<3); + int cflag=oggpack_read(opb,1); + if(cflag<0) goto errout; + if(cflag){ + int c=oggpack_read(opb,5); + if(c<0) goto errout; + cascade|=(c<<3); + } info->secondstages[j]=cascade; acc+=icount(cascade); } - for(j=0;jbooklist[j]=oggpack_read(opb,8); + for(j=0;jbooklist[j]=book; + } if(info->groupbook>=ci->books)goto errout; - for(j=0;jbooklist[j]>=ci->books)goto errout; + if(ci->book_param[info->booklist[j]]->maptype==0)goto errout; + } + + /* verify the phrasebook is not specifying an impossible or + inconsistent partitioning scheme. */ + /* modify the phrasebook ranging check from r16327; an early beta + encoder had a bug where it used an oversized phrasebook by + accident. These files should continue to be playable, but don't + allow an exploit */ + { + int entries = ci->book_param[info->groupbook]->entries; + int dim = ci->book_param[info->groupbook]->dim; + int partvals = 1; + if (dim<1) goto errout; + while(dim>0){ + partvals *= info->partitions; + if(partvals > entries) goto errout; + dim--; + } + info->partvals = partvals; + } return(info); errout: @@ -229,7 +257,7 @@ vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){ } vorbis_look_residue *res0_look(vorbis_dsp_state *vd, - vorbis_info_residue *vr){ + vorbis_info_residue *vr){ vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; vorbis_look_residue0 *look=_ogg_calloc(1,sizeof(*look)); codec_setup_info *ci=vd->vi->codec_setup; @@ -247,22 +275,25 @@ vorbis_look_residue *res0_look(vorbis_dsp_state *vd, look->partbooks=_ogg_calloc(look->parts,sizeof(*look->partbooks)); for(j=0;jparts;j++){ - int stages=ilog(info->secondstages[j]); + int stages=ov_ilog(info->secondstages[j]); if(stages){ if(stages>maxstage)maxstage=stages; look->partbooks[j]=_ogg_calloc(stages,sizeof(*look->partbooks[j])); for(k=0;ksecondstages[j]&(1<partbooks[j][k]=ci->fullbooks+info->booklist[acc++]; + if(info->secondstages[j]&(1<partbooks[j][k]=ci->fullbooks+info->booklist[acc++]; #ifdef TRAIN_RES - look->training_data[k][j]=calloc(look->partbooks[j][k]->entries, - sizeof(***look->training_data)); + look->training_data[k][j]=_ogg_calloc(look->partbooks[j][k]->entries, + sizeof(***look->training_data)); #endif - } + } } } - look->partvals=rint(pow((float)look->parts,(float)dim)); + look->partvals=1; + for(j=0;jpartvals*=look->parts; + look->stages=maxstage; look->decodemap=_ogg_malloc(look->partvals*sizeof(*look->decodemap)); for(j=0;jpartvals;j++){ @@ -276,7 +307,7 @@ vorbis_look_residue *res0_look(vorbis_dsp_state *vd, look->decodemap[j][k]=deco; } } -#ifdef TRAIN_RES +#if defined(TRAIN_RES) || defined (TRAIN_RESAUX) { static int train_seq=0; look->train_seq=train_seq++; @@ -286,66 +317,77 @@ vorbis_look_residue *res0_look(vorbis_dsp_state *vd, } /* break an abstraction and copy some code for performance purposes */ -static int local_book_besterror(codebook *book,float *a){ - int dim=book->dim,i,k,o; - int best=0; - encode_aux_threshmatch *tt=book->c->thresh_tree; - - /* find the quant val of each scalar */ - for(k=0,o=dim;kthreshvals>>1; - - if(valquantthresh[i]){ - if(valquantthresh[i-1]){ - for(--i;i>0;--i) - if(val>=tt->quantthresh[i-1]) - break; - } - }else{ - - for(++i;ithreshvals-1;++i) - if(valquantthresh[i])break; - +static int local_book_besterror(codebook *book,int *a){ + int dim=book->dim; + int i,j,o; + int minval=book->minval; + int del=book->delta; + int qv=book->quantvals; + int ze=(qv>>1); + int index=0; + /* assumes integer/centered encoder codebook maptype 1 no more than dim 8 */ + int p[8]={0,0,0,0,0,0,0,0}; + + if(del!=1){ + for(i=0,o=dim;i>1))/del; + int m = (v=qv?qv-1:m)); + p[o]=v*del+minval; + } + }else{ + for(i=0,o=dim;i=qv?qv-1:m)); + p[o]=v*del+minval; } - - best=(best*tt->quantvals)+tt->quantmap[i]; } - /* regular lattices are easy :-) */ - - if(book->c->lengthlist[best]<=0){ + + if(book->c->lengthlist[index]<=0){ const static_codebook *c=book->c; - int i,j; - float bestf=0.f; - float *e=book->valuelist; - best=-1; + int best=-1; + /* assumes integer/centered encoder codebook maptype 1 no more than dim 8 */ + int e[8]={0,0,0,0,0,0,0,0}; + int maxval = book->minval + book->delta*(book->quantvals-1); for(i=0;ientries;i++){ if(c->lengthlist[i]>0){ - float this=0.f; - for(j=0;j=maxval) + e[j++]=0; + if(e[j]>=0) + e[j]+=book->delta; + e[j]= -e[j]; } } - { - float *ptr=book->valuelist+best*dim; + if(index>-1){ for(i=0;idim; int step=n/dim; @@ -354,28 +396,28 @@ static int _encodepart(oggpack_buffer *opb,float *vec, int n, int entry=local_book_besterror(book,vec+i*dim); #ifdef TRAIN_RES - acc[entry]++; + if(entry>=0) + acc[entry]++; #endif bits+=vorbis_book_encode(book,entry,opb); + } return(bits); } static long **_01class(vorbis_block *vb,vorbis_look_residue *vl, - float **in,int ch){ + int **in,int ch){ long i,j,k; vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; vorbis_info_residue0 *info=look->info; - vorbis_info *vi=vb->vd->vi; - codec_setup_info *ci=vi->codec_setup; /* move all this setup out later */ int samples_per_partition=info->grouping; int possible_partitions=info->partitions; int n=info->end-info->begin; - + int partvals=n/samples_per_partition; long **partword=_vorbis_block_alloc(vb,ch*sizeof(*partword)); float scale=100./samples_per_partition; @@ -383,29 +425,29 @@ static long **_01class(vorbis_block *vb,vorbis_look_residue *vl, /* we find the partition type for each partition of each channel. We'll go back and do the interleaved encoding in a bit. For now, clarity */ - + for(i=0;ibegin; for(j=0;jmax)max=fabs(in[j][offset+k]); - ent+=fabs(rint(in[j][offset+k])); + if(abs(in[j][offset+k])>max)max=abs(in[j][offset+k]); + ent+=abs(in[j][offset+k]); } ent*=scale; - + for(k=0;kclassmetric1[k] && - (info->classmetric2[k]<0 || (int)entclassmetric2[k])) - break; - - partword[j][i]=k; + if(max<=info->classmetric1[k] && + (info->classmetric2[k]<0 || entclassmetric2[k])) + break; + + partword[j][i]=k; } } @@ -413,12 +455,12 @@ static long **_01class(vorbis_block *vb,vorbis_look_residue *vl, { FILE *of; char buffer[80]; - + for(i=0;itrain_seq); of=fopen(buffer,"a"); for(j=0;jinfo; @@ -446,33 +488,33 @@ static long **_2class(vorbis_block *vb,vorbis_look_residue *vl,float **in, int partvals=n/samples_per_partition; long **partword=_vorbis_block_alloc(vb,sizeof(*partword)); -#ifdef TRAIN_RES +#if defined(TRAIN_RES) || defined (TRAIN_RESAUX) FILE *of; char buffer[80]; #endif - - partword[0]=_vorbis_block_alloc(vb,n*ch/samples_per_partition*sizeof(*partword[0])); - memset(partword[0],0,n*ch/samples_per_partition*sizeof(*partword[0])); + + partword[0]=_vorbis_block_alloc(vb,partvals*sizeof(*partword[0])); + memset(partword[0],0,partvals*sizeof(*partword[0])); for(i=0,l=info->begin/ch;imagmax)magmax=fabs(in[0][l]); + if(abs(in[0][l])>magmax)magmax=abs(in[0][l]); for(k=1;kangmax)angmax=fabs(in[k][l]); + if(abs(in[k][l])>angmax)angmax=abs(in[k][l]); l++; } for(j=0;jclassmetric1[j] && - angmax<=info->classmetric2[j]) - break; + angmax<=info->classmetric2[j]) + break; partword[0][i]=j; - } - + } + #ifdef TRAIN_RESAUX sprintf(buffer,"resaux_%d.vqd",look->train_seq); of=fopen(buffer,"a"); @@ -487,16 +529,26 @@ static long **_2class(vorbis_block *vb,vorbis_look_residue *vl,float **in, return(partword); } -static int _01forward(vorbis_block *vb,vorbis_look_residue *vl, - float **in,int ch, - long **partword, - int (*encode)(oggpack_buffer *,float *,int, - codebook *,long *)){ +static int _01forward(oggpack_buffer *opb, + vorbis_look_residue *vl, + int **in,int ch, + long **partword, +#ifdef TRAIN_RES + int (*encode)(oggpack_buffer *,int *,int, + codebook *,long *), + int submap +#else + int (*encode)(oggpack_buffer *,int *,int, + codebook *) +#endif +){ long i,j,k,s; vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; vorbis_info_residue0 *info=look->info; - vorbis_dsp_state *vd=vb->vd; +#ifdef TRAIN_RES + look->submap=submap; +#endif /* move all this setup out later */ int samples_per_partition=info->grouping; @@ -518,7 +570,7 @@ static int _01forward(vorbis_block *vb,vorbis_look_residue *vl, memset(resbits,0,sizeof(resbits)); memset(resvals,0,sizeof(resvals)); - + /* we code the partition words for each channel, then the residual words for a partition per channel until we've written all the residual words for that partition word. Then write the next @@ -530,83 +582,72 @@ static int _01forward(vorbis_block *vb,vorbis_look_residue *vl, /* first we encode a partition codeword for each channel */ if(s==0){ - for(j=0;jphrasebook->entries) - look->phrasebits+=vorbis_book_encode(look->phrasebook,val,&vb->opb); + for(j=0;jphrasebook->entries) + look->phrasebits+=vorbis_book_encode(look->phrasebook,val,opb); #if 0 /*def TRAIN_RES*/ - else - fprintf(stderr,"!"); + else + fprintf(stderr,"!"); #endif - - } + + } } - + /* now we encode interleaved residual values for the partitions */ for(k=0;kbegin; - - for(j=0;jsecondstages[partword[j][i]]&(1<partbooks[partword[j][i]][s]; - if(statebook){ - int ret; - long *accumulator=NULL; - + long offset=i*samples_per_partition+info->begin; + + for(j=0;jsecondstages[partword[j][i]]&(1<partbooks[partword[j][i]][s]; + if(statebook){ + int ret; #ifdef TRAIN_RES - accumulator=look->training_data[s][partword[j][i]]; - { - int l; - float *samples=in[j]+offset; - for(l=0;ltraining_min[s][partword[j][i]]) - look->training_min[s][partword[j][i]]=samples[l]; - if(samples[l]>look->training_max[s][partword[j][i]]) - look->training_max[s][partword[j][i]]=samples[l]; - } - } + long *accumulator=NULL; + accumulator=look->training_data[s][partword[j][i]]; + { + int l; + int *samples=in[j]+offset; + for(l=0;ltraining_min[s][partword[j][i]]) + look->training_min[s][partword[j][i]]=samples[l]; + if(samples[l]>look->training_max[s][partword[j][i]]) + look->training_max[s][partword[j][i]]=samples[l]; + } + } + ret=encode(opb,in[j]+offset,samples_per_partition, + statebook,accumulator); +#else + ret=encode(opb,in[j]+offset,samples_per_partition, + statebook); #endif - - ret=encode(&vb->opb,in[j]+offset,samples_per_partition, - statebook,accumulator); - - look->postbits+=ret; - resbits[partword[j][i]]+=ret; - } - } - } + + look->postbits+=ret; + resbits[partword[j][i]]+=ret; + } + } + } } } } - /*{ - long total=0; - long totalbits=0; - fprintf(stderr,"%d :: ",vb->mode); - for(k=0;kgrouping; int partitions_per_word=look->phrasebook->dim; - int n=info->end-info->begin; - - int partvals=n/samples_per_partition; - int partwords=(partvals+partitions_per_word-1)/partitions_per_word; - int ***partword=alloca(ch*sizeof(*partword)); - - for(j=0;jstages;s++){ - - /* each loop decodes on partition codeword containing - partitions_pre_word partitions */ - for(i=0,l=0;iphrasebook,&vb->opb); - if(temp==-1)goto eopbreak; - partword[j][l]=look->decodemap[temp]; - if(partword[j][l]==NULL)goto errout; - } + int max=vb->pcmend>>1; + int end=(info->endend:max); + int n=end-info->begin; + + if(n>0){ + int partvals=n/samples_per_partition; + int partwords=(partvals+partitions_per_word-1)/partitions_per_word; + int ***partword=alloca(ch*sizeof(*partword)); + + for(j=0;jstages;s++){ + + /* each loop decodes on partition codeword containing + partitions_per_word partitions */ + for(i=0,l=0;iphrasebook,&vb->opb); + + if(temp==-1 || temp>=info->partvals)goto eopbreak; + partword[j][l]=look->decodemap[temp]; + if(partword[j][l]==NULL)goto errout; + } + } + + /* now we decode residual values for the partitions */ + for(k=0;kbegin+i*samples_per_partition; + if(info->secondstages[partword[j][l][k]]&(1<partbooks[partword[j][l][k]][s]; + if(stagebook){ + if(decodepart(stagebook,in[j]+offset,&vb->opb, + samples_per_partition)==-1)goto eopbreak; + } + } + } } - - /* now we decode residual values for the partitions */ - for(k=0;kbegin+i*samples_per_partition; - if(info->secondstages[partword[j][l][k]]&(1<partbooks[partword[j][l][k]][s]; - if(stagebook){ - if(decodepart(stagebook,in[j]+offset,&vb->opb, - samples_per_partition)==-1)goto eopbreak; - } - } - } - } + } } - errout: eopbreak: return(0); } -#if 0 -/* residue 0 and 1 are just slight variants of one another. 0 is - interleaved, 1 is not */ -long **res0_class(vorbis_block *vb,vorbis_look_residue *vl, - float **in,int *nonzero,int ch){ - /* we encode only the nonzero parts of a bundle */ - int i,used=0; - for(i=0;ipcmend/2; - for(i=0;ipcmend/2; +int res1_forward(oggpack_buffer *opb,vorbis_block *vb,vorbis_look_residue *vl, + int **in,int *nonzero,int ch, long **partword, int submap){ + int i,used=0; + (void)vb; for(i=0;ipcmend/2,used=0; /* don't duplicate the code; use a working vector hack for now and reshape ourselves into a single channel res1 */ /* ugly; reallocs for each coupling pass :-( */ - float *work=_vorbis_block_alloc(vb,ch*n*sizeof(*work)); + int *work=_vorbis_block_alloc(vb,ch*n*sizeof(*work)); for(i=0;iinfo; @@ -830,48 +812,51 @@ int res2_inverse(vorbis_block *vb,vorbis_look_residue *vl, /* move all this setup out later */ int samples_per_partition=info->grouping; int partitions_per_word=look->phrasebook->dim; - int n=info->end-info->begin; - - int partvals=n/samples_per_partition; - int partwords=(partvals+partitions_per_word-1)/partitions_per_word; - int **partword=_vorbis_block_alloc(vb,partwords*sizeof(*partword)); - - for(i=0;istages;s++){ - for(i=0,l=0;iphrasebook,&vb->opb); - if(temp==-1)goto eopbreak; - partword[l]=look->decodemap[temp]; - if(partword[l]==NULL)goto errout; + int max=(vb->pcmend*ch)>>1; + int end=(info->endend:max); + int n=end-info->begin; + + if(n>0){ + int partvals=n/samples_per_partition; + int partwords=(partvals+partitions_per_word-1)/partitions_per_word; + int **partword=_vorbis_block_alloc(vb,partwords*sizeof(*partword)); + + for(i=0;istages;s++){ + for(i=0,l=0;iphrasebook,&vb->opb); + if(temp==-1 || temp>=info->partvals)goto eopbreak; + partword[l]=look->decodemap[temp]; + if(partword[l]==NULL)goto errout; + } + + /* now we decode residual values for the partitions */ + for(k=0;ksecondstages[partword[l][k]]&(1<partbooks[partword[l][k]][s]; + + if(stagebook){ + if(vorbis_book_decodevv_add(stagebook,in, + i*samples_per_partition+info->begin,ch, + &vb->opb,samples_per_partition)==-1) + goto eopbreak; + } + } } - - /* now we decode residual values for the partitions */ - for(k=0;ksecondstages[partword[l][k]]&(1<partbooks[partword[l][k]][s]; - - if(stagebook){ - if(vorbis_book_decodevv_add(stagebook,in, - i*samples_per_partition+info->begin,ch, - &vb->opb,samples_per_partition)==-1) - goto eopbreak; - } - } - } + } } - errout: eopbreak: return(0); } -vorbis_func_residue residue0_exportbundle={ +const vorbis_func_residue residue0_exportbundle={ NULL, &res0_unpack, &res0_look, @@ -882,7 +867,7 @@ vorbis_func_residue residue0_exportbundle={ &res0_inverse }; -vorbis_func_residue residue1_exportbundle={ +const vorbis_func_residue residue1_exportbundle={ &res0_pack, &res0_unpack, &res0_look, @@ -893,7 +878,7 @@ vorbis_func_residue residue1_exportbundle={ &res1_inverse }; -vorbis_func_residue residue2_exportbundle={ +const vorbis_func_residue residue2_exportbundle={ &res0_pack, &res0_unpack, &res0_look, @@ -903,4 +888,3 @@ vorbis_func_residue residue2_exportbundle={ &res2_forward, &res2_inverse }; -