rusty_aac 2.0.2

Pure-Rust AAC decoder (LC, Main, LTP, HE-AAC v1/v2 SBR+PS, ER LD/ELD; sample-exact vs FFmpeg on the ISO conformance suite) and AAC-LC encoder (~5x faster than FFmpeg's native encoder, PEAQ-measured). No C/FFI. ADTS/MP4/LATM-LOAS, 7.1 + PCE layouts.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! `aacasc <hex>` — print a parsed `AudioSpecificConfig` and its output layout.
#[global_allocator]
static RUSTY_ALLOC: rusty_alloc_api::RustyAlloc = rusty_alloc_api::RustyAlloc;
fn main() {
    let hex: String = std::env::args().skip(1).collect::<String>();
    let bytes: Vec<u8> = (0..hex.len() / 2)
        .map(|i| u8::from_str_radix(&hex[2 * i..2 * i + 2], 16).unwrap())
        .collect();
    let c = rusty_aac::config::parse(&bytes).expect("parse");
    println!("{c:#?}");
    if let Some(p) = &c.pce {
        let rows = rusty_aac::decode::layout::pce_layout(p);
        println!("rows {rows:?}");
        let oc = rusty_aac::decode::layout::OutputConfig::configure(rows, false);
        println!("outputs {:?} mask {:#x}", oc.outputs, oc.mask);
    }
}