Commits
Commits on
cbbd6e2ef6acafb00aeb55e460423f024126f90fFiltered to crates/ec-aac/src/config.rsClear filter2026-08-20
aac(sbr): explicit-SBR AudioSpecificConfig writer, plus a wrap-to-mp4 probe instrumentAhmet Kaan Gümüş · 9b44442
aac(sbr): explicit-SBR AudioSpecificConfig writer, plus a wrap-to-mp4 probe instrument write_audio_specific_config never emitted the extension sf_index/ extensionAudioObjectType an AOT_SBR/AOT_PS config needs (§1.6.2.1) -- it wrote plain GASpecificConfig fields regardless of object type, so every config it built for an SBR-signalling caller was spec-invalid. Extended it minimally (parse_audio_specific_config already read the extension fields correctly, so only the writer was missing them) and added a round-trip unit test. Also adds crates/ec-aac/examples/wrap_sbr, the round-30/31 instrument blocker's fix: wraps bare ADTS probe streams (the SBR patch-map scripts' output) in an mp4 carrying this explicit-SBR ASC as their esds, so the reference decoder has an out-of-band AudioSpecificConfig to arm HE-AAC output from instead of only its (never-engaging) implicit per-frame detection on bare ADTS.
2026-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.