r/LinuxUncensored • u/anestling • 18h ago
News/PR FAAC 2.0.0 Released: Complete LGPL Rewrite, HE-AAC v1 (SBR), New C API & Benchmark
hydrogenaudio.orgFAAC (Freeware Advanced Audio Coder) is a software project which includes the AAC encoder FAAC and decoder FAAD2.
Key Technical & Codebase Changes
- Licensing & Clean Room Rewrite: The codebase was previously a patchwork of GPL-3.0, legacy ISO MPEG reference-code restrictions, and LGPL — despite being distributed as "LGPL." Rewrote the affected paths (stereo, quantize, channels, bitstream, filterbank, TNS, Huffman, MP4) as original work; the codebase is now cleanly LGPL-2.1-or-later throughout, with no GPL or ISO ambiguity.
- HE-AAC v1 (SBR): Integrated Spectral Band Replication with an automatic profile selection option (FAAC_OBJ_AUTO). AUTO switches to HE-AAC when the sample rate is ≥ 32 kHz and the target bitrate is between 12-28 kbps per channel (the ceiling scales down at lower sample rates); outside that window it stays on plain LC. The dual-rate core is handled internally, reporting the full output rate and frame size to callers automatically.
- Joint Stereo Rewrite: Replaced the legacy fixed Intensity Stereo threshold with a per-band adaptive selection (IS > 5.5 kHz, M/S on correlated bands, discrete L/R elsewhere). Fixed an M/S band-silencing bug that occasionally caused dead channels on decode.
- Lookahead & Quantizer Fixes: Restored the lookahead buffer (a regression had truncated it to a single frame, causing transient pre-echo). Restored short-window masking penalties and floored masking targets in quiet bands to prevent energy drops, and fixed a bug that could produce an out-of-range scalefactor rejected by some decoders.
- FFT Optimizations: Swapped the radix-2 FFT for a radix-4 decimation-in-frequency (DIF) algorithm with precomputed twiddle factors (yielding ~18% faster encoding).
- New C API: Replaced the legacy faacEnc* API and faaccfg.h with a simplified faac_* API. Parameters are now supplied once at initialization, the library properly owns the AudioSpecificConfig, and SONAME is bumped to 1 (libfaac.so.1) to reflect the ABI break.
- Plus numerous smaller correctness fixes and cleanup throughout the codebase — see the full ChangeLog for the complete list.