diff options
author | Monty <xiphmont@xiph.org> | 2001-10-22 09:09:29 +0000 |
---|---|---|
committer | Monty <xiphmont@xiph.org> | 2001-10-22 09:09:29 +0000 |
commit | 7784ba9b2097d569dd0d02add124186d0c5f42fc (patch) | |
tree | 8a8019e646c02983579f920fa4a45181b7e2493f | |
parent | f12aff7faf067529a53bd4334dc6db96f991e15e (diff) | |
download | libvorbis-git-7784ba9b2097d569dd0d02add124186d0c5f42fc.tar.gz |
Found one straggler that was killing bitrate tracking at even
iteration boundaries
svn path=/branches/branch_monty_20011009/vorbis/; revision=2253
-rw-r--r-- | lib/mapping0.c | 12 | ||||
-rw-r--r-- | lib/res0.c | 11 |
2 files changed, 9 insertions, 14 deletions
diff --git a/lib/mapping0.c b/lib/mapping0.c index 06e6f8ca..8d69bdca 100644 --- a/lib/mapping0.c +++ b/lib/mapping0.c @@ -11,7 +11,7 @@ ******************************************************************** function: channel mapping 0 implementation - last mod: $Id: mapping0.c,v 1.37.2.5 2001/10/20 03:00:10 xiphmont Exp $ + last mod: $Id: mapping0.c,v 1.37.2.6 2001/10/22 09:09:29 xiphmont Exp $ ********************************************************************/ @@ -651,15 +651,15 @@ static int mapping0_forward(vorbis_block *vb,vorbis_look_mapping *l){ qbundle[j],sobundle[j],zerobundle[j],chbundle[j], i,classifications[j],b->bitrate_avgfloat,queueptr); } - i++; - } - + i++; + + /* bitrate management.... deciding when it's time to stop. */ if(i<quant_passes){ if(b->bitrate_bins==0){ /* average bitrate always runs - encode to the bitter end in - order to collect statistics */ + encode to the bitter end in + order to collect statistics */ long current_bytes=oggpack_bits(&vb->opb)/8; @@ -11,7 +11,7 @@ ******************************************************************** function: residue backend 0, 1 and 2 implementation - last mod: $Id: res0.c,v 1.37.2.5 2001/10/20 01:03:59 xiphmont Exp $ + last mod: $Id: res0.c,v 1.37.2.6 2001/10/22 09:09:29 xiphmont Exp $ ********************************************************************/ @@ -511,13 +511,8 @@ static int _01forward(vorbis_block *vb,vorbis_look_residue *vl, } #endif - if((int)passlimit<ci->passlimit[pass]){ - wholepasses=passlimit; - partialpass=rint((passlimit-wholepasses)*partvals); - }else{ - wholepasses=ci->passlimit[pass]; - partialpass=0; - } + wholepasses=passlimit; + partialpass=(passlimit-wholepasses)*partvals; memset(resbits,0,sizeof(resbits)); memset(resvals,0,sizeof(resvals)); |