Commit 230c1a90 authored by Nathan Caldwell's avatar Nathan Caldwell Committed by Martin Storsjö

aacenc: Finish 3GPP psymodel analysis for non mid/side cases.

There is still are still a few sections missing relating to TNS (not present)
and mid/side (contains other bugs).

Overall this improves quality, and vastly improves rate-control.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent cfc2a0cf
......@@ -606,8 +606,10 @@ static int aac_encode_frame(AVCodecContext *avctx,
}
frame_bits = put_bits_count(&s->pb);
if (frame_bits <= 6144 * avctx->channels - 3)
if (frame_bits <= 6144 * avctx->channels - 3) {
s->psy.bitres.bits = frame_bits / avctx->channels;
break;
}
s->lambda *= avctx->bit_rate * 1024.0f / avctx->sample_rate / frame_bits;
......
This diff is collapsed.
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