diff options
author | Claudio Freire <klaussfreire@gmail.com> | 2013-05-04 18:36:37 -0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-05-14 12:42:04 +0300 |
commit | f4d0a63b5b5c682c18df3bba730f97a9067408ba (patch) | |
tree | dcf3c84f072017f44cf4b54fed1cc98a05fa87a5 | |
parent | 7c71ada4cad3c6aab5fa24155c379465c41cfd76 (diff) | |
download | ffmpeg-streaming-f4d0a63b5b5c682c18df3bba730f97a9067408ba.zip ffmpeg-streaming-f4d0a63b5b5c682c18df3bba730f97a9067408ba.tar.gz |
aacenc: Fix target bitrate for twoloop quantiser search
This fixes a case where multichannel bitrate isn't accurately
targetted by psy model alone, never achieving the target bitrate.
Signed-off-by: Martin Storsjö <martin@martin.st>
-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 d65d8d9..35b98a9 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -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; |