diff options
author | Monty <xiphmont@xiph.org> | 2000-02-13 11:53:48 +0000 |
---|---|---|
committer | Monty <xiphmont@xiph.org> | 2000-02-13 11:53:48 +0000 |
commit | 83b7555a25abd4479770d4d8b16508c8586d882f (patch) | |
tree | 934f1661e7799129a2e16416c0f2ffe96ca319f9 | |
parent | eaf29d90e892dde843bad47ea5f579abf6bda8d5 (diff) | |
download | libvorbis-git-83b7555a25abd4479770d4d8b16508c8586d882f.tar.gz |
a little bughunting
svn path=/trunk/vorbis/; revision=260
-rw-r--r-- | lib/mapping0.c | 16 | ||||
-rw-r--r-- | lib/res0.c | 6 |
2 files changed, 13 insertions, 9 deletions
diff --git a/lib/mapping0.c b/lib/mapping0.c index df36ce50..5a1eb748 100644 --- a/lib/mapping0.c +++ b/lib/mapping0.c @@ -12,7 +12,7 @@ ******************************************************************** 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 $ ********************************************************************/ @@ -228,15 +228,16 @@ static int forward(vorbis_block *vb,vorbis_look_mapping *l){ _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"); @@ -253,6 +254,9 @@ static int forward(vorbis_block *vb,vorbis_look_mapping *l){ } #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 @@ -263,7 +267,7 @@ static int forward(vorbis_block *vb,vorbis_look_mapping *l){ 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]; } } @@ -12,7 +12,7 @@ ******************************************************************** 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 $ ********************************************************************/ @@ -114,7 +114,7 @@ int forward(vorbis_block *vb,vorbis_look_residue *l, 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); } @@ -122,7 +122,7 @@ int inverse(vorbis_block *vb,vorbis_look_residue *l,double **in,int ch){ 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); } |