Log in

View Full Version : Dolby Pro Logic II encoding test (90° vs 180° phase shift)


Pages : [1] 2 3 4

3dsnar
7th June 2006, 08:33
Here are two clips,
http://forum.videohelp.com/images/guides/p1514165/180vs90.7z

And the reference (original 6 channel input) clip.
http://forum.videohelp.com/images/guides/p1514168/fifthelem_6chnl.7z

Each downmixed with:
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{180°} + 0.5 SR{180°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{0°} + 0.866 SR{0°}
and
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{90°} + 0.5 SR{-90°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{-90°} + 0.866 SR{+90°}

Please test them with your dolby certified decoders
and decide which ones sounds better (eg. A vs B version) with reference to the original sound.
The poll question is related to fifthelem_A.mp3 and fifthelem_B.mp3,
while speech_A.mp3 and speech_B.mp3 should sound identical
(to see that both downmixing methods are compatible with DPLII decoders)

scharfis_brain
7th June 2006, 14:17
I cannot tell for sure (tendency goes to clip A) which is the 180 or 90 degree clip because I curently have no possibility to play back the AC3 in direct 5.1 off my PC.

but anyways this is NOT a fair comparision.

fair would have been:

Each downmixed with:
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{180°} + 0.5 SR{180°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{0°} + 0.866 SR{0°}
and
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{+90°} + 0.5 SR{+90°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{-90°} + 0.866 SR{-90°}

or Rockarias style:

Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{0°} + 0.5 SR{180°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{180°} + 0.866 SR{0°}
and
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{+90°} + 0.5 SR{-90°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{-90°} + 0.866 SR{+90°}

but you are testing two types of four concurring types.
the traditional mixing with 180°
and rockarias inverse mixing with 90°

And I think this is perfectly audible when you can hear "weapons loaded" at the very beginning of the sample.

sample A lets it sound from the center.
sample B lets it sound from the surround.

But this is not due to the different phases but more due to the reason that one of the surround channels (in relation to each other) become inverted with your 90° matrix. (IMO)

(this is the thing I always tried to explain as center surround issue to Rockaria. But it seems to be a slightly different effect here)

so would you redo the samples, please?

Rockaria
7th June 2006, 15:02
http://forum.doom9.org/showpost.php?p=783211&postcount=42

IMO this matrix is useless.
Just imagine the MonoSurround-condition: Rear left and rear right are carrying the same signal.
With this matrix you'll succesfully eliminate the mono surround out of the downmix.
This means to me, that

Dolby Pro Logic Left Right Center Rear Left Rear Right
Left Total 1.000 0.000 0.7071 0.866 -0.5
Right Total 0.000 1.000 0.7071 -0.5 0.866

is a derivation from the faulty matrix above and should not be used.
You may experience wider sounding surround channels, because every middle information (mono information) is weakened in the surround downmix.


or Rockarias style:

Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{0°} + 0.5 SR{180°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{180°} + 0.866 SR{0°}
and
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{+90°} + 0.5 SR{-90°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{-90°} + 0.866 SR{+90°}

but you are testing two types of four concurring types.
the traditional mixing with 180°
and rockarias inverse mixing with 90°


(this is the thing I always tried to explain as center surround issue to Rockaria. But it seems to be a slightly different effect here)




I found, that Rockaria's personal matrix has problems with centered surround effects that are meant to be reproduced by both surround speakers (DPLII) or the surround-back speaker (DPLIIx).
Inverting the phase of one of the Surround channels like this modified matrix does can enhance the perceived width and separation of both channel because it is simply something like crosstalk reduction. But At the cost of centered surround sounds. That's why I prefer the unaltered matrix.


.....
....

@scharfis, do you see your posts are 'arbitrary itself' ?
Would you stop posting against anybody with no basis & no understanding at all? That does not help anything.

traditional mixing with 180° :: what the traditional means? your myths?, your Gods' words?
inverse mixing with 90° : youself admitted you have no clear picture of the DPL II model already?
If you continue posting like this, I will regard them as personal attacks, only to depreciate any resonable conversations.

scharfis_brain
7th June 2006, 15:23
I don't see a contradiction to myself here. I think that these quotes still enhance the statements of my first post in this thread.
Also it is not a personal attack as I said many times in past, too.
If you are interpreting my answers as personal attacks it is your problem. Not mine!

traditional mixing with 180° :: what the traditional means? your myths?, your Gods' words?The wikipedia style of matrix. The Besweet style of matrix. The AC3filter style of matrix. The ffdshow style of matrix. Is this enough traditional style?

inverse mixing with 90° : youself admitted you have no clear picture of the DPL II model already?
Of course not, as I already did some manual mixes myself, build some active Dolby surround mixing ciruits etc.

If you should find irony in the last sentence, keep it for yourself. Thanks.

Actually I think you are the person that is not able or willing to do a objective conversation without personal attacks.
I never did attack you. But you do!

tebasuna51
7th June 2006, 19:03
Test with a SONY STR-DE495 receiver, DPL II Movie mode.

There are a clear difference between A and B in "weapons loaded" (?) and "Yes, Sir" (3 sec.).
There are presents in FL, FR, BL, BR original audio, and not at Center channel.
In A "Yes, Sir" is basically only at Center channel.
In B "Yes, Sir" is present in all five channels, then is not perfect but better than A.
Then my vote for B.

I tried also a C option (matrix 3 from original thread) with indistinguishable differences with B (at least for my ears).

Rockaria
7th June 2006, 19:10
@scharfis, I am pretty much impressed by your convenient logic adaptible to any situations.:(

In my previous quotes :

The contradiction in the 1st and 3rd quoted messages from you looks to me clearly an irony. (and the 2nd one just a justification)

The 'inverse 90 degree' is actually the +-90 degree phase shifts, to be correct, based on my best reasoning & understaning which describes the DPL II model from Dolby's unclear documents.

Look at the 1st quote.
Now do you distinguish which is useless? : my useless model vs your invaluable objections

scharfis, I just want you not to play with my id at all.:cool:

@3dsnar,
The two fifth_elm clips showed a distinct difference in the first part, the _b clip sounded some wider fronts
But I have no idea which is with better seperation fidelity without the original 6ch clip(in any form such as mp4) as I mentioned in other thread.

[edit] Yeah, I see tebasuna has the same opinion.
Now with the original 6ch AC3, I see the fifth_elm_B has the better seperation fidelity. voted.

3dsnar
8th June 2006, 08:41
OK, thanks all of you for votes.
BTW. The original signal is provided too.

Yes, B is 180 deg phase shift (the simpler approach),
A is 90 deg. phase shift.

The sign variations are not important, because they result
in phase invertion in the decoded signal and do not affect the separation (as Tebasuna already noticed). Therefore A and B are enough to distinguish between 90 and 180 phase shifts.
I agree with Scharfis that the 90 deg phase shift should have been prepared with the same sign style, to be fully consistent with the 180 deg. shift. Maybe next time ;)

(early) conclusions.
1) There is a noticable difference between the 90 deg phase shift and 180 deg phase shift
2) 90 deg seem to produce significantly worst results, thus probably the DPLII downmixing equation is based on 180 deg. shifts (simple sign change).

---

BTW. Please test Aud-X DSfilter DPLII decoder (or rather DPLII decoder simulation),
by sending the output as AC3 through SPDIF to your HT amps.
I am curious of your opinions and especially your thoughts regarding its quality vs certified dolby decoders quality

:thanks: 3d

Rockaria
8th June 2006, 09:39
OK, thanks all of you for votes.
BTW. The original signal is provided too.
But after my post in other thread, without any notice or acknowledgement.
http://forum.doom9.org/showpost.php?p=837679&postcount=63

You might want to add two more models to fully reflect the discussions in the related threads:
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 BL{-90°} + 0.5 BR{-90°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 BL{90°} + 0.866 BR{90°}
and
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{180°} + 0.5 SR{0°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{0°} + 0.866 SR{180°}
...
You might also want to test with original 6ch(mp4 format) vs dpl II mix(music + speaker test clip), to compare reasonably.
The FFDShow can switch between PCM/AC3 in digital out mode on the fly making it easy to compare.
As I said many times, the speaker test clip is most generous on any models(more than 95% of the seperation quality).

Also the matrices values(Ls1,Ls2,Rs1,Rs2....) might affect the seperation quality by the phase shift degree change.
Comparing the Wikipedia matrix with the current one would be reasonable(also making it reasonable using the variable reference than the values).

So far, the fifthelem_B showed noticeable better seperation, but the test is not setup to compare the seperation fidelity(original vs DPL II).


Yes, A is 180 deg phase shift (the simpler approach),
B is 90 deg. phase shift.
Can you provide the proof in a source format(no dll)?

The sign variations are not important, because they result
in phase invertion in the decoded signal and do not affect the separation (as Tebasuna already noticed). Therefore A and B are enough to distinguish between 90 and 180 phase shifts.
Again, it's just your very dangerouse assumption.
You can test it with FFDShow which can adjust the matrix value with the sign.
It shows no difference only with the simplest speaker test file.
Also prove exactly which Tebasuna's observations concure your assumptions.

I agree with Scharfis that the 90 deg phase shift should have been prepared with the same sign style, to be fully consistent with the 180 deg. shift. Maybe next time
also check my quote above. indeed, the polls feels like something public.

(early) conclusions.
1) There is a noticable difference between the 90 deg phase shift and 180 deg phase shift : agreed.
2) 90 deg seem to produce significantly worst results, thus probably the DPLII downmixing equation is based on 180 deg. shifts (simple sign change).
I agree again we are using totally differernt languages. Apparently it seems what you wanna see.
---

BTW. Please test Aud-X DSfilter DPLII decoder (or rather DPLII decoder simulation),
by sending the output as AC3 through SPDIF to your HT amps.
I am curious of your opinions and especially your thoughts regarding its quality vs certified dolby decoders quality My independant Ad. :
Sorry, unfortunately, I am very much satisfied with the FFDShow with probably 1000% of proven better features and stability.
I also believe they will provide the DPL II encoding with 90 deg. phase shift very soon(with current adjustable matrix).

Rockaria
8th June 2006, 09:51
Was it a blind test to fool people by an anonymous person?

Here are two clips,
http://forum.videohelp.com/images/gu...165/180vs90.7z

And the reference (original 6 channel input) clip.
http://forum.videohelp.com/images/gu...helem_6chnl.7z

Each downmixed with:
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{180°} + 0.5 SR{180°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{0°} + 0.866 SR{0°}
and
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{90°} + 0.5 SR{-90°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{-90°} + 0.866 SR{+90°}


Yes, A is 180 deg phase shift (the simpler approach),
B is 90 deg. phase shift.


Yes, B is 180 deg phase shift (the simpler approach),
A is 90 deg. phase shift.


You definitely need to provide the encoding source of your test poll.

3dsnar
8th June 2006, 10:18
I have informed you of the input included (after you suggested so).
You should read my posts more carefully.
-----------
I am asking to verify my DPLII simmulation decoding algorithm,
not the entire DSfilter.
-----------
Here is the matlab code that I used for downmixing.

function [y, y2]=DPLIIdownmix(s)

FL=s(:,1);
FR=s(:,2);
C=s(:,3);
LFE=s(:,4);
SL=s(:,5);
SR=s(:,6);

y=zeros(length(FL),2)
y2=zeros(length(FL),2);

wgF=1;
wgC=sqrt(0.5);
wgA=sqrt(0.75);
wgB=sqrt(0.25);

Nrm=wgF + wgC + wgC + wgA + wgB;
wgF=wgF/Nrm;
wgC=wgC/Nrm;
wgA=wgA/Nrm;
wgB=wgB/Nrm;


%180 deg phase shifts
y(:,1) = FL*wgF + C*wgC + LFE*wgC - wgA*SL - wgB*SR;
y(:,2) = FR*wgF + C*wgC + LFE*wgC + wgB*SL + wgA*SR;


%90 deg phase shifts
y2(:,1) = FL*wgF + C*wgC + LFE*wgC + wgA*imag(hilbert(SL)) - wgB*imag(hilbert(SR));
y2(:,2) = FR*wgF + C*wgC + LFE*wgC - wgB*imag(hilbert(SL)) + wgA*imag(hilbert(SR));

Rockaria
8th June 2006, 10:31
I have informed you of the input included (after you suggested so).
You should read my posts more carefully.
Now I see at the last part....
So you feel OK performing the blind test poll without any prior permission?
Anyway, I want to believe it can be forgiven if the test routine proves used correctly.

Anybody know where I can get the matlab?

3dsnar
8th June 2006, 10:55
So you feel OK performing the blind test poll without any prior permission?

Yes :D

tebasuna51
8th June 2006, 11:00
BTW. Please test Aud-X DSfilter DPLII decoder (or rather DPLII decoder simulation),
by sending the output as AC3 through SPDIF to your HT amps.
I am curious of your opinions and especially your thoughts regarding its quality vs certified dolby decoders quality
Sorry, I have attached my PC to a old amp with only stereo input (with DPL I capability).

To test 5.1 or DPL II I need to burn a CD and go to other room with a DVD/DivX/mp3 player attached to the SONY receiver.

I tried, to make some kind of test, use your Aud-X DSF in GraphEdit but don't accept WAVDEST or DUMP output. Only accept DirectSound output (like you say in other thread).

For my configuration your Aud-X DSF is unusable.

Rockaria
8th June 2006, 11:17
@3dsnar, you seem to be very confident about ...what?
Anyway, I myself won't engage in such flip-flop games any more.

http://en.wikipedia.org/wiki/MATLAB : something that costs money for what I do not owe.
http://en.wikipedia.org/wiki/Hilbert_transform : seems to be the logic for transforming a square wave form to a strange curve with 90 deg. phase shifts

Possibly we can find the corresponding function in any forms of avisynth/sox plugin..
It's gonna take a long while to prepare the verification test.... oh well, nothing to believe.

It seems it has just lengthened the route further, forcing me to continue my own approach.
At least, I believe I have proved the reference model 4 better than 2 practically, and 1/3 better than 2/4 theoretically. period.

/fooled

3dsnar
8th June 2006, 11:37
You can believe the test, or not.
You can prepare your own downmixes as well.
Freedom of choice.
-------
Hilbert transform shifts all of the signal (represented as Fourier series) sinusoidal components by Pi/2 (90 deg). Hence, such operation may result in waveform change.

Due to long discussions related to creating DPLII downmixes,
and especially 90 dg. vs 180 dg. phase shift myths and speculations, I hope the test has its value for reasonable people.

Rockaria
8th June 2006, 17:32
Freedom of choice.
Oh yeah, my favorest word!:rolleyes: But when abused it becomes what we have just experienced.

So you are proud of playing with the POLL!
Do you even realize you abused the public POLL for your personal purpose?
Also do you understand I tried my best to prevent this kind of misleading, in the first post in other thread about your POLL?
http://forum.doom9.org/showpost.php?p=837679&postcount=63

What I am doubting most is the ethic of an anonymous identity, who wants to move people dramitically with minimum honest efforts.

For an example, your faulty DSFilter unable to connect the out pin to other filters is what I pointed out 5 month ago, still not fixed.
Your gesture is something like identifying the bugs with all the smooth generic promising words, but in fact no honest consideration & fix at all. That's why I can't trust yours at all to be honest, including all the other hidden invaluable un-disclosable know-wheres(no know-hows).
Your 'DPL II decoder' is another good example of the misleading. aud-x? .oh well..I forgot it..
Why don't you just put more time to fix the bugs silently in the one-person-owned-WE .com, for your future, instead of playing the waste games?

Even if I become to verify by myself your doubtful process and result, there's no doubt you just(afterall) created the minimum result(who knows if it's even intented mystypings) that you wanna see in a very deceiving way and you seem to be satisfied you proved something, moved people, realizing no ethical & logical problem at all. Another perfect example of Public Misleading.

I believe you will have to ACTIVELY prove your QUESTIONED HONESTY with proper perfectly OPEN processes and full considerations as I described in other thread, realizing you just created a bigger problem.
Until then, I believe all the other issues are none of your concern.

Thanks anyway for your little event(a true surprise never experienced before) that makes me think of something very different.:eek:

3dsnar
8th June 2006, 18:40
IMHO you've got a serious problem man.
Sorry, but conversation with you is waste of time.

And I am probably not alone with this sad conclusion.
This is the last time I replied to your attacks.

Rockaria
8th June 2006, 18:45
Will see.

Rockaria
9th June 2006, 04:26
Well, I don't have the matlab, nor could find a corresponding plugin for avisynth yet.
Which is why I want to share my idea looking for positive contributions from anybody talented and equipped.
Below is my draft plan to figure out the closest DPL II model for s/w emulations, possibly in a very OPEN, independant, objective, fair and fully reflected but economic way.

Now some more tests are included such as 'the verification of the Hilbert() algo' as well as many other essential considerations to go through the proper approach & procedure.
If the minimum test environment is not setup soon, I am going to add the results in my original thread when available.

1. prepare proper tools & organize the test.
. s/w tools : matlab or avisynth/sox with proper plugin(esp. for 90 deg phase shift)
. resource orgarnizer : an independant user with proper DPL II understanding, s/w tools, h/w equips, resources.
. refined model : the orgarnizer refines the test procedures & models
. prepare, test, report and share the results

2. prepare a 6ch mixed original source for full channel complexity and easy identification
The DPL II encoding with avisynth is listed in the below thread.(for models m12, m22)
http://forum.doom9.org/showpost.php?p=786690&postcount=82
<avs 6ch clips mixing example>
spk=DirectShowSource("SSWAV06.m4a")
muz=DirectShowSource("6chmusic.m4a")
...
mxx=MixAudio(spk, muz, 0.4, 1)
..
dpl2Enc(mxx, 0.7071, 0.7071, 0.866, -0.5, -0.5, 0.866)
...

3. identify the weights of orginal matrices : including the coefficients on rears to be shared on each channel, with no phase shifts(passive)

<mxA> : widely used for s/w encoding
DPL II Lf Rf C Ls Rs
Lt 1.000 0.000 0.7071 0.866 0.5
Rt 0.000 1.000 0.7071 0.5 0.866

<mxB> : Wikipedia one, possibly from Dolby
DPL II Lf Rf C Ls Rs
Lt 1.000 0.000 0.707 0.8165 0.5774
Rt 0.000 1.000 0.707 0.5774 0.8165


4. identify target DPL II models(formula) to compare
<m11>
Lt = mix(Lf.0°, C.0°, Ls1.-90°, Rs2.-90°) == mix(mix(Lf, C), mix(Ls1, Rs2).-90°)
Rt = mix(Rf.0°, C.0°, Ls2.+90°, Rs1.+90°) == mix(mix(Lf, C), mix(Ls2, Rs1).+90°)
<m12> rears(m11).-90°
Lt = mix(Lf.0°, C.0°, Ls1.-180°, Rs2.-180°) == mix(mix(Lf, C),-mix(Ls1, Rs2))
Rt = mix(Rf.0°., C.0°., Ls2.0°, Rs1.0°} == mix(Rf, C, Ls2, Rs1)
<m13> m11.-90° == m11?
Lt = mix(Lf.-90°, C.-90°, Ls1.-180°, Rs2.-180°) == mix(mix(Lf, C).-90°,-mix(Ls1, Rs2))
Rt = mix(Rf.-90°, C.-90°, Ls2.0°, Rs1.0°) == mix(mix(Rf, C).-90°, mix(Ls2, Rs1))
...
<m21>
Lt = mix(Lf.0°, C.0°, Ls1.+90°, Rs2.-90°) == mix(mix(Lf, C), Ls1.+90°, Rs2.-90°)
Rt = mix(Rf.0°, C.0°, Ls2.-90°, Rs1.+90°) == mix(mix(Rf, C), Ls2.-90°, Rs1.+90°)
<m22> rears(m21).-90°
Lt = mix(Lf.0°, C.0°, Ls1.0°, Rs2.-180°) == mix(mix(Lf, C, Ls1),-Rs2)
Rt = mix(Rf.0°, C.0°, Ls2.-180°, Rs1.0°) == mix(mix(Rf, C, Rs1),-Ls2)
...

When -180° = -, +90° = Hilbert(), -90° = -180°.+90° = -.+90°

5. perform the verification of Hilbert() algo if any useful, with m12 * mxA
<m12>
Lt = mix(Lf.0°, C.0°, Ls1.-180°, Rs2.-180°) == mix(mix(Lf, C), -mix(Ls1, Rs2)})
Rt = mix(Rf.0°, C.0°, Ls2.0°, Rs1.0°) == mix(Rf, C, Ls2, Rs1)
<-180° = -(+90°.+90°) == -Hilbert().Hilbert()>
Lt = mix(Lf.0°, C.0°, Ls1.-90°.-90°, Rs2.-90°.-90° == mix(mix(Lf, C), -mix(Ls1, Rs2).+90°.+90°)
Rt = mix(Rf.0°, C.0°, Ls2.0°, Rs1.0°)

6. verify if m13 == m11 with mxA
.discard m13 if identical or refine the 'phase shift' concept

7. verify if different phase shift degrees makes any difference with (m11, m12) * mxA
.discard the worse model

8. prepare & perform the seperation fidelity comparison with remaining candidates combination(matrices, models)
m11 * mxA : <reference1>
m11 * mxB :
m12 * mxA : <reference2>
m13 * mxA :

m21 * mxA : <reference3>
m21 * mxB :
m22 * mxA : <reference4>

9. conclusions
. the test orgarnizer share & report the test results
. users evaluate & verify the results(polls and/or posts)

Thanks,

ursamtl
9th June 2006, 13:39
If you have Plogue Bidule, why don't you just model the Dolby encoding using it? Bidule has a built-in Hilbert Transform filter (although in my experiments, it seems to produce a -90° phase shift, so for the +90° shift, you'll need to invert the signal). Another option for the Hilbert is to use Christian Budde's excellent Phasebug VST plugin (freeware). This gives you the possibility of any phase shift in a 360° circle.

If you don't have Plogue Bidule, try Audomulch.

I haven't done much with DPLII since I've never been impressed with its results, but I can tell you that in my experiments with Ambisonics, the 90° phase shift used in some encoding designs is essential. For example, in the superstereo circuits I've modelled using Plogue Bidule and Phasebug, the 90° phase shift balances the ambience nicely across the surround speakers, but moving it to 0° or 180° forces the ambience all to one surround speaker on another. Again, the application is different from DPL, but I've read a lot of surround sound documentation over the past couple of years and the Hilbert Transform is everywhere!

Finally, I know you guys are passionate about your points of view, but let's relax and enjoy this experimentation.

Regards,
Steve.

scharfis_brain
9th June 2006, 13:59
one question: how was the hilbert transform performed nearly 20 years ago when Dolby introduced their "Dolby Surround" ?

I know, that bandpass filters alter the phase. But the phase deviation is not constant with changes in frequency.
Also I think that 25 years ago computers weren't fast enough to do such calculations in realtime.

Do you have an idea how dolby 'could' have made the frequency independent phase shift?

ursamtl
9th June 2006, 14:15
The Hilbert Transform was done electronically. You can find quite a few circuits around on the net with a bit of judicious googling. :) It's sometimes known as a "dome filter."

scharfis_brain
9th June 2006, 14:43
Oh! That's nice stuff. Chaining some filters to achieve a near to constant phase shift over a defined range of frequencies.

scharfis_brain
9th June 2006, 15:36
I just did a small test with simple 180 degree mixing how the sign affects the surround image:

The Normal mixing:
http://home.arcor.de/scharfis_brain/samples/traditional_matrix_180_degree.png

And the inverted matrix:
http://home.arcor.de/scharfis_brain/samples/inverted_matrix_180_degree.png

samples can be downloaded here:
http://home.arcor.de/scharfis_brain/samples/DPL2-inverse-vs-traditional.rar

3dsnar: now compare my inverted sample to your 90 degree sample. both show the same behavior: "weapons loaded" comes from the center.
And that is why your 90 degree sample also is inverted.

I hope that it now should be clear what I meant all the time that Rockarias personal (inverted) Matrix destroys some of the surround information.

Rockaria
9th June 2006, 16:55
I will also have to agree that 'Rockarias personal (inverted) Matrix' destroyed scharis brain cells totally.
Sorry now brainless, I feel the responsibility. So what can I do for you?

@ursamtl, I appreciate your invaluable unbiased information.
I will look into the mentioned tools and try to find a way in my environment to apply the DPL II 90 degree phase shifts by the spec in the resonable models.

By the way, I seem to have made some annoying useless neighbors unavoidably.
My wife says she's gonna move right now although I want to give them some more opportunities to make themselves good citizons until this weekend.
The apatment is wooden, transfering the earthqakes every once in a while and the alu. shutters shap ultra sonic waves poking awaken my ears, soul and body more than 30 times a day. Their languages are nothing but noises to me, but they seems proud of keeping differnt languages in every different villlage, just 5 miles away.
My best idea atm is turning up the VOA(the foreign language to them) out from the window around the same origin(balcony) to neutralize. And it seems working now. But my wife says it's gonna go back tomorrow like yesterday saying there are such memories that don't last a day.

scharfis_brain
9th June 2006, 17:20
LOL. You are still taking it personal.
You were the person swapping the signs, weren't you?
So I refer this kind of matrix to you.

but anyways. did you listen to the samples?

Rockaria
9th June 2006, 18:38
Just imagine, what happens to your person when you replay whatever sweet music more than 10 times everyday.
Even the most beautiful aria(unfortunately, yours infact was some annoying discrete cracklings) becomes ugly.....at least to me.

You will get disappointed if I say I have already tested the active matrix DPL II encoding with all the possible combinations of the sign and rear coefs with FFDShow, Ac3Filter and Avisynth MixAudio() explained in the original thread.
So those things are no news to me, unfortunately making me feel no need to repeat. But you seem to be still repeating the same old song.

please remind, that arbitrary phase shifting is dependant to frequency.
I think it doesn't make any difference to the decoder whether the encoder shifts the surround +90° and -90° or whether it shifts 0° and 180°.
It is the phase difference (180°) between Lt and Rt that counts here.
where can I find these documents? I was unsuccessful searching them on the dolby.com site.
The contents of the document you linked to me I already knew. I hoped it contained some more specific information about how DPL2 is encoded. But it just was like some marketing talk (for sure, this is not your fault)
slnc = i.amplify(0).invert()

Sure, it's not your fault either(I'm unavoidably repeating). Btw, why the fault directed to Rockaria' among all the reasonable smooth words?.
But if you continue to repeat it blindedly like this, It becomes clearly your faults, even evil. Please maintain the HISTORY to avoid the WW III.

By the way, 'the inverting' reminds me of the reflecting on the mirror in the same phase region, while shifting kinda sliding through the phase regions. So I believe they are different and the 'phase shift' is correct in this case

3dsnar
9th June 2006, 18:51
3dsnar: now compare my inverted sample to your 90 degree sample. both show the same behavior: "weapons loaded" comes from the center.
And that is why your 90 degree sample also is inverted.

I hope that it now should be clear what I meant all the time that Rockarias personal (inverted) Matrix destroys some of the surround information.
Scharfis, I agree with you (partly).

Yes, the inverted version causes wrong position of some sounds in the surround panorama (in case of the 180 phase shifts).

The 90 deg. phase shift in general destroys much more significantly the complete sound (i.e. the inverted 180 deg shift differs from the inverted 90 deg shift. The 90 deg is even worst.).

So far it seems that the the best results are obtained with this equation:
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{180°} + 0.5 SR{180°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{0°} + 0.866 SR{0°}

Cheers, 3d.

Rockaria
9th June 2006, 19:34
It's gonna be my last wasteful discussion on the unclear theory until I get the resonable fully considered test results to verify the models, unless Rockaria is pointed directly or indirectly hereafter.


4. identify target DPL II models(formula) to compare
<m11>
Lt = mix(Lf.0°, C.0°, Ls1.-90°, Rs2.-90°) == mix(mix(Lf, C), mix(Ls1, Rs2).-90°)
Rt = mix(Rf.0°, C.0°, Ls2.+90°, Rs1.+90°) == mix(mix(Lf, C), mix(Ls2, Rs1).+90°)
<m12> rears(m11).-90°
Lt = mix(Lf.0°, C.0°, Ls1.-180°, Rs2.-180°) == mix(mix(Lf, C),-mix(Ls1, Rs2))
Rt = mix(Rf.0°., C.0°., Ls2.0°, Rs1.0°} == mix(Rf, C, Ls2, Rs1)
<m13> m11.-90° == m11?
Lt = mix(Lf.-90°, C.-90°, Ls1.-180°, Rs2.-180°) == mix(mix(Lf, C).-90°,-mix(Ls1, Rs2))
Rt = mix(Rf.-90°, C.-90°, Ls2.0°, Rs1.0°) == mix(mix(Rf, C).-90°, mix(Ls2, Rs1))
...
<m21>
Lt = mix(Lf.0°, C.0°, Ls1.+90°, Rs2.-90°) == mix(mix(Lf, C), Ls1.+90°, Rs2.-90°)
Rt = mix(Rf.0°, C.0°, Ls2.-90°, Rs1.+90°) == mix(mix(Rf, C), Ls2.-90°, Rs1.+90°)
<m22> rears(m21).-90°
Lt = mix(Lf.0°, C.0°, Ls1.0°, Rs2.-180°) == mix(mix(Lf, C, Ls1),-Rs2)
Rt = mix(Rf.0°, C.0°, Ls2.-180°, Rs1.0°) == mix(mix(Rf, C, Rs1),-Ls2)
...

When -180° = -, +90° = Hilbert(), -90° = -180°.+90° = -.+90°
As it explaines, the Rt in <m12>, has the image mixed with all 4 channels in the same phase region 0, making it the worst choice for the seperations theoretically.(it's a very simple math). It seems concuring my test results with the prevailing <m12> having Lf<Rf, if you read my original thread.
Now the seperation efficiency more clearly looks like m21>m22>m11>m12, which of course needs some simple listening tests.

If I were to explain why the rears have the coefs shared on different channels based on the <m21>, <m22> model is :
. there may exists some overlappings of the images spanning on the different phase regions.
. by comparing the two identical but somewhat overlapped rear coef images, it would be possible to get the closer original channel image enhanced by the servo feedback.

/OPEN minded & mutual respects to the anonymous...

DarkAvenger
9th June 2006, 23:41
Your test is probably flawed if I understand correctly. A properly mastered 5.1 ac3 track already contains 90° shifted surround sounds. That's why a simple downmix should be enough.

ursamtl
9th June 2006, 23:48
Actually this brings up a point I was going to make earlier in this thread. The Dolby documentation talks about + or - 90° phase shifts during the encoding phase only.

scharfis_brain
10th June 2006, 00:09
hmmm. since every DVD-Standalone player has DPL downmixing built in (some also offer DPL2!), what about recording the downmixed & outputted audio of such a device?

Then one can tell for sure, whether ther is +/-90 or 0/180 degree downmixing.

ursamtl
10th June 2006, 00:34
To "downmix" means taking the a 6-channel input and mixing it appropriately for stereo playback on non-multichannel systems. I'm not sure that a downmixed stereo output is matrixed in such a way that it can be subsequently "unmatrixed" into 6 channels so that you could do this comparison. As I understand it, the downmix process is only to present fairly listenable audio on a stereo system.

To be able to determine phase shifts as you suggest would require taking the downmixed stereo file and running it through a decoder and then comparing the phase of the resulting channels to the original 6 individual source channels before the downmix. From what I've read, the matrix process is such that complete recovery of original source channels is not possible.

I wonder if all the attention to whether or not the Hilbert transform /90° phase shift is necessary isn't because it's much easier for casual programmers to implement a 0/180° algorithm. For those who want to try, my understanding is that you need to implement a FIR filter with certain cooefficients. Here's a routine for calculating the cooefficients: http://www.musicdsp.org/archive.php?classid=3#195.

Rockaria
10th June 2006, 08:31
I have identified one(or two) more DPL II candidate from VideoHelp.
http://www.videohelp.com/forum/archive/t294463.html
This model appears to be similar to what ursamtl mentioned in his very helpful posts for the quest.
So I am adding this to the candidates as :

<m31>
Lt = mix(Lf.0°, C.0°, Ls1.-90°, *Rs2.-90°) == mix(mix(Lf, C), mix(Ls1, *Rs2).-90°)
Rt = mix(Rf.0°, C.0°, *Ls2.+90°, Rs1.+90°) == mix(mix(Rf, C), mix(*Ls2, Rs1).+90°)
<m32>
Lt = mix(Lf.0°, C.0°, Ls1.+90°, *Rs2.+90°) == mix(mix(Lf, C), mix(Ls1, *Rs2).+90°)
Rt = mix(Rf.0°, C.0°, *Ls2.-90°, Rs1.-90°) == mix(mix(Rf, C), mix(*Ls2, Rs1).-90°)

When * = invert()


Ok, here's an ANSWER finally...


This won't give you EXACT Dolby Surround Encoding (without a true encoding plugin), but it'll come mighty close.

Put your 6 waves into Audition.

Pan them Like this:

LF --> 100%L
C --> 50%L + 50%R
RF --> 100%R
LS -->(50%L + PhaseInverted 50%R) w/ +90º PhaseShift (if you know how to do that, otherwise ignore the phaseshift)
RS -->(50%R + PhaseInverted 50%L) w/ -90º PhaseShift (same as above)
LFE --> (Already LowPassFiltered up to ~80Hz) ?? 25%L+25%R


Mix down to a stereo WAVE file (making sure not to overload the mixer itself--bring everything down equally if you have to)

Then, you can convert to AC3 2.0, with the "Dolby Surround Indicated" checked.

Good luck,

Scott

(Static) Phase shifting is where the waveform's SINE wavefronts are shifted by a constant Phase Angle. E.G. a textbook "Sine Wave" will become a "Cosine Wave" when shifted 90º. It's fairly easy to do with analog Electronics, but not so easy to do digitally.
Why?
Because a shift by degrees is related in phase, not in time. Shifting a single frequency like above is equivalent to a delay of the same SINE--but only for that frequency. That means that to duplicate using standard delay techniques, you have to have a frequency-dependent time delay.

Thankfully, there is a VST plugin that can do the same thing easily:
http://www.savioursofsoul.de/Christian/VST/PhaseBug.zip

Like I said, if this is too much extra work, you can try skipping the phase shift.

Scott

The PhaseBug also works with Audacity with the help of its VST Enabler, for the rear phase shifts.
And the Audacity has the required effects such as Amplify() and Invert().
It will accept 6ch wav and save to any supported codec containing DPL II stereo signal inside.

I also located the free matlab clone scilab-4.0.exe, which has the very intrinsic hlib function for the Hilbert Transform.
Yeah, no such builtin Hilbert() which certainly require a custom function like what ursamtl addressed again.
But I couldn't find any avisynth plugin(HilbertShift, InvertAudio) yet, for the DPL II automation when the the best s/w emulation model is finally established.

Now all the requird basic functionalities seem to be ready with Audacity : 6ch read, mix, amplify, shift(PhaseBug VST), invert, 2ch save
I will update my original plan to save the space when I finish verifying the all required functionalities.

BTW, an unresolved issue on the PhaseBugMono(in the below links) :
. it has the effect scale input range as 0.000~1.000..
. the document has different gui and scale : in degree
. anybody can kindly explain how to map the effect scale to phase degree?

http://audacity.sourceforge.net/download/windows
http://audacity.sourceforge.net/help/faq?s=install&i=vst-enabler
http://www.savioursofsoul.de/Christian/Plugins.htm

3dsnar
10th June 2006, 08:50
Your test is probably flawed if I understand correctly. A properly mastered 5.1 ac3 track already contains 90° shifted surround sounds. That's why a simple downmix should be enough.
Such statement cannot be actually true.
Because, in case of reach 5.1 mixes there is alot going on,
and some sounds in the surround are (roughly) 90 deg shifted against fronts, some contain similar phase, and some are only present in the surrounds (or fronts). So it is difficult to talk about phase relations.
Anyway, as I understand we are interested in the best DPLII downmixing equation applicapable for 5.1 sources. Since the sources practically in most of the cases come from DVDs (and we do not have the raw tracks used for creating the 5.1 signals), thus we are interested how to convert the DVD 5.1 audio signals to DPLII stereo.

3dsnar
10th June 2006, 08:56
To be able to determine phase shifts as you suggest would require taking the downmixed stereo file and running it through a decoder and then comparing the phase of the resulting channels to the original 6 individual source channels before the downmix. From what I've read, the matrix process is such that complete recovery of original source channels is not possible.

I wonder if all the attention to whether or not the Hilbert transform /90° phase shift is necessary isn't because it's much easier for casual programmers to implement a 0/180° algorithm. For those who want to try, my understanding is that you need to implement a FIR filter with certain cooefficients. Here's a routine for calculating the cooefficients: http://www.musicdsp.org/archive.php?classid=3#195.
Yes, you've got the point. It is not so easy to implement hilbert transform.
In practice, the hilbert transform is applied via spectrum operations, not FIR filtering apprach, because convolutive filtering is a bit computationally heavy.
You have to calculate a complex spectrum (with FFT), manipulate the spectrum bins, and go back to time domain with IFFT. This requires overalapp-add aproach (to preserve signal continuity on the frame edges). If someone is really interested in that, I could help (please PM me. I cannot directly share the source code - sorry).

There is an alternative way to see how the downmix should look like.
Generate an appropriate test signal (let's say square and sinusoidal signals). Each playing
separately in each channel. Than use DPLII certified decoder and see the phase changes
in the decoded multichannel output.

I have no possibility to capture such signal.
Can someone do that?
(even capturing it throuth analog output/input would do)

I prepared the signals.
http://forum.videohelp.com/images/guides/p1514184/squares.7z

1) Just in case, the original

2) The 180 deg. downmix
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{180°} + 0.5 SR{180°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{0°} + 0.866 SR{0°}

3)
Lt = FL{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.866 SL{-90°} + 0.5 SR{-90°}
Rt = FR{0°} + 0.7071 C{0°} + 0.7071 LFE{0°} + 0.5 SL{+90°} + 0.866 SR{+90°}

(so this time with the same sign style - i.e. no sign inversion)

DarkAvenger
10th June 2006, 09:16
Such statement cannot be actually true.


Knowing is better than believing. Refer to page 3-6, 4-12ff, 4-19, D-1 of document: http://www.dolby.com/assets/pdf/tech_library/46_DDEncodingGuidelines.pdf

3dsnar
10th June 2006, 09:21
I know this document...
But, what dolby writes is one thing, and how it is done, it could be a different story.
Ofcourse I am talkin about creating DPLII downmixes (not preparing material for 5.1 dolby digital).
But we do not have to argue about this,
but can simply find out.
Please read my previous post.

DarkAvenger
10th June 2006, 09:34
Yes, and I wrote "properly mastered"... and that you are using unsuitable sources for testing.

3dsnar
10th June 2006, 09:37
Uhm, you could be right :o
It would be better to analyze
the waveform changes and see if the DPLII decoder adjusts the (assumed) phase shifts.
---
On the other hand, since some sources may have already adjusted phase,
and some may not, this means that there is no universal solution for the downmixing equation...
And dependingly on the material, you have to use 180 deg or 90 deg. (to achieve what dolby suggests). But will see the decoded downmixes (if someone will be able to perform the decoding
and record the results), to be certain.

ursamtl
10th June 2006, 13:59
Yes, you've got the point. It is not so easy to implement hilbert transform.
In practice, the hilbert transform is applied via spectrum operations, not FIR filtering apprach, because convolutive filtering is a bit computationally heavy.
That's not what Dolby says about its approach. I think they are clear in their explanation of why and how for the Hilbert. They designed DPLII, etc., so I hope they know what they're talking about ;)
(from Dolby Digital Professional Encoding Guidelines, Appendix D, page 1)

Purpose
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. Without this filter, point-source elements panned from Surround to Center in the multichannel mix would seem to pan from Surround to Left and then to Center when downmixed to Lt/Rt and reproduced using a Dolby Surround Pro Logic decoder.

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. For example, 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. If in doubt, use a DP562 to downmix the 5.1-channel program to Lt/Rt, Dolby Surround Pro Logic decode the Lt/Rt signals, and then set the filter to the setting that sounds best.

Description
The 90-degree phase-shift is created using a very long FIR filter. Since this filter introduces a significant time delay, the other four channels are delayed using a PCM delay line so that all six channels are kept in sample alignment. This filter has exactly
90-degree phase shift at all frequencies. The magnitude response is flat across most of the spectrum, rolling off at the lower edge of the audio band (-3 dB below 30 Hz).
I don't know how much clearer we could get than this! Dolby clearly states how they do it: a very long FIR filter. The source code for such a filter is available around the net, either at the audiodsp.org link I provided yesterday or at a couple of other filter designer sites. Dolby also mentions that this introduces a time delay (also known as latency), so the channels not passed through the Hilbert need to be delayed to compensate for this. Maybe instead of investing all this time and energy in trying to prove one side of the argument or the other, it'd make more sense to try coding it the way Dolby describes it and see how the results turned out? Just a suggestion.:)

Regards,
Steve.

tebasuna51
10th June 2006, 14:06
Knowing is better than believing. Refer to page 3-6, 4-12ff, 4-19, D-1 of document: http://www.dolby.com/assets/pdf/tech_library/
46_DDEncodingGuidelines.pdf
Reading the document:
1) The info is for Dolby Surround Pro Logic (DPL I), nothing about DPL II.
2) Using the info in this DPL II discussion:

a) The phase shift (and the related FIR filters), when needed, is always a process in encoder ac3 5.1 phase, in downmix process only a inverter is used to add the surround mix to the Lt channel.

b) The phase shift is not needed "if the source was recorded using five discrete microphones placed in the corners of an auditorium".

c) The downmix of a Dolby Digital 5.1 compliant signal (with or without phase shift included) only need a inverter. Matrix 1 (simple downmix).

d) The use of Matrix 1 downmix can't guarantee a correct DPL mix if the 5.1 source is not Dolby Digital compliant, but none can guarantee this if the method to obtain the 5.1 signal is unknown.

BTW, there are some contradictions in Dolby documentation, for instance:
At Authoring Dolby Digital and Dolby E Bitstreams (2002), 3.6 Downmixing (page 17), http://forum.doom9.org/showthread.php?p=332259#post332259

"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.
This allow a Dolby Surround Pro Logic decoder to reconstruct the L/C/R/S channels for a Pro Logic home theater."

If this is true we must use a matrix 3 style, with correct (not inverted) SL, SR channels using software DPL II Cyberlink decoder.

3dsnar
10th June 2006, 16:30
@Ursamtl,
I am just talking about en efficient implementation.
The result should be very similar (i.e. spectral multiplications are equivelent to convolution in the time domain).

@Tebasuna. All I was just going to write you did :)
All I can say is EXACTLY. 100% agree.
To summarize, the appropriate phase relations in the 5.1 input should be as close as possible to the Dolby specs. (e.g. application of appropriate phase shifts, etc).
The downmixing process can be viewed as a separate thing.
Cheers, 3d

Rockaria
10th June 2006, 20:21
@tebasuna51
I do not understand clearly what you mean by 'in phase', 'out of phase', 'inverted', 'matrix 3' and the use of 'software DPL II Cyberlink decoder' here.
--------------------------

A more detailed DPL II doc with diagrams of .. DPL1 which I linked to scharfis in my original thread.(look @ around P-3)
http://www.dolby.com/assets/pdf/tech_library/209_Dolby_Surround_Pro_Logic_II_Decoder_Principles_of_Operation.pdf

About the issue on DD5.1(ac3) the possibility of occasionally having the rears shifted :
. I don't want to believe the decoded already discrete 5.1 ch stream needs any phase shift effects on the rears for further channel seperations unless it's EX or similar encoded
. there are contradictions in many related docs : i.e. this doc only mentions the 90 deg phase shift in DPL (II) encoding
. so the target should be limited to normal(no phase shifted) 5.1ch sources for the DPL II encoding emulation.

My interpretation on the DPL I is now adjusted as ursamtl addressed :
Lt = mix(Lf.0°, C.0°, *S.+/-90°)
Rt = mix(Rf.0°, C.0°, S.+/-90°)
. when * = invert(), +/- = + or - phase shift(prolly +)
. no 180° is mentioned here at all : I initially misinterpreted the - polarity(invert) as - phase shift, 180 deg off relations as results.
--------------------------

Now the issue is clearly what reasonable DPL II rear stereo seperation plans we can imagine(in combination with existing matrices) :

<m11> adjusted : no relations between the coefs, polarity between the channel : simple coefs mix
Lt = mix(Lf.0°, C.0°, *Ls1.+/-90°, *Rs2.+/-90°) == mix(Lf, C, *mix(Ls1, Rs2).+/-90°)
Rt = mix(Rf.0°, C.0°, Ls2.+/-90°, Rs1.+/-90°) == mix(Rf, C, mix(Ls2, Ls1).+/-90°)
<m12> the prevailing s/w version : we clearly see the Lf<Rf effect
<m13> to be adjusted
...
<m21> : adjusted : phase between the coefs, polarity between the channels
Lt = mix(Lf.0°, C.0°, *Ls1.+/-90°, *Rs2.-/+90°) == mix(mix(Lf, C), *mix(Ls1.+/-90°, Rs2.-/+90°))
Rt = mix(Rf.0°, C.0°, Ls2.-/+90°, Rs1.+/-90°) == mix(mix(Rf, C), mix(Ls2.-/+90°, Rs1.+/-90°))
<m22> my adjusted s/w emulation that has around 20% better seperations than <m12> : both 180 deg shifts
...
<m31> : adjusted : polarity between the coefs, phase between the channels
Lt = mix(Lf.0°, C.0°, *Ls1.+/-90°, Rs2.+/-90°) == mix(mix(Lf, C), mix(*Ls1, Rs2).+/-90°)
Rt = mix(Rf.0°, C.0°, Ls2.-/+90°, *Rs1.-/+90°) == mix(mix(Rf, C), mix(Ls2, *Rs1).-/+90°)
<m32> : replaced : polarity between the coefs & channels, phase between the channels
Lt = mix(Lf.0°, C.0°, *Ls1.+/-90°, Rs2.+/-90°) == mix(mix(Lf, C), mix(*Ls1, Rs2).+/-90°)
Rt = mix(Rf.0°, C.0°, *Ls2.-/+90°, Rs1.-/+90°) == mix(mix(Rf, C), mix(*Ls2, Rs1).-/+90°)
<m33> : added : polarity between the coefs & channels
Lt = mix(Lf.0°, C.0°, *Ls1.+/-90°, Rs2.+/-90°) == mix(mix(Lf, C), mix(*Ls1, Rs2).+/-90°)
Rt = mix(Rf.0°, C.0°, Ls2.+/-90°, *Rs1.+/-90°) == mix(mix(Rf, C), mix(Ls2, *Rs1).+/-90°)
<m34> : added : polarity between the coefs
Lt = mix(Lf.0°, C.0°, *Ls1.+/-90°, Rs2.+/-90°) == mix(mix(Lf, C), mix(*Ls1, Rs2).+/-90°)
Rt = mix(Rf.0°, C.0°, *Ls2.+/-90°, Rs1.+/-90°) == mix(mix(Rf, C), mix(*Ls2, Rs1).+/-90°)
...
. when * = invert(), +/- = + then - phase shift(a), -/+ = - then + phase shift(b) : i.e. <m21a>,, <m32b>
. we are not certain on Dolby's 90° whether - or +, so applying on the models respectively
. not still sure why there need the relations to be established between the channels, but will evaluate them.
. these DPL II model candidates adjustments will be reflected on the original plan.

tebasuna51
11th June 2006, 00:58
@tebasuna51
I do not understand clearly what you mean by 'in phase', 'out of phase', 'inverted', 'matrix 3' and the use of 'software DPL II Cyberlink decoder' here.
- 'in phase' and 'out of phase' are literal text in document:
Authoring Dolby Digital and Dolby E Bitstreams
Of course is ambiguous, but can be interpreted like the inverted (or {180}) surround signal mus be added to Rt instead to Lt.

- 'inverted', 'matrix 3' and 'software DPL II Cyberlink decoder' are quick references to my test in previous threads. Here a brief resume (with simplified coeficients and results to see the relevant questions):

Purpose: check the relation between input and output channels in the process
6channelwav -> DPL II downmix -> DPL II upmix -> 6channelwav'
Where:
- 6channelwav is a Channel_Test (channels separated in time)
- DPL II upmix was made with Cyberlink PowerDVD 6, Audio Effect dsf (software decode).
- DPL II downmix was made with BeHappy using:
Matrix 1 (like BeSweet/Azid)
LT = L + 0.7 C - 0.8 SL - 0.5 SR
RT = R + 0.7 C + 0.5 SL + 0.8 SR

Matrix 3 (with inverted signs for back channels)
LT = L + 0.7 C + 0.8 SL + 0.5 SR
RT = R + 0.7 C - 0.5 SL - 0.8 SR

Results (L, R, ... input channels, L', R'... output channels) :
M1 decoded in Movie mode
L' = 0.7 L
R' = 0.7 R
C' = 0.6 C
SL' = - 0.7 SL
SR' = - 0.7 SR

M3 decoded in Movie mode
L' = 0.7 L
R' = 0.7 R
C' = 0.6 C
SL' = 0.7 SL
SR' = 0.7 SR

But I don't know if all soft/hard decoders have similar behaviour.

Rockaria
11th June 2006, 03:19
can be interpreted like the inverted (or {180}) Yea, literally you are right.
And with the above linked (recentest maybe) doc's mentoned 'polarity', I believe it's a plain invert(mirroring) on the same phase region.

I also tested your mentioned matrix 3 with FFDShow, with various clips, ac3/dts/aac/wav, 6ch/5ch, varying complexity, h/w DPL II decoder in movie mode.
I found it's indeed better(closer to ffdshow's ac3 out mode) with some types of clips.
I also found the matrix 2(mine) becomes extremely bad with winamp5 bundled 6ch music, forcing me to give up messing with these 180 deg. models any more.
But they will still be included in the tests with some more content types. Just no more pinky expectations.

So I conclude it(the s/w 180 deg. phase shift emulations) heavily depends on the contents. The possible reasons are :
. the phase shifts originally imbeded in the sources as DarkAvenger said.(it will also affect 90 deg models)
. the number of source channels without LFE and/or Center.
. channel complexity of the clips
. no enough/accurate channel seperation plan(algo, esp. Hilbert() & Invert())
...

Now I have encoded a 6ch speaker test 90 deg. phase shifted DPL II based on the <m31> model.
It plays perfectly as expected(most generous no-concurrent-ch-clip).
But what is important now is I assure the Audacity with PhaseBug is working perfectly on my current slow P4, you can use the same procedure & env.
. read a 6ch source wav or ogg..
. duplicate each rear for invert
. -3dB on center, -3dB/-9dB for coef1/coef2 on each rears.(sorta 1:3, minimum residuals)
. PhaseBugMono +-90deg phase shifts on each 4 rear coef. (*check edit : 0.75 : 90 deg., 1.0 : 180, 0.25 -90, 0.00 : -180 )
. align the channels to correct positions L-C-R
. save to 2ch DPL II ogg. done.

I am changing to XP-M soundstorm. I need some significant performance...
Let's see if these 90 deg. phase shifts and inverts gonna make any differnces....;)

[edit]
.The phaseBug input scale seems working strangely : it changes the degree but advances a lot and no negative direction ??

raquete
11th June 2006, 16:48
- 'in phase' and 'out of phase' are literal text in document:
Authoring Dolby Digital and Dolby E Bitstreams
Of course is ambiguous, but can be interpreted like the inverted (or {180}) surround signal mus be added to Rt instead to Lt.

a good lecture about phase: http://en.wikipedia.org/wiki/Phase_%28waves%29

It is common to speak of inverting the polarity of a wave as "flipping the phase" or "shifting the phase by 180 degrees". These are not completely equivalent, though, since a 180 degree phase shift of all signal frequencies would also delay the signal. Inverting the signal is instantaneous.

i have one .pdf from Dolby.Inc showing about LT/RT and respectives phases,later i post the link to download this file(i need to find it)

very interesting thread guys,i'm loving it,go ahead!

;)

tebasuna51
11th June 2006, 19:15
It is common to speak of inverting the polarity of a wave as "flipping the phase" or "shifting the phase by 180 degrees". These are not completely equivalent, though, since a 180 degree phase shift of all signal frequencies would also delay the signal. Inverting the signal is instantaneous.
Not at all. Any delay is a undesired result, if exist any delay then not all frecuencies have the same phase shift.

Invert the polarity of a wave is the perfect method to shift the phase by 180 degrees to all frecuencies.

In matrix equations the terms SL{180} and -SL are absolutely equivalents.

Rockaria
11th June 2006, 22:47
In fact, that's a fundamental issue in the digital world.

Suppose a best visual assimilating situation : throw a stone in a pond and recode the event.

. you will see the tree-age-circles(wave) spereding outside forever until the origin loses it's energy
. it's a continuous analogic wave circles spreading to all directions(360 degree)
. now the issue is how to capture and compact the phenomenon in a digital way from that abundant of analogic data.
. suppose you are far outside from the center of the event and trying to recode the WAVE on the TIME AXIS.
...
My best imagination is a STRING of COIL, which circulates 0~360 degree, but also advances on the time axis, making any degree (i.e. +-3601~ deg) of phase shift possible, spanning any number of samples, definately causing exact amount of time delay.

With more circular scanings(sample rate), the more accurate/bigger data will be attained on each second(bit rate).
Also with more recodings from multi directions, you are getting more accurate spatial informations(5.1~ch, I assume the minimum is 8 mics/speakers for real 3d recoding).

Also if you straighten the COIL wire on the more granular phase*time linear domain, it appears similar to the diagram on Wikipedia.

Any correction is welcomed.

raquete
11th June 2006, 23:46
@ Rockaria.... :goodpost:

My best imagination is a STRING of COIL, which circulates 0~360 degree, but also advances on the time axis,..
something like this?
http://upload.wikimedia.org/wikipedia/en/e/e1/Wave-chirplet-wave-only.png

more lecture : (Complex sinusoids)
http://en.wikipedia.org/wiki/Negative_frequency