forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to crates/ec-aac/Cargo.tomlClear filter

2026-08-19

test(ec-aac): reach the SBR chain from real HE-AAC files, not just ADTS fixturesAhmet Kaan Gümüş · 5bbfe62
test(ec-aac): reach the SBR chain from real HE-AAC files, not just ADTS fixtures

tests/oracle.rs remuxes every source to bare ADTS before decoding, and ADTS
carries no AudioSpecificConfig, so with_config_bytes()/set_sbr_rate() never
armed and no existing test exercised the SBR path at all. This adds a
container-native harness (ec-mp4/ec-matroska as dev-deps, via the shared
Demuxer trait) that pulls the real esds/CodecPrivate AudioSpecificConfig and
access units out of whichever real HE-AAC files a live library sweep finds,
decodes them through with_config_bytes, and compares against the reference
decoder by lag-searched correlation, split into below/above-crossover bands
for localization. Skips loudly when ffmpeg or no such files are present.

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.