From c8dcb9dee1c5f337dc97f805eb868207064252e9 Mon Sep 17 00:00:00 2001 From: Nathan Caldwell Date: Wed, 27 Oct 2010 06:36:47 +0000 Subject: [PATCH] aacenc: Remove energy 'normalization' modification from the 3GPP psymodel This greatly improves bitrate handling. You will now get within a few kbps of your requested bitrate instead of 20-40kbps higher. There is absolutely no analog to this line in the 3GPP spec, that I can find. patch by Nathan Caldwell saintdev (at) gmail Originally committed as revision 25589 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/aacpsy.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c index 77eebb92d78..a3618ce57f9 100644 --- a/libavcodec/aacpsy.c +++ b/libavcodec/aacpsy.c @@ -404,7 +404,6 @@ static void psy_3gpp_analyze(FFPsyContext *ctx, int channel, band->energy = 0.0f; for (i = 0; i < band_sizes[g]; i++) band->energy += coefs[start+i] * coefs[start+i]; - band->energy *= 1.0f / (512*512); band->thr = band->energy * 0.001258925f; start += band_sizes[g]; -- 2.39.5