Resource icon

ADPCM-2 Codec Demo 2019-10-15

I've been working on some programming involving linear prediction, and came up with this as a side-project.

The idea is to use linear prediction to 'whiten' the signal, and then pack the residuals into 32-bit 'frames' of 12 samples. It turns out that as long as you provide residuals with a coded quantization step, a simple sinusoidal predictor is enough to give decent quality of around 20-25dB PSNR for unpredictable signals (eg. synth leads), and approaching 40dB PSNR for highly predictable signals (eg. orchestral, sine waves).

This codec uses 16 prediction sets, providing a coding rate of 2.667bits/sample (16.667% of 16bit PCM, or 87.38kbps/channel @ 32.768kHz), and the stereo decoder takes under 6% CPU according to my testing.

Full source code is included for the player and encoder. Feel free to do whatever you want with it, and it is released unlicensed. If placing your own music in, be sure to update the playback rate ("adpcmplayer.s", line 463) before re-building.

As with ulc-codec, special thanks to No!ze Freakz for permission to use their track 'Freedom' for this demo.
  • Like
Reactions: IC_
Author
Aikku
Downloads
805
Views
1,093
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from Aikku

Latest updates

  1. Fixed mono playback, higher precision encoding filter

    Mono playback was broken but is now working. The encoding filter now also computes in .8fxp...
  2. New LPC coefficients, mild psychoacoustic opto

    New LPC coefficients to go with a slight psychoacoustic optimization in the encoder (emphasizes...
General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Sorry for accidentally bending over