Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Is ADPCM lossless compression? (Read 15588 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is ADPCM lossless compression?

Few days ago, I got a CD with complete discography of a band (which is not important now). That CD was made in 1997, when MP3 was not as popular as today (or should I say, it wasn't popular at all). All songs on CD are stored as 4-bit ADPCM. Since I haven't use ADPCM at all, I was very confused - 4-bit, but sounds very good. Then, I found the following definition on Google:

"Short for Adaptive Differential Pulse Code Modulation, a form of pulse code modulation (PCM) that produces a digital signal with a lower bit rate than standard PCM. ADPCM produces a lower bit rate by recording only the difference between samples and adjusting the coding scale dynamically to accommodate large and small differences. Some applications use ADPCM to digitize a voice signal so voice and data can be transmitted simultaneously over a digital facility normally used only for one or the other."

NOW I'm confused
If ADPCM stores only differences between samples, and not full sample values (as PCM), that means whole audio information is intact. But then, what is the point of Monkey Audio and Flac, when I can squeze a CD track (44.1 kHz, 16bit) to a fourth of size (44.1 kHz, 4bit)? Therefore, ADPCM must be lossless. Can somebody please explain this to me. I guess ADPCM is lossy, but I also guess it is less destructive than MP3, Ogg and WMA.

Thanks and sorry for not-so-good English.

Is ADPCM lossless compression?

Reply #1
ADPCM is lossy - 4 bits is not enough to store the differences between samples correctly.

Note that ADPCM compression corresponds to a bitrate of 352kbps. Compared to an AAC/Ogg/MP3/Wavpack hybrid of the same bitrate it *will* be off lesser quality. You can find some results related to that with the search function I think.

Is ADPCM lossless compression?

Reply #2
Think of it like this:

A regular CD stores 16 bit integers, one after the other, 44,100 times per second. These integers have a range of 2^32 -1 ...both positive and negative, alternating left and right channel if in stereo. So the data could be:

-300
456
0
2000
etc...

So four bits is not enough information to represent the difference between them...it truncates...

At least this is my understanding, please correct me if I am wrong.

Is ADPCM lossless compression?

Reply #3
Quote
If ADPCM stores only differences between samples, and not full sample values (as PCM), that means whole audio information is intact.[a href="index.php?act=findpost&pid=241141"][{POST_SNAPBACK}][/a]

Full sample values -> whole audio information.
Whole audio information -> Full sample values can be recovered.

4bit ADPCM from 16bit PCM -> inaccurate differences between samples in ADPCM
Hence ADPCM does not contain full sample values.

Hence ADPCM does not carry all the audio information of the 16bit source.

edit: The logic above is not bulletproof, but you get the idea.

Is ADPCM lossless compression?

Reply #4
Sure thing

Thanks guys!

UPDATE: In the first post, when I said "Therefore, ADPCM must be lossless" I meant "Therefore, ADPCM must be lossy".

Is ADPCM lossless compression?

Reply #5
The way I think about it is:
Nothing with a fixed bitrate is lossless compression. If it was, you could just treat the resulting file as raw audio data, then compress it again, etc., until you finally get a 4-bit file. (plus WAV header, I suppose)

With all lossless compressions, there must be a sample that will not be compressible (and will probably end up bieng larger than the initial file) Because of this, there is no way to specify a compression ratio. Since ADPCM is 4bits per sample, it is definitely lossy.
"We demand rigidly defined areas of doubt and uncertainty!" - Vroomfondel, H2G2

Is ADPCM lossless compression?

Reply #6
ADPCM is lossy, but is very easy to implement (both ways) and requires very, very little resources which makes it ideal for embedded solutions. The early creative soundblaster cards (the Pro and SB16) even had ADPCM decompression hardware! You can probably do 44100/stereo ADPCM compression on less than a simple 386 machine in realtime. (to compare, I have a 486-66 at home which cannot playback MP3 at 64kbps with the standard windows codec)

You can get very good quality sound from ADPCM. It is not limited to 4-bit, you can use any number of bits. I got the built-in Windows ADPCM codec to do 3-bit, but no less and i also didn't get it to compress to 6 or 8-bit (which had my interest).

A bit of oversampling will greatly improve the quality of the audio, but the oversampling itself is more computation intensive than ADPCM.

ADPCM is pure "math" encoding which makes it totally different from MP3 and OGG, which are "perceptive" compressors.


Is ADPCM lossless compression?

Reply #8
I wonder when rjamorim will appear and comment about the quality of ADPCM versus perceptual encoding. 

On a sidenote, ADPCM can be made perceptual, esp. for speech coding where the residual is fed back via a weighting filter which shapes quantisation noise so that more noise tends to occur in stronger formant areas and utilise some auditory masking.

Is ADPCM lossless compression?

Reply #9
Quote
I wonder when rjamorim will appear and comment about the quality of ADPCM versus perceptual encoding. 
[a href="index.php?act=findpost&pid=241664"][{POST_SNAPBACK}][/a]


Moi?

I don't know much about ADPCM. I only know that it uses only quantization, unlike the much more advanced data reduction techniques used in more advanced lossy encoders. And the advantage of that approach is that you won't find artifacts usually found on other lossy encoders, like pre-echo, smearing, stereo collapse... you will only see quantization noise (hissing).

Is ADPCM lossless compression?

Reply #10
This quantization error can be minimized to some avail by using some 2-pass algorithm in Microsoft's ADPCM codec, and as far as I remember, MS-ADPCM is block oriented and so able to change the quantization scale, with different window sizes.

IMA/DVI-ADPCM instead was quite often used in hardware soundcards, e.g. the "legendary" MediaTrix "AudioTrix Pro" card (one of the first Windows Sound System cards ever, being able to handle WSS, MPU-401 and SB-Pro without any resident software drivers). I'm not totally sure if this approach uses windows and block oriented adaptive quantization ranges, or if it adjusts the range dynamically, somehow - but AFAIR, the bitrate was exactly 1/4 of the PCM, not a little bit above 1/4 as for the MS-ADPCM codec.

Is ADPCM lossless compression?

Reply #11
Just curious, can you play this CD on a standard CD player?  Is the source of the disk ADPCM and the disk actually 16/44.1?  How could a CD player play anything but standard CD audio?
"Monkey see, monkey do, yeah."  David J. Matthews

 

Is ADPCM lossless compression?

Reply #12
You can't play this on a standard CD player. I suppose the disc just contained ADPCM wavs.