********************************************************************
function: channel mapping 0 implementation
- last mod: $Id: mapping0.c,v 1.9 2000/02/12 08:33:06 xiphmont Exp $
+ last mod: $Id: mapping0.c,v 1.10 2000/02/13 11:53:46 xiphmont Exp $
********************************************************************/
_vp_mask_floor(look->psy_look+submap,pcm,mask,1);
/* perform floor encoding; takes transform floor, returns decoded floor */
+ /* nonzero[i]=look->floor_func[submap]->
+ forward(vb,look->floor_look[submap],floor,decfloor);*/
nonzero[i]=look->floor_func[submap]->
- forward(vb,look->floor_look[submap],floor,decfloor);
-
- /* no iterative residue/floor tuning at the moment */
-
+ forward(vb,look->floor_look[submap],mask,decfloor);
+
#ifdef TRAIN
if(nonzero[i]){
FILE *of;
char buffer[80];
+ int i;
sprintf(buffer,"masked_%d.vqd",vb->mode);
of=fopen(buffer,"a");
}
#endif
+ /* no iterative residue/floor tuning at the moment */
+ if(nonzero[i])for(j=0;j<n/2;j++)pcm[j]/=decfloor[j];
+
}
/* perform residue encoding with residue mapping; this is
int ch_in_bundle=0;
for(j=0;j<vi->channels;j++){
if(map->chmuxlist[j]==i && nonzero[j]==1){
- pcmbundle[ch_in_bundle]=vb->pcm[j];
+ pcmbundle[ch_in_bundle++]=vb->pcm[j];
}
}
********************************************************************
function: residue backend 0 implementation
- last mod: $Id: res0.c,v 1.5 2000/02/12 08:33:09 xiphmont Exp $
+ last mod: $Id: res0.c,v 1.6 2000/02/13 11:53:48 xiphmont Exp $
********************************************************************/
vorbis_info_residue0 *info=look->info;
for(i=0;i<ch;i++)
for(j=0;j<vb->pcmend/2;j++)
- _oggpack_write(&vb->opb,rint(in[i][j])+16,5);
+ _oggpack_write(&vb->opb,rint(in[i][j])+32,6);
return(0);
}
long i,j;
for(i=0;i<ch;i++)
for(j=0;j<vb->pcmend/2;j++)
- in[i][j]*=_oggpack_read(&vb->opb,5)-16;
+ in[i][j]*=_oggpack_read(&vb->opb,6)-32;
return(0);
}