Skip to content

Releases: audexdev/Lossless-Audio-Codec

LAC v1.4.0 - Compression & Performance Upgrade

20 Nov 06:21

Choose a tag to compare

Highlights

  • Parallel block encoder/decoder
  • Improved LPC
  • Adaptive Rice k (v2)
  • Smarter block-size heuristic
  • Thread monitoring (--debug-threads now logs real worker thread IDs for both encode & decode)
  • New LPC tests (-DLAC_BUILD_TESTS=ON test suite)

Performance

  • Faster encode: up to 1.4-2.0x speed depending on sample rate and CPU cores
  • Faster decode
  • Lower file size: improved compression across all sample rates (44.1/48/96/192 kHz)
    (LAC still intentionally preserves bitstream compatibility.)

LAC v1.3.0 - Apple Silicon NEON Acceleration & Multithreaded Encoding

19 Nov 16:26

Choose a tag to compare

Highlights

  • NEON SIMD acceleration for Apple Silicon
  • Multithreaded block encoding
  • New --debug-threads flag

Internal Improvements

  • SIMD fallbacks fully synchronized with scalar logic
  • Cleaned encode pipeline
  • Precomputed Rice k-adaptation (SIMD-accelerated)
  • No format changes - backward compatible

this entire optimization pass was completed in less than 24 hours lol

LAC v1.2.0 - Hi-Res (24-bit / 48-192 kHz) Support

19 Nov 09:45

Choose a tag to compare

New Features

  • Added full support for 24-bit PCM at 44.1 / 48 / 96 / 192 kHz
  • Bit-perfect lossless reconstruction verified
  • Supports both L/R and Mid/Side stereo coding at all sample rates
  • Expanded adaptive block size candidates up to 16384 samples for high-rate audio

Fixes

  • Corrected internal handling of 24-bit PCM samples
  • Removed unintended << 8 scaling that inflated residual magnitudes
  • Restored proper Rice parameter adaptation for 24-bit signals
  • Result: 24-bit .lac files now compress correctly (smaller than WAV)

Decoder / BitStream Hardening (Security & Stability)

Added strict bounds checks for:

  • block_count (1 ... 10M)
  • block_size (1 ... 16384)
  • LPC order (1 ... 32 and < block_size)

BitReader now detects underflow and exposes error state

Validation

All formats successfully passed bit-perfect tests:

  • 16-bit 44.1 kHz
  • 24-bit 44.1 / 48 / 96 / 192 kHz

Both L/R and Mid/Side stereo paths confirmed identical to original WAV.

LAC v1.1.0 - Mid/Side Stereo Support

19 Nov 07:05

Choose a tag to compare

This release introduces optional Mid/Side (MS) stereo encoding for improved compression efficiency on stereo material, while keeping full compatibility with the LAC v1.0.0 bitstream format.

MS mode performs a reversible LR → M/S transform and often yields smaller file sizes on real music (typically 1–4% gains), especially when the left/right channels share similar content.

Mid/Side Stereo Encoding (optional)

  • Added --stereo-mode=ms flag to lac_cli encode
  • Default remains LR (standard Left/Right stereo)
  • Provides bit-perfect LR reconstruction
  • Verified with Python bit-perfect tests across full WAV files

Improvements

  • Added decode-time benchmarks for LR vs MS in selftest
  • Cleaner channel reconstruction path
  • Additional internal validation for safe block parsing

CLI Usage
Encode (Mid/Side):
lac_cli encode input.wav output.lac --stereo-mode=ms

Decode:
lac_cli decode input.lac output.wav

LAC v1.0.0 - Lossless Audio Codec

19 Nov 05:28

Choose a tag to compare

This is the first stable release of LAC (Lossless Audio Codec), a lightweight, block-based lossless audio format designed for simplicity, speed, and transparency.

Key Features

  • True lossless compression
    Verified bit-perfect reconstruction on large real-world stereo WAV files.
  • LPC + Adaptive Rice entropy coding
    Efficient compression using 8-tap Q15 LPC and per-sample adaptive Rice parameter.
  • Stereo support
    Independent L/R channel compression.
  • Stable bitstream format
    Finalized structure for the LAC 1.0.0 stream.
  • WAV I/O
    Supports PCM 16-bit / 44.1 kHz mono or stereo.
  • CLI Tool (lac_cli)
    Encode: lac_cli encode input.wav output.lac
    Decode: lac_cli decode input.lac output.wav

Compression Performance

  • Original WAV: 45.5MB
  • LAC output: 32.4MB (29% reduction)

Bit-perfect verification
Roundtrip reconstruction matches the input exactly.