Commits
Commits on
98eeb6c19f044c10962b95f759cce7eb9f26c0e1Filtered to crates/ec-aac/src/encode.rsClear filter2026-08-14
feat(aac): AAC-LC decoder, encoder and rusty_aac shimAhmet Kaan Gümüş · 9a848b4
feat(aac): AAC-LC decoder, encoder and rusty_aac shim Decoder covers AAC-LC end to end: AudioSpecificConfig and ADTS framing, all four window sequences and both window shapes, section and scalefactor data, every spectral codebook including the escape one, pulse data, TNS, M/S and intensity stereo, PNS, and SCE/CPE/LFE/DSE/PCE/FIL elements. Output is film order FL, FR, FC, LFE, BL, BR (SL, SR), which is the order the downmix in this family folds, so a 5.1 track needs no caller-side permutation. HE-AAC's SBR is not reconstructed: such a stream decodes to its AAC-LC core and reports the core rate rather than claiming the extension's. Encoder is a full two-loop search: 2048-point FFT masking with spectral flatness for tonality, bark-ish spreading, a relative hearing-threshold floor, transient-driven window switching, per-band mid/side, exact Huffman bit counts for codebook choice, and a bit reservoir against a CBR target. Both ADTS and bare raw_data_block output. The normative tables were derived rather than transcribed: access units with a chosen spectral payload were decoded by a reference decoder and read back through the inverse MDCT, which enumerates each codebook by a binary tree walk. Every one came out with a Kraft sum of exactly 1 and the entry count the standard prescribes. forbid(unsafe_code) in both crates.