Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Freire <klaussfreire@gmail.com>2013-05-05 01:36:37 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-05-05 06:19:34 +0400
commit1ef82cc60d3bc050ea4cbdabe530499da8dce3bf (patch)
tree05f150d1edff9fbd65e9d04247896ed31460fae1
parentc545876d1bcf0f91ab7a2b73a7e9c19057e1a5bd (diff)
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: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/aaccoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index 994de286c9..45fbc2dedf 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;