Gabriel
Jan 9 2003, 04:08
There is a small point that I do not get.
To my mind, if we have L and R in phase opposition, then the S signal will be 0. In this case, we can not reconstruct the initial L/R once we passed through the M/S space.
This would means the M/S transformation can destroy phase information, and so surround (in the DPL way) information.
So, is M/S space able to preserve phase (and so surround) or no?
Comments are welcome.
mp3 encoder:
M = (L + R) / sqrt(2)
S = (L - R) / sqrt(2)
mp3 decoder:
L = (M + S) / sqrt(2)
R = (M - S) / sqrt(2)
These calculations are bijective, because the equations of the decoder (L, R) are derived directly from the equations of the encoder (M, S). That means, that the Mid/Side-Stereo transformation itself is lossless.
Two examples:
input: L=1, R=1 (mono sound)
encoded: M=sqrt(2), S=0
decoded: L=1, R=1
input: L=1, R=-1 (phase inverse sound)
encoded: M=0, S=sqrt(2)
decoded: L=1, R=-1
Gabriel
Jan 9 2003, 08:24
Yes, I made a mistake.
So in case of phase opposition, everything is in S (if R was negative). In compression, that might means that in this case we should not be biased toward M channel by allowing more bits to it than S.
Or perhaps detect the frequency point at which phase shift occurs and favorise M below and S upper?
tangent
Jan 9 2003, 09:21
When there are too many things in S, I guess the encoder switches to SS mode.
Vietwoojagig
Jan 9 2003, 09:58
OK, maybe a silly question for someone who is inside this encoding/decoding thing, but why /SQRT(2)?
Why not:
mp3 encoder:
M = (L + R) / 2
S = (L - R) / 2
mp3 decoder:
L = (M + S)
R = (M - S)
Seems to me much easyer to calculate? And the information is the same.
Gabriel
Jan 9 2003, 09:59
At least Lame switches to SS when L/R differ more than a given account.
So next question is: would it be possible that L and R would be considered similar enough (ie phase would not be taken into account when computing similarities) in case of phase opposition.
I think that in such case, perhaps it would be interesting to switch to MS, but favorising S channel.
Ivan Dimkovic
Jan 9 2003, 10:10
QUOTE
OK, maybe a silly question for someone who is inside this encoding/decoding thing, but why /SQRT(2)?
Well.. ask people who designed MPEG Layer III standard

AAC uses 2 instead of sqrt(2)
Regarding this side channel issue - similar problems were examined in AAC encoder implementation. On some mono-like signals (where L and R channels have very similar energy) there was a possibility to code S scalefactor band improperly (AAC has advantage - it can switch from L/R to M/S per scalefactor band) - energy in side channel is very low, and quantizer just zeroes it out. After reconstruction in decoder, these signals have "thrill" - small "vibrato" between channels.
Gabriel
Jan 9 2003, 10:28
Ivan, what would you do in a subband with phase opposition? Code in L/R, or code in M/S with emphasis on S instead of M?
In such cases, I think AAC should be easier, with ability to use LR or MS for each subband.
Ivan Dimkovic
Jan 9 2003, 11:07
Hmm - since M/S decision is done in energy (power spectrum) domain, all coefficients are positive - so decision module does not take phase into account.
Emphasis (bit allocation) is done by taking perceptual entropy and bit reservoir status in the account - regardless of subband type (L, R, M, S)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.