History

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.

Claudio Freire committed 13 years ago

Commit 1ef82cc1 parent c5458761 file · +1 −1Browse files

Showing the changes to libavcodec/aaccoder.c (1 of 1 file). Show all

Unified · Split

libavcodec/aaccoder.c+1−1
@@ -710,7 +710,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx, · 709 unmodified lines
710710 const float lambda)
711711 {
712712 int start = 0, i, w, w2, g;
713− int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / avctx->channels;
713+ int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / avctx->channels * (lambda / 120.f);
714714 float dists[128] = { 0 }, uplims[128];
715715 float maxvals[128];
716716 int fflag, minscaler;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t