Commit 1ef82cc6 authored by Claudio Freire's avatar Claudio Freire Committed by Michael Niedermayer

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.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c545876d
......@@ -710,7 +710,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment