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
840
Views
1,194
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
  • Psionic Roshambo @ Psionic Roshambo:
    No no continue, I hear these things women say so often I decided to start counting
  • K3Nv2 @ K3Nv2:
    I tried that new Pepsi lime it just taste like pepsi
  • DTApple @ DTApple:
    With lime, right?
  • K3Nv2 @ K3Nv2:
    Just pepsi lol
  • K3Nv2 @ K3Nv2:
    Oh yeah it's D-Days 80th anniversary today
  • BigOnYa @ BigOnYa:
    I drink the Coke with lime all the time, in my Spiced rum (Captain Morgans) I hate pepsi
  • K3Nv2 @ K3Nv2:
    Probably better just to jizz a lime squeeze inside it
  • DinohScene @ DinohScene:
    volvic > anything else
    +1
  • K3Nv2 @ K3Nv2:
    My piss is water
  • BigOnYa @ BigOnYa:
    That looks like the router i just got from microcenter. Spectrum wanted to charge me $7 a month for a wifi router, so I said no thank you and just bought one, I paid like $65 tho
  • K3Nv2 @ K3Nv2:
    Linksys?
  • BigOnYa @ BigOnYa:
    Yea its Linksys, but not sure if same model, has 4 antennas
  • K3Nv2 @ K3Nv2:
    6gbps and two usb ports that supports ntfs is pretty solid dont care if it's reconditioned for $55
  • K3Nv2 @ K3Nv2:
    Just trying to figure out if it's vpn supported
  • K3Nv2 @ K3Nv2:
    I could probably set it up like a nas device
  • K3Nv2 @ K3Nv2:
    TP your router
    +1
  • K3Nv2 @ K3Nv2:
    Unless @Psionic Roshambo can convince me to spend $100 on a better option I'm probably going with it
  • BigOnYa @ BigOnYa:
    Works great for me, all i need. Can go way back on edge of property and still get 3/5 bars. And it let me setup IP Vanish on it no problem.
  • K3Nv2 @ K3Nv2:
    Google fibers router sucks keeps randomly blocking websites
  • BigOnYa @ BigOnYa:
    Does it say "Unexpected Database Error"?
  • K3Nv2 @ K3Nv2:
    Might as well 403
    +1
  • K3Nv2 @ K3Nv2:
    I yell at my isp like listen if I get a virus that's on me stop trying to protect me
    +1
    K3Nv2 @ K3Nv2: I yell at my isp like listen if I get a virus that's on me stop trying to protect me +1