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:35:06 +0200 |
commit | dfcf910569e7a44ff26cdcf5a9913de51847c7d2 (patch) | |
tree | e76f3c1467f1c0305c772d6954384868e8166ad7 | |
parent | 02923b8c781c4f52b3f6b4f3e541d7cec187035c (diff) | |
download | ffmpeg-dfcf910569e7a44ff26cdcf5a9913de51847c7d2.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>
Conflicts:
libavcodec/aaccoder.c
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 8738460b81..4d642aea95 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], uplims[128]; float maxvals[128]; int fflag, minscaler; |