Help - Search - Members - Calendar
Full Version: Is this a valid transparency test?
Hydrogenaudio Forums > Lossy Audio Compression > MPC
cmokruhl
As more of an experiment than anything else, I wanted to see if there was a way to easily tell whether or not a setting in MPC was "transparent" (audibly indistinguishable from the original .wav). So, I wrote a perl script to do encode-decode cycles on a clip. My theory: if, after many (50+) re-encodings, the 50th encoding sounds the same as the first, then the compression is psychacoustically "lossless".

I tried this on "mppenc --standard" and, after 50 encodings, it sounds awful. "--xtreme" and "--insane" sound slightly better, but still mangled. If you max out all the switches (" --insane --ltq_gain -12 --minSMR 3 --ltq_max 65 --nmt 16 --tmn 32 --ans 0"), it's transparent (at least on my one test clip and to my ears). I'm currently playing with all the switches to find the lowest bitrate that is still "transparent".

My question: is this even a valid experiment? Or does expecting a re-encoded clip to sound as good as the first encoding fly in the face of the principles of lossy encoding?

Here's the script I use for this experiment:


#!/usr/bin/perl -w

$ARGS = "--verbose --standard";

$tmp = `mppenc $ARGS $ARGV[0].wav $ARGV[0].001.mpc`;

for ($i = 1; $i < 50; $i++) {
$cmd = sprintf("mppdec $ARGV[0].%03d.mpc tmp.wav ; mppenc $ARGS tmp.wav $ARGV[0].%03d.mpc", $i, $i+1);
$tmp = `$cmd`;
}

exit(0);


If the source is test.wav, you would execute the script with "test" as the argument. Let it run and listen to the original file, test.001.mpc, and test.050.mpc.

-Craig
ErikS
QUOTE

Is this a valid transparency test?


no.
tangent
The only thing you are really doing with each test is just introducing more and more quantisation noise with each iteration. Kind of useless, don't you think?
timcupery
I used to try something like this... but just two encodes, not 50. Still, it was interesting to note that at around 128 kbps, wma and lame did a LOT better than Ogg Vorbis RC2 at still sounding pretty close to the original on the second encode, while ogg's increase-the-high-pitch thing really showed up exaggerated on the second encode. But really, the whole point is how close the first encode sounds to a person's ear. Not to say that your method doesn't bring up some good stuff about overall alteration to the sound clip, and may be valuable...
Garf
This test is fatally flawed, and here's why:

on the first encode, the encoder will introduce noise and artifacts, but only up to a degree where it's not distinguishable from the original to your ears. The encode will be transparent.

After the first decode, you start the second encode. The encoder will introduce noise up to a degree where it's not distinguishable from the first encode.

While the difference between the first and second encode, and the difference between the first and the original may not be audible, the difference between the original and the second encode may very well be.

So hearing a difference after n>1 encodes does not in any way imply that there is an audible difference after 1 encode.

--
GCP
VeryBlur
QUOTE
Originally posted by Garf
This test is fatally flawed, and here's why:
on the first encode, the encoder will introduce noise and artifacts, but only up to a degree where it's not distinguishable from the original to your ears. The encode will be transparent.
After the first decode, you start the second encode. The encoder will introduce noise up to a degree where it's not distinguishable from the [b]first encode
.
While the difference between the first and second encode, and the difference between the first and the original may not be audible, the difference between the original and the second encode may very well be.
So hearing a difference after n>1 encodes does not in any way imply that there is an audible difference after 1 encode.
-- 
GCP


Not true. At least the reencoding works fine for MP3. I remember last time the forum had discussed about this before with the conclusion that you cannot judge subband coder with this listening test method.
Garf
QUOTE
Originally posted by VeryBlur


Not true. At least the reencoding works fine for MP3.


And can you at least explain why it would not be true???

--
GCP
VeryBlur
QUOTE
Originally posted by Garf

And can you at least explain why it would not be true???
-- 
GCP


Listening tests.
Garf
I'm very curious which listening test contradicts my conclusion:

QUOTE

So hearing a difference after n>1 encodes does not in any way imply that there is an audible difference after 1 encode. 


[b]Very
curious

--
GCP
Buschel
the problem is the following:

1st encoding: the encoder will add quantization noise up to amount that is normally imperceptible and will cut frequencies that won't be perceived.

next encodings: the signal has become noisier and contains less energy at higher frequencies. both will raise the allowed masking threshold -> even more noise will be added. even if the encoder will calculate exactly the same masking thresholds the result after encoding will be noisier...

it may be possible to put up a psychoacoustic model which won't be disturbed by preencoded noise but this will lead to higher bitrates for 1st time encoding... as most users will encode original wavs i see no need to achieve such behaviour.

andree
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.