diff options
author | David Conrad <lessen42@gmail.com> | 2010-06-04 22:40:40 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2010-06-04 22:40:40 +0000 |
commit | 57ebbccf9ca6aa6b8c0708d8b85d8f9d3ba6f813 (patch) | |
tree | a0a1d78fca37272de6a04cfe812c7a00cf45bda8 | |
parent | ed638b5c4bbf867986f82a6fa29a8deb52e20a27 (diff) | |
download | ffmpeg-57ebbccf9ca6aa6b8c0708d8b85d8f9d3ba6f813.tar.gz |
libvorbis: Disable strict bitrate management when not requested
This is 3 times faster in a quick benchmark
Originally committed as revision 23471 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/libvorbis.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c index cc9b2f202c..f9a1b32995 100644 --- a/libavcodec/libvorbis.c +++ b/libavcodec/libvorbis.c @@ -68,11 +68,10 @@ static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avcco 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 */ |