[xiph-cvs] cvs commit: vorbis/lib bitrate.c
Monty
xiphmont at xiph.org
Tue Jun 25 20:28:27 PDT 2002
xiphmont 02/06/25 20:28:26
Modified: lib Tag: branch_monty_20020507 bitrate.c
Log:
killed an unintentional corner case in floater_interpolate that could
cause it to guess high.
Monty
Revision Changes Path
No revision
<p>No revision
<p>1.11.4.4 +12 -7 vorbis/lib/bitrate.c
Index: bitrate.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/bitrate.c,v
retrieving revision 1.11.4.3
retrieving revision 1.11.4.4
diff -u -r1.11.4.3 -r1.11.4.4
--- bitrate.c 2002/06/26 00:37:37 1.11.4.3
+++ bitrate.c 2002/06/26 03:28:25 1.11.4.4
@@ -11,7 +11,7 @@
********************************************************************
function: bitrate tracking and management
- last mod: $Id: bitrate.c,v 1.11.4.3 2002/06/26 00:37:37 xiphmont Exp $
+ last mod: $Id: bitrate.c,v 1.11.4.4 2002/06/26 03:28:25 xiphmont Exp $
********************************************************************/
@@ -53,12 +53,7 @@
if(bin+1<bm->queue_bins){
hibitrate=(double)(bm->avg_binacc[bin+1]*8)/bm->avg_sampleacc*vi->rate;
- while(bin+1<bm->queue_bins &&
- fabs(hibitrate-desired_rate) < fabs(lobitrate-desired_rate)){
- bin++;
- if(bin+1<bm->queue_bins)
- hibitrate=(double)(bm->avg_binacc[bin+1]*8)/bm->avg_sampleacc*vi->rate;
- }
+ if(fabs(hibitrate-desired_rate) < fabs(lobitrate-desired_rate))bin++;
}
return(bin);
}
@@ -303,6 +298,16 @@
bm->avg_sampleacc*vi->rate;
fprintf(stderr,"upper:%f lower:%f float: %f, bitrate=%f\n",
upper,lower,new,bitrate);
+
+ fprintf(stderr," 8:%.0f %.0f 9:%.0f 10:%.0f 11:%.0f 12:%.0f 13:%.0f 14:%.0f\n",
+ (bm->avg_binacc[7]*8.)/bm->avg_sampleacc*vi->rate,
+ (bm->avg_binacc[8]*8.)/bm->avg_sampleacc*vi->rate,
+ (bm->avg_binacc[9]*8.)/bm->avg_sampleacc*vi->rate,
+ (bm->avg_binacc[10]*8.)/bm->avg_sampleacc*vi->rate,
+ (bm->avg_binacc[11]*8.)/bm->avg_sampleacc*vi->rate,
+ (bm->avg_binacc[12]*8.)/bm->avg_sampleacc*vi->rate,
+ (bm->avg_binacc[13]*8.)/bm->avg_sampleacc*vi->rate,
+ (bm->avg_binacc[14]*8.)/bm->avg_sampleacc*vi->rate);
}
<p><p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list