diff options
author | Lynne <dev@lynne.ee> | 2025-02-08 04:35:31 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2025-07-15 16:27:31 +0900 |
commit | bedfb6eca402037f5cbb115fa767d106b8c14f1c (patch) | |
tree | a9e8787f741998b66c8eb71942ec684b816f3297 /libavformat/tls_openssl.c | |
parent | e9cd280dfe5a563843ce2b114c3ef2d042d93684 (diff) | |
download | ffmpeg-bedfb6eca402037f5cbb115fa767d106b8c14f1c.tar.gz |
aacenc_tns: clamp filter direction energy measurement
The issue is that:
float en[2];
...
tns->n_filt[w] = is8 ? 1 : order != TNS_MAX_ORDER ? 2 : 3;
for (g = 0; g < tns->n_filt[w]; g++) {
tns->direction[w][g] = slant != 2 ? slant : en[g] < en[!g];
When using the AAC Main profile, n_filt = 3, and slant is by
default 2 (normal long frames), g can go above 1.
en is the evolution of energy in the frequency domain for every
band at the given window. E.g. whether the energy is concentrated
at the top of each band, or the bottom.
For 2-pole filters, its straightforward.
For 3-pole filters, we need more than 2 measurements.
This commit properly implements support for 3-pole filters, by measuring
the band energy across three areas.
Do note that even xHE-AAC caps n_filt to 2, and only AAC Main allows
n_filt == 3.
Fixes https://trac.ffmpeg.org/ticket/11418
Diffstat (limited to 'libavformat/tls_openssl.c')
0 files changed, 0 insertions, 0 deletions