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: An idea of checking lossy codecs quality (Read 6033 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

An idea of checking lossy codecs quality

I don't know if it was discussed before (I guess it was, as it's quite a trivial idea), but did anyone try to do a kind of ABX against pure artifacts instead of against encodes? One could ask "how to extract pure artifacts from encodes?", quite simply - I do it this way:

1. encode original file A to some lossy file B
2. decode B to C (so you get it back to the format which you can load into some audio editor)
3. load A & C into Audacity for example
4. invert phase of one of them
5. mix

That way you substract encoded wave from original - you get pure artifacts which you can listen to. In case if B was lossless, you would get digital silence (substracting a wave from another identical but phase-inverted wave = zeroes) - no differences, no artifacts.
When you encode A to B, avoid resampling (after all you don't want to hear resampling artifacts). When you decode B to C, decoder should compensate encoder's offset (if it didn't, the C wave could get shifted I guess, which would ruin everything) and don't do any processing like dithering which adds in this case unwanted noise (I used fb2k for decoding).
The result is quite interesting - when I tried MP3 encoded at 320kbps, the artifact was very quiet quantization noise only, ADPCM artifacts sound kinda like original sound passed through limiter, etc.
I know that doing an ABX of encodes is better, as artifacts alone are clearly audible, while in the context of encoded sound they get masked, but it can be useful in some cases, like comparing high bitrate encodes (where it's often impossible to ABX any difference at all), training in artifacts detection, or hunting encoders flaws (for example, some versions ago LAME had a bug with -q0 - I wonder if it would be easy to detect with such a methodology, -q0 could have louder quantization noise than -q3 for example), etc. And surely it's much better than judging by spectrograms.
And there's one more thing - that way you can get hybrid compression for any format - just keep file B, and save the mixed difference as a correction file (I checked with OptimFROG and they compress quite well). Of course to get original file back, you need to decode file B with the same decoder as the one used to decode file B to C, and then mix with correction file (preferably in the same audio editor).

An idea of checking lossy codecs quality

Reply #1
I think it wouldn't work.

The first thing that comes to my mind is, mix-pasting fails to take frequency/temporal masking into account.

I think I've seen people making fun of such comparisons, although I don't remember where.

An idea of checking lossy codecs quality

Reply #2
Well I guess it would be useful for bug-testing at least.  >_>
But not for quality comparison.

An idea of checking lossy codecs quality

Reply #3
I like the idea very much. You're quite a smart person ;-)

Congratulations.  I'll try it whenever I'm having a hard time ABX-ing, just to test.

An idea of checking lossy codecs quality

Reply #4
I'm not sure if it's been scientifically researched, but as already commented I think the technique has very little usefulness on it's own for quality comparisons (due to almost completely eliminating masking, which is exactly the point of perceptual encoding to begin with!)

What it could be useful for is training to listen for artifacts. That is, training your listening skills. Although even this application could quite limited. I'll have to test and see for myself.

An idea of checking lossy codecs quality

Reply #5
If an 'artifact' is something that doesn't sound right, something not encoded very well vis a via human perception, this process does not detect them. The remainder is simply the differences, bit by bit, between the two versions of the file. Any lossy encoding will always be different, even one so good that not a single human can hear any difference what-so-ever. The 'artifacts' will have their place in the remained, along with every other bit that had any difference, but no measure of the result of the mix will reflect what was wrong in any way.

An idea of checking lossy codecs quality

Reply #6
kjoonlee is right, it won't work because of temporal and spectral masking effects.

An idea of checking lossy codecs quality

Reply #7
This would be fun for just testing the difference a DSP effect makes to audio.
Acid8000 aka. PhilDEE

An idea of checking lossy codecs quality

Reply #8
yep, you'll just get quantization noise doing that, which is not equal to artifacts.

An idea of checking lossy codecs quality

Reply #9
Not only quantization noise, on lower bitrates actual sound content (especially on higher frequencies) is very distinguishable, and artifacts like ringing and pre-echo/smearing get quite saturated.


An idea of checking lossy codecs quality

Reply #11
Yeah, im afraid i have already tried this idea, seperating the mp3 from the original like this, though for different purposes. it doesnt work well for testing quality

An idea of checking lossy codecs quality

Reply #12
I've done this too just out of curiosity, wanted to hear the audio that various codecs filter out when compressing (as opposed to trying to find distortions added to the end result.) Music sounds really wierd like that for sure.

An idea of checking lossy codecs quality

Reply #13
Actually, exactly the same idea was the starting point of my research. Infinite Grade Impairment Scale used at SoundExpert is one of the results. Details could be found in these publications:

FEITEN B, “Measuring the Coding Margin of Perceptual Codecs with The Difference Signal” presented at the AES102th Convention, Munich, Federal Republic of Germany, 1997 March, preprint 4417

SMIRNOFF S, “Difference Level: An Objective Audio Parameter” presented at the AES118th Convention, Barcelona, Spain, 2005 May, preprint 6493

Both papers are available at AES store ($20 each for non members). If I receive permission from AES for posting my paper on the Internet, it will appear soon on my site (for free  ).
keeping audio clear together - soundexpert.org

An idea of checking lossy codecs quality

Reply #14
Quote
If I receive permission from AES for posting my paper on the Internet, it will appear soon on my site (for free  ).
[a href="index.php?act=findpost&pid=347681"][{POST_SNAPBACK}][/a]

Let us know if that happens