forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 03dc6e9978cbbbba112bf5c6ad925845ede8c744Filtered to shims/flacenc/src/source.rsClear filter

2026-08-14

feat(flac): ec-flac decoder + encoder and the flacenc shimAhmet Kaan Gümüş · 339321d
feat(flac): ec-flac decoder + encoder and the flacenc shim

Decoder: metadata blocks, frame headers (fixed and variable blocking),
constant/verbatim/fixed/LPC subframes to order 32, escaped and
Rice-coded partitions, all three stereo decorrelations, 8..32-bit,
CRC-8 + CRC-16 verified per frame, STREAMINFO MD5 check, seek-table
positioning, and frame-sync resynchronisation for streams that start
mid-file. Malformed input errors, never panics.

Encoder: fixed block size, wasted-bit detection, fixed predictors,
LPC (Tukey window, Levinson-Durbin, error-feedback quantisation),
exact-cost Rice partition search, per-block stereo decision, 1..8
channels and 4..32 bits, with the input MD5 in STREAMINFO.

shims/flacenc carries package flacenc 0.5.1 over ec-flac for the exact
surface the replica calls (component::BitRepr, error::Verify,
config::Encoder, source::MemSource, encode_with_fixed_block_size,
bitsink::ByteSink).

Verified: 64/64 Xiph subset vectors decode bit-exact vs ffmpeg,
6/6 decodable uncommon vectors bit-exact, faulty vectors error out;
14/14 fixture encodes decode back bit-exact through ffmpeg at 0.961x
the size of ffmpeg's default FLAC.