Help - Search - Members - Calendar
Full Version: joint stereo
Hydrogenaudio Forums > Hydrogenaudio Forum > Scientific Discussion
jazzymelody
I have a question
How much bandwidth I save using jstereo?
Mono uses the half data from a stereo stream
Joint stereo how much?(an average)


Sebastian Mares
It depends on the signal and whether most of it is encoded as MS or SS.
Shade[ST]
In a best case scenario, you'll gain 50% of size for the same quality (mono)
SebastianG
worst case: no gain at all

Sebi
Synthetic Soul
... which makes an average of 75%. smile.gif

Good teamwork guys.
Shade[ST]
Actually an average of 75% would be filesize.
25% is the average gain.

Nice try, Synthetic Soul wink.gif
Synthetic Soul
QUOTE(jazzymelody @ Mar 10 2006, 11:38 AM)
Mono uses the half data from a stereo stream
Joint stereo how much?(an average)
Joint stereo will use 75% on average.
Shade[ST]
Darn. He asked two questions, arr.. fiesty.
LaserSokrates
I suggest encoding a sample twice with lame at a given bitrate, say 128 kbit/s, once with joint-stereo, once without. You'll hear the difference (if my memories are right). BTW, what effect does l/r stereo have on the V- switches? Does quality decrease or does bitrate increase, or does both happen?
Jojo
QUOTE(LaserSokrates @ Mar 10 2006, 03:03 PM)
I suggest encoding a sample twice with lame at a given bitrate, say 128 kbit/s, once with joint-stereo, once without. You'll hear the difference (if my memories are right). BTW, what effect does l/r stereo have on the V- switches? Does quality decrease or does bitrate increase, or does both happen?
*


a better way would be to encode something using -V2 (a.k.a --preset standard) with/without Joint Stereo
LaserSokrates
QUOTE(Jojo)
a better way would be to encode something using -V2 (a.k.a --preset standard) with/without Joint Stereo

QUOTE(LaserSokrates)
BTW, what effect does l/r stereo have on the V- switches? Does quality decrease or does bitrate increase, or does both happen?


That was it what I was asking for. l/r stereo is "without Joint Stereo". But for getting a first idea of what will happen if you don't use js, my first example might work.
jazzymelody

QUOTE
a better way would be to encode something using -V2 (a.k.a --preset standard) with/without Joint Stereo

hmm, I didnt think it before opening the thread!

QUOTE
That was it what I was asking for. l/r stereo is "without Joint Stereo". But for getting a first idea of what will happen if you don't use js, my first example might work.


As I see it at your example the 2 samples will have the same size and the j/s sample better sound quality than the stereo one.

In Jojo's example you will have same quality, different filesizes.


Jojo
QUOTE(jazzymelody @ Mar 11 2006, 03:30 AM)
In Jojo's example you will have same quality, different filesizes.
*


there is still a chance that Joint Stereo will sound better. Just imagine a frame where Joint Stereo already uses 320kbps...
jazzymelody
So the best way is two samples js/stereo at -V 6. Why you recommended V2 ? smile.gif
Woodinville
Joint stereo does not decrease file size, it increases encoded quality by preventing stereo artifacts.

Or so I've had the guy who invented several forms of it say, over and over again, in talks, at least.
Jojo
QUOTE(jazzymelody @ Mar 11 2006, 01:23 PM)
So the best way is two samples js/stereo at -V 6. Why you recommended V2 ? smile.gif
*


no, not really. -V6 has some cap on the maximum bitrate that can be used. -V2 is designed to be transparent. For testing -V2 with Joint Stereo / without Joint Stereo should be sufficient to get the idea. It depends on the song anyway. I just made that comment to illustrate that no one should use regular stereo, even if file size isn't an issue.

QUOTE(Woodinville @ Mar 11 2006, 02:29 PM)
Joint stereo does not decrease file size, it increases encoded quality by preventing stereo artifacts.
*


yes and no. True for CBR, ABR encoding and half way true for VBR (depending on the -V mode). Partially true for VBR -V2 etc. (see my comment above)
jazzymelody
ok, thanks for the info.

And btw, for an ending to this thread, are there improvements to be done at this subject(taking advantage of the similarities of the 2 channels), or joint stereo serves us pretty well?
Jojo
QUOTE(jazzymelody @ Mar 11 2006, 11:04 PM)
And btw, for an ending to this thread, are there improvements to be done at this subject(taking advantage of the similarities of the 2 channels), or joint stereo serves us pretty well?
*


the Joint Stereo mode that is used right now is lossless and therefore there is little room for improvement when it comes to transparent encodings. However, there is something that could be done for lower bitrate encodings. Since those encodings contain most likely artifacts, it sometimes might be more suitable to use a lossy Joint Stereo mode, which could reduce those artifacts. Such a mode does not exist in the Lame 3.xx branch.
Firon
Since it's lossless, all it does is save you some bits (which may or may not reduce bitrate significantly when dealing with VBR), which depending on the encoding mode you're using, can increase quality or not.

And I think you speak of intensity stereo, for the lossy joint stereo
Is there any reason why LAME doesn't have it?
jazzymelody
QUOTE
And I think you speak of intensity stereo, for the lossy joint stereoIs there any reason why LAME doesn't have it?


I think he speaks for intensity stereo too, and I have the same question.

I remember this being disscused years ago. After the Jojo's post I downloaded the lastest cvs snapshot of lame4, unfortunatelly intensity stereo wasn't there yet.

I think that just the priorities of the lame porject, at least until now, were far away from being a good codec at low frequencies
loophole
Does joint stereo still do bad thing with pro logic etc on receivers? I used to hear terrible artifacting in the rear speakers that you wouldn't get if you used L/R stereo.
Wintershade
QUOTE(loophole @ Mar 12 2006, 01:26 PM)
Does joint stereo still do bad thing with pro logic etc on receivers?


No.

QUOTE(loophole @ Mar 12 2006, 01:26 PM)
I used to hear terrible artifacting in the rear speakers that you wouldn't get if you used L/R stereo.


Probably on mp3s encoded with Fraunhofer's encoder which used intensity Joint-stereo (downmixing some high trebles to mono or somehting like that). That was really terrible.

SebastianG
QUOTE(Synthetic Soul @ Mar 10 2006, 08:48 PM)
QUOTE(jazzymelody @ Mar 10 2006, 11:38 AM)
Mono uses the half data from a stereo stream
Joint stereo how much?(an average)
Joint stereo will use 75% on average.
*



Are you serious ?
You can't compute the average case by averaging the worst and the best case.

Sebi
SebastianG
QUOTE(Woodinville @ Mar 11 2006, 10:29 PM)
Joint stereo does not decrease file size, it increases encoded quality by preventing stereo artifacts.

Or so I've had the guy who invented several forms of it say, over and over again, in talks, at least.
*



Either way it increases encoding efficiency which is what counts. If files are smaller or of higher quality or a bit of both is really an implementation issue. By disabling channel coupling in the Vorbis code for example you'll get pretty much the same audio signal after decoding (at -q6 and above) but the files with disabled CC will be larger.

Sebi
kjoonlee
I seem to remember reading that when channel coupling was added to Vorbis, it reduced bitrate by approx. 20%.

Don't take my word for it, though. It was a long time ago and my memory may be faulty.
Synthetic Soul
QUOTE(SebastianG @ Mar 13 2006, 08:55 AM)
QUOTE(Synthetic Soul @ Mar 10 2006, 08:48 PM)
QUOTE(jazzymelody @ Mar 10 2006, 11:38 AM)
Mono uses the half data from a stereo stream
Joint stereo how much?(an average)
Joint stereo will use 75% on average.
*
Are you serious ?
You can't compute the average case by averaging the worst and the best case.

Sebi
Not particularly, no.

As we all know, the term "average" is in itself vague, and I was simply taking the two stats that were provided and finding the mean. Apologies if my flippancy confused the issue.

The answer, in reality, requires a good deal of testing to find the true median. Testing, it seems, that no-one has previous records of, or is prepared to undertake. With a maximum of 100% and a minimum of 50%, until such testing is done then an estimate of 75% needs disproving.

Given kjoonlee's statement above, is it that unrealistic?


[JAZ]
QUOTE(Wintershade @ Mar 12 2006, 12:59 PM)
QUOTE(loophole @ Mar 12 2006, 01:26 PM)
Does joint stereo still do bad thing with pro logic etc on receivers?

Probably on mp3s encoded with Fraunhofer's encoder which used intensity Joint-stereo (downmixing some high trebles to mono or somehting like that). That was really terrible.
*



This used to be a debatable subject here not long ago. Yes, with LAME.
And the answer is actually that yes, it does "bad things" to prologic encoded signals, IF we understand bad things as the rear channels, listened alone, being distorted/artifacted.

The encoder cannot know if a signal contains pro-logic encoded audio. Either one would have to tell it so, or the encoder always assume that it is, and then, decreasing the encoder efficiency with the rest of the encodings.

I don't know, but i think that it isn't trivial to add such option.
Firon
LAME uses lossless (mid/side) joint stereo though, how could it affect Prologic? Or is it something else that's destroying the DPLII info?
SebastianG
Although M/S is just a lossless mapping an mp3 encoder could starve the "difference channel" (S). That probably leads to the rear channels sounding awful after DPL decoding.

Try the search function. IIRC there have been users stating that -ms sounds better after DPL decoding than -mj (with LAME!). I'm not saying use -ms or -mj since I havn't checked it for myself nor I'm sure if what those guys said is still true. OTOH I'm not really convinced that current LAME versions do not starve the S channel. Better try for yourself. I do remember though that Gabriel keeps saying S is not starved by LAME. smile.gif

Sebi
Gabriel
QUOTE
I do remember though that Gabriel keeps saying S is not starved by LAME.

Well, not intentionnally starved, at least.

Reminder for the pro-logic fans: listening to rear speakers in isolation is not a normal listening condition.
Woodinville
QUOTE(SebastianG @ Mar 13 2006, 01:02 AM)
Either way it increases encoding efficiency which is what counts. If files are smaller or of higher quality or a bit of both is really an implementation issue. By disabling channel coupling in the Vorbis code for example you'll get pretty much the same audio signal after decoding (at -q6 and above) but the files with disabled CC will be larger.

Sebi
*




Oookkaaaayyyyy...

Let's take the rate that is just transparent for the left channel in mono. Let's encode the left channel at that rate.

Let's take the rate that's just transparent for the right channel in mono. Let's encode the right channel at that rate.

Let's do this to "Tom's Diner".

Ok, what happens when we listen to both left and right channels in a stereo presentation, either headphones or speakers?

SebastianG
You made it look like the outcome of this experiment (whatever it may be) would be able to disprove my statement. I don't see that. (BTW: By implementation issue I referred to the bit allocation code.)

Sebi
halb27
QUOTE(Gabriel @ Mar 14 2006, 10:39 AM)
QUOTE
I do remember though that Gabriel keeps saying S is not starved by LAME.

Well, not intentionnally starved, at least.

Reminder for the pro-logic fans: listening to rear speakers in isolation is not a normal listening condition.
*


ms representation is equivalent to lr representation, but a few weeks ago I wondered what is actually done to the side part when encoded.

Is it treated exactly the same way as is done to the mid part (or the left and right part in lr representation)?

In case it is I'm a bit afraid that using the psy model on the difference signal may be inappropriate in certain situations because the difference signal has other characteristics towards masking effects.
Is this fear foolish?
Woodinville
QUOTE(SebastianG @ Mar 15 2006, 12:20 AM)
You made it look like the outcome of this experiment (whatever it may be) would be able to disprove my statement. I don't see that. (BTW: By implementation issue I referred to the bit allocation code.)

Sebi
*



Well, what this shows is that two good monophonic coders do not make a good stereophonic coder. While the statement that you get to use less bits is true of properly utilized M/S coding, I argue that that is different than it "saves you bits" by providing coding gain. I would argue that it allows you to use the coding gain, or most of it, to avoid having to overcode signals in order to prevent BLMD problems.
Woodinville
QUOTE(halb27 @ Mar 15 2006, 07:06 AM)
In case it is I'm a bit afraid that using the psy model on the difference signal may be inappropriate in certain situations because the difference signal has other characteristics towards masking effects.
Is this fear foolish?
*



Well, there is some work (Ferrierra/Johnston) out there that suggests ways to do a proper psychoacoustic model. I believe those results are out of date, but suggestive of the issues involved.
Firon
QUOTE(SebastianG @ Mar 14 2006, 04:18 AM)
Although M/S is just a lossless mapping an mp3 encoder could starve the "difference channel" (S). That probably leads to the rear channels sounding awful after DPL decoding.


Ahh, that does make sense. It sounds like a very possible situation. My knowledge of MP3 and its techniques is limited, so you'll have to forgive me tongue.gif
Garf
QUOTE(Woodinville @ Mar 15 2006, 11:03 PM)
QUOTE(halb27 @ Mar 15 2006, 07:06 AM)
In case it is I'm a bit afraid that using the psy model on the difference signal may be inappropriate in certain situations because the difference signal has other characteristics towards masking effects.
Is this fear foolish?
*



Well, there is some work (Ferrierra/Johnston) out there that suggests ways to do a proper psychoacoustic model. I believe those results are out of date, but suggestive of the issues involved.
*



LAME has had a model based on those results for a long time, so fear in that direction would qualify as unwarranted.
Garf
QUOTE(Woodinville @ Mar 15 2006, 11:02 PM)
QUOTE(SebastianG @ Mar 15 2006, 12:20 AM)
You made it look like the outcome of this experiment (whatever it may be) would be able to disprove my statement. I don't see that. (BTW: By implementation issue I referred to the bit allocation code.)

Sebi
*



Well, what this shows is that two good monophonic coders do not make a good stereophonic coder. While the statement that you get to use less bits is true of properly utilized M/S coding, I argue that that is different than it "saves you bits" by providing coding gain. I would argue that it allows you to use the coding gain, or most of it, to avoid having to overcode signals in order to prevent BLMD problems.
*



The cause for the confusion between you two is that you wouldn't notice that in Vorbis because the lower frequencies are overcoded no matter what stereo (or mono) mode is being used.

So effectively using M/S (or in the context of Vorbis, square polar stereo) will produce a coding efficiency improvement without BMLD ever explicitly factoring in. Conversely you won't get BMLD artifacts when using Vorbis with stereo files.

As far as I understand, the reason the low frequencies are overcoded is reportedly related to combatting blocking artifacts.

This leads to the obvious wondering whether BMLD is really blocking artifacts, whether those blocking artifacts are really BMLD, or whether both are correct and both sides of the argument were lucky to accidentally fix a problem they didn't know about when fixing another.

Ah, the difference between science and engineering.
Woodinville
QUOTE(Garf @ Mar 20 2006, 02:16 PM)
This leads to the obvious wondering whether BMLD is really blocking artifacts,


Obviously not, since one can cause BMLD without any coding at all

Try this:

Take a narrowband noise signal, 1 critical band wide. Put it in both channels. add a sine wave 7dB lower in the middle of that critical band to it.

Put the sine wave both in (one file) and out (the other file) of phase in the two channels.

Listen.

No coding, obvious BMLD.
QUOTE

whether those blocking artifacts are really BMLD, or whether both are correct and both sides of the argument were lucky to accidentally fix a problem they didn't know about when fixing another.

Ah, the difference between science and engineering.
*



Well "blocking" artifacts are simply frequency-response artifacts related to the coding aperature.

Below 1kHz, especially, overcoding is also a good idea because the ear is not only level sensitive but also waveform sensitive at those frequencies, and a full analysis by synthesis would be the only way to be sure you were 'under threshold' if you don't overcode there.

Different problem.
Firon
QUOTE(SebastianG @ Mar 14 2006, 04:18 AM) *

Although M/S is just a lossless mapping an mp3 encoder could starve the "difference channel" (S). That probably leads to the rear channels sounding awful after DPL decoding.

Try the search function. IIRC there have been users stating that -ms sounds better after DPL decoding than -mj (with LAME!). I'm not saying use -ms or -mj since I havn't checked it for myself nor I'm sure if what those guys said is still true. OTOH I'm not really convinced that current LAME versions do not starve the S channel. Better try for yourself. I do remember though that Gabriel keeps saying S is not starved by LAME. smile.gif

Sebi


I actually tried it on a few files with LAME 3.97b2, then set my decoder into Prologic II movie mode, and the rear channels sounded -terrible-. It was the same on the PLII music mode. However, I didn't try it on music or movies encoded with PLII (since I don't have any), just regular music, so I don't know if it would behave any better with proper PLII encoding.
SebastianG
I'd like to add this comment:
One can read in the Dolby Digital (AC3) specification that adaptive M/S matrixing is used in AC3 also to avoid DPL2 encoded stereo streams to sound awful. They recommend selecting a representation (L/R or M/S) with the lowest value of min(energy(channel1),min(channel2)).

So, M/S matrix is not in general a bad idea when it comes to DPL2. (It depends on what the encoder decides to do)

Sebi
Woodinville
QUOTE(SebastianG @ Apr 6 2006, 10:47 AM) *

I'd like to add this comment:
One can read in the Dolby Digital (AC3) specification that adaptive M/S matrixing is used in AC3 also to avoid DPL2 encoded stereo streams to sound awful. They recommend selecting a representation (L/R or M/S) with the lowest value of min(energy(channel1),min(channel2)).

So, M/S matrix is not in general a bad idea when it comes to DPL2. (It depends on what the encoder decides to do)

Sebi



You might also check out the old Johnston/Feireirra papers on that.
SebastianG
I may give the impression that I've access to all that stuff. But I don't. sad.gif

Sebi
Woodinville
QUOTE(SebastianG @ Apr 7 2006, 01:25 AM) *

I may give the impression that I've access to all that stuff. But I don't. sad.gif

Sebi


Drat. It's in an ICASSP paper somewhere, I think. You could check jj's web site for more accuracy.
pepoluan
A somewhat related question.

I happen to end up with 2 MP3 files of the same song, both at 192kbps CBR. But one is "stereo" and the other is "joint stereo" (as declared by fb2k).

Which one do you recommend to keep? My intuitive side of the brain keeps screaming "kill the 'stereo'", but my analytical side of the brain screams "Ask HA".

I know that ideally I should perhaps compare them side-by-side (i.e. using ABX tools), but remembering that these are 192kbps...

Kef
QUOTE(pepoluan @ Jun 21 2006, 19:32) *

A somewhat related question.

I happen to end up with 2 MP3 files of the same song, both at 192kbps CBR. But one is "stereo" and the other is "joint stereo" (as declared by fb2k).

Which one do you recommend to keep? My intuitive side of the brain keeps screaming "kill the 'stereo'", but my analytical side of the brain screams "Ask HA".

I know that ideally I should perhaps compare them side-by-side (i.e. using ABX tools), but remembering that these are 192kbps...


There are many other factors to consider than the "stereo" or "joint stereo" attributes. For example:

1. Version of encoder used.
2. Is there a low pass filter applied? (very likely, use something like foobars spectrum analyser to find out)
3. Algorithm quality (-q in lame is I'm not mistaken)
4. Quality is the ripped track. (What ripper was used for the ripping? Was there error correction or burst mode?)
5. Mastering of the CD? The track can come from different CD's and different compression is likely to been used.

I'm sure I forgot a few things, but as you can see it is an impossible question to answer, without more information. Keep them both. It's just a few megabytes anyway. smile.gif

If both mp3's where ripped from the same CD and compressed with the same encoder using default settings, I would keep to J/S one. (unless the encoder has a J/S bug...) smile.gif

/Kef
pest
QUOTE

A somewhat related question.

I happen to end up with 2 MP3 files of the same song, both at 192kbps CBR. But one is "stereo" and the other is "joint stereo" (as declared by fb2k).

Which one do you recommend to keep? My intuitive side of the brain keeps screaming "kill the 'stereo'", but my analytical side of the brain screams "Ask HA".

I know that ideally I should perhaps compare them side-by-side (i.e. using ABX tools), but remembering that these are 192kbps...


my intuitive side of the brain keeps screaming "buy the cd"
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.