[xiph-commits] r9032 - trunk/vorbis/lib

msmith at motherfish-iii.xiph.org msmith at motherfish-iii.xiph.org
Thu Mar 3 20:18:57 PST 2005


Author: msmith
Date: 2005-03-03 20:18:55 -0800 (Thu, 03 Mar 2005)
New Revision: 9032

Modified:
   trunk/vorbis/lib/vorbisenc.c
Log:
highlevel_encode_setup.bitrate_av is in bps, 
struct ovectl_ratemanage2_arg.bitrate_average_kbps is obviously in kbps. 
So convert when reading/writing the latter (public) struct.


Modified: trunk/vorbis/lib/vorbisenc.c
===================================================================
--- trunk/vorbis/lib/vorbisenc.c	2005-03-03 22:59:16 UTC (rev 9031)
+++ trunk/vorbis/lib/vorbisenc.c	2005-03-04 04:18:55 UTC (rev 9032)
@@ -1093,7 +1093,7 @@
 	ai->management_active=hi->managed;
 	ai->bitrate_limit_min_kbps=hi->bitrate_min;
 	ai->bitrate_limit_max_kbps=hi->bitrate_max;
-	ai->bitrate_average_kbps=hi->bitrate_av;
+	ai->bitrate_average_kbps=hi->bitrate_av/1000;
 	ai->bitrate_average_damping=hi->bitrate_av_damp;
 	ai->bitrate_limit_reservoir_bits=hi->bitrate_reservoir;
 	ai->bitrate_limit_reservoir_bias=hi->bitrate_reservoir_bias;
@@ -1137,7 +1137,7 @@
 	  hi->managed=ai->management_active;
 	  hi->bitrate_min=ai->bitrate_limit_min_kbps;
 	  hi->bitrate_max=ai->bitrate_limit_max_kbps;
-	  hi->bitrate_av=ai->bitrate_average_kbps;
+	  hi->bitrate_av=ai->bitrate_average_kbps * 1000;
 	  hi->bitrate_av_damp=ai->bitrate_average_damping;
 	  hi->bitrate_reservoir=ai->bitrate_limit_reservoir_bits;
 	  hi->bitrate_reservoir_bias=ai->bitrate_limit_reservoir_bias;



More information about the commits mailing list