mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-26 00:31:12 +00:00
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>
This commit is contained in:
parent
02923b8c78
commit
dfcf910569
@ -713,7 +713,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
|
|||||||
const float lambda)
|
const float lambda)
|
||||||
{
|
{
|
||||||
int start = 0, i, w, w2, g;
|
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 dists[128], uplims[128];
|
||||||
float maxvals[128];
|
float maxvals[128];
|
||||||
int fflag, minscaler;
|
int fflag, minscaler;
|
||||||
|
Loading…
Reference in New Issue
Block a user