]> git.sesse.net Git - ffmpeg/commit
aacenc_tns: adjust coefficient calculation, add double filter support
authorRostislav Pehlivanov <atomnuker@gmail.com>
Sat, 5 Sep 2015 08:08:30 +0000 (09:08 +0100)
committerRostislav Pehlivanov <atomnuker@gmail.com>
Sat, 5 Sep 2015 08:08:30 +0000 (09:08 +0100)
commite3faad811e429002d549562db4e0fc30c08dc6a4
treeee640ac53850c7e1f2f1131fdb2af67b05afdfe1
parent7591f8319b06d7ac6cfc16a852f24a46063f0595
aacenc_tns: adjust coefficient calculation, add double filter support

This commit improves the TNS implementation to the point where it's
actually usable and very rarely results in nastyness (in all bitrates
except extremely low bitrates it's increasing the quality and prevents
some distortions from the coder being audiable).

Also adds a double filter support which is only used if the energy
difference between the top and bottom of the SFBs is above the
thresholds defined in the header file. Looking at the bitstream
that fdk_aac generates it sometimes used a double filter despite
the specs stating that a single filter should be enough for almost
all cases and purposes.

Unlike FAAC or fdk_aac we sometimes use a reverse filter in case
the energy difference isn't enought to use a double filter. This
actually works better.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
libavcodec/aacenc_tns.c
libavcodec/aacenc_tns.h