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,186
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.
  • S @ salazarcosplay:
    hunter x hunter
  • S @ salazarcosplay:
    he has not allowed anyone to continue it for him for example
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, theres a dragon ball af mod for budokai 3
  • Xdqwerty @ Xdqwerty:
    updated ship of harkinian, gonna install some hd texture pack
  • Xdqwerty @ Xdqwerty:
    I might download rayman revolution for my ps3
  • BigOnYa @ BigOnYa:
    I may try the new ram site, and download more RAM to my Switch. Not sure if ddr3 is the right ram
    for it tho. Edit- no it uses floppy Ram, just like @AncientBoi
    +1
  • Xdqwerty @ Xdqwerty:
    aeiou
  • BigOnYa @ BigOnYa:
    And sometimes Z
  • SylverReZ @ SylverReZ:
    @K3Nv2, MAGA supporters be wearing tin foil hats lol.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, whats maga?
  • BigOnYa @ BigOnYa:
    It stands for Maniacs Against General Acceptance
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, people rejecting general consensus about stuff?
    +1
  • BigOnYa @ BigOnYa:
    Yup, nuh its really just Trump followers
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, im not american so i dont care about trump
    +1
  • Xdqwerty @ Xdqwerty:
    or us elections
  • BigOnYa @ BigOnYa:
    Me niether, us north Koreans don't care
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    i don't care either, even if i'm american
  • BakerMan @ BakerMan:
    truth be told, i agree with psi, i dislike both candidates, but i'd probably vote trump simply because the economy was better during his presidency
  • AngryCinnabon @ AngryCinnabon:
    Just be careful, if trump ends up winning and using project 2025 America might really change...for the worse.
  • AngryCinnabon @ AngryCinnabon:
    I'm not american and even that sends shivers down my spine.
  • AngryCinnabon @ AngryCinnabon:
    anything that offers trump an opportunity to become an actual dictator
    is bad in my book, i could care less if it wasn't for that...
  • K3Nv2 @ K3Nv2:
    Canada: America's Russia
  • NinStar @ NinStar:
    people are so dramatic that I can't even tell if they are being serious
    NinStar @ NinStar: people are so dramatic that I can't even tell if they are being serious