Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TNS_MAX_ORDER is object type and short/long window dependent #195

Open
atimmernans opened this issue Dec 15, 2023 · 3 comments
Open

TNS_MAX_ORDER is object type and short/long window dependent #195

atimmernans opened this issue Dec 15, 2023 · 3 comments

Comments

@atimmernans
Copy link

I was looking at some AAC specs and they mention that TNS_MAX_ORDER is a constant that is dependent of the object type and can takes values 12 or 20 for long windows and 7 for short windows. FAAD2 seems to only use value 20.

Since they are some draft specs found on the net and not official ones can you check this point?

@eustas
Copy link
Contributor

eustas commented Dec 18, 2023

For short window it is capped with 7 indeed (search for order_bits = 3 and tns_order = min(tns->order[w][f], TNS_MAX_ORDER).
For long window it is capped with 20, but again it could be 0..20.

@eustas
Copy link
Contributor

eustas commented Dec 19, 2023

@atimmernans it would be nice if you provide some quotes, to be sure we have coded it right. Currently I do not have access to spec to check it myself.

@atimmernans
Copy link
Author

From that ISO/IEC 14496-3:2009 document:

4.6.9.4 Maximum TNS order and bandwidth
The value for the constant MAX_TNS_ODER depends on audio object type and windowing, and. Table 4.156
defines MAX_TNS_ORDER depending on these parameters.
Table 4.156 – Definition of TNS_MAX_ORDER depending on AOT and windowing
windowing short windows long windows
AOT 1 (AAC Main) 7 20
other AOT using TNS 7 12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants