[FFmpeg-devel] [PATCH] aacenc: Correct spreading calculation in the 3GPP psymodel.

Alex Converse alex.converse
Mon Nov 1 08:46:25 CET 2010

On Sun, Oct 31, 2010 at 7:32 PM, Nathan Caldwell <saintdev at gmail.com> wrote:
> On Sun, Oct 31, 2010 at 12:09 AM, Nathan Caldwell <saintdev at gmail.com> wrote:
>> On Sat, Oct 30, 2010 at 3:27 PM, Nathan Caldwell <saintdev at gmail.com> wrote:
>>> Spreading is currently being calculated incorrectly. We were
>>> multiplying the previous band
>>> threshold by the lower spreading factor, and the next band by the
>>> higher spreading
>>> factor. Also, the first spreading loop was using the spreading factor for the
>>> previous band, instead of the spreading factor for the current band.
>>> I've found this fix to be most noticeable in the Tom's Diner sample.
>>> ---
>>> ?libavcodec/aacpsy.c | ? ?4 ++--
>>> ?1 files changed, 2 insertions(+), 2 deletions(-)
>> I'm not so sure this is correct now. The constants for calculating the
>> spreading factors seem to be reversed from what they should be (which
>> I hadn't noticed). So it appears what we are currently doing is
>> correct. I think I may need to do more investigation on this, because
>> it did noticeably help the Tom's Diner sample.
> The attached patches should (somewhat) clear this up. The first is
> purely cosmetic, just clearing up some naming.


> The second patch is where the quality improvement comes from. It seems
> the assumption that we want to calculate upward spreading using the
> Bark-width between the previous band, and the current band is
> incorrect. I don't completely understand why this is. The commit
> message has a little longer explanation.

Committed with spell checked commit message

More information about the ffmpeg-devel mailing list