[FFmpeg-cvslog] r23471 - trunk/libavcodec/libvorbis.c

conrad subversion
Sat Jun 5 00:40:40 CEST 2010


Author: conrad
Date: Sat Jun  5 00:40:40 2010
New Revision: 23471

Log:
libvorbis: Disable strict bitrate management when not requested

This is 3 times faster in a quick benchmark

Modified:
   trunk/libavcodec/libvorbis.c

Modified: trunk/libavcodec/libvorbis.c
==============================================================================
--- trunk/libavcodec/libvorbis.c	Sat Jun  5 00:40:36 2010	(r23470)
+++ trunk/libavcodec/libvorbis.c	Sat Jun  5 00:40:40 2010	(r23471)
@@ -68,11 +68,10 @@ static av_cold int oggvorbis_init_encode
                 avccontext->sample_rate, minrate, avccontext->bit_rate, maxrate))
             return -1;
 
-#ifdef OGGVORBIS_VBR_BY_ESTIMATE
-        /* variable bitrate by estimate */
-        if(vorbis_encode_ctl(vi, OV_ECTL_RATEMANAGE2_SET, NULL))
-            return -1;
-#endif
+        /* variable bitrate by estimate, disable slow rate management */
+        if(minrate == -1 && maxrate == -1)
+            if(vorbis_encode_ctl(vi, OV_ECTL_RATEMANAGE2_SET, NULL))
+                return -1;
     }
 
     /* cutoff frequency */



More information about the ffmpeg-cvslog mailing list