[FFmpeg-devel] [Patch] AAC encoder improvements

Michael Niedermayer michaelni at gmx.at
Sat May 4 23:03:13 CEST 2013


Hi

On Sat, May 04, 2013 at 04:14:45PM -0300, Claudio Freire wrote:
> Attached is a patch with some improvements to the AAC encoder. The patch
> has my default username wrong, feel free to replace it with Claudio Freire <
> klaussfreire at gmail.com>
> 
> Those are rather simple low-hanging-fruit improvements that have the most
> impact on encoding quality, especially multichannel audio. In the case of
> multichannel audio, the biggest offending bug was that psy was applied
> independently to each channel group with bitrate/nchannels per-channel
> bitrate. Since stereo has only one channel group, it worked fine, but for
> multichannel, this means lots of bits reserved to little-used surround
> channels, and thus really poor performance on front channels.
> 
> With that fixed, plust a little rounding bug, I tried to make the "fast"
> encoder a bit more decent. I think I did accomplish some decency without
> much of a performance impact. I'll probably keep working on that one, since
> it's cool having a decent fast encoder (think realtime on embedded devices
> for instance).
> 
> Also, twoloop had a rather peculiar... bug shall I say... where the scalers
> selected were all flat, and had little correlation with the masking
> thresholds. I believe this was indeed a bug caused by naive clamping of the
> scalers' range, something that I addressed by "normalizing" them. Indeed
> the result sounds much more natural, especially on low bit rates. I have
> only my own listening sessions to prove that, although I myself am pretty
> convinced it's an improvement. But I'm open to suggestions on how to test
> this.
> 
> Finally, I fixed joint stereo. It had one bug, namely, that it did not
> recompute psy masking and quantizer scaling after doing the mid-side
> transformation, resulting in artifacts everywhere and generally poor
> quality. It was also a bit eager to apply the transformation when it wasn't
> really beneficial, so I patched cost estimation with an IMVHO better
> option: average thresholds for mid (I think this is numerically accurate),
> and minimum thresholds for side (this I've pulled out of a magic hat -
> heuristic, to punish side energy, seems to work). Indeed now auto joint
> stereo mode seems to result in better quality on all samples I've tried.
> 
> Without further ado, the patch is attached. Won't be the last one. I
> noticed there are quite some missing features to be implemented, and might
> as well do so.

like derek suggested, can you split this into 1 patch/commit per
issue ?
(see "git reset HEAD^ ; git add -p ; git commit" if you dont know how
to do that easily)

Also as you plan to continue working on aac, it might make
sense if you setup a public git repo (maybe on github) where you
publish your changes.
This way people can easily checkout and test your latest work


and very nice work!

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130504/c873cbdb/attachment.asc>


More information about the ffmpeg-devel mailing list