View Full Version : Dolby Pro Logic II encoding test (90° vs 180° phase shift)
Rockaria
22nd June 2006, 22:18
OK. thanks for pointing the typos instead of answering my Qs.
(Actually I stopped the further model refining after the reults of the <m11> and thinking the seperation plan is optimized for the DPL II decoder. Of course, I will have to reagrrage the models any time soon.)
You seem to be really proud of your invert-only s/w encoder efforts, three years ago. I wonder if Valex' has implemented the 90 deg shifts by delaying the frequencies accordingly since then.
But I want to make it very cleare that WE are interested in the 90 deg phase shifts implementation(no ommissions from the Dolby's spec).
If you are not interested in the enhancements, please at least stop advertising or over-protecting your partial implementation. No music users will go back, once tasted the full implementations. Nobody here is depreciating your efforts also but yourself.:cool:
bleo
23rd June 2006, 04:08
Ls' and Rs' are separated by their different amplitudes (the 0.866 and 0.5 coefficients) in Lt and Rt.
I have tested the matrix <m11a>:
Lt = L + 0.7071 C - 0.866 Ls (-90°) - 0.5 Rs (-90°)
Rt = R + 0.7071 C + 0.5 Ls (-90°) + 0.866 Rs (-90°)
I made a 6-channel sample with 10sec of pink noise in L, then C, R, Rs, Ls. I then downmixed to DPL2 using <m11a> in Cool Edit. I then decoded back to 6-channels using WinDVD's DPL2 filter. The output channels were all very well separated with very little leakage.
I will upload the files once I organize some webspace.
Rockaria
23rd June 2006, 05:11
I have tested the matrix <m11a>:
Lt = L + 0.7071 C - 0.866 Ls (-90°) - 0.5 Rs (-90°)
Rt = R + 0.7071 C + 0.5 Ls (-90°) + 0.866 Rs (-90°)
It's actually <m11>...
Thanks for the first verification(besides me) of the seperation quality of the 90° shift model.:thanks:
The model from the specise's linked DPL 1 document(now I can open it) seems actually based on <m11a>.
I am not familiar with the CoolEdit's PhaseShift(which direction actually it shifts if we (can) ignore the align()), but I don't think the sign will make not so big differences, although it may actually create the different mixure of the images.
The constants used seems reasonable(1:3 on coef dB) and I believe can be used for the default values before any custom pannings(based on Dolby's doc I linked recently, I read we sometimes need to adjust the panning by the ch-signal types used).
My rough interpretation(just to match) might be helpful for dB unit users(based on DPL 1+) :
. -3dB == 0.5 ~= 0.7071
. (-3dB, -9dB) == (0.5, 1/8) ~= (sqrt(3/4), sqrt(1/4)) == (0.866 , 0.5)
http://en.wikipedia.org/wiki/Decibel
raquete
23rd June 2006, 05:41
hy boys,
i will this help the thread:
from "Dolby Surround Pro Logic II Decoder Principles of Operation.pdf (Dolby.Inc)"
(is too big but very clever)
please pay atention in the green retangle(and red lines) and in the text about "antiphase signal".
http://img471.imageshack.us/img471/8374/018by.png http://img217.imageshack.us/img217/6011/026oy.png http://img217.imageshack.us/img217/2186/034zi.png http://img69.imageshack.us/img69/6267/049zw.png
thanks.
Rockaria
23rd June 2006, 06:31
Yes, invert() == '-' in the bleo's formula! Everybody seems to agree now.
That must be a good visual guide, better than the links(several times here).:D
One thing to remind is that it's for DPL 1. For DPL 2, I found the 1:3~4 ratio on the coef 1: coef 2 is optimized.
It is similar to the -4.5dB or -6dB attenuation ratio used by bleo(btw, what is the source?).
Another thing is that depending on the mix process(mix all together or by steps) and algo used, the resulting ratio will be changed.
One last thing is that there are actually some more formal/personal matrices used beside the Dolby's -3dBs.
I think at least we need to evaluate them depending on the mix processes, effects & tools we choose. Thanks.
3dsnar
23rd June 2006, 06:42
Ls' and Rs' are separated by their different amplitudes (the 0.866 and 0.5 coefficients) in Lt and Rt.
I have tested the matrix <m11a>:
Lt = L + 0.7071 C - 0.866 Ls (-90°) - 0.5 Rs (-90°)
Rt = R + 0.7071 C + 0.5 Ls (-90°) + 0.866 Rs (-90°)
I made a 6-channel sample with 10sec of pink noise in L, then C, R, Rs, Ls. I then downmixed to DPL2 using <m11a> in Cool Edit. I then decoded back to 6-channels using WinDVD's DPL2 filter. The output channels were all very well separated with very little leakage.
I will upload the files once I organize some webspace.
Bleo, can you do the same with the signals from this post:
http://forum.doom9.org/showthread.php?p=838650#post838650
It will be also possible to determine phase changes after separation (to see wether the decoder compensates the 90 deg. phase shift), etc.
I will provide all the pictures and analysis results
which I will perform in Matlab.
Please let me know,
3d
raquete
23rd June 2006, 07:08
Yes, invert() == '-' in the bleo's formula! Everybody seems to agree now. this is not what i understood. :stupid:
the S input is also reduced by 3dB,but before being divided equally between Lt and Rt,the signal has 90-degree phase shift applied relative to L,C, and R. Finally, the S signals are carried in Lt/Rt with opposite polarities
correct me please if i'm wrong but what i understood about "opposite polarity" is:
S(-90) to Lt
S(+90) to Rt
:thanks:
Rockaria
23rd June 2006, 07:50
Well, suppose if you have only -90 deg shift logic.
If we can ignore the delay(cycle advance) :
+90 == -90.invert() == -90 - 180 == -90 + 180 : any routine is ok
If we count the delay :
+90 == -90.invert() == (-90 + 180).align()... : align() is introduced
So :
S(-90).invert() == S(+90), same result but the process included to get the final result is differernt
The reason why I do not want to optimize the process(formula) is to respect(identify) the original encoding & decoding process.
hilbert(). invert() instead of simple +90
Mathmatically, it looks stupid. But sometimes it's very useful to identify the hidden process/logic.
Also If you continue to optimze them from person to person any further for any reasons, you might even get the 180 deg(invert-only) model
or to an extreme, the simple downmix, progressively detached from the reality.
ursamtl
23rd June 2006, 13:52
hy boys,
i will this help the thread:
from "Dolby Surround Pro Logic II Decoder Principles of Operation.pdf (Dolby.Inc)"
(is too big but very clever)
please pay atention in the green retangle(and red lines) and in the text about "antiphase signal".
Exactly!
No offense to the participants, but seriously this thread has been going on for days now and dancing around the same point. Dolby says that it encodes the surround signal with a -90deg phase shift for the Lt channel and a +90deg phase shift for the Rt channel. This applies to DPLII as well as DPLI.
The difference between DPLI and DPLII are (as I understand them) the following and only the following:
DPLI: surrounds limited 100Hz to 7kHz with special Dolby B noise reduction
DPLII: surrounds full range
DPLI: one mode of operation with 20ms delay on surround to take advantage of the Haas effect so that sounds appear to be coming from the front channels.
DPLII: two modes of operations. Movie Mode, which features the same 20ms delay as DPLI and an active Center. Music Mode, which does not have a delay between front and rear. IIRC, it also does not have a center speaker output but relies on phantom imaging for the front Center.
DPLI: single channel surround output (may be spread across two speakers but still mono).
DPLII: stereo surround output using a steering logic to ensure that the matrixed surround channel is separated into two distinct channels.
Notice that there doesn't seem to be any real difference in the encoding method. There may be commercial encoding software available for DPLII, but Dolby's documentation seems to indicate that the differences between DPLI and DPLII are all on the decoding side.
Now, if you look carefully at all of the decoding differences, there are only two that are not quite clear or relatively easy to duplicate in hobby/project software: the Dolby B noise reduction and the steering logic. As for the noise reduction, if one is interested more in DPLII, it's not very crucial. The steering logic, however, IS essential.
Therefore, IMHO, you folks would more quickly get some good results if you simply accepted Dolby's recommendation to encode the surrounds with the -90deg and +90deg phase shift and then focus on the steering logic. You'll notice that Bleo used the +-90 in his most recent post and the results were very good.
Sorry if this message seems a bit harsh, but it seems this thread at times is getting bogged down or going around in circles with arguments over whether a -- is the + or whether inverting a channel is the same as a -, etc., etc.
So here's the real challenge for you folks. Figure this out:
(thanks to Raquete for the image)
http://img69.imageshack.us/img69/6267/049zw.png
Regards,
Steve.
3dsnar
23rd June 2006, 14:18
Therefore, IMHO, you folks would more quickly get some good results if you simply accepted Dolby's recommendation to encode the surrounds with the -90deg and +90deg phase shift and then focus on the steering logic. You'll notice that Bleo used the +-90 in his most recent post and the results were very good.
Exactly.
However do we all agree, that if the surround channels are already +-90 deg shifted the simple downmixing method (with only sign inverting) is correct?
So the best automated way would be to scan the whole signal and determine phase relation between fronts and surrounds (and adjust it if necessary) and then proceed with downmixing.
Rockaria
23rd June 2006, 19:11
Boys go dancing?
Sorry if this message seems a bit harsh, but it seems this thread at times is getting bogged down or going around in circles with arguments over whether a -- is the + or whether inverting a channel is the same as a -, etc., etc.
<<it seems to produce a -90° phase shift, so for the +90° shift, you'll need to invert the signal
...
Notice that there doesn't seem to be any real difference in the encoding method.
It's more than harsh. What a supid boy try to make another +90° shift logic when they already have -90°?
Raquete, was my answer above enough for your inquiry or too enough(at least it's my 20 years old system analysis rule)?
ursamtl, so you decided to completely forget the cross channel-coefficient-imbeding which is the major different feature for the DPL II decoder steering logic?
Nobody has explained the coef ratio(1:3) but started to use it since 3 years ago. Keeping the silence is a good virtue on legacy thing?
If you don't understand the black box clearly, at least have a correct approach to figure out the uncertain things prior to any attempt of misleading conclusions. That's the basic virtue of any participants.
Why nobody except me and now bleo test the new models and verify the seperation quality it produces? Do you think you can prove it with the mouth only?
ursamtl
23rd June 2006, 19:34
Exactly.
However do we all agree, that if the surround channels are already +-90 deg shifted the simple downmixing method (with only sign inverting) is correct?
So the best automated way would be to scan the whole signal and determine phase relation between fronts and surrounds (and adjust it if necessary) and then proceed with downmixing.
I agree that the +-90deg shift should occur in the encoding phase only since that's what Dolby describes in their documentation. I also agree with the decoder using the surround and the inverted surround since this is also documented by Dolby.
What I don't get is the need to scan for phase relationships and adjust. Simply downmix using the +-90deg phase shifts, since downmixing is in essence the same thing as encoding in the context we're discussing.
ursamtl
23rd June 2006, 19:52
Rockaria,
There were two reasons I mostly stayed silent on this debate. Number one, I have very little interest in Dolby Pro Logic I or II. Number two, the tone of this thread has often been quite negative and combative. I tried to point out earlier that we can all be passionate about our positions, but let's relax and enjoy the experimentation. However, you seem to take this far too personally. As long as what I said seemed to back up your "side" of the argument, you referred to me as being unbiased. If, however, I write something you don't like or that doesn't back your "side", you suddenly seem to get angry! Dude, relax! Don't take this as a personal attack on you. If you do, then that's your problem. Don't turn the thread into your personal battle.
If you read what I wrote, you will see that I pointed out that steering logic is what you should be focusing on. Obviously I didn't forget it! If I don't join in testing all the different coefficients it's because I don't want or need to. I played around with Dolby Pro Logic I and II over two years ago and have no further desire to. I jumped into this discussion mostly to nudge it in a more positive direction. That seems to be impossible if anyone disagrees with you because you take it far too personally! If you do, it just makes the debate unpleasnt for everyone concerned. Plus, if the thread gets too negative, the moderators will simply close it. That certainly won't help anyone gain a better understanding!
Boys go dancing?
It's more than harsh. What a supid boy try to make another +90° shift logic when they already have -90°?
Raquete, was my answer above enough for your inquiry or too enough(at least it's my 20 years old system analysis rule)?
ursamtl, so you decided to completely forget the cross channel-coefficient-imbeding which is the major different feature for the DPL II decoder steering logic?
Nobody has explained the coef ratio(1:3) but started to use it since 3 years ago. Keeping the silence is a good virtue on legacy thing?
If you don't understand the black box clearly, at least have a correct approach to figure out the uncertain things prior to any attempt of misleading conclusions. That's the basic virtue of any participants.
Why nobody except me and now bleo test the new models and verify the seperation quality it produces? Do you think you can prove it with the mouth only?
Rockaria
23rd June 2006, 20:52
I'm beginning to agree with 32, ****************
I also start to change my view on your approches or D****, ****IS COM****L.
Before mentioning the 'like, dislike, personal, angry, jump on', what you need to understand is we must keep the mutual respects to the anonymous.
If you have backuped any of my views, it should be because you think it's right, nothing else. Otherwise, it's just a child game.
As you admitted in the beginning, you may not have enough knowledge on DPL II because of several reasons, compared to your other experiences.
I liked the unbiased opinions from your experiences on this audio area. But as for the system analysis on the uncertain area is what I am majored in.
You started to have & expose the WILL to drive. To my point of view, by asserting the DPL II encoding SAME as DPL I and excluding the rear-stereo seperation plan, even though I explaind so many times about the rear stereo-coefs, you started dancing.
It's more than dangerous in my views, almost same as regarding the 90 deg shift concept to 180 deg one.
It's like trying to explain the water with H2 only without considering the Oxygen.
At least, I skimmed the Dolby's docs twice before. Why do you think I didn't know the steering logic? simply because I aknowledged you by 'pin-pointing' & 'no spec yet,ursamtl' ? What if I say I't was my way of confirmation?
Don't look down on people who might have better experiences on certain area, which is also the reason we can help each other.
As far as you keep the unbiased opinions, I will acknowledge you. But if you ever attempt to mislead in the approach, I think it's my duty to point them out. That's all. So you can think you are warned by me Dude.
About the 'debate, combat,,,,' : Have you seen myself accusing people first & at all? I just wanted to protect myself & VIEW and promote the possible debates to conversations. This thread started to prove the legacy is better than the Dolby's spec, yeah over-protecting the VIEWS related, not in a scientific way at all. And I think we have almost calmed down it to the correct direction, until you started it suddenly.
scharfis_brain
23rd June 2006, 21:20
One question: how 'unbiased' (as you understand it) are YOU?
ursamtl
23rd June 2006, 21:24
One question: how 'unbiased' (as you understand it) are YOU?
Hehe. Good one. Reminds me of that line in Orwell's Animal Farm about all animals being equal, except that some are more equal than others!
Rockaria
23rd June 2006, 21:26
One question: how 'unbiased' (as you understand it) are YOU?What is the reason asking me? Would you elaborate some more on it, followed by your own confession?
Rockaria
23rd June 2006, 21:27
Hehe. Good one. Reminds me of that line in Orwell's Animal Farm about all animals being equal, except that some are more equal than others!
Boy, I totally changed now. Play the animal kids game here.
bleo
23rd June 2006, 22:05
However do we all agree, that if the surround channels are already +-90 deg shifted the simple downmixing method (with only sign inverting) is correct?
So the best automated way would be to scan the whole signal and determine phase relation between fronts and surrounds (and adjust it if necessary) and then proceed with downmixing.
I agree. The 6-channel materials that we are downmixing to DPL2 are mostly DD5.1 movie soundtracks. The Sonic Foundry Soft Encode DD5.1 encoder by default applies 90° phase shift to the surround channels. So if we were to downmix such a DD5.1 soundtrack to DPL2, the input channels will be: L, R, C, Ls (90°), Rs (90°); and the matrix that we actually use will be:
Lt = L + 0.7071 C - 0.866 Ls - 0.5 Rs
Rt = R + 0.7071 C + 0.5 Ls + 0.866 Rs
Substitute the input channels into the matrix and the total result will be:
Lt = L + 0.7071 C - 0.866 Ls (90°) - 0.5 Rs (90°)
Rt = R + 0.7071 C + 0.5 Ls (90°) + 0.866 Rs (90°)
which is exactly what we want :) and coincidently, what we've been doing for the past several years, blissfully unaware of 90° phase shifts... :)
Now the question is how do we know if the surrounds of a DD5.1 soundtrack are already 90° phase shifted? I don't think it's easy without having the original 6-channel source from before DD5.1 encoding. Otherwise, we don't know the correct phases of the surround channels, or even what relationship they are supposed to have with the fronts (they may contain completely different material).
bleo
23rd June 2006, 22:16
@raquete: I'm still trying to work out which should be + or - 90° in the matrix. It is a bit more complicated because one of the surrounds gets inverted in the output depending on whether you are using Movie or Music mode.
@3dsnar: I downloaded your test samples, but there's a problem since the WinDVD DPL2 decoder silences the first 2 seconds of its output. I will create a similar test sample myself, so please tell me if there are any specific parameters that I should include.
bleo
23rd June 2006, 23:48
I made a 6-channel test sample that contained 3 sec silence then 3 sec sine waves in the L, then C, R, Ls and Rs channels. I downmixed it to DPL2 using Cool Edit and the matrix:
Lt = L + 0.7071 C - 0.866 Ls (+90°) - 0.5 Rs (+90°)
Rt = R + 0.7071 C + 0.5 Ls (+90°) + 0.866 Rs (+90°)
I then upmixed it using the WinDVD DPL2 decoder in Movie mode.
Results:
- The entire output was delayed by 5msec.
- The surround output channels were delayed by an additional 15msec.
- The surround output channels were both -90° phase shifted relative to the original inputs.
In a second experiment, I encoded a 6-channel test sample that contained sine waves to DD5.1 using Sonic Foundry Soft Encode. It phase shifted the surround channels by +90°
Rockaria
23rd June 2006, 23:54
bleo, thanks for the detailed test results.
I agree. The 6-channel materials that we are downmixing to DPL2 are mostly DD5.1 movie soundtracks...
Indeed, I read the SoftEncode has the '90 deg phase shift option' for DD5.1 rear channels, which later can be invert-downmixed to DPL or DPL II(cross coefs mixed).
This filter should generally be used whenever encoding a multichannel signal unless
it is known that the 5.1-channel source does not contain point-source element pans.
should use-unless-does not contain == should use-if not-not-contains == should use-if contains?
However here arise some issues:
. rears shifted for later possible DPL invert-downmix only from DD5.1 having the point-source element pans
. does the DD.5.1 decoder detect the 'rears shifted' info anyhow(meta tag or stream) and play the rears in normal phase?
. if not, doesn't it have any negative effects in volume and panning in AC3 decoding itself?
I believe it's still an exceptional case limited to DD5.1 encoding & decoding/downmix and the solution(if any) should be sought there.
The full DPL II solution is also good for PC 6ch music play through the analog-2ch-DPL II receiver(FFDShow), let alone the multi platform, compact size use, with relatively decent seperation fidelity & overall decent quality. And it at teast does not prove the Legacy is better than the Dolby's spec.
My simple idea for the detection of the shifted image is : it has generally low altitude(volumes) than the non shifted one, which can be verified by shfting it visually.
So the general consensus is the FULL implementation of the DPL II spec and possibly have the option to detect the originally 90 deg. shifted rears and suggest not to apply again?
Rockaria
24th June 2006, 02:36
@Raqueue and anybody still misunderstanding the +-90 shifts on the Dolby's doc,
The S input is also reduced by 3 dB, but before being divided equally between Lt and Rt,
the signal has 90-degree phase shift applied relative to L, C, and R.
Finally, the S signals are carried in Lt/Rt with opposite polarities
(note the "-" sign in the summing stage feeding the Lt output). Clearly, it describes there are practically two steps which you missed by just looking at the result : diagram.
When the stream is finally mixed to the Rt(or Lt, one side), it will be invert-mixed.
Also the cost of invert logic(circuit) is relatavely ignorable than the all-pass filter, it's not desirable at all to develop a redundant +90 shift logic, which is exactly what Dolby described in the document.
You didn't need to use the misleading 'boys enforced by Exactly recursively' on this small discovery which I evaluated already.
Rockaria
24th June 2006, 03:14
A snippet from the Surcode DPLII Encoder Manual.
9.4 Invert Right Surround
In Pro Logic II, the Ls and Rs outputs are intended to be out of phase by
180 degrees for surround steered inputs. However, if the decoder is set to
Movie mode, the polarity of the Rs output is inverted in order for the Ls
and Rs outputs to be in phase. This improves phantom rear center
imaging.
A snippet from the Surcode DPLII Encoder Manual.
This would make sense since DPLII music mode is generally promoted by
Dolby as intended for simulating 5-channel surround when listening to
regular stereo music. As such, they don't want accurate phantom center
imaging in the rear; they want diffuse ambience.
also I want to add that there won't be any phantom center surround anymore
when inverting one of the surround channels before downmixing. The centered
surround will be sent to the front center instead.
So this must be a mistake in the SurCode Manual or even in the SurCode
program itself.
Did I read it wrong? I wonder why the movie mode issue suddenly changed to the music mode?
Does anybody think this kind of posts any helpful to promote the positive contributions?
I actually started to worry from here.... The Good Will seems to have decided to stay as a gentleman as before.
bleo
24th June 2006, 04:29
This filter should generally be used whenever encoding a multichannel signal unless it is known that the 5.1-channel source does not contain point-source element pans.This is confusing English. It means:
- If the source contains point-source element pans, you must use 90° phase shifts on the DD5.1 surround channels.
- If the source definitely does not contain point-source element pans, you can choose to turn off the 90° phase shift filter. (It should not hurt to leave it on).
- By default, the 90° phase shift filter is on.
- Note that most of the time, you don't know whether the source contains point-source element pans.
Also in section 4.7.5: Surround Channel 90-Degree Phase-Shift it says:
The 90-Degree Phase-Shift parameter should always be left enabled except under specific conditions. These include, but are not necessarily limited to, system calibration, encoding of certain test signals, and in the extremely rare case when the discrete playback of highly coherent program material may be compromised.
I take "highly coherent program material" to mean that the surround channels must keep the same phase relationship with the fronts. There is an example of this back in section D.1:
if the source was recorded using five discrete microphones placed in the corners of an auditorium, there is no panning between channels and the filter could be safely disabled.The microphones are already setup in positions matching DD5.1 playback speakers. The phase relationships should not be altered.
Note that this entire post is about 90° phase shifting the surround channels when encoding DD5.1.
raquete
24th June 2006, 04:48
@Raqueue and anybody still misunderstanding the +-90 shifts on the Dolby's doc,...
i'm not misunderstanding anything because i don't know anything about DPL I or II.
i don't know "nothing" (and who don't know nothing don't understand anything and can't misunderstand anything :p hey,i'm philos-off :p )
Rockaria trust me,i'm learning here with you all,this thread is like a "school" for me.
Rockaria
24th June 2006, 06:48
Yeah, that's what I finally figured out by excluding the two 'NOT's. I don't like this style.(two negatives==positive==invert().invert()) : severe waste of my CPU cycles
- If the source definitely does not contain point-source element pans, you can choose to turn off the 90° phase shift filter. (It should not hurt to leave it on).
This type of corner-positioned mic sources are considered to have (invert)phase shifted rear channels. So there might still necessary some more inverting process to cross mix the rear channels for later DPL II downmixes.
Also if we consider the processing of the 90 phase shifts on the rears, without any mastering, the rears might have 0 & 180 phases, which may require some verifying before deciding to enable. Also I am not sure if it's OK(fidelity) for the DD5.1 playback.
The Dolby family codecs seems asking a strongly forced compatibility as using all 'should's & default-on option.
But what is certain is that we can safely regard it as a simple suggestion only when we consider the later optional DPL downmixing.
. The 90-Degree Phase Shift filter provides a means for an encoding engineer to create a multichannel Dolby Digital bitstream that can be downmixed to a Dolby Surroundcompatible Lt/Rt output.
. The SoftEncode has the default-on option for 90-Degree Phase Shift
. But I strongly believe we SHOULD disable the feature for a wider compatibility
Personally, I think it's an undesirable forced feature for either DD5.1 playback or no-custom-downmix., I will choose 'disabled' if I have to DD encode.
The issue of "highly coherent program material" implies there can be some unexpected side effects(fidelity loss) by the unrecovered DD5.1 playback from the optional feature. I will not choose the 'should be enabled option for some rare later DPL downmix opportunity' for this reason too.
Thanks for your analysis bleo, it helped me a lot for my evaluation.
Rockaria
24th June 2006, 06:56
What we've learnt from the 'phase shifts' :
i don't know "nothing" == you know everything ( you know everything when you are interested in, in the end or now if aligned)
positive+positive = 45+45|155 = 90|200 = 90|-160 = positive|negative = +-positive : so no right(x).right(y) pls. it's confusing..
@raquete, what I count is you love music, since long ago. that's not nothing, believe me:cool:
3dsnar
24th June 2006, 09:19
I made a 6-channel test sample that contained 3 sec silence then 3 sec sine waves in the L, then C, R, Ls and Rs channels. I downmixed it to DPL2 using Cool Edit and the matrix:
Lt = L + 0.7071 C - 0.866 Ls (+90°) - 0.5 Rs (+90°)
Rt = R + 0.7071 C + 0.5 Ls (+90°) + 0.866 Rs (+90°)
I then upmixed it using the WinDVD DPL2 decoder in Movie mode.
Results:
- The entire output was delayed by 5msec.
- The surround output channels were delayed by an additional 15msec.
- The surround output channels were both -90° phase shifted relative to the original inputs.
In a second experiment, I encoded a 6-channel test sample that contained sine waves to DD5.1 using Sonic Foundry Soft Encode. It phase shifted the surround channels by +90°
OK, Bleo, thanks for the test.
1) I assume that the sinusoids (in all channels) had the same amplitudes before downmixing. Did they have the same amplitudes (in all channels) after decoding (if yes, this implies the weights were correct, because they must be an arbitrary values assumed by the decoder in order to recreate the original amplitude of all channels).
2) The fact that the decoded signals were -90 deg shifted means that the downmixing equations should look like
Lt = L + 0.7071 C + 0.866 Ls (+90°) + 0.5 Rs (+90°)
Rt = R + 0.7071 C - 0.5 Ls (+90°) - 0.866 Rs (+90°)
(???)
3) It would be the best to use for example square waves (instead of sinusoids) because it will be possible to distinguish between time delay and phase shift applied to all sinusoidal partials (i.e. phase shift does not affect the waveform shape)
Also, my observation (I am curious if any of you agree) is that
since the decoder does not compensate the 90 deg. phase shift
it means that the process of preparing the audio material is something separate than the downmixing (it is like a recommendation how to prepare the audio material for downmixing)
So I think that NOT including the 90 phase shifts in the downmixing equation is fully correct, because the inverse process does not compensate that (assuming that the inverse process is supposed to attempt to recreate the original). The 90 deg. shift should be viewed as some audio preprocessing to assure the best possible performance. However treating it as a part of the equations implies using them, which is not true for all cases.
So the DPLII material preparation should be rather described as a two stage process
1) Audio preprocessing (to assure correct phase relations between fronts and surrounds)
2) Downmixing with the use of equations with only sign reversing.
But I guess this is a bit matter of taste...
------
And some short remarks to some other posts
A) It is not possible to determine whether the signal is, or is not 90 deg shifted (without knowing the original). I.e. any methodology will work in some rare cases, and in others will not
(consider for example pure sinusoids or noise)
B) It is possible to roughly calculate phase relation between pair of channels (e.g. between FL and SL or FR and SR). It is also possible to change the phase. It could be done for the total signal, or in overlapping frames (they would have to be pretty long though, e.g. 1 sec. or so in order not to produce artifacts by phase cancallation of overlapping segments, etc)
So it would be possible to scan through the signal and determine global phase relation between the fronts are surrounds, and correct it if necessary for DPLII downmixing. This would be a bit computationally expensive.
Also, it could be done locally (because phase can fluctuate - because the surrounds and fronts may contain different audio material, etc.) in 1 sec. overlapping segments. This would be a bit less computationally complex to the global phase adjustments (in order to determine phase you have to compute FFTs for each short time frame - e.g 2048 samples for 48000 Hz signal, with 50% overlapp).
But is it worth it to implement such complex algorithm? Especially because probably over 90% of movie soundtracs have already properly (for DPLII downmixing) phase shifted?
bleo
24th June 2006, 16:44
Hi 3dsnar, thank you for your comments.
1) I assume that the sinusoids (in all channels) had the same amplitudes before downmixing. Did they have the same amplitudes (in all channels) after decoding (if yes, this implies the weights were correct, because they must be an arbitrary values assumed by the decoder in order to recreate the original amplitude of all channels).The sine waves in the input were all -3.2dB. The sine waves in the output were as follows:
L' C' R' Ls' Rs'
L -6.2 -43.3 -69.5 -49.2 -47.8
C -43.2 -6.2 -43.2 -42.9 -42.9
R -69.5 -43.3 -6.2 -47.8 -49.2
Ls ~-50.5 ~-62 ~-53 -6.3 -35
Rs ~-57.5 -61.7 -50.8 -34.3 -6.3Looking along the main diagonal, we see that the outputs of L', C' and R' were decreased by -3dB, and the outputs of Ls' and Rs' were decreased by -3.1dB.
All other values off the main diagonal indicate channel leakage. Some are inevitable due to the steering logic. For example, L and R were pure sine waves present solely in their respective channels, yet they still leaked by a small amount to C', Ls' and Rs'. Others may be due to rounding errors in our downmix matrix coefficients and +90° phase shift. For example, there is a fair amount of leakage of Ls and Rs to the other surround output. Perhaps we can refine the matrix to reduce this.2) The fact that the decoded signals were -90 deg shifted means that the downmixing equations should look like
Lt = L + 0.7071 C + 0.866 Ls (+90°) + 0.5 Rs (+90°)
Rt = R + 0.7071 C - 0.5 Ls (+90°) - 0.866 Rs (+90°)
(???)I have not tested this yet, but I theorize that both surround outputs will then be +90° phase shifted relative to the original inputs (when using DPL2 Movie mode).3) It would be the best to use for example square waves (instead of sinusoids) because it will be possible to distinguish between time delay and phase shift applied to all sinusoidal partials (i.e. phase shift does not affect the waveform shape)I will use square waves in my future tests.
I will also respond to the rest of your (interesting) discussion when I have time... :)
raquete
24th June 2006, 18:59
I will use square waves in my future tests.
what about differents frequences between channel ? !
something like:
L = 440Hz -3.2dB
R = 1Khz -3.2db
and 2Khz -15dB inside L and R channels (as center).
:thanks: for your tests bleo.
3dsnar
24th June 2006, 19:26
OK, Bleo. Great!
So we have found out one thing for certain:
The weights values that you used in the equations are correct.
Also if we would use the following downmixing eqs:
(no 90 deg phase shifts)
Lt = L + 0.7071 C + 0.866 Ls + 0.5 Rs
Rt = R + 0.7071 C - 0.5 Ls - 0.866 Rs
we should obtain (roughly) the input 6 channel signal.
If you'll find a bit of time, it would be great to perform the
test with the above eqs, and based on square waves.
---
Good idea Raquete, although it is better not to use sine waves.
So square waves with different fundamental frequencies for different channels.
Rockaria
25th June 2006, 00:52
As discussed in the related posts, we are concerned if there are any commercial DVDs supporting this optional feature.
http://forum.doom9.org/showpost.php?p=844338&postcount=119 : The 6-channel materials that we are downmixing to DPL2 are mostly DD5.1 movie soundtracks
http://forum.doom9.org/showpost.php?p=844361&postcount=122 : I believe it's still an exceptional case limited to DD5.1 encoding & decoding/downmix and the solution(if any) should be sought there.
http://forum.doom9.org/showpost.php?p=844442&postcount=125
http://forum.doom9.org/showpost.php?p=844466&postcount=127 : The issue of "highly coherent program material" implies there can be some unexpected side effects(fidelity loss) by the unrecovered DD5.1
The capability of seperating this two processes is backed-up by identifying the two seperate steps of the DPL encoding :
http://forum.doom9.org/showpost.php?p=844418&postcount=123 : (Ls,Rs).hilbert() => (Ls.invert.mix, Rs.mix).
I believe the initial DPL II threads participants were fully aware of the limitation of the invert-only version.
The formula only had some potentials to be misinterpreted, forcing us to waste enormous energies even to get down to discuss the full implementation.
It must be a big discovery, if it ever turnes out that all/most existing DD5.1s are ready for the invert-only downmix.
They might be identified in the real world as :
. By the DPL compatibility mark on the movie jacket, not with the 2ch DPL but with 5.1ch DD : has anybody seen them?
. By receivers for 2ch speakers : I see only passive matrix downmix(cross mixed) or straight mix(not cross mixed)
. By dvd players for DPL II receivers : it's mostly provable if any such dvds exist.
. By licence permission for general transcode on PCs or other platform : definitely only on their certified devices.
. By the acknowigements by the s/w DPL II(invert-only) encoder developers : The SoftEncode suggested 90 deg shift issue is just recently introduced here
.
.
Anyway, I believe there should be no issues in concluding the final DPL II stream must contain the FULL DPL II encoding(invert & 90deg phase shifts). if we can prove the below assumption is INCORECT by resolving the issue 2(below).
http://forum.doom9.org/showpost.php?p=844489&postcount=129 : So I think that NOT including the 90 phase shifts in the downmixing equation is fully correct, because the inverse process does not compensate that....
<history>
[Jun24] looking for any evidences.
Rockaria
25th June 2006, 01:03
The process is of course : 2ch coefs-cross-mix(Ls,Rs)-> 90 deg shift(hilbert()) -> +-polarity mix(simple mix & invert mix) on Lt & Rt
Some facts from Dolby's doc :
1. the result should be : Ls(in phase : +90), Rs(out phase : -90)
"The Lt/Rt downmix sums the surround channels and adds them in phase to the left channel and out of phase to the right channel.
http://web.archive.org/web/20031206104650/http://dolby.com/pro/digaudio/pa.ma.1102.Standards.S.pdf P18 middle
http://forum.doom9.org/showpost.php?p=838744&postcount=42
2. The diagrams say to apply invert() to the Ls when mixing to Lt : Ls.hilbert().invert() == in phase(+90), so Ls.hilbert() == -90 deg shift.
http://www.dolby.com/assets/pdf/tech_library/44_SuroundMixing.pdf P8-1
Also it concurs the Dolby description in the same page :
Thus for instance at 1 kHz, the left and right paths through the Dolby
Model SEU4 give phase shifts of roughly –550 degrees, while the surround path, measured at the
right total output, has about 90 degrees more lag (approximately –640 degrees total).
-640 - (-550) = -90 for the 90 degrees shift mentioned
3. it also mostly concurs other tools' hilbert() directions
. mathlab : hilbert() = -90
. PhaseBugMono(0.322) = -90 : it advances on the time-axis but when aligned it start from the -90 phase image.
. CoolEdit : PhaseShift(90) = -90?
. Soft Encode DD5.1 rear shifted: ?? -> +90 decoded
. Surcode assumed : -90 => +90 decoded, *check below 4. Surcode by specise.
4. analysis of the decoder outputs.
. PowerDvd(invert-only) by tebasuna : Avisynth, BeSweet, Azid
http://forum.doom9.org/showpost.php?p=838939&postcount=45
. Windvd by bleo
http://forum.doom9.org/showpost.php?p=844358&postcount=121
CoolEdit, Windvd movie mode.
Lt = L + 0.7071 C - 0.866 Ls (+90°) - 0.5 Rs (+90°) => -90° decoded
Rt = R + 0.7071 C + 0.5 Ls (+90°) + 0.866 Rs (+90°) => -90° decoded
==>change all (+90°)s to (-90°)s==> CoolEdit : PhaseShift(90) = -90?
. Surcode by specise.
http://forum.doom9.org/showpost.php?p=843644&postcount=90
9.4 Invert Right Surround
In Pro Logic II, the Ls and Rs outputs are intended to be out of phase by 180 degrees for surround steered inputs. However, if the decoder is set to Movie mode, the polarity of the Rs output is inverted in order for the Ls and Rs outputs to be in phase. This improves phantom rear center imaging.
-Ls(-90), Rs(-90) -> Ls(+90), Rs(-90).invert() ==> Ls(+90), Rs(+90)
<issues>
. no reverse phase shift logic in the decoder? : 90 -> 0
<history>
[Jun24] more inputs to be updated until cleared out.
Rockaria
25th June 2006, 20:52
Dolby simply say -3dB for the C-mix and another -3dB for the S-mix in the DPL 1 docs.
If we include the LFE and rear STEREO to the formula, it will become somewhat more complicated.
Also depending on the encoding tools and mixing steps(stacking mix) the resulting ratio will be changed.
This will also include some of the essential effects such as normalizing(mostly on the final mix), the DRC(enough bit size, clipping control by pre-gaining), stacked mixing(grouping) and the custom panning if the default matrix does not yield the desired harmony.
1. 1:2 SoundPressure(p) ratio on the coefs :
http://forum.doom9.org/showpost.php?p=145721&postcount=1 , same one as Wikipedia
Lt = 1.0*L + 0.707*C + 0.707*LFE - 0.8165*Ls - 0.5774*Rs
Rt = 1.0*R + 0.707*C + 0.707*LFE + 0.5774*Ls + 0.8165*Rs
. residuals
. resulting max linear ratio = 3.808
. max(safe) pre-gaining 1/3.808 = 0.2626 == -11.6dB == 10log(0.2626^2)
2. 1:3 SoundPressure(p) ratio between the coefs by bleo :
http://forum.doom9.org/showthread.php?t=57988 : good so far for existing s/w encoders
Lt = L + 0.7071 C + 0.7071 LFE - 0.866 BL - 0.5 BR
Rt = R + 0.7071 C + 0.7071 LFE + 0.5 BL + 0.866 BR
. 0.7071 == -3dB, -0.866 == -1.25dB, -0.5 == -6dB
. resulting max linear ratio = 3.78
. max(safe) pre-gaining 1/3.78 = 0.2646 == -11.5dB == 10log(0.2646^2)
3. Dolby's way (-3dBs & 1:3 SoundPressure(p)) :
simple assigning of the 3:1 ratio to the coef dB value : (-3dB, -9dB)
http://forum.doom9.org/showpost.php?...4&postcount=73 bottom : good results
Lt = (L, -3dB(C, LFE), (-3dB Ls, -9dB Rs)<*)
Rt = (R, -3dB(C, LFE), (-9dB Ls, -3dB Rs)<)
changing it to the linear gain ratio format would look like :
Lt = (L, 0.7071(C, LFE), (0.7071 Ls, 0.3536 Rs)<*)
Rt = (R, 0.7071(C, LFE), (0.3536 Ls, 0.7071 Rs)<)
. when < : -90 deg shift, * : invert()
using the coef which satisfies the two conditions to have the effective -3dB attnuation
http://forum.doom9.org/showpost.php?p=846551&postcount=140
. 1:3 ratio on the Sound Pressures
. -3dB result by the opposite polarity
. it will have +3dB gain effect by reverse inverting the Ls DPL II decoding time
in dB format :
Lt = (L, -3dB(C, LFE), (-1.25dB(Ls), -6.02dB(Rs))<*)
Rt = (R, -3dB(C, LFE), (-6.02dB(Ls), -1.25dB(Rs))<)
in Sound Power format(P) : same as 2.
Lt = (1L, 0.7071(C, LFE), (0.866Ls, 0.5Rs)<*)
Rt = (1R, 0.7071(C, LFE), (0.5Ls, 0.866Rs)<)
. resulting max linear ratio = 3.78 == 11.55dB(10log(3.78^2)), max(safe) pre-gaining -11.55dB
. the custom panning can be applied to each channel(variable) and groups(Lf-Rf, Ls-Rs, F-S,...)
. the coef ratio also can control the F-S & Ls-Rs panning but not desirable because it also imples not enough seperation/cancellations
. the seperation plans are stacked by <, *, (1, 0.7071 + phantom center, 0.866, 0.5) for the input to the DPL II decoder
Also we can use this 'redirecting the LFE to the SubWoofer(instead of the center)' method :
http://forum.doom9.org/showpost.php?p=846578&postcount=141
4. stacking mix(channel grouping) : will be mostly useful when using the gui tools
. the FRONT, C, LFE is one logical group : FRONT, and the coefs-cross-mixed-rears is another group REAR
. These groups ideally can be mixed, tuned before the final mix with normalization.
. the gains will be changed in a stacked way
. pre gaining methods : averaging or peak
. batch encoding(mixing) will be useful with : default attenuations, peak-pre-gaining, and final normalizing
http://en.wikipedia.org/wiki/Decibel
http://www.phys.unsw.edu.au/~jw/dB.html
Decibel.10^(dB/10) == SoundPressure.p^(1/2) == SoundPower.P || Decibel.10^(dB/20) == SoundPower.P
SoundPower.P^2 == SoundPressure.10Log(p) == Decibel.dB || SoundPower.10log(P^2) == Decibel.dB
http://en.wikipedia.org/wiki/Root_mean_square
5. analysis of the decoder out amplitudes
. need to verify all the candidates on both(90deg shift, invert-only) models.
. the rears can be affected by the un recovered 90 deg shifts of the image
. it will be strongly affected by the seperation plans(models)
. especially by the seperation/cancellation order(rear->center+LFE->front), dynamically by the steering logic enhanced by the servo feedbacks.
. steering logic might be allocating the ratios from the predefined gains(+3dBs) to the channels regardless of the input attenuations.
it turned out that the decoder does not control the decoded channel gains. if you give the ratio 0 on a channel, it produces no sound on the channel(except the phantom center), making the gain control independant from the decoder(transparent).
. In this case, analysing the decoded volumes might not be that useful, relying on the speakers would have the higher priority.
a. a result from bleo http://forum.doom9.org/showthread.php?p=844619#post844619
. tested with a sign wave, <m11a>
. may require some more tests with fully complex streams :
<issues>
<history>
[Jun25] some more refinings of the gains, stacked mixing, formula, analysis of the decoder output
[Jun25] modified 3.a., daft coef formula by gain & coef dB ratio 1:3, typos
[Jun26] refined the model <m11>, it's attenuation variables & coef constants
[Jun27] the gain control on the channels is tranparent to the decoder(except the phantom center)
[Jun29] final(?) modifications on the models
bleo
26th June 2006, 02:47
My findings on Issue #3:
If the difference between the coefficients for Ls and Rs is:
< 4.77dB then Ls will leak into Rs' and Rs into Ls', so the surround channel separation will be poor.
> 4.77dB then Ls will leak into L' and Rs into R', so the surround channels will spread too wide and 'wrap around' to the fronts.
= 4.77dB then Ls' and Rs' will have maximum channel separation without leaking into L' and R'.
Secondly, if the coefficients for Ls^2 + Rs^2 are:
> 1 then the volume of Ls' + Rs' will be louder than Ls + Rs.
< 1 then the volume of Ls' + Rs' will be quieter than Ls + Rs.
= 1 then the volume of Ls' + Rs' will be equal to Ls + Rs.
So the coefficients should be:
0.866, 0.5 = SQRT(3/4), SQRT (1/4) = -1.25dB, -6.02dB
Rockaria
26th June 2006, 03:57
Ignoring the phase & the polarity and counting one channel only,
a. If we give 0dB(1) attenuation to the rears :
T = mix(F, -3dB C,-3dB LFE, S), when S= (coef1, coef2)
= mix(F, 0.7071 C, 0.7071 LFE, S)
. resulting max linear ratio = 3.4142 == 10.665779 dB
. if we exclude rears : 2.4142 == 7.6554649... dB, so the difference(if we can do -) = 3.0103...dB
b. If we allocate linear ratio 1 S to the coeffs in 1:3 ratio : (sqrt(3/4), sqrt(1/4) = (0.8660, 0.5)
T = mix(F, 0.7071 C, 0.7071 LFE, 0.866 S1, 0.5 S2)
. resulting max linear ratio = 3.4142 - 1 + 0.5 + 0.866 = 3.7802 == 11.550295555...dB
if we exclude the rears : 2.4142 == 7.6554649... dB, the difference(if we can do -) = 3.8945...dB
if we count the coefs only : 0.866 + 0.5 = 1.366 == 2.7090 dB
I was able to get your 4.77dB by : 6.02dB - 1.25dB = 4.77, although I am not sure what it means.
But as you see, it keeps the 1:3 coef ratio(that's why I said reasonable before), but assign & allocationg 0dB(1) between the coefs.
I just didn't want to duplicate it in the group 3 to respect the original efforts.
As far as the rear coef ratio(allocating) keeps 1 : 3~ dB, it seperates well between the rear stereo(no residuals).
And the assigning of the attenuations on the rears(in your case 0dB == 1) is another issue(F-S panning maybe)...
specise_8472
26th June 2006, 11:00
At the end of the day, the downmixes are almost there.
BUT
Dolby Prologic 1/2 specifications are to have phase shifted +-90 degree (=180 degree) rear. So no amount of figure twiddling and tweeking will ever make spec files. If it was that easy to do this way, I think Dolby Laboratories and their technicians would have figured it out by now, and patented it.
A good starter patent and pointers to other patents is US 6,760,448. ALso includes steering and 3 rear channels.
Just my 2c worth.
Rockaria
26th June 2006, 12:00
Hmm, one of my role is straightening the looking-complicated stuffs in easy words & logics.
But if it looked too easy(except specise ;) ) then there's something wrong. So the brand new almost-FINAL full version follows.
if use -3dBs for the attenuations by the Dolby's spec
Lt = mix(L, -3dB(C, LFE), -3dB(Ls, 0.5774 Rs)<*)
Rt = mix(R, -3dB(C, LFE), -3dB(0.5774 Ls, Rs)<)
. when < : -90 deg phase shifts, * : invert(), so both rears are 180 deg off polarity on the same time axis.
changing it to the linear gain ratio format would look like :
Lt = mix(L, 0.7071mix( C, LFE), 0.7071mix(Ls, 0.5774 Rs)<*)
Rt = mix(R, 0.7071mix( C, LFE), 0.7071mix(0.5774 Ls, Rs)<)
. resulting max linear ratio = 3.53. max(safe) pre-gaining 1/3.53 = 0.2833 == -11.0dB == 10log(0.2833^2)
. might need to apply 0.7071mix( 0.7071C, 0.7071LFE) ==0.5mix(C, LFE)
the attenuations are variables to allow any custom pannings from the defaults, the rear coefs are constants for the REAR-STEREO seperation plan. so the seperation plans are stacked by <, *, (1, 0.5774) for the input to a ever-fading DPL II decoder to be reconstructed almost identical. I also feel full of coins in my pocket with some various convincing results on this useless stuff, but might also be useful for IIx or III.
for anybody interested in the automation, the -90deg phase shift logic must be fully emulated, not by the simple some freq delay, but by hilbert() or full ranges freq delays aligned dynamically in the buffer, thinking it's gonna be issue #4, some time later, possibly followed by the steering logic of the decoder.
/steering logic specs
Rockaria
29th June 2006, 08:32
bleo, I finally figured out the reason why the rear coeff ratios rule need to be your (0.866, 0.5).
Besides the mentioned rear seperation plan(1:3 on the coef attenuation),
there is one more condition that the result of the channel gain difference must be -3dB by the opposite polarity of the duplication imbeded on the other channels.
It will cancel the extra sound pressures in the main coef(also when played in the stereo mode) resulting in effectively -3dB attenuations.
<condition1 : 1:3 ratio on the Sound Pressures>
XX=3*YY (x= SQRT(3)y)
<condition2 : -3dB result by the opposite polarity>
0.7071^2(-3dB)=XX - YY
So :
3YY -YY=-.5
YY=.25, y=.5
XX=.75, x=.866
The Dolby's spec seems to have been changed in DPL II by the STEREO implementations on the rears.
I will update the model including an advanced LFE mixing method to be effectively played in the SUB Woofer(not to the center in reduced volume).
Also note that there are differences in the two decoding mode(passive in stereo mode & active in DPL II decoding mode)
By reverse changing the polarity in Ls (in the movie mode, although I don't notice the rear volume difference than the music mode), the total gain will be 0dB(3/4 + 1/4 p) on the rears(creating the rear phantom center, no extra +3dB gaining) unlike the center(the decoder will add 3dB).
But the passive decoder(in stereo mode) will still have the effective -3dB attenuations on the center & rears.
[Jun30] By some tests in the post http://forum.doom9.org/showpost.php?p=847043&postcount=149 :
. the stereo speaker out by the opposite polarity will somehow modify the overall volume
. so the output volume will be adjusted creating some diffussion by the opposite polarity.
. so the (0.866, 0.5) is not proved as the only correct coefs ratio yet, maybe some more test with both output(decoder, speaker) analysis are necessary
[Jun30] Considering the DPL II is also designed for the stereo playback, edstimating its total output volume would be useful to define the proper pre-mix attenuations. The DIFFUSION effect by the cross channel imbeded coef2 volume is considered having -1.5 ~ +1.5 P(sound power) by the distances inbetween making the overall stereo outputs -3DB ~0 dB attenuations from the original level.
The DPL II rear decoding would require some more analysis by measuring the decoder output levels by changing the attenuation values. So far (0.866, 0.5) seems to be the optimized value.
Rockaria
29th June 2006, 10:21
...
DPL II channels are full range(less LFE of course)
He threw up another meaningful words again, I was thinking about that too though, and finally had some time to messup with some richer harmony.
One of my receivers I am testing is not directing the mixed LFE to the Subwoofer. The center speaker is set to 'large'(for more rich bass) so setting it to small/medium might help to direct it to the subwoofer.
The fact that if I mix the LFE to Lf or Rf, it goes to the subwoofer, gave me a hint to mix the LFE to both Lf and Rf in invert & 90phase shifted way.
There can be several ways to achieve the LFE to be redirected to the SUBWoofer by :
. equaly positioning the LFE to the fronts(like center) : no redirection(in my setup), but when changed the center to 'small', it redirected
. panning the LFE to some unbalanced positions to the front(Lf-Rf) : some portion will go to the SUB, will also affect the unbalanced normal stereo playback
. phaseshift(Lf -90), invert(Rf) of the LFE : complicated, might have some side effects depending on the existing fronts LFE portion(cancellation)
.other combinations of these (normal, shift, invert) gave me less SUB Woofer volumes.
. mixing the LFE to the rears before the rear shift & invert process
Some changes from the latest model :
Lt = (L, LFE<, -3dB(C), (-1.25dB(Ls), -6.02dB(Rs))<*)
Rt = (R, LFE*, -3dB(C), (-6.02dB(Ls), -1.25dB(Rs))<)
changing it to the linear gain ratio format would look like :
Lt = (1L, 1LFE<, 0.7071C, (0.866Ls, 0.5Rs)<*)
Rt = (1R, 1LFE*, 0.7071C, (0.5Ls, 0.866Rs)<)
. resulting max linear ratio = 4.07 == 12.20dB(10log(4.07^2)), max(safe) pre-gaining -12.20dB
. this way gave richer LFE directed to the subwoofer
. might affect the existing LFE portions of the fronts(cancellation)
. it seems giving better rear seperations surprisingly(?)
. the PhantomCenter(of the LFE) might stay in the center though
. also it has very similar volume in the stereo mode playback as before(not too loud).
PreMixing the LFE to the Rears :
Ls = (Ls, LFE), Rs = (Rs, LFE)
dbFormat ratio :
Lt = (L, -3dB(C), (-1.25dB(Ls), -6.02dB(Rs))<*)
Rt = (R, -3dB(C), (-6.02dB(Ls), -1.25dB(Rs))<)
Sound Power ratio :
Lt = (1L, 0.7071C, (0.866Ls, 0.5Rs)<*)
Rt = (1R, 0.7071C, (0.5Ls, 0.866Rs)<)
. no negative effect, the safe-pregaining would be similar to above.
<conclusion>
. if the receiver supports the speaker size setting(or center-LFE-SUB redirecting) or portable use, pre-mix it to the center
. if the receiver supports rear-LFE-SUB redirect, pre-mix it to the rears.
. otherwise, test the front invert-shift-mix
<history>
[Jun 29] initial version tested with some 6ch music. : good results
[Jun 29] added a method premixing to the rears, conclusions.
bleo
30th June 2006, 02:29
I made a 6-channel test sample in Cool Edit that contained the following:
0-3 sec, silence
3-6 sec, L 300Hz square wave
6-9 sec, C 400Hz square wave
9-12 sec, R 500Hz square wave
12-15 sec, Ls 600Hz square wave
15-18 sec, Rs 700Hz square wave
I then downmixed it to DPL2 in Cool Edit using the matrix:
Lt = L + 0.7071 C + 0.866 Ls + 0.5 Rs
Rt = R + 0.7071 C - 0.5 Ls - 0.866 Rs
I then upmixed it back to 6 channels using WinDVD DPL2 decoder in Movie mode.
Results:
- The square waves were intact in the output indicating that no phase shift occurred.
- There was a 5msec delay of the entire output, and an additional 15msec delay of Ls' & Rs'.
- After accounting for this delay, the phases of all output channels were identical to the inputs, and there was no inverting either.
- The amplitude of the square waves fluctuated a bit at the channel switchover points (3, 6, 9, 12, 15 secs). This was probably an artifact of the steering logic.
Discussion:
This matrix produced output that was closest to the original input. The phases were the same and the relative channel volumes were the same with an overall reduction of -3dB. However this is NOT a DPL2 spec. compliant downmix. A discussion on 90° phase shifts will follow...
bleo
30th June 2006, 04:01
Let's say we forget about DPL2 and DD5.1 for the moment. Then we take a 5-channel soundtrack and phase shift both rears by 90°. What is the result to the listener?... In most cases, nothing! Especially for movie soundtracks, this is because there is usually no phase correlation required between the fronts and the rears. Furthermore, it would be difficult to keep such a phase correlation intact because the listener does not necessarily sit in the exact center of all 5 channels, and the rears are usually time delayed as well. (This difficulty may have been why quadraphonic sound did not become popular).
Now for DPL2, the rears MUST be 90° phase shifted to DEcorrelate them from the fronts in the downmix. Otherwise, if C and S are identical, they will cancel each other out on either Lt or Rt of the downmix. Once they cancel out in the downmix, you cannot get them back--this is the disadvantage of matrix encoding compared to discrete multi-channels.
So you 90° phase shift the input rears to make sure they are not cancelled out in the DPL2 downmix. After you decode back to 5 channels, the output rears are still 90° phase shifted. What is the consequence to the listener? Again, nothing! The input & output rears do not need to have any phase correlation with the input & output fronts.
Now for DD5.1, why do the Dolby specs say to 90° phase shift the rears? Firstly because it has no consequence for a listener using 5.1 channels--the rears do not need to have any phase correlation with the fronts. Secondly (and more importantly for our discussion), when downmixing DD5.1 to DPL 1 or 2, PRE- 90° phase shifting the rears allows the DD5.1 DEcoder to downmix using a very simple arithmetic matrix:
Lt = L + 0.7071 C - 0.866 Ls - 0.5 Rs
Rt = R + 0.7071 C + 0.5 Ls + 0.866 Rs
or
Lt = L + 0.7071 C + 0.866 Ls + 0.5 Rs
Rt = R + 0.7071 C - 0.5 Ls - 0.866 Rs
(signs to be determined by further experiments)
The final DPL2 decoded rears will of course be 90° phase shifted compared to the original sountrack before DD5.1 encoding, but have the same phase as the DD5.1 output. What is the consequence to the listener? You guessed it--nothing!
So when downmixing a DD5.1 soundtrack to DPL2, use one of the above matrices. DO NOT 90° phase shift the rears--it should have already been done when encoding to DD5.1.
When SHOULD you apply 90° phase shifts to the rears when downmixing to DPL2? These are mostly unique cases:
- If your multichannel material was never encoded to DD5.1 (e.g. you created it yourself).
- If you want to experiment...
raquete
30th June 2006, 04:52
Now for DD5.1, why do the Dolby specs say to 90° phase shift the rears? Firstly because it has no consequence for a listener using 5.1 channels--the rears do not need to have any phase correlation with the fronts.
sorry,i don't agree and it's nothing have to do with DD5.1,follow me:
http://img425.imageshack.us/img425/9361/controlroom2bf.png
think that you listen the sound and not decoding
q1
what happen if the surround left and right have the same phase as front left and right?
a1- cancellation!
q2
what if the sL and sR have +90 degrees?
a2- cancellation!
q3
what if the sL and sR have -90 degrees?
a3- cancelation!
q4
what happen if sL have +90 and sR -90 degrees?
a4-
the sL is 90 degrees from the L channel.
the sR is 90 degrees from the R channel.
the sL and sR are now 180 degrees
no more cancellations and:
as show the picture,the surrounds are placed round 90 degrees from the frontal channels this is why they are turned 90 degrees and one of them with +90 and other with -90 to don't have cancellation because one speaker in front other sounding with the same phase will give.... cancellation.
this is what i understood(with experience) why they used 180 degrees between surrounds and at the same time 90 degrees from the fronts!
3dsnar
30th June 2006, 06:50
Raquette,
we are talking about 90 deg phase shift of the waveform
(or shifting by PI/2 in radians). It has not much to do with angles between speakers ;)
raquete
30th June 2006, 07:17
@ 3dsnar
It has not much to do with angles between speakers
but have.
maybe i was unclear,let me try to explain better:
has no consequence for a listener using 5.1 channels--the rears do not need to have any phase correlation with the fronts.
if the surround channels have the same phase(no matter if phase 0,+90 or -90) and one speaker is in front of the other,you get cancellation.
as the surrounds are placed in the left and right sides,they turn his phases in (+ and -)90 degrees in the audio too.this result in differents phases between the surrounds and no cancellations will happen.
this not means that the sound with turned phase sounds better
then,if it not sounds better,we have to questions:
1-why they turn the phases?
because one speaker in front other playing the sound with the same phase give cancellation
2- and why -90 and +90?
because the surrounds are nearly (or perfectly) 90 degrees from the central channel(and can't have the same phase)
(of course,poor english here)
later i(will if needed)post another picture showing how and why the surrounds have to stay round 90 degrees from the frontals and 180 degrees(between sL/sR)
Rockaria
30th June 2006, 11:31
I made a 6-channel test sample in Cool Edit that contained the following:
0-3 sec, silence
3-6 sec, L 300Hz square wave
6-9 sec, C 400Hz square wave
9-12 sec, R 500Hz square wave
12-15 sec, Ls 600Hz square wave
15-18 sec, Rs 700Hz square wave
I then downmixed it to DPL2 in Cool Edit using the matrix:
Lt = L + 0.7071 C + 0.866 Ls + 0.5 Rs
Rt = R + 0.7071 C - 0.5 Ls - 0.866 Rs
I then upmixed it back to 6 channels using WinDVD DPL2 decoder in Movie mode.
Results:
- The square waves were intact in the output indicating that no phase shift occurred.
- There was a 5msec delay of the entire output, and an additional 15msec delay of Ls' & Rs'.
- After accounting for this delay, the phases of all output channels were identical to the inputs, and there was no inverting either.
- The amplitude of the square waves fluctuated a bit at the channel switchover points (3, 6, 9, 12, 15 secs). This was probably an artifact of the steering logic.
Discussion:
This matrix produced output that was closest to the original input. The phases were the same and the relative channel volumes were the same with an overall reduction of -3dB. However this is NOT a DPL2 spec. compliant downmix. A discussion on 90° phase shifts will follow...
Well, whatever is the purpose of this test, there always are another eyes trying to see what it means actually..
I try to figure out conditions not described clearly :
. purpose : to prove if the DPL II decoders work correctly without the 90 deg shift process with non-pre-shifted clips
. conditions : very similar to tebasuna's powerdvd test before where he recommended the matrix3 to be used
- Windvd should represent the standard of the DPL II decoders
- the input streams should represent the normal combinations
The conclusion implied in the test result : although nothing specified explicitly
. windvd or powerdvd are de facto standard : whether complient to the DPL II spec or simply Dolby..
. the 90 phase shift is not necessary, matrix3 is the rule
. not regaining the -3dB on rears is correct
The conclusion I could derive from the result : although the previous test with 90 deg shift looked more reliable
. the decoder performs invert on one channel, does not perform 'reverse phase shift' as expected
. not sure if it is complient or not with the two test results : does not meet the conditions to conclude
. the -3dB rear output attenuation says not correct volume regaining by either wrong input or logic
. for the invert-only versions(and these s/w dpl II decoders), the matrix3 is the way to go!
/believing is personal freedom
tebasuna51
30th June 2006, 12:27
I made a 6-channel test sample in Cool Edit that contained the following:
0-3 sec, silence
3-6 sec, L 300Hz square wave
6-9 sec, C 400Hz square wave
9-12 sec, R 500Hz square wave
12-15 sec, Ls 600Hz square wave
15-18 sec, Rs 700Hz square wave
I then downmixed it to DPL2 in Cool Edit using the matrix:
Lt = L + 0.7071 C + 0.866 Ls + 0.5 Rs
Rt = R + 0.7071 C - 0.5 Ls - 0.866 Rs
I then upmixed it back to 6 channels using WinDVD DPL2 decoder in Movie mode.
Same test using PowerDVD6 DPL2 decoder in Movie mode. Exact results, only:
- There was a 5msec delay of the entire output, and an additional 15msec delay of Ls' & Rs'.
I get a 15msec total delay of Ls' & Rs' (5 global + 10 additional)
Rockaria
30th June 2006, 15:10
@raqueue, there are three possible cases that can happen by mixing the two identical signals before & after the DAC process.
Suppose you are playing the identical stereo streams in stereo mode(DPL II will aggressively decode them in surrounds) :
combinations : (0,0),(0, -180),(0, 90), (0,-90), (90,90), (90,-90), (-90,-90)....
a. mixing the streams in one channel before the DAC :
- the stream will completely cancel each other : (90,-90), (0, -180)...
- increased volumes : (0,0), (90,90), (-90,-90) > (0,+-90)...
b. phantom center speaker effect : (0,0), (90, 90), (-90,-90) > (0,+-90)..
c. difussion effect : (0, -180), (90,-90) > (0,+-90)...
@ bleo, at least we seem to agree the final DPL II stream must contain +-90 cross stacked mixes for the better seperation quality.
Some problems I am noticing is that the conditions to be proved are confused :
a. 90 shifts are nessary for normal 5.1 streams for better seperations : clearly explained in the Dolby's doc, doesn't need to prove anything else.
b. 90 shifts are not necessary at all except for some experiments : need to prove lots of things before claiming
- the DPL II encoding is mostly used only for DD5.1 movie clips
- all the DD5.1 movie clips rears are already 90 deg phase shifted
- there are actually some certified equipments for normal users which can do the invert-only downmix
- the 90 deg shifts has no negative effects at all for movie clips in the correlations between the channels maybe
- the MOVIE clips are always different from the MUSIC in the correlations between the channels maybe
- all the non-pre-90 shifted clips are just for hobby
Not an easy job .. impossible. Why not just let the methods be chosen by those who know what they are doing?
3dsnar
30th June 2006, 15:49
sorry,i don't agree and it's nothing have to do with DD5.1,follow me:
http://img425.imageshack.us/img425/9361/controlroom2bf.png
think that you listen the sound and not decoding
q1
what happen if the surround left and right have the same phase as front left and right?
a1- cancellation!
q2
what if the sL and sR have +90 degrees?
a2- cancellation!
q3
what if the sL and sR have -90 degrees?
a3- cancelation!
q4
what happen if sL have +90 and sR -90 degrees?
a4-
the sL is 90 degrees from the L channel.
the sR is 90 degrees from the R channel.
the sL and sR are now 180 degrees
no more cancellations and:
as show the picture,the surrounds are placed round 90 degrees from the frontal channels this is why they are turned 90 degrees and one of them with +90 and other with -90 to don't have cancellation because one speaker in front other sounding with the same phase will give.... cancellation.
this is what i understood(with experience) why they used 180 degrees between surrounds and at the same time 90 degrees from the fronts!
Ofcourse the speakers position are of importance. But this is a completely different issue. Here we are talking about the problems related to phase properties for downmixing and decoding (before the decoded sound gets outside the decoder).
So it is not that I disagree / agree with you :)
I just wanted to clear things out.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.