comparison libvorbis.c @ 11829:582c0687fc63 libavcodec

libvorbis: Disable strict bitrate management when not requested This is 3 times faster in a quick benchmark
author conrad
date Fri, 04 Jun 2010 22:40:40 +0000
parents 474766be9e4d
children 6a09fc06317a
comparison
equal deleted inserted replaced
11828:474766be9e4d 11829:582c0687fc63
66 /* constant bitrate */ 66 /* constant bitrate */
67 if(vorbis_encode_setup_managed(vi, avccontext->channels, 67 if(vorbis_encode_setup_managed(vi, avccontext->channels,
68 avccontext->sample_rate, minrate, avccontext->bit_rate, maxrate)) 68 avccontext->sample_rate, minrate, avccontext->bit_rate, maxrate))
69 return -1; 69 return -1;
70 70
71 #ifdef OGGVORBIS_VBR_BY_ESTIMATE 71 /* variable bitrate by estimate, disable slow rate management */
72 /* variable bitrate by estimate */ 72 if(minrate == -1 && maxrate == -1)
73 if(vorbis_encode_ctl(vi, OV_ECTL_RATEMANAGE2_SET, NULL)) 73 if(vorbis_encode_ctl(vi, OV_ECTL_RATEMANAGE2_SET, NULL))
74 return -1; 74 return -1;
75 #endif
76 } 75 }
77 76
78 /* cutoff frequency */ 77 /* cutoff frequency */
79 if(avccontext->cutoff > 0) { 78 if(avccontext->cutoff > 0) {
80 cfreq = avccontext->cutoff / 1000.0; 79 cfreq = avccontext->cutoff / 1000.0;