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

Nathan Caldwell saintdev
Mon Nov 1 03:32:29 CET 2010


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.


-- 
-Nathan Caldwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-aacenc-cosmetics-Swap-spreading_hi-low-to-match-the-.patch
Type: text/x-patch
Size: 1923 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101031/364ada89/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-aacenc-Correct-spreading-calculation-for-high-spread.patch
Type: text/x-patch
Size: 1719 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101031/364ada89/attachment-0001.bin>



More information about the ffmpeg-devel mailing list