Log in

View Full Version : 5.1 AC3 > Dolby Pro Logic II AAC?


Pages : 1 [2]

Rockaria
9th February 2006, 22:11
But it just was like some marketing talk (for sure, this is not your fault)It can imply many things. It's not your fault either.
The problem is that the documents are not very clear especially on the DPL II.
So my belief is we definitely need the inductive reasoning through lots of tests to get the clear picture of the DPL II model.

Anyway, the FFDShow suffices my needs with the adjusted matrice. So I don't want waste our emotions any more.
But let us know when you get the clear picture of the proper DPL II encoder..

[edit] I have no experience with any commercial h/w, s/w DPL II encoders. But iirc, one of my links in this thread is mentioning it.

gte024h
10th February 2006, 01:52
Does this mean that the DPL II encoder in azid 1.9 is flawed?

I have no use for and have not tested any software DPL II decoders since my amp takes care of that. I assume its implementation is correct since it is a commercial product with the Dolby logo.

If Azid's implementation of DPL II encoding is flawed, then all my rips are flawed too, even though they sound OK to me. Is there any quantitative way to validate Azid's DPL II encoder?

Rockaria
10th February 2006, 02:58
Of course we don't need the s/w DPL II decoder when connected to a digital receiver/decoder. But if you have original multi ch clips, you may still find the advantage of the s/w DPL II encoder as I described before(besides the transcoding purpose).

BTW, those linked discusstions are aged around three years. So many things might have been correctly implemented especially if you feel no bias at all.
What I count MORE is what they experience & prove not what they say or believe (three years ago and reproduced thereafter).
The only correct way to verify would be comparing the DPL II recoded music with original multi channel clips.

Another very simple visual way would be checking the system mixer channel matrix behavior.
If it shows Lt<Rt mostly or similar bias, then it's made FROM different understanding, which means there are no perfect emulations...

scharfis_brain
10th February 2006, 06:04
what means Lt<Rt ?

Rockaria
10th February 2006, 06:22
What means better balanced?
. but it does not reconstruct(seperation & cancellation) the rears correctly, noticeably emphasizing(not seperated & canceled) FR precisely speaking, when processed with normal 6ch music.
what means Lt<Rt ?:confused: What is the point of repeating this?

scharfis_brain
10th February 2006, 11:16
Because I don't understand the meaning of some of your sentences.
Are you a native english speaker? I am not.

Could you rephrase your thoughts about the unbalanced Lt <-> Rt thing into easier understandable sentences, please?

As I stated before I do not see a mathematical imbalance here, because we are dealing with ac voltages/signals that are centered to zero. this means that signs are irrelevant in the downmixing process regarding signal balance between Lt and Rt.

Both 'yours' and 'mine' preferred matrices are balanced for Lt <-> Rt.
The different results occur due to the different sign, yes. But that does not mean inbalance in the resulting signal itself.

scharfis_brain
10th February 2006, 15:37
I am currently looking into some of dolbys documents and found this:
http://www.dolby.com/assets/pdf/tech_library/149_seu4_ce.Manual.pdf
on page 12 : one can see a chart that clearly states, that there is NO 90° phase shift for dpl1 encoding.

another document: http://www.dolby.com/assets/pdf/tech_library/44_SuroundMixing.pdf states at page 59 that there IS a 90° phase shift included. But this phase shift is measured at 1 kHz. Other frequencies will have other phase shifts. I think that the 90° phase shift derives from the 7kHz Bandpass filter for the Surround channel of DPL1-encoding.

Also, I found a (I thinks so) official DPL2 encoder:
http://www.surcode.com/low/images/PL2-main-screen.gif
But with about 500$ it is far much too expensive.

When I find more - and especially DPL2 - documents, I'll add them here.

Rockaria
10th February 2006, 15:44
Instead, I don't see any clear DPL II model in your mind.
Do you still believe your first assertive statement on the uncertain suff?(that's probably the reason you cannot understand and stick to the possible defects of others)
It is the phase difference (180°) between Lt and Rt that counts here.
It sound like gross stereo(Lt, Rt) image having 180 degree of phase difference. Is it a new format of joint stereo?
That seems to be the least understanding IMHO, provided the same Dolby's document, as you said you read it.

coefficients -(Ls3 + Rs1) , +(Ls1 + Rs3) looks far better than that, based on the Dolby's one(but with different understanding) and actually I read somebody was doing the arithmetic addition on the coefficients on each channel.

coefficients (-Ls3, -Rs1) , (Ls1, Rs3) is the Dolby's one and the default format of the FFDShow(but with slight different values)
it does not perform the arithmetic addition but the results are biased as I described in my ealier post.

my tested & verified(by myself) adjustment is (Ls3, -Rs1), (-Ls1, Rs3) as you might have seen.
*when coefficient Ls3 = sqrt(3/4) * Ls, and Rs1 = sqrt(1/4) * Rs....

I don't know how to express the complicated model easy to read in few sentenses using common language. So please don't blame me for the small mistypings.

I am still refining the model so I cannot say anything assertive yet. Only the test results will tell something reasonably, for a while.
And I don't think it's fair at all to discuss anything when I don't get any positive contribution. feedbacks..

tebasuna51
11th February 2006, 18:51
Test about DPL_II software encoders/decoders (or downmix/upmix).

1) Encoders (downmix).
FFdshow version 20060123
Last versions of BeSweet-Azid and BeHappy
Tried also ATSurround plugin for Foobar, but is only DPL_I compliant.

Data in % original channel.
FFdshow Downmix from 5.0 with Dolby Prologic II
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 100 0 71 - 87 - 50 308
FR' 0 100 71 50 87 308

BeSweet-Azid-dpl2 and BeHappy-dpl2 from 5.0
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 33 0 23 - 28 - 16 100
FR' 0 33 23 16 28 100
Warning for ffdshow: use normalized matrix (like azid) to avoid clipping problems.

2) Decoders (upmix).
Cyberlink PowerDVD 6, Audio Effect dsf.
FFdshow version 20060123

Data in % original channel.
Cyberlink Upmix from Dpl2 with Audio Effect (PDVD6)
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 69 0 30 0 - 1 100
FR' 0 69 30 1 0 100
C' 1 1 57 0 0 59
SL' - 1 - 1 - 1 - 68 - 2 73
SR' - 1 - 1 - 1 2 68 73

FFdshow Upmix from Dpl2 with Dolby Decoder
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 97 - 2 17 - 87 - 7 210
FR' - 2 97 17 7 87 210
C' 45 45 173 - 10 10 283
SL' 79 0 0 -120 - 69 268
SR' 0 - 79 0 - 69 -120 268
FFdshow becomes unusable because:
- Clipping problems.
- SL and SR inverted.
- Channel mix.

Problems with Cyberlink:
- SL inverted
- Center channel not cancelled completely (30%) in FL and FR.
- Global volume for center channel 115 (30+30+57-1-1) great than volume of rest of channels.

Now with the matrix suggested by Rockaria
Normalized matrix with inverted signs for SL
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 33 0 23 28 - 16 100
FR' 0 33 23 - 16 28 100

Cyberlink Upmix from Dpl2(-SL) with Audio Effect (PDVD6)
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 69 0 30 0 - 1 100
FR' 0 69 30 - 1 0 100
C' 1 1 57 0 0 59
SL' - 1 - 1 - 1 68 - 2 73
SR' - 1 - 1 - 1 - 2 68 73
Solved the SL inverted channel at least with Cyberlink Upmix.

The question is, hardware decoders works like Cyberlink?
Is not easy detect a inverted channel only listen it.

scharfis_brain
11th February 2006, 19:23
dolby states in their documents, that they invert the left surround in Movie-Mode in order to spread the sound in the room.

tebasuna51
11th February 2006, 19:36
But the goal of a downmix-upmix process must be obtain the original sound (with the SL channel pre-inverted or not).

scharfis_brain
11th February 2006, 20:19
I just reflected, what Dolby said.

tebasuna51, could you also do your test with mono surround (source has Rs == Ls) with the different matrices and upmixers?

Rockaria
11th February 2006, 20:44
Thanks tebasuna51, it's a great feedback.
FFdshow becomes unusable because:
- Clipping problems.
- SL and SR inverted.
- Channel mix.

The FFDShow's 'Dolby Decoder' DSP looks incomplete(too much center in addition) and can be used only for any pcm decoded 2ch (DPL (II)) stream if we don't have the external h/w decoder, as we already know.

My adjusted coeficents matrix model is for FFDShow DPL II encoder, but supprised by that it also applies to Cyberlink encoder.

Anyway the 'music mode' of the DPL II h/w decoder is (just->)basically for compensating too much seperation of the center from the fronts that the default 'movie mode' does.

[edit]clarification just->basically
there are some more difference between the two modes which has minor effects(i.e. delay on movie mode) in the rears also.

tebasuna51
12th February 2006, 01:03
My previous test with Cyberlink was incomplete because there are two modes: music and movie, and I only test the music mode.
Now the two modes with dpl2 generated by ffdshow, azid, BeHappy:
Data in % original channel.
Cyberlink Upmix from Dpl2 with Audio Effect (music mode)
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 69 0 30 0 - 1 100
FR' 0 69 30 1 0 100
C' 1 1 57 0 0 59
SL' - 1 - 1 - 1 - 68 - 2 73
SR' - 1 - 1 - 1 2 68 73

Cyberlink Upmix from Dpl2 with Audio Effect (movie mode)
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 71 0 1 0 0 72
FR' 0 71 1 0 0 72
C' 1 1 70 0 0 72
SL' 0 0 0 - 70 - 2 73
SR' 0 0 0 - 2 - 70 72
With movie mode the center channel is ok, but now SL and SR are inverted.
Then:
Matrix for encode dpl2 and properly decode
with Cyberlink Audio Effect (movie mode):
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 33 0 23 28 16 100
FR' 0 33 23 - 16 - 28 100
And this matrix don't have the problem with mono surround:

tebasuna51, could you also do your test with mono surround (source has Rs == Ls) with the different matrices and upmixers?
Is not necessary. If SL=SR=S with matrix(-SL)
FL' = 33*FL + 23*C + 28*S - 16*S = 33*FL + 23*C + 12*S
FR' = 33*FR + 23*C - 16*S+ 28*S = 33*FR + 23*C + 12*S
And after the surround channels are send to center channel.

With the other matrixes the surround is preserved (inverted or not by Cyberlink).

My adjusted coeficents matrix model is for FFDShow DPL II encoder, but supprised by that it also applies to Cyberlink encoder.
Only for music mode Cyberlynk decoder, (the Cyberlink encoder only do DPL I).

scharfis_brain
12th February 2006, 01:45
With movie mode the center channel is ok, but now SL and SR are inverted. That is exactly how my Hardware DPL2 decoder behaves.
Music mode: center is spread to Left&Right. Ls&Rs are same phase.
Movie Mode: center is totally separated from the other channels and one surround channel is inverted. (it doesn't matter which one, cause one has the surround delay anyways)
And after the surround channels are send to center channel.
With the other matrixes the surround is preserved
That is the reason, why I dislike Rockarias style of matrix: It destroys panning between Ls and Rs.

(inverted or not by Cyberlink).So, Cyberlink exacly behaves like Dolby intended the standard for the Movie and Music modes.

Many thanks for your tests, tebasuna51. How do you did them?

Rockaria
12th February 2006, 02:06
OK. I will wait for any corrections.;)

tebasuna51
12th February 2006, 03:09
That is exactly how my Hardware DPL2 decoder behaves.
Music mode: center is spread to Left&Right. Ls&Rs are same phase.
Movie Mode: center is totally separated from the other channels and one surround channel is inverted. (it doesn't matter which one, cause one has the surround delay anyways)
In my test:
Music mode: center is spread to Left&Right. Ls&Rs are different phase.
Movie Mode: center is totally separated. Ls&Rs are same phase.
How do you did them?
With the five channels separated in time: silence+FL+silence+FR+...
The sound is a 1KHz tone to avoid problems with filters (low or high pass) and see the phase differences quickly. Not observed delays or phase differences other than 180š (inverted).
I use Goldwave to create the initial wav's and for final measurement. Graphedit for use ffdshow and Cyberlink Audio Effect dsf.

Rockaria
12th February 2006, 08:03
Well, no self-corrections or suggestions...I meant it to everybody engaged, including ownself.
yeah, again I see ..some types people are ready to change the facts or history let alone the belief, only to win...

Sorry scharfis_brain, no more extra comments on you.
Tebasuna51, I suggest you to be very careful(confident) when it becomes triangular situation, unless you are enjoying mediating...

Now I will just describe what I have about the test environment and second test result. Then I will only answer any inquiry toward me in this thread.

<<test environment : condition>>

FFdshow version 20060123
Last versions of BeSweet-Azid and BeHappy
...
Cyberlink decoder.

. the test purpose and the conditions are normally specified in the beginnng(anyway, sorry for being confused of the decoder).
. afaik, there are several versions of downmix by the name of DPL II in BeHappy, which is it exactly, and where it is used?
. were the encoding/decoding results(FFDShow, Azid, ???) same? Why did you mix different encoders in the test?

It seems to me the NorthPol's (the best script I think for the environmrnt) upmix routine is yet to be Dolby DPL II certified.

sl_{2} = DelayAudio(sl_{2},0.02)
sr_{2} = DelayAudio(sr_{2},0.02)

The DelayAudio alone seems unable to emulate the decoding of the rear phase shift of the DPL II.
http://forum.doom9.org/showpost.php?p=779538&postcount=66
I agree it's not a good quotation when the DPL II encoder is focused

<<2nd test result>>
. included only partial results with the default(not my adjusted one) matrix, which has caused severe misunderstanding
. It also is mixing another different test(with two ideltical mono rear) with minimum explanations and results: another misleading
. anyway, the 'movie mode' decoding result with 'FFDShow default/original' matrix looks strange implying some defects of the Cyberlink decoder. The rears shouldn't be affected by the decoding mode change as I said in my prev. post.

Then:


Matrix for encode dpl2 and properly decode
with Cyberlink Audio Effect (movie mode):
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 33 0 23 28 16 100
FR' 0 33 23 - 16 - 28 100

It seems to emphasize the phase(sign) is not that important for the mono/identical rears.


And this matrix don't have the problem with mono surround:
Is not necessary. If SL=SR=S with matrix(-SL)
FL' = 33*FL + 23*C + 28*S - 16*S = 33*FL + 23*C + 12*S
FR' = 33*FR + 23*C - 16*S+ 28*S = 33*FR + 23*C + 12*S
And after the surround channels are send to center channel.
With the other matrixes the surround is preserved (inverted or not by Cyberlink).

The DPL II is not doing any arithmetic additions on the coefficients(as some people repeat).
So I believe the 12*Ss will not be represented anywhere on the phases(degree)<frequences(cycles)<channels<DPLII....
And my understanding is that the surrounds(rear) are not sent to the (virtual) center, even if they are identical( two identical mono), in DPL II. They are merged into the Lt & Rt accorfingly as the phases(<frequences<...) proceed.

Thanks anyway for the positive(/unintended negative) contributions.

scharfis_brain
12th February 2006, 11:32
Sorry, I accidently swapped that phase thing for movie and music mode :(

So I believe the 12*Ss will not be represented anywhere on the phases(degree)<frequences(cycles)<channels<DPLII....
And my understanding is that the surrounds(rear) are not sent to the (virtual) center, even if they are identical( two identical mono), in DPL II. They are merged into the Lt & Rt accorfingly as the phases(<frequences<...) proceed.

But it is true that your matrix sends the mono-surround to the center as I said before and Tebasuna51 confirmed. My Yamaha DPL2-Receiver and tebasuna51's equation shouldn't work different from Dolby's standards...

Anyways, I cannot follow you again when you talk about frequencies & phases :(
To my understanding there is no such thing like arbitrary phases in an (ideal) DPL2 downmix. Either 0° or 180° phase difference between Lt & Rt.
Finally the amplitude difference between Lt & Rt is used for steering Rs & Ls.

Actually there ARE some old quadrophonic standards (they were used on Vinyls) using true 90° phase shifts, but those are pretty tough to decode.
(Something like +90° = Ls and -90° = Rs, maybe reversed, dunno it now)

It seems to me the NorthPol's (the best script I think for the environmrnt) upmix routine is yet to be Dolby DPL II certified.
This thing unfortunately is just a passive matrix decoder so it barely reaches a handful of dB's of channel separation (crosstalk damping), because there is no dynamic steering :( It should behave exactly like ffdshow's upmixing crosstalk-wise.
If I would know, how to implement such dynamic steering in AVS, I definitely would have tried building such upmixer...
Hmm. Maybe someone implements some per-frame-absolute-loudness measurement filters for the AVS conditional environment? This would make it possible to implement a near to dolby's specs decoder.

Rockaria, I do not intend to offend you personally. It is just a technical discussion and I do not agree with some of your findings and you don't with some of mine.
So hey this is a discussion, there have to be points if disagreement ;)

Rockaria
12th February 2006, 11:46
Everything else is stated/discussed already, no need to mention only for further conflicts.
But it is true that your matrix sends the mono-surround to the center as I said before and Tebasuna51 confirmed.
You definitely need to prove if really Tebasuna51 confirmed it.
I couldn't find anywhere he was using my adjusted matrix in the second test.

Maybe it's a small thing to you, but it's very important to me.:cool:

And I don't really want you to follow me, but just want you not to get in the way, please.

Rockaria
12th February 2006, 11:55
Here is the copy of his 2nd test.
My previous test with Cyberlink was incomplete because there are two modes: music and movie, and I only test the music mode.
Now the two modes with dpl2 generated by ffdshow, azid, BeHappy:
Data in % original channel.
Cyberlink Upmix from Dpl2 with Audio Effect (music mode)
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 69 0 30 0 - 1 100
FR' 0 69 30 1 0 100
C' 1 1 57 0 0 59
SL' - 1 - 1 - 1 - 68 - 2 73
SR' - 1 - 1 - 1 2 68 73

Cyberlink Upmix from Dpl2 with Audio Effect (movie mode)
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 71 0 1 0 0 72
FR' 0 71 1 0 0 72
C' 1 1 70 0 0 72
SL' 0 0 0 - 70 - 2 73
SR' 0 0 0 - 2 - 70 72
With movie mode the center channel is ok, but now SL and SR are inverted.
Then:
Matrix for encode dpl2 and properly decode
with Cyberlink Audio Effect (movie mode):
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 33 0 23 28 16 100
FR' 0 33 23 - 16 - 28 100
And this matrix don't have the problem with mono surround:


Is not necessary. If SL=SR=S with matrix(-SL)
FL' = 33*FL + 23*C + 28*S - 16*S = 33*FL + 23*C + 12*S
FR' = 33*FR + 23*C - 16*S+ 28*S = 33*FR + 23*C + 12*S
And after the surround channels are send to center channel.

With the other matrixes the surround is preserved (inverted or not by Cyberlink).


Only for music mode Cyberlynk decoder, (the Cyberlink encoder only do DPL I).
My previous test with Cyberlink was incomplete because there are two modes: music and movie, and I only test the music mode.
Now the two modes with dpl2 generated by ffdshow, azid, BeHappy:
Data in % original channel.

Code:
Cyberlink Upmix from Dpl2 with Audio Effect (music mode)
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 69 0 30 0 - 1 100
FR' 0 69 30 1 0 100
C' 1 1 57 0 0 59
SL' - 1 - 1 - 1 - 68 - 2 73
SR' - 1 - 1 - 1 2 68 73

Cyberlink Upmix from Dpl2 with Audio Effect (movie mode)
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 71 0 1 0 0 72
FR' 0 71 1 0 0 72
C' 1 1 70 0 0 72
SL' 0 0 0 - 70 - 2 73
SR' 0 0 0 - 2 - 70 72With movie mode the center channel is ok, but now SL and SR are inverted.
Then:

Code:
Matrix for encode dpl2 and properly decode
with Cyberlink Audio Effect (movie mode):
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 33 0 23 28 16 100
FR' 0 33 23 - 16 - 28 100And this matrix don't have the problem with mono surround:


Quote:
Originally Posted by scharfis_brain
tebasuna51, could you also do your test with mono surround (source has Rs == Ls) with the different matrices and upmixers?

Is not necessary. If SL=SR=S with matrix(-SL)
FL' = 33*FL + 23*C + 28*S - 16*S = 33*FL + 23*C + 12*S
FR' = 33*FR + 23*C - 16*S+ 28*S = 33*FR + 23*C + 12*S
And after the surround channels are send to center channel.

With the other matrixes the surround is preserved (inverted or not by Cyberlink).


Quote:
Originally Posted by Rockaria
My adjusted coeficents matrix model is for FFDShow DPL II encoder, but supprised by that it also applies to Cyberlink encoder.

Only for music mode Cyberlynk decoder, (the Cyberlink encoder only do DPL I).

scharfis_brain
12th February 2006, 12:06
If you'd have read tebasuna51 equation you quoted you would see that it is your matrix. 12S in Lt and Rt each will be send to the center cause there is no difference in sign.

this is your matrix:
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

Here the proof:

This is your matrix with heavy rounding...
Lt = 1L + 0R + 0.7C + 0.9Ls - 0.5Rs
Rt = 0L + 1R + 0.7C - 0.5Ls + 0.9Rs

assuming S = Ls = Rs , we get:
Lt = 1L + 0R + 0.7C + 0.9S - 0.5S = 1L + 0R + 0.7C + 0.4S
Rt = 0L + 1R + 0.7C - 0.5S + 0.9S = 0L + 1R + 0.7C + 0.4S

conclusion: the surround information is in-phase between Lt & Rt. This will cause it is sent to the center in the upmixing process.
The mono surround is only about 6dB quieter than the normal center, so it is likely to be forced in a dynamic upmixing procees.

There is no need to argue about this. Math doesn't lie. And the decoders strictly work according to those mathematical rules.

Rockaria
12th February 2006, 12:09
And it is for your self-reflection.
That is exactly how my Hardware DPL2 decoder behaves.
Music mode: center is spread to Left&Right. Ls&Rs are same phase.
Movie Mode: center is totally separated from the other channels and one surround channel is inverted. (it doesn't matter which one, cause one has the surround delay anyways)

That is the reason, why I dislike Rockarias style of matrix: It destroys panning between Ls and Rs.

So, Cyberlink exacly behaves like Dolby intended the standard for the Movie and Music modes.

Many thanks for your tests, tebasuna51. How do you did them?
Quote:
Originally Posted by tebasuna51
With movie mode the center channel is ok, but now SL and SR are inverted.

That is exactly how my Hardware DPL2 decoder behaves.
Music mode: center is spread to Left&Right. Ls&Rs are same phase.
Movie Mode: center is totally separated from the other channels and one surround channel is inverted. (it doesn't matter which one, cause one has the surround delay anyways)

Quote:
And after the surround channels are send to center channel.
With the other matrixes the surround is preserved

That is the reason, why I dislike Rockarias style of matrix: It destroys panning between Ls and Rs.


Quote:
(inverted or not by Cyberlink).

So, Cyberlink exacly behaves like Dolby intended the standard for the Movie and Music modes.

Many thanks for your tests, tebasuna51. How do you did them?

Rockaria
12th February 2006, 12:14
You are again changing the facts. I asked you if tebasuna51 said it, not your proven understanding ability.

If you'd have read tebasuna51 equation you quoted you would see that it is your matrix. 12S in Lt and Rt each will be send to the center cause there is no difference in sign.

this is your matrix:
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

Here the proof:

This is your matrix with heavy rounding...
Lt = 1L + 0R + 0.7C + 0.9Ls - 0.5Rs
Rt = 0L + 1R + 0.7C - 0.5Ls + 0.9Rs

assuming S = Ls = Rs , we get:
Lt = 1L + 0R + 0.7C + 0.9S - 0.5S = 1L + 0R + 0.7C + 0.4S
Rt = 0L + 1R + 0.7C - 0.5S + 0.9S = 0L + 1R + 0.7C + 0.4S

conclusion: the surround information is in-phase between Lt & Rt. This will cause it is sent to the center in the upmixing process.
The mono surround is only about 6dB quieter than the normal center, so it is likely to be forced in a dynamic upmixing procees.

There is no need to argue about this. Math doesn't lie. And the decoders strictly work according to those mathematical rules.

scharfis_brain
12th February 2006, 12:18
I am aware of this, Rockaria. I also said: "Sorry, I accidently swapped that phase thing for movie and music mode :( "
Human are known to do mistakes (especially when drunken some beers...)
And I tried to excuse (which you didn't quoted in that context! Many thanks).
Anyways it still prooves cyberlinks decoding is correct according to dolbys specs.

Btw.: proove me, that I am wrong with my conclusion about your matrix sending mono-surround to the center. Thanks.

Rockaria
12th February 2006, 12:25
... why I dislike Rockarias style ... The only thing I can respect is this from all your posts.

And also you must be knowing what style of people I can't do with at all.
Lets just respect each other....I stop.

scharfis_brain
12th February 2006, 12:49
You are digging for personal offensions, that don't exist.
Is everyone who doesn't confirm you an offending person to you?

When I dislike a product of your findings (here: your matrix) this is NOT an offension. It is a personal preference of what I like or not.

Also I tried to proove it to you, why I dislike it.
But you always seem to escape from answering it properly :(

tebasuna51
12th February 2006, 12:52
You definitely need to prove if really Tebasuna51 confirmed it.
I couldn't find anywhere he was using my adjusted matrix in the second test.

Maybe it's a small thing to you, but it's very important to me.
Whit Rockaria matrix:
Data in % original channel.
Normalized matrix with inverted signs for SL
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 33 0 23 28 - 16 100
FR' 0 33 23 - 16 28 100

Cyberlink Upmix from Dpl2(-SL) with Audio Effect (music mode)
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 69 0 30 0 - 1 100
FR' 0 69 30 - 1 0 100
C' 1 1 57 0 0 59
SL' - 1 - 1 - 1 68 - 2 73
SR' - 1 - 1 - 1 - 2 68 73

Cyberlink Upmix from Dpl2(-SL) with Audio Effect (movie mode)
FL FR C SL SR max
---- ---- ---- ---- ---- ----
FL' 71 0 1 0 0 72
FR' 0 71 1 0 0 72
C' 1 1 70 0 0 72
SL' 0 0 0 70 - 2 72
SR' 0 0 0 2 - 70 72
Correct SL and SR channels for music mode, but inverted SR channel in movie mode.

Rockaria
12th February 2006, 13:00
. anyway, the 'movie mode' decoding result with 'FFDShow default/original' matrix looks strange implying some defects of the Cyberlink decoder. The rears shouldn't be affected by the decoding mode change as I said in my prev. post.
Something seems not right with Cyberlink decoder in movie mode. My ONKYO TX-L5 works as it is designed.

[edit] clarification,, extremely tired of it..won't quote other references.
precisely speaking, there are also some minor differences(delay..) in the rear effects between the modes.
but there is absolutely no reason to decode differently(inverted phase) with music/movie mode on originally DPL II encoded stream

tebasuna51
12th February 2006, 13:04
Sorry, I accidently swapped that phase thing for movie and music mode
...
Anyways it still prooves cyberlinks decoding is correct according to dolbys specs.

Then, if you confirm your hardware DPL II decoder (upmix) works like Cyberlink, we are using a incorrect matrix with ffdshow-azid DPL II encoders (downmix).

scharfis_brain
12th February 2006, 13:19
hmmm. I got confused regarding the differences between music and cinema modes. here is the document I am refeering to: http://www.dolby.com/assets/pdf/tech_library/214_Mixing%20with%20Dolby%20Pro%20Logic%20II%20Technology.pdf
Look at the middle of page 5.

The reason why I got confused: I use omni-directional (spherical) speakers for surround. One can notice a difference between music and movie mode, but due to the sound-spreading nature of that kind of speakers it is hard to tell, what is in-phase and what is inverted polarity.

Rockaria
17th February 2006, 00:50
Finally, the time to conclude my experiment on DPL II encoders.
As tested before & partially verified by tebasuna51, the FFDShow DPL II mixer works correctly with my adjusted matrix model (Ls3,-Rs1),(-Ls1, Rs3).
The same coefficients matrix model also applies to Azid DPL II encoder as his great feedback reported.

Now, with Avisynth scripts,(the dimzon's experiment actually has DPL II mixer DSPs but with some different understandings : similar to Dolby's one).
I made some avs scripts to test the target DPL II model with some multi channel clips.
<system configuration>
. MPC with FFDShow dts/ac3/aac enabled, output set to pcm 16bit
. AN7 pcm digital encode mode, connected to ONKYO TX-L5
. FFDShow's ac3 output(conflicts with DirectShowSource() which uses FFDShow also) mode is used for clipping test : MixAudio(a,b,1,1).

<DPLT0.avs> for original 5.1ch ac3/pcm 2ch out

#NicDTSSource("2.dts")
NicAC3Source("SSWAV06.ac3")
#DirectShowSource("SSWAV06.m4a")
#DirectShowSource("DPLII.grf")


<DPLT1.avs> dimzon's experiment's DPL II DSP : low volume (-Ls3,-Rs1), (Ls1,Rs3)

NicDTSSource("2.dts")
#NicAC3Source("SSWAV06.ac3")
...
import("DPLII.avs")
dpl21(last)


<DPLT2.avs> my modification for upper model : proper volume (-Ls3,-Rs1), (Ls1,Rs3)

...
dpl22(last)


<DPLT3.avs> My adjusted DPL II model: (Ls3,-Rs1), (-Ls1,Rs3) : seems right

...
dpl23(last)


<DPLTp.avs> downmix using dpl 2 matrix(no phase shift) to compare the volume level with DPLT0.avs. Also it does not seperate the rears

...
dpl2p(last)


<DPLTII.avs> : to be included in the test scripts

#NicDTSSource("1.dts")
#DirectShowSource("SSWAV06.m4a")
#DirectShowSource("DPLII.grf")
#dpl22(last)
function dpl21(clip a){
fl = GetChannel(a, 1)
fr = GetChannel(a, 2)
c = GetChannel(a, 3)
sl = GetChannel(a, 5)
sr = GetChannel(a, 6)
ssl = MixAudio(sl, sr, 0.2818, 0.1627).Amplify(-1.0)
fl_c = MixAudio(fl, c, 0.3254, 0.2301)
ssr = MixAudio(sl, sr, 0.1627, 0.2818)
fr_c = MixAudio(fr, c, 0.3254, 0.2301)
l = MixAudio(ssl, fl_c, 1.0, 1.0)
r = MixAudio(ssr, fr_c, 1.0, 1.0)
return MergeChannels(l, r)
}
function dpl22(clip a){
cc = GetChannel(a, 3).Amplify(0.7071)
Lt = MixAudio(GetChannel(a, 1),cc,1,1)
Rt = MixAudio(GetChannel(a, 2),cc,1,1)

Ls = GetChannel(a, 5)
Rs = GetChannel(a, 6)
Lss = MixAudio(Ls, Rs, -0.866, -0.5)
Rss = MixAudio(Ls, Rs, 0.5, 0.866)

return MergeChannels(MixAudio(Lt,Lss,1,1), MixAudio(Rt,Rss,1,1))
}
function dpl23(clip a){
cc = GetChannel(a, 3).Amplify(0.7071)
Lt = MixAudio(GetChannel(a, 1),cc,1,1)
Rt = MixAudio(GetChannel(a, 2),cc,1,1)

Ls = GetChannel(a, 5)
Rs = GetChannel(a, 6)
Lss = MixAudio(Ls, Rs, 0.866, -0.5)
Rss = MixAudio(Ls, Rs, -0.5, 0.866)

return MergeChannels(MixAudio(Lt,Lss,1,1), MixAudio(Rt,Rss,1,1))
}
function DPL2p(clip a){
cc = GetChannel(a, 3).Amplify(0.7071)
Lt = MixAudio(GetChannel(a, 1),cc,1,1)
Rt = MixAudio(GetChannel(a, 2),cc,1,1)

Ls = GetChannel(a, 5)
Rs = GetChannel(a, 6)
Lss = MixAudio(Ls,RS,0.866,0.5)
Rss = MixAudio(Ls,Rs,0.5,0.866)

return MergeChannels(MixAudio(Lt,Lss,1,1), MixAudio(Rt,Rss,1,1))
}


<conclusion>
. MixAudio(a,b,1,1) did not add the volume level, it did not clip unlike the Avisynth manual and suggesting default MixAudio(a,b,0.5,0.5)
. with the speakerset test file(SSWAV06.ac3), dpl21,dpl22,dpl23 showed no difference
. with normal music clips, the dpl23 only showed the close result to ac3 output mode

The rest is yours : to use the dpl22/dpl23 model or not, it seems depending on the STYLE.
I won't get into any further details.

[edit] Things to Sum Up
. The FFDShow's DPL II mixer model looks like below
. The Normalize()(wherever you feel needed) needs scanning time but might be safer for transcoding purpose.


NicDTSSource("2.dts")
#Normalize(0.70)
#Amplify(0.70)
#AmplifydB(-3)

dpl2FFD(last, 0.7071, 0.866, -0.5, -0.5, 0.866)
#dpl2FFD(last, 0.7071, -0.866, -0.5, 0.5, 0.866)
#dpl2FFD(last, 0.7071, 0.866, -0.5, -0.5, 0.866).Normalize()
#dpl2FFD(last, 0.707, 0.8165, -0.5774, -0.5774, 0.8165).Normalize()

function dpl2FFD(clip a, CC2, Ls3, Rs1, Ls1, Rs3){
cc = GetChannel(a, 3).Amplify(CC2)
Lt = MixAudio(GetChannel(a, 1),cc,1,1)
Rt = MixAudio(GetChannel(a, 2),cc,1,1)

Ls = GetChannel(a, 5)
Rs = GetChannel(a, 6)
Lss = MixAudio(Ls, Rs, Ls3, Rs1)
Rss = MixAudio(Ls, Rs, Ls1, Rs3)

return MergeChannels(MixAudio(Lt,Lss,1,1), MixAudio(Rt,Rss,1,1))
}

Now it looks so simple...

[edit] Now, an enhanced model supporting LFE which also is an important factor for the fidelity.
. the LFE channel will be played on the center/front/subwoofer depending on the speaker/receiver system setting

#NicDTSSource("1.dts")
DirectShowSource("3.m4a")
#DirectShowSource("SSWAV06.m4a")
##DirectShowSource("DPLII.grf")

#Amplify(0.70)
#AmplifydB(-3.01)

#dpl2FFDA(last)
dpl2FFDLFEA(last)
#dpl2FFDA(last, 0.7)
#dpl2Enc(last, 0.7071, 0.6, 0.866, -0.5, -0.5, 0.866)
#dpl2Enc(last, 0.707, 0.4, 0.8165, -0.5774, -0.5774, 0.8165)
#dpl2Enc(last, 0.7071, 0.4, 0.866, -0.5, -0.5, 0.866).Normalize()
#dpl2Enc(last, 0.707, 0.4, 0.8165, -0.5774, -0.5774, 0.8165).Normalize()

#function dpl2FFD(clip a){return dpl2FFD(a, 0)}
#function dpl2FFDLFE(clip a){return dpl2FFD(a, 0.5)}
function dpl2FFD(clip a, LF2){return dpl2Enc(a, 0.7071, LF2, -0.866, -0.5, 0.5, 0.866)}
function dpl2FFDA(clip a){return dpl2FFDA(a, 0)}
function dpl2FFDA(clip a, LF2){return dpl2Enc(a, 0.7071, LF2, 0.866, -0.5, -0.5, 0.866)}
function dpl2FFDLFEA(clip a){return dpl2FFDA(a, 0.5)}
function dpl2Enc(clip a, CC2, LF2, Ls3, Rs1, Ls1, Rs3){
# cc = GetChannel(a, 3).Amplify(CC2)
cc = MixAudio(GetChannel(a, 3),GetChannel(a, 4),CC2,LF2)
Lt = MixAudio(GetChannel(a, 1),cc,1,1)
Rt = MixAudio(GetChannel(a, 2),cc,1,1)

Ls = GetChannel(a, 5)
Rs = GetChannel(a, 6)
Lss = MixAudio(Ls, Rs, Ls3, Rs1)
Rss = MixAudio(Ls, Rs, Ls1, Rs3)
# Lss = MixAudio(Ls.Amplify(Ls3), Rs.Amplify(Rs1),1,1)
# Rss = MixAudio(Ls.Amplify(Ls1), Rs.Amplify(Rs3),1,1)

return MergeChannels(MixAudio(Lt,Lss,1,1), MixAudio(Rt,Rss,1,1))
}

done.
[edit]a somewhat disappointing mixed music clip test is added. (http://forum.doom9.org/showpost.php?p=788534&postcount=84)

elmimmo
18th February 2006, 13:31
I donīt wrok with OS X, so I donīt know with what tools do u count.
But the basic tools to do proper DPLII downmixing will have to have (without exception) a way to perform a AC3 decoding with the capacity to enable or disable the DRC (I would inclne to disable the DRC) exporting 1 AIFF file (is that the standard equivalent of WAV for OS X?) with 6ch.
This 6ch AIFF then must be passed trough a renderer/software/whatever that will allow to apply the matrix downmixing using the matrices posted above, creating the 2ch file.
This matrix-encoded 2ch AIFF should be loaded into the AAC encoder and encoded with LC/MAIN/LTP profiles. Never with HE-AAC, since as posted before, it severely alters the higher frequencies to gain compression ratio, and u need to have a AAC file that is as pure as possible compared to the source (i.e. in FAAC maybe q=130, 140 will give a good exchange between quality and bitrate).
Wonderbra, thanks for such a detailed walkthrough.

Still, strictly speaking about a Mac OS X environment, I only got to find tools for Mac OS X to split AC3 into 6 AIFF uncompressed mono files, but nothing to downmix them using a custom matrix. Any further help would be very appreciated.

Rockaria
20th February 2006, 23:05
Well, I did some more tests by mixing a 6ch speaker setup test file with a music clip to test the 6ch music mode DPL II encoding more clearly.

a=DirectShowSource("SSWAV06.m4a")
b=DirectShowSource("6chmusic.m4a")
...
MixAudio(a,b,0.4,1)
..
dpl2Enc(last, 0.7071, 0.7071, 0.866, -0.5, -0.5, 0.866)
#dpl2Enc(last, 0.7071, 0.7071, -0.866, -0.5, 0.5, 0.866)
...


The results were somewhat disappointing. There were quite amount of mixes and residuals on all the channels(fronts,center & rears).

Coefficients matrix (5.1ch) rear seperation(est) center/front seperation estimation
Ls(Ls3,-Rs1),Rs(-Ls1,Rs3) 70~95% 70~95%
Ls(-Ls3,-Rs1),Rs(Ls1,Rs3) 50~95% 50~95%, affected by rear seperation

On 5.1ch speaker test clip, it showed over 95% of same seperations.(including Ls(-Ls3,Rs1),Rs(Ls1,-Rs3) & Ls(Ls3,Rs1),Rs(-Ls1,-Rs3))
On 4.1/5.0/5.1ch (mixed) music clips, it showed 50~90% of varying results depending on the contents.
My adjusted model Ls(Ls3,-Rs1),Rs(-Ls1,Rs3) showed 20~30% of better results.
The default model Ls(-Ls3,-Rs1),Rs(Ls1,Rs3) showed somewaht wider & biased results

The FFDShow's DPL II encoder also showed the similar results.

<conclusion>
. the decoding seems to be affected by the channel-stream relations(coeffects)
. it really depends on the contents(overall 60~90% of the channel seperation). so they are customizable in FFDShow and similar(not that useful though)
. a possibility of s/w phase shift limitation of 180 degree(not +-90) and/or encoding logic
. a possibility of no perfect h/w decoding( servo feedback ...)
. not recommended for the sources if you have a digital receiver with both decoding(ac3/dpl II) unless the latency is the critical issue.
. for the lightweight transcoding for later decoding through pc+receiver/headphone, the 120~160k aac vbr he is considered superior to any format DPL II with similar bit rate (while still selectable between dynamic ac3/dpl II encoding->external decoding/headphone)
. for portable headphone(2ch) uses, any proper efficient codec encoded DPL II or downmix will be OK.
. for maximum compatibility(portability) & quality(including seperations & fidelity), the aacplus v1 HE-AAC VBR 48K~96k DPL II downmix(using my adjusted coefficient model) seems to be the best option at the moment. It did not destroy the surrounds(M/S Joint stereo?).

<some more on aac HE's SBR>
The AAC HE is using the SBR technology taking(transforming to & generating the signals from ancillary data) the higher bands(frequency) of the spectrum as the bitrate applied higher through the applicable(efficient) bitrate range of 48 ~ 96 ~ kbps.
So the higher band(SBR area) of the rear spartial data will be regenerated mixed through the channels. But as the bit rate applied higher over 64k, the SBR band is expected to be more supersonic area, thus the mix-effect will be minimal, ignorable.
Anyway, for he bitrates upto 64k, other codecs like vorbis or wma would be more efficient with possibly less SBR mix results.

Another point to make clear is that DPL II downmixing is actually merging(phase shifting) the complexity of the spectrum, but the quality based vbr resulting size are similar to normal ratio : 1(2ch) : 2.5(6ch).
ex) 6ch ac3 -> DPL II(-q7 vbr) : 38, 223KB, -> 6ch aac (-q7 vbr) : 89,983KB , the ratio : 1 : 2.35 =~2.4(average ratio)

The CT aac HE produced the reasonable quality as 20MB(64kbps), 26MB(80kbps), 31MB(96kbps).
As per mp3 DPL II, the Lame 3.97b2 -V5 vbr-new seemed to yield the reasonable quality @ around 48MB.

<aac he/lc & vorbis 6ch 48khz quality comparison with VBR quality based DPL II encoding>

kbps 40~ 48~ 56~ 64~ 72~ 80~ 88~ 96~ 106 112 120 128 136.

CT HE Q3.0 Q3.5 Q4.1 Q4.8 Q5.4 Q6.0 Q6.4 Q6.7 Q6.9 Q7.1 Q7.6
CT LC Q2.1 Q2.8 Q3.6 Q4.4 Q5.2 Q5.9 Q6.4 Q6.7 Q6.9 Q7.1 Q7.6

NR HE q3.42k q4.60 q5.65 q6.80 q7.114
NR LC q3.68k q4.94 q5.135

OGG q0.70k q1.90 q2.110 q3.130

. naac V0.3 using nero V6 aacenc32.dll v2.6.2.0 : lc minumum quality(q3) is similar to he q5 in bit rate
. aacPlus using enc_aacplus dll in winamp 5.20 : no noticeable difference in the quality compared to the same bit rate nero aac
. oggenc2 v2.7 using aoTuVb4.51 : felt a somewhat better than the same bit rate aac he

. LC <=48 showed some artefacts, poorer quality than HE @ <= 64k but has better seperation(SBR band) than HE(tradeoffs)
. AAC HE seems to be optimized @ around 64k(q4~q5), LC qood quality from 64K(q0) but requiring bigger bit rate to acheve better quality level.
. Vorbis 48khz seems optimized @ around 100kbps but still shows better quality than aac @ its minimum quality(q0 : 70k here).
. Vorbis 48khz still showed decent quality @ >= 32kbps, AAC HE >= 40, AAC LC >= 48

<conclusion for DPL II encoding>
. use vorbis if target players supports the codec. period.
. use aac HE if the quality is the first concern else use LC if the ch seperation is more important, @ low bit rate <= 64

[edit] well, too many modifications... just wanted to be correct
[edit Mar 01 2006]
. I tested some more on DPL II downmix encoding on some codecs using my coefficient model. The CT aacplus v1 @48~96k seemed fairely effective. On a long travel again.
. added DPL II encoding using avisynth & ffdshow (audio) plugin with Dynamic Normalization (http://forum.doom9.org/showpost.php?p=792939&postcount=85)
. aacPlus v2 (AAC+SBR+PS) destroys the DPL II rears severely(Parametric Stereo), so the AAC HE VBR (v1) DPL II @ 48 ~96 seems to be the proper format.
[edit Mar 06 2006] added some more analysis & tests on aac HE's SBR for DPL II : 64k ~ 96k is recommended for less SBR band mix
[edit] Mar 08 2006] added some notes on aac LC and vorbis DPL II encoding related.

Rockaria
2nd March 2006, 02:03
We can also use the FFDShow's DSPs through it's avisynth plugin to encode DPL II from 6ch decoded sources.
The codec portion of the ffdshow is common and the DSP portion can be overriden using several predefined profiles including the dynamic option overrides.
I copied & created the 'avsdpl2' profile with 'volume', 'resample' and 'mixer'(dpl II with my adjusted matrix) enabled.
The output setting in this mode seems to allow only 16bit PCM.

<ffdDPL2.avs> : You can preview the script in MPC & encode using the profiles.cmd as before.

LoadPlugin("ffavisynth.dll")
DirectShowSource("1.m4a")
#NicDTSSource("1.dts")
#ffdshowAudio()
ffdshowAudio(preset="avsdpl2", options="volNormalizeMax=200")


The latest ffavisynth.dll files from FFDShow installations are not working correctly for me. So you may need to find a recent working version.
http://forum.doom9.org/showthread.php?p=774091#post774091
It is placed in the local folder until getting a stable latest version.

The DRC applicaions are implemented in two levels : codec level and play level.
The DRC profiles(encoding time) meta information is used by the decoder(AC3,DTS in ffdshow codec setting) if enabled.
http://pages.sbcglobal.net/wilsondr/ddcompprof.gif
http://www.dolby.com/assets/pdf/tech_library/17_.AllMetadata.pdf
The play level DRC is what user can control on any decoded PCM streams(FFDShow's volume..., ac3filter's DRC).
Both options are (IMO) not required to be enabled when the listenning environment is very quite & not disturbing(or the receiver/DAC does not accept higher bit size). Also too much(any..) application will always degradate the fidelity.

The ac3filter actually has two dynamic volume/range controls : dynamic volume control(clipping control) and DRC.
FFDShow's dynamic volume level control seems to be closer to the ac3filter's DRC. **check [edit]
The 'volNormalizeMax' option of 150~200% seems to be proper for normal encoded music.

[edit Mar 8 2006]
. we seem to need the FFDShow to implement playtime(onto decoded PCM) DRC like ac3Filter.
. I am not also sure if the dts/ac3 codec DRC decoding options are working correctly, I feel no difference....