diff options
author | Claudio Freire <klaussfreire@gmail.com> | 2013-05-04 18:36:37 -0300 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-06-02 16:28:35 +0200 |
commit | be66531ee27cce11b3baa9c7be3e3fb2f89fe6af (patch) | |
tree | 83f4cf679664e395c5a7028ce8c2f290aeabaab6 | |
parent | d70043ea0f47cd83244118c0e5b8338e39829178 (diff) | |
download | ffmpeg-be66531ee27cce11b3baa9c7be3e3fb2f89fe6af.tar.gz |
AAC encoder: Fix rate control on twoloop.
Fixes a case where multichannel bitrate isn't accurately
targetted by psy model alone, never achieving the target bitrate.
Now fixed.
Fixes ticket #2625.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
-rw-r--r-- | libavcodec/aaccoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index e66dcb8405..417c457cc6 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -713,7 +713,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx, const float lambda) { int start = 0, i, w, w2, g; - int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / avctx->channels; + int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / avctx->channels * (lambda / 120.f); float dists[128] = { 0 }, uplims[128]; float maxvals[128]; int fflag, minscaler; |