OSDN Git Service

aacenc_tns: rework TNS descision logic
authorRostislav Pehlivanov <atomnuker@gmail.com>
Sat, 17 Oct 2015 09:59:35 +0000 (10:59 +0100)
committerRostislav Pehlivanov <atomnuker@gmail.com>
Sat, 17 Oct 2015 10:10:26 +0000 (11:10 +0100)
commitfa4d900c275fa20124f87d60393c1e6373b9de51
tree9bb42e10e36d27e1fbdd5c2a4998c48db9385cf8
parentbf39beca8784077a3918de0933eaaa84a94e42a4
aacenc_tns: rework TNS descision logic

Changes:
 - strongly prefer dual filters to a single filter
 - less strict about using 2 filters w.r.t. energy
 - scrap the usage of threshold and spread, useless
 - use odd-shaped windows to set the filter direction
 - use 4 bits instead of 3 bits for short windows
 - simplify and reduce the main loop to a single level
 - add stricter regulations for short windows

All of this now makes the TNS implementation operate
as good as it can and it definitely shows. The frequency
thresholds are now even better defined by looking at
the spectrals and the overall sound has been improved at
the price of just a few bits that are well worth it.
libavcodec/aacenc_tns.c
libavcodec/aacenc_tns.h