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: Distortion statistical measure (Read 2467 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Distortion statistical measure

Hello everybody,

I'd like to measure the distortion introduced in a wave file after compression & decompression. For doing so, as they (the original and the comp & decomp files) must have the same number of samples, I'm calculating the Euclidean distance between the original wave file and the compressed & decompressed one, sample by sample. But I'd like to know if there is a better measure for this purpose.

Thank you.

PS: Of course, I mean compressing with any lossy audio codec.

Distortion statistical measure

Reply #1
I'd like to measure the distortion introduced in a wave file after compression & decompression. For doing so, as they (the original and the comp & decomp files) must have the same number of samples, I'm calculating the Euclidean distance between the original wave file and the compressed & decompressed one, sample by sample. But I'd like to know if there is a better measure for this purpose.


You were right in your suspicion that a simple Euclidean distance might not be the best measure of audio quality. In fact, it is the worst.

Since lossy codecs are designed to reproduce the sound of the audio transparently to a human ear (instead of just mathematically approximating the source waveform), they are based on psycho-acoustic principles. So the measure of distortion must also be based on psychoacoustics of human hearing. You need a measure of "psycho-acoustic distance".

A well known example of such quality evaluation algorithm is EAQUAL.

However, there is a catch. Such evaluation algorithms can be appiled only to a codec that uses an inferior psycho-acoustic model. Only then the evaluation would make sense. For example, one could take a highly tuned version of EAQUAL and use it on some very low bitrate lossy codec.

But once you develop a highly tuned psycho-acoustic model for your evaluation algorithm, you may just as well build a new lossy codec using this model, and your own evaluation algorithm becomes useless for this improved codec.

At the moment, the best tuned psycho-acoustic models are incorporated into existing lossy codecs.
So we are left with the only ultimate measure of lossy codec quality - double blind listening tests by human subjects, such as ABX or ABC/HR and similar.