IPB

Welcome Guest ( Log In | Register )

Lame and surround
Fr4nz
post Aug 6 2003, 12:45
Post #1





Group: Members
Posts: 102
Joined: 30-June 03
From: Venice (yeah, city of the gondola!!)
Member No.: 7470



Hi guys. I've read many past threads about Lame and encoding movies soundtracks from AC3 to Dolby Surround1/2. While many people claim that Lame preserves the phase informations thanks to its safe joint stereo mode, in this thread http://www.hydrogenaudio.org/forums/index....t=0&#entry47454 it's stated that only at very high bitrates (for e.g. --alt-preset extreme or insane(!!)) Lame can conserve surround infos in a decent way.

Anyway i've encoded lots of movie soundtracks with Lame, and the --alt-preset standard setting seems quite good to me for surround1/2 tracks.

Thanks for any answer!

Fr4nz
Go to the top of the page
+Quote Post
 
Start new topic
Replies
2Bdecided
post Aug 6 2003, 14:43
Post #2


ReplayGain developer


Group: Developer
Posts: 5110
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



I've always wondered about these two threads:

http://www.hydrogenaudio.org/forums/index....t=0&#entry47454
and
http://www.hydrogenaudio.org/forums/index....=ST&f=11&t=4109

because I had a brief look at this issue during my PhD, and found that it was a huge issue for some encoders, and not for others. I couldn't believe that our favourite encoders (i.e. lame --alt-preset standard, and mpc standard a/k/a --quality 5) could have such problems.

However, I've just tried the same kinds of testing as atom, and have found similar results.

If you listen carefully (and actually create the test sample yourself, and listen to front and surround at once, rather than just the surround on its own) you can figure out what's happening...

We have two channels of information, Left and Right. These can be transformed to Mid (or Sum) and Side (or Difference). These M and S channels can be encoded instead of the original L and R channels when joint stereo encoding is enabled, though the encoder still has the choice of encoding straight L and R if it wishes. Also, the encoder can trade bits between L and R, or M and S as it wishes - so, for a mono signal, S gets no bits.

Of course, M is the same as the centre channel in Dolby Stereo, and S is similar to the surround channel. In Pro Logic decoders, the signal is actively steered between the channels, so if the decoder detects that most of the signal should be going to the surround channel, it cuts off the front left, centre, and right channels - this stops the surround info also being present in the front Left and Right channels - a problem with the older passive Dolby Stereo decoding.


Both lame and Musepack have a problem at the "standard" settings where ever both the front and surround channels carry high frequency information simultaneously. I'm guessing at the psychoacoustic calculations that are involved, but where the out-of-phase components are significantly quieter than (i.e. masked by) the in-phase components, they are dumped.

This makes sense from a psychoacoustic point of view, and (as we know) works perfectly for stereo reproduction. The problem is that the surround decoding process takes the out-of-phase signal component, and moves it behind you. The in-phase signal component that was masking it is now unable to do so. (I found that spatial unmasking was about 15dB for coding noise moved 90 degrees away from the original signal).

Accepting that you won't actually listen to the surround channel in isolation, the coding artefacts are bad enough that they are audible when listening to all channels at once using a typical surround system. I'm judging this by knowing the level of artefacts that are needed to be audible in this context, and comparing it to the level of artefacts I'm now hearing listening via headphones - I haven't verified it using a real surround sound system. But I'm willing to bet that it's true, especially for people who have their surround speakers closer than their front speakers, and don't compensate.

The 8kHz bandwidth on Dolby Pro Logic will help to hide the problem, but the problem goes down to 4kHz, and DPL2 doesn't have this bandwidth limitation.


Now, this result holds when you make an intentionally difficult signal yourself by combining various signals. So why do people encoding movies not encounter serious problems - after all, they're often only using 128kbps!!! Well, because of the steering in Dolby Pro-logic decoders, it's important that the dominant sound source only comes from one direction at once, otherwise they'll be no effective steering. So, in a movie sound track, there shouldn't be an instance where there's significant high frequency info from both the front and surround channels.

If the movie producer wants the sound to come from all around (subtle ambience), then I'd guess the surround has to be loud enough to prevent the steering from shutting it off. So it's possible that, when the mp3 or mpc encoder does destroy the surround channel, the pro-logic encoder has shut it off anyway, and where the pro-logic encoder has left all channels open, there's enough information in each channel that none of it is "masked", and hence none of it is discarded by the encoder.

This assumption may work pretty well for movies, and a dolby decoder. It will probably break for music, which isn't specially encoded to cause a DPL encoder to steer the signal, but can have any relative levels of in-phase and out-of-phase information. It will probably break for an arbitrary dematrix operation (e.g. Logic7, DPL2) which is trying to extract subtle ambient info from "stereo" sources.



In short: Movie sound tracks will probably be OK, but there will almost certainly be instances where music will not be.

Cheers,
David.

P.S. Would it be possible to adapt the lame or musepack psychoacoustic model to perform masking calculations on L, R, M, and S rather than just one pair of them? It would increase the bitrate, but make any stereo source dematrix safe.

EDIT: sorry this is so long - there have been three posts while I was typing this!!!

EDIT 2: Months later, I edited this post to remove all the repeats which were added within the text when it was originally posted by a forum bug (which has since been fixed). I don't normally return to old posts and "correct" them, but I wanted to link to this, and found it unreadable. All the comments below about a long and repeating post were referring to the original "damaged" version.

This post has been edited by 2Bdecided: Dec 8 2003, 10:54
Go to the top of the page
+Quote Post

Posts in this topic
- Fr4nz   Lame and surround   Aug 6 2003, 12:45
- - sld   Pardon me, but did you ask a question?   Aug 6 2003, 13:17
- - Fr4nz   Yes, sorry for my english The question would be...   Aug 6 2003, 13:21
- - TrNSZ   What do you mean by Dolby Surround? If you are sp...   Aug 6 2003, 14:20
- - Fr4nz   QUOTE (TrNSZ @ Aug 6 2003, 05:20 AM)What do y...   Aug 6 2003, 14:32
- - smok3   i remember the thread on HA where someone was test...   Aug 6 2003, 14:37
- - 2Bdecided   I've always wondered about these two threads: ...   Aug 6 2003, 14:43
- - Fr4nz   Lol you're post is a little fucked up but I un...   Aug 6 2003, 15:00
- - Lev   QUOTE EDIT: sorry this is so long - there have bee...   Aug 6 2003, 15:10
- - Gabriel   David, your post would probably be more understand...   Aug 6 2003, 15:23
- - CiTay   QUOTE (Gabriel @ Aug 6 2003, 04:23 PM)David, ...   Aug 6 2003, 15:37
- - TrNSZ   Yeah, it's the board formatting causing the er...   Aug 6 2003, 16:02
- - 2Bdecided   QUOTE (TrNSZ @ Aug 6 2003, 03:02 PM)Yeah, it...   Aug 6 2003, 17:08
- - Fr4nz   If I remember well --alt-presets uses nssafejoint ...   Aug 6 2003, 17:51
- - TrNSZ   I recall having a similar discussion on the r3mix ...   Aug 6 2003, 17:56
- - kxy   QUOTE (Fr4nz @ Aug 6 2003, 08:00 AM)Lol you...   Aug 6 2003, 18:41
- - Fr4nz   QUOTE (kxy @ Aug 6 2003, 09:41 AM)QUOTE (Fr4n...   Aug 6 2003, 18:54
- - Fr4nz   So guys --nsmsfix 1.0 is the way to go for encodin...   Aug 7 2003, 09:05
- - 2Bdecided   QUOTE (Fr4nz @ Aug 7 2003, 08:05 AM)So guys -...   Aug 7 2003, 10:42
- - Fr4nz   QUOTE (TrNSZ @ Aug 6 2003, 08:56 AM)II guess ...   Aug 7 2003, 11:19
- - 2Bdecided   I've had an email from Frank. He asked 6 sensi...   Aug 8 2003, 13:33
- - Fr4nz   David you're totally right. If I put my ears n...   Aug 8 2003, 13:45
- - Fr4nz   David are you alive?? I'm waiting for a PM rep...   Aug 10 2003, 11:04


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd September 2014 - 20:39