Log in

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


Pages : [1] 2

FFWD
18th January 2006, 02:10
Is there a way to get a Dolby Pro Logic II AAC from a 5.1 AC3?

Belight and MeGUI have some checkboxes for it, but does the decoding actually work (my Logitech Z-5500 supports DPII)?

Does downmixing to Dolby Prologic II decrease the soundquality compared to a normal stereo downsize?

Is there a minimum bitrate required for DPII AAC's?

Is DPII compatible with Paremetric Stereo and HE-AAC?

And does DPII decoding work if the AAC is muxed in a MP4 container?

jel
18th January 2006, 02:54
FFWD,

i will move this to the audio encoding forum, where hopefully one of the gurus there can answer your questions.

good luck
j

kotrtim
18th January 2006, 04:14
Is DPII compatible with Paremetric Stereo and HE-AAC?
I think this is a bad idea, He-AAC is reconstructing from mono to stereo, and dplii is reconstructing stereo to 5.1....so many reconstruction...

And does DPII decoding work if the AAC is muxed in a MP4 container?
http://www.codingtechnologies.com/products/sbr.htm
http://www.codingtechnologies.com/products/paraSter.htm

your question is something anology to sbr explanation above, it is just a matter of the corecodec and decoder, the core can be anything mp3, aac, etc...

Skelsgard
19th January 2006, 16:32
- DPLII downmixing does NOT decrease stereo quality
- The minimum bitrate should be the one that allows to properly maintain the stereo fields of the encoded AAC. Maybe 192 approx. or q=140 with no mid-side (full stereo). I know that many will say that it sounds OK with 128 kbps but remember that it`s not about sounding OK as stereo but as a 6-channel upmix.
- DPL is not compatible HE-AAC since HE-AAC severely alters the high range frequencies. Again, it may sound OK as stereo bu when apply matrix upmixing to the HE-AAC the sound will be damaged compared to the source. I`m not to familiar with PS, can`t help u there.
- The AAC will be upmixed to 6-ch no matter what container u use as long as u have a way to perform matrix upmixing to the output (as ffdshow audio filter allows to). Ffdshow audio gives u the option to create your own upmixing and downmixing matrixes (as AC3filter does for AC3 and DTS streams).

Keep in mind that DPLII decoding is done by hardware AC3 decoders, there is no codec or software that really provides true DPLII decoding, since the matrixes (as simple as they are) are not properly implemented yet by any software decoder. It involves channel phase shifting and phase cancellation techniques not implemented.

3dsnar
19th January 2006, 17:09
> Keep in mind that DPLII decoding is done by hardware AC3 decoders,
> there is no codec or software that really provides true DPLII decoding, since
> the matrixes (as simple as they are) are not properly implemented yet by any
> software decoder. It involves channel phase shifting and phase cancellation
> techniques not implemented.
---
Is the technical specification available to implement such a decoder properly?

elenhil
19th January 2006, 17:56
Keep in mind that DPLII decoding is done by hardware AC3 decoders, there is no codec or software that really provides true DPLII decoding, since the matrixes (as simple as they are) are not properly implemented yet by any software decoder.
What about DirectShow filters included in WinDVD and PowerDVD (licensed from Dolby)?

Skelsgard
20th January 2006, 06:40
Is the technical specification available to implement such a decoder properly?
Absolutely. In the Dolby website u can get all sorts of PDFs with the technical specs for their technology (like Dolby digital inner workings, DPLI/II matrixes, etc.).
But it isnīt even as hard as it may sound. The downmixing matrix for DPLII is very simple:
Lt = (L*1) + (C*0.7071) + (Ls*-0.8164) + (Rs*-0.5774)
Rt = (R*1) + (C*0.7071) + (Ls*0.5774) + (Rs*0.8164)
Then, to retrieve C from Lt/Rt u will need to use a basic equation:
"find whatever is in both channels and send it to another channel but also erase it form the source channels".
I.e. LC and RC --> C is equal in both channels --> send C to another channel (i.e. center) --> but also erase C form the source (Lc - C, and RC - C) --> L and R.
Then L, R and C.
Is a basic channel extraction. But no decoder Iīve tried has been able to achieve it properly. They just end up creating a Center channel that is Lt + Rt while Lt and Rt are not touched. That is NOT true Prologic (either I or II).
That only gives Lt - LtRt - Rt (and donīt even start with the Ls an Rs).
LFE is not mentioned here since Dolby recommends not to use LFE in the DPLII downmixing.
Honestly, the upmixing technique is so simple that itīs annoying to see that nobody has implemented it properly.

What about DirectShow filters included in WinDVD and PowerDVD (licensed from Dolby)?
They perform as specified above (wich sucks considering how easy it would be true DPL for what Iīve exposed earlier).
Make your own tests. Take a original 2.0 DPL AC3 and see if the voices are heard only in the center channel or all the channels.
Or just create a simple 1-ch WAV whith nothing but a clear voice, then convert it to 2-ch by duplication, the voice in DPL should be sent only to the Center (since the information is exactly equal in both channels) and nothing should be heard in the Left and Right channels. If u hear something in the L and R, then u have your answer.
I believe WinDVD or PowerDVDīs filters do proper downmixing, but Iīm positive about the sucky upmixing.

Iīve found out about all this from a paper from Dolby on DPL wich among other things stated that hardware decoding was a lot better than software decoding (the difference between a passive and a active decoder, donīt remember very well, read it was years ago). Also by comparing the decoders on my PC against the built-in DPL decoder of my Panasonic SA-AK 55 stereo.

Some of us have post the necesity of a proper phase/channels cancellation for correct DPL upmixing in the project website of Alexander Vigovskyīs AC3Filter. No answer yet :(.

elenhil
20th January 2006, 15:59
What about DirectShow filters included in WinDVD and PowerDVD (licensed from Dolby)?They perform as specified above (wich sucks considering how easy it would be true DPL for what Iīve exposed earlier).
Make your own tests. Take a original 2.0 DPL AC3 and see if the voices are heard only in the center channel or all the channels.

I did. Works 100% OK for me - but it is very difficult to make them work outside of their respective players.

Anyway, 3dsnar, there's a great DSP plugin for Foobar2000 and WinAmp which, according to my ears, performs correct DPL decoding (upmixing) - and it's FREE! Check www.andrewlabs.com - the author is very helpful, perhaps we you two could cooperate and create a free DirectShow DPL decoder!

elmimmo
20th January 2006, 19:42
What about Mac OS X? Does anyone know a (free or affordable) tool to make Dolby Pro Logic II (AAC or MP3) from a 5.1 AC3 source?

There is nothing like besweet for the platform, is there?

Sometime ago I did ask this very same question @3ivx.com (http://forums.3ivx.com/index.php?showtopic=82187&pid=416886&st=0&#entry416886) forums. The only answer I got was that *maybe* mAC3dec (http://sourceforge.net/projects/mac3dec/) could do it, but nowhere in the GUI or docs say so, and I could not contact its developer to have a direct answer (which does not seem to work on it anymore).

BigDid
20th January 2006, 22:43
What about Mac OS X? Does anyone know a (free or affordable) tool to make Dolby Pro Logic II (AAC or MP3) from a 5.1 AC3 source?

There is nothing like besweet for the platform, is there?...

Do you know/did you try Itunes-lame encoder?
here to download:http://www.versiontracker.com/dyn/moreinfo/macosx/13048
here for the forum:http://forums.blacktree.com/viewforum.php?f=10

It does encode to mp3, it could (line editing) use the dpl2 line commands...

Did

Skelsgard
21st January 2006, 01:41
What about Mac OS X? Does anyone know a (free or affordable) tool to make Dolby Pro Logic II (AAC or MP3) from a 5.1 AC3 source?
If uīre looking for a all-in-one tool, I have no answer (I donīt work with Mac) but u can apply yourself the dowmixing matrix and create a 2.0 DPLII WAV and then encode it with whatever tool u like.

I did. Works 100% OK for me - but it is very difficult to make them work outside of their respective players.
Itīs always on a "I like/I donīt like" basis. Like i said, hardware decoders to me outperform the software ones.
Thatīs true too. Intervideo and Cyberlink filters tend to allow only 2 ch output form within other players. But if uīre interested in getting an upmixed DPL source using these filters, render the file and export it thru GraphEdit (for some reason it DOES allow to use all the features, as 8 ch output, or DPL or CLMEI, from within Graphedit, while not from within other players).

elmimmo
21st January 2006, 02:35
Do you know/did you try Itunes-lame encoder?
It does encode to mp3, it could (line editing) use the dpl2 line commands...Well, it is basically the lame MP3 encoder under a GUI for iTunes, so yes, I know it. But how do I feed it with a 5.1 AC3 source? And which are those "dpl2 line commands"?
U can apply yourself the dowmixing matrix and create a 2.0 DPLII WAV.
Excuse me, I do not think I understood you. What tool do I use to go from 5.1 AC3 to uncompressed DPII? How do I "apply myself the dowmixing matrix"?

elenhil
21st January 2006, 10:58
Intervideo and Cyberlink filters tend to allow only 2 ch output form within other players. But if uīre interested in getting an upmixed DPL source using these filters, render the file and export it thru GraphEdit (for some reason it DOES allow to use all the features, as 8 ch output, or DPL or CLMEI, from within Graphedit, while not from within other players).
I have no hardware decoder, so I wait for someone to create a free DirectShow DPL-decoding filter. Like I said, there's already a free DSP plugin capable of that (but not pluggable in known software video players), so guys might just join their forces...

FFWD
21st January 2006, 15:24
- DPLII downmixing does NOT decrease stereo qualityBut how about soundquality?
- The minimum bitrate should be the one that allows to properly maintain the stereo fields of the encoded AAC. Maybe 192 approx. or q=140 with no mid-side (full stereo). I know that many will say that it sounds OK with 128 kbps but remember that it`s not about sounding OK as stereo but as a 6-channel upmix.The same bitrate requirements apply for LAME? What does 'q=140' mean?
- The AAC will be upmixed to 6-ch no matter what container u use as long as u have a way to perform matrix upmixing to the output (as ffdshow audio filter allows to). Ffdshow audio gives u the option to create your own upmixing and downmixing matrixes (as AC3filter does for AC3 and DTS streams).I have a DPII hardware decoder (Logitech Z-5500, connected via optical SPDIF). I have installed Nero AAC decoder on my PC (part of the Nero 7.0 suite). Is the DPII information passed trough correctly with the Nero AAC decoder or should I use FFDShow? (is it codec dependant?)

Skelsgard
21st January 2006, 16:18
But how about soundquality?
Same thing.

The same bitrate requirements apply for LAME? What does 'q=140' mean?
Yeah, u can use 192 kbps for lame, wich will give a very good quality MP3, maintaining most of the information need to get a decent upmixing.
q=140 is for FAAC, q for quality. Even though there havenīt been any new versions since May 2005, itīs still my prefered encoder for LC/MAIN/LTP profiles and >6ch files.

Is the DPII information passed trough correctly with the Nero AAC decoder or should I use FFDShow?
Yeah, uīll have no problem. I just used ffdshow as example since itīs freeware.
Is simple, the aac decoder (whatever decoder u like) will perform decoding of the 2ch AAC to a 2ch PCM wich is the actual format rendered by Windows. This PCM will be encoded by the SPDIF output to be send to your Z-5500, and the Z-5500 will do de DPLII decoding.
Iīm not familiar with Nero AAC decoder, if it has SPDIF output it probably does itself the AAC-to-SPDIF conversion. In any way (whatever filter does the AAC decoding), youīre getting a 2ch format-decoded file wich will be DPLII-decoded by your Z-5500.

The word "Decoding" is used in two ways here: one, to say going from a format to another, and two, to say taking info form a source to create an output that depends on that info.

3dsnar
23rd January 2006, 09:22
Absolutely. In the Dolby website u can get all sorts of PDFs with the technical specs for their technology (like Dolby digital inner workings, DPLI/II matrixes, etc.).
But it isnīt even as hard as it may sound. The downmixing matrix for DPLII is very simple:
Lt = (L*1) + (C*0.7071) + (Ls*-0.8164) + (Rs*-0.5774)
Rt = (R*1) + (C*0.7071) + (Ls*0.5774) + (Rs*0.8164)
Then, to retrieve C from Lt/Rt u will need to use a basic equation:
"find whatever is in both channels and send it to another channel but also erase it form the source channels".
I.e. LC and RC --> C is equal in both channels --> send C to another channel (i.e. center) --> but also erase C form the source (Lc - C, and RC - C) --> L and R.
Then L, R and C.
Is a basic channel extraction. But no decoder Iīve tried has been able to achieve it properly. They just end up creating a Center channel that is Lt + Rt while Lt and Rt are not touched. That is NOT true Prologic (either I or II).
That only gives Lt - LtRt - Rt (and donīt even start with the Ls an Rs).
LFE is not mentioned here since Dolby recommends not to use LFE in the DPLII downmixing.
Honestly, the upmixing technique is so simple that itīs annoying to see that nobody has implemented it properly.

Thanks for this! Maybe to obtain C, it is necessary to operate in the frequency domain. I.e. I will compute a complex spectrum, and maybe those spectrum bins which have identical real part and imaginary part, should be used for a center channel, and deleted from the Lt and Rt spectrums?
I will check this out.
It would be great to have the stereo DPLII and the outputed
5 channel stream. This would make guessing much easier...
Do you know where to obtain such examples?

Rockaria
23rd January 2006, 11:29
http://en.wikipedia.org/wiki/Dolby_Pro_Logic

Dolby Decoding Matrices

Dolby Surround Left Right Center Surround
Left Total 1.000 0.000 0.707 -0.707
Right Total 0.000 1.000 0.707 0.707

Dolby Pro Logic Left Right Center Rear Left Rear Right
Left Total 1.000 0.000 0.707 -0.707 0.707
Right Total 0.000 1.000 0.707 0.707 -0.707

Dolby Pro Logic II Left Right Center Rear Left Rear Right
Left Total 1.000 0.000 0.707 -0.8165 -0.5774
Right Total 0.000 1.000 0.707 0.5774 0.8165

I guess these matrices would be mostly useful for downmixing to play(as it is) on stereo speakers.
But in decoding the DS/DPL/DPL II encoded 2 ch PCM/MP3/AAC/AC3... to 5ch PCM to play, I believe we need to consider some more factors besides upper quantitative formula:

. rear surround(s) : how to sort out the phase-shifted surround signals from the Lt & Rt spectral image
. how to minimize the phantom center(front spanned signal) cancellation when seperating the center from the Lt & Rt.

I suppose the aud-x is already excellent in the shift-phased surround seperations to 5.1ch except some small interference between the channels when played on certain DAC & analog speakers. So I believe this phase shift technology is quite effective except the narrow bandwith embeded in 2ch lossy codecs.
But the three fronts seperation after that seems to have a bigger problem as making it inherently impossible to reconstruct the perfect original images.

These technology also seperates equal amount of the originally imbeded spanning sounds in the two fronts to the center!

So the DPL II provides some compensation methods like 'music' mode and/or center spanning control to the fronts in decoding time(my receiver DD decoding has no such effects) , not purely reconstructed surrounds :: somewhat virtual, which is why the discrete 5.1 DD(ac3) is regarded superior than these technology besides the bandwidth, IMO.

SeeMoreDigital
23rd January 2006, 12:15
Can somebody please remind me....

So a ProLogic II audio stream is capable of giving the "impression" of carrying "individual" sounds over each of the rear channels?


Cheers

Rockaria
23rd January 2006, 19:18
Yeah, the AC3Filter has both DS/DPL, DPL II encoder(speaker sets) for external DPL II decoders through analog/digital connections.

Skelsgard
24th January 2006, 13:49
It would be great to have the stereo DPLII and the outputed
5 channel stream. This would make guessing much easier...
Do you know where to obtain such examples?
DVDs. Get a DVD with a 2-ch DPL encoded track and try to get a "clean" center from it.
With clean, I mean regarding to what channel separation should be.

These technology also seperates equal amount of the originally imbeded spanning sounds in the two fronts to the center!
But in decoding the DS/DPL/DPL II encoded 2 ch PCM/MP3/AAC/AC3... to 5ch PCM to play, I believe we need to consider some more factors besides upper quantitative formula.
So the DPL II provides some compensation methods like 'music' mode and/or center spanning control to the fronts in decoding time(my receiver DD decoding has no such effects) , not purely reconstructed surrounds :: somewhat virtual, which is why the discrete 5.1 DD(ac3) is regarded superior than these technology besides the bandwidth, IMO.
Dolby Prologic is NOT intended to prefectly recreate the original info of the 5-ch source, but to create a "virtual environment" that tries to reproduce the "original environment" of the 5-ch source.
As Dolby states in their articles, absolute and pure channel separation is not possible nor realistic since there is obviously going to be at some point info that is shared by 2 or more of the channels in the stream.
Therefore DPL decoded streams are not meant to be heard as separate channels but as a whole.
It is obvious that discrete channels are always gonna be superior to matrix-decoded ones, thatīs a fact, not just an opinion.

Rockaria
24th January 2006, 16:18
Becauses we sometimes (get) confuse(ed) between the facts and opinions?;)

I think there are trade-offs between the two :
. high bit rated DPL II or similar with more efficient algorithm can be better than low bit rated discrete AC3 in overall quality( i.e. 180kbps DPL II in vorbis vs 180kbps 5.1 DD)
. the DS/DPL technology was invented & distributed because of the limited carrier (ch & bandwidth) but is being enhanced with better tech & environment, IMO

Skelsgard
24th January 2006, 20:11
Exactly.

Rockaria
25th January 2006, 02:13
Forgot to mention :

It's far more than the impression. I felt it's very close to the real surround except the little design glitch on the center as I mentioned.

Test the aud-x 5.1 surround seperation technology imbeded in the recent efficient Lame codec. I also believe cross-referencing the DPL II(x) surround encoding & decoding procedure will make the aud-x perfectly economic & effective..

Rockaria
26th January 2006, 13:40
Alright, I meant the Lame encoded Mp3 as a container or carrier of your aud-x stream, expressed so many times in other thread. It's just an abbreviation.
Also <aud-x dsfilter decoder + alpha>
mp3(normal) -> decode + upmix/48k resample + apu rendering/ac3 encode & spdif passthrough
mp3s(aud-x)-> decode + apu rendering/ac3 encode & spdif passthrough
ac3 -> (decode/resample) + apu rendering/(ac3 encode) & spdif passthrough
from in this thread (http://forum.doom9.org/showthread.php?p=769872#post769872) is my way of the expression about the (hidden) functionality of the aud-x dsfilter you described just before.

I suggested you to enable the aud-x out-pin connection to other filters such as FFDSHow or AC3Filter to utilize their built-in DSPs expecially DRC & DPL II, which seems not implemented in your new version yet.
1. indeed a complete set but with no DRC or gain control? cannot connect to FFDShow or AC3Filter to utilize the DRC or other DSPs
-> provide the DRC/gain/EQ control or allow connecting to other filters, the volume level is critical in perceived sound quality for normal ears.
2. cannot be used for AVISynth DirectShowSource frame source, looks too strongly tied to the sound (out) device.
3. what kind of an algorithm is used for the mp3 upmix, martrix. DPL or DLP II? can users choose or set the parameters?
4. what else formats can it decode besides the mp3, mp3s(aud-x) & ac3?

All these suggestions are after experimenting the full functionality of the aud-x, pseudo surround , stereo-out, 5.1ch analog/digital(soundstorm) and spdif-passthrough(aud-x) on normal mp3, aud-x 5.1, original 5.1wav, aud-x decoded 5.1wav, aud-x encoded ac3.

As I said before, I just have been having a hard time to connect the crosstalks (happened only on the aud-x dsfilter which is disabled by setting the invert phase on the nvmixer) to your DPL II. Because the DPL II is designed for 2ch physical media. But I finally thought that the surround encoding & decoding algorithm of the DPL II would useful to elliminate the crosstalks in the aud-x.
Sorry for going ahead but it would be wonderful to be explained why you need the DPL II for your aud-x.
Rocaria, thanx for the explanation.
However I would be happy to include a proper DPLII decoder
algorithm in our DirectShow filter (since there is alot of movies
encoded with this technology).

Now the AC3 decoding is disabled because of the conflict between dsfilters, you said?
The real difficulty to me was that the aud-x wouldn't allow the connection to other filters, sticking only to the sound out device.

Sorry FFWD, the duscussion is getting out of the scope of the DPL II..:confused:

FFWD
26th January 2006, 14:48
Sorry FFWD, the duscussion is getting out of the scope of the DPL II..:confused:No problem, because of the high bitrate requirement DPII is not so interesting for me anymore. I might do discrete 5.1 encoding when the Nero AAC codecs are mature enough for a ~80-128 kbit/s range. Untill then I'll use a normal stereo downmix.

FFWD
26th January 2006, 15:28
Try Aud-X STDQ (128 kbps) :DI refrain from using Aud-X, because I haven't seen some proper listeningtest results (on HA.org (http://www.hydrogenaudio.org/forums/index.php?showforum=40)) and you're using LAME instead of a more efficient codec. I'll be happy to change to Aud-X if such a listening test can prove your claims.


I don't know if ABC/HR supports 5.1 though...

BTW : Is the sound quality of Aud-X STDQ worse than LAME 3.97b2 -V 5 if I use a standard 2.0 mp3 decoder?

Rockaria
26th January 2006, 19:56
I might do discrete 5.1 encoding when the Nero AAC codecs are mature enough for a ~80-128 kbit/s range. Untill then I'll use a normal stereo downmix.Yeah, I will have to agree The HE AAC 5.1ch @150k~200K VBR(64k(stereo) * 2.5(5.1ch multiplier) = 160kbps) has been the most stable & lightweight solution to me so far.

Also it's very interesting to test & compare other multi channel solutions including the new yet-proven solution aud-x. It's improving.

Rockaria
27th January 2006, 06:43
The content is moved to the original aud-x thread here. (http://forum.doom9.org/showthread.php?p=776218#post776218)
I agree the topic is going irrelevant to the thread topic.
Yeah the rule must be kept fairly on all the threads..

bond
27th January 2006, 11:51
3dsnar , this thread is about aac

dont adverstise your stuff here, where it doesnt belong

elmimmo
29th January 2006, 12:42
BigDid and Wonderbra seemed to know (or at least guess) how to do in OS X what the title of the thread suggests, but never got to expand on how to do it (or I am too thick to interpret it…).

Can anybody throw a hint on that?

Skelsgard
31st January 2006, 20:56
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).

gte024h
5th February 2006, 19:23
I've been encoding from 5.1 AC3 to 2.0 AAC for a few months now and all my encodes have played quite well on my home theater. I use azid with the "-s dpl2" option to make the WAV file, then feed that WAV to FAAC with q=100 (~155kbps). I mux that in with my H.264 video using YAMB then play it back on my HTPC using ffdshow. The audio is decoded with ffdshow to PCM, which is sent via SPDIF to my Panasonic SA-XR55 HT receiver. Then I just turn on Dolby Pro Logic IIx decoding on the receiver and I get quite nice sounding 5 channel surround.

The LFE is mixed into the main's by azid (I think), but I have my main's set to "small" on my Panasonic which causes everything below 80Hz to go to my sub. The center is clear, and the surrounds don't have that bubbly sound you get with plain Dolby Pro Logic (the default with azid).

I use mid/side encoding with FAAC because I read somewhere on the HydrogenAudio forums that M/S vs. Stereo is a lossless transform. That is the decoder can exactly recover stereo from M/S encoding, of course the rest of the encoding is lossy, but at q=100 I find the quality as good as the original.

The exact commands I use for the conversion are in batch files I put in my SendTo folder, that way I can right-click on the files to do the conversion:

AC3 to WAV.bat = azid.exe -a -c normal -s dpl2 %1 "%~d1%~p1%~n1.wav"

WAV to AAC.bat = faac.exe -q 100 -c 22000 -o "%~d1%~p1%~n1.aac" %1

Rockaria
7th February 2006, 00:15
Yeah, the DPL II PCM encoded with more efficient codec and special care not to damage the spatial info too much will be the most economic(direct) multi channel digital solution if the fidelity is not a big issue(center, rear proper phase shift & split process).
Using the PC(codecs & FFDShow DPL II mixer) as a preprocessor for multi channel sources, we can also utilize it if the delay(ac3 dynamic encoding & decoding) is the issue( I often use a headphone as analog monitoring for other sources over the base digital receiver & speaker set, it's annoying).

An interesting issue I have is that, all the matrices of the DPL II introduced are unbalanced(Lt<Rt), making me doubt if it is even proper for stereo headphone use.

Dolby Pro Logic II Left Right Center Rear Left Rear Right
Left Total 1.000 0.000 0.707 -0.8165 -0.5774
Right Total 0.000 1.000 0.707 0.5774 0.8165

When I change the matrice to below, the DPL II h/w decoded stream sounded proper, at least to me.

Dolby Pro Logic II Left Right Center Rear Left Rear Right
Left Total 1.000 0.000 0.707 0.8165 -0.5774
Right Total 0.000 1.000 0.707 -0.5774 0.8165

Interesting..
AFAIK, the +- of the rear are the directions of the phase shift degree, not a mathematical summation.

[edit]
I tested the FFDShow's default DPL II matrice(similar to the 1st one) again and found it properly seperates on each channels.
The 2nd one produced slight mixes of the counter-rears. So the FFDShow's DPL II encoder proved itself quite effective to me.;)
--tested with a 6ch speaker set wav on both digital & analog.

[edit]
I tested again with various multi channel streams(quad, 5.1ch, 5.0ch...) and the results were quite different than the previous test with the 6ch speaker set test wav.
The 2nd one was better(balanced) even if it has some slight mixes on the rears. The 1st one showed the mathematical unbalance(Lt<Rt) severely on both analog 2ch/6ch and digital 6ch decoding.
The AC3filter also behaved similar, which proves even the best ds filters (FFDShow & AC3Filter) are not fully implementing the +-90 degree shift of the rear phases when encoding DPL II...:confused:

Skelsgard
8th February 2006, 15:22
AFAIK, the +- of the rear are the directions of the phase shift degree, not a mathematical summation...
...
The AC3filter also behaved similar, which proves even the best ds filters (FFDShow & AC3Filter) are not fully implementing the +-90 degree shift of the rear phases when encoding DPL II...
Yeah, is basically the way to perform 180 phase shifting for the later cancellations, but there is no allow-custom-phase-shifting-value feature in any DS filter. One may try with pro audio tools, like Audition, Audacity or SoundForge, but it would take a lot of time and work.

scharfis_brain
8th February 2006, 18:07
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.

The 1st one showed the mathematical unbalance(Lt<Rt) severely on both analog 2ch/6ch and digital 6ch decoding.
There is NO mathematical unbalance since we are dealing with AC SIgnals.
This means that only their factor take count into the balance, not the sign.

The 2nd one was better(balanced) even if it has some slight mixes on the rears. What means better balanced?

Lets assume a Mono Surround signal (Ls & Rs of a 5.1 source are the same).
with the second set of equations (Lt=L+C+Ls-Rs || Rt=R+C-Ls+Rs) the mono surround will be reduced to a third of its amplitude.
With the first set of equations (Lt=L+C-Ls-Rs || Rt=R+C+Ls+Rs) the mono surround retains preserved correctly.

3dsnar
8th February 2006, 19:56
It is important to remember that reversing phase by 180 deg
(changing the signal sign) results in some sort of attenuating the signal.
This is related to the physical behaviour of speaker (or headphone) membrane.

This is especially related to impulsive low frequency sounds (like base drum
'oumgth' sound). This usually has the transient phase of positive values
(the speaker rapidly pushes the air. When you revert the phase,
the speaker 'sucks' the air :D )

Thus, although the energy for both channels signals (in the digital domain) stays the same,
those which do not have inverted phase in fact result in higher energy
acoustical signal (i.e. higher energy air vibrations).

This is just a speculation...

Rockaria
8th February 2006, 22:15
I understand the phase shift is used in various stages through the chains : Sources->ADC->various DSPs(including encoding & decoding)->DAC->Speaker set.
What we are focusing on is the DPL II encoding & encoding stages, especially on the encoding to EMULATE the dolby's certified H/W DPL II encoder with the adjustable matrices.

I am not an expert on the DSP technology but just want to have some basic CORRECT knowledge to use the system effectively.
Every learning curve (including the scientific experiments) is supposed to include some essential steps and factors complementary.

. theory, deductive reasoning, reference model, hypothesis
. target system model, tests adjusting variables,
. analysis, inductive reasoning, feedbacks.

The facts which (I cannot change at all for anybody's sake) caught my attention so far is that :
. the ffdshow DPL II encode routine with the default(or 1st) matrice responsed correctly(very close to original ac3 play) on 6ch speaker setup test wav(it has no concurrent signals on each channels).
. but it does not reconstruct(seperation & cancellation) the rears correctly, noticeably emphasizing(not seperated & canceled) FR precisely speaking, when processed with normal 6ch music.
. The 2nd matrice has slight mixes on the rears but at least it does not causes reconstruction Lt<Rt(in seperation & cancellation)

It is the phase difference (180°) between Lt and Rt that counts here.
IIRC, based on the dolby documents, the phase shifts are : -90 degree for Ls(not Lt) and +90 degree for Rs when merging to fronts(Lt & Rt).
I have no clear picture on how much it(matrices) affect differently on ffdshow's DPL II encoding routine((0~180 degree on Lt & Rt?).
But what I am feeling sure by the test results is that there are something need to be adjusted in the emulated DPL II routine for the default & suggested matrices.
Meanwhile, I am going to use the 2nd matrice, until more facts(test results on various matrices,,) gathered & proves and modifications applied. Thanks.;)

http://www.ethanwiner.com/phase.html

scharfis_brain
8th February 2006, 22:42
where can I find these documents? I was unsuccessful searching them on the dolby.com site.

Rockaria
8th February 2006, 23:13
In the document
http://www.dolby.com/assets/pdf/tech_library/209_Dolby_Surround_Pro_Logic_II_Decoder_Principles_of_Operation.pdf
around the page 3.

http://www.dolby.com/resources/tech_library/index.cfm

Rockaria
9th February 2006, 03:41
The DPL II diagram is using the DPL(basically same model) and below is the DPL matrice I mentioned before. Notice the +- signs on the rear.

Dolby Pro Logic Left Right Center Rear Left Rear Right
Left Total 1.000 0.000 0.707 -0.707 0.707
Right Total 0.000 1.000 0.707 0.707 -0.707


Now some improvements on the rear with better seperations with +-change on the FFDShow's default matrice.

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

Very close to the 6ch AC3 spdif out except some residuals when starting the cancellations and the small glitch on center seperation as known.
I wonder if you are having similar results...

[edit]
I happened to visit the http://en.wikipedia.org/wiki/Dolby_Pro_Logic and found the matrix for the DPL is different, maybe my copy&paste mistake. The next post is to be affected...
But there is no difference that the adjusted matrix works fine for my environment(6ch->FFDShow DPL II encoder & ONKYO DPL II movie/music mode decoder) and probably on yours also.

Rockaria
9th February 2006, 12:12
The picture is about to be clear.

Phase Shift Degree -90 | 90 -> 0 | 180
Ls coefficients -0.866|+0.5 -> +0.866| -0.5
Rs coefficients +0.5 |-0.866 -> -0.5 | +0.866

The shifts of the signs looks like it's because the process(encoding) is starting from phase zero shfting 90 degree in the beginning.
The 180 degree phase difference seems to be BETWEEN the downmix coefficients on each rear channel, as well as between each pair of the coefficients on the rears as the phase goes on, but not between the rears on the sum of the coefficients.
The FFDShow's(& AC3Filter) coefficients factors are sqrt(3/4) & sqrt(1/4) resulting in 4.8db of attenuation based on this (http://forum.doom9.org/showpost.php?p=347432&postcount=1) post, unlike Dolby's(!).
...
Anyway, the 6ch music reconstruction result is fairly good.:)

scharfis_brain
9th February 2006, 19:45
Dolby Pro Logic Left Right Center Rear Left Rear Right
Left Total 1.000 0.000 0.707 -0.707 0.707
Right Total 0.000 1.000 0.707 0.707 -0.707


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.

hmmm. maybe I should create a testfile that cyclic pans a sound source softly from one channel into the other in this order:
L -> C -> R -> Rs -> Ls -> L -> C ....
(clockwise)

this should clearly demonstrate, that your matrix has the leakage in the middle of both surrounds that I am decribing.

Rockaria
9th February 2006, 20:39
IMO, firstly you may have to explain why the default matrice is not responding correctly(but correctly with the adjusted matrice) on 6ch music & what system model you are perceiving with FFDShow & its matrice(asymmetric).


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.

I guess, the seperation & cancellation(ellimination) is performed by the phase region not by the (symmetric)volume image.
So I am having a bit hard time getting the picture to disqualify the referenced official DPL matrice.


You may experience wider sounding surround channels, because every middle information (mono information) is weakened in the surround downmix.
hmmm. maybe I should create a testfile that cyclic pans a sound source softly from one channel into the other in this order:
L -> C -> R -> Rs -> Ls -> L -> C ....
(clockwise)
this should clearly demonstrate, that your matrix has the leakage in the middle of both surrounds that I am decribing.

Thanks to the quality of the FFDShow, I can change the decoding mode(ac3/DPL II) on the fly through the digital receiver.
It sounds very close now(no rear mixes). I could hardly find the residuals(leakage) of the rear also.

But, yeah, I agree, we need TESTs(with many samples) for analysis and feedbacks to refine the target system model. I will participate testing with your tool.:)
But in my second thought, the FFDShow satisfies every party's interest!, It's almost perfect.

I adjusted my prev. table to make my point clearer.

scharfis_brain
9th February 2006, 20:46
ia=tone(length=60, frequency=440, samplerate=48000, channels=1, type="Noise")
iv=blankclip(length=1500, fps=25, width=480,height=360, pixel_type="YV12", audio_rate=48000, stereo=false).invert()
i=audiodub(iv,ia).trim(0,49)

slnc = i.amplify(0).invert()
asc = i.fadein(49).trim(0,49)
desc = i.fadeout(49).trim(0,49)
full = i

left = full++desc++slnc++slnc++slnc++slnc++slnc++slnc++slnc++asc
center = slnc++asc ++full++desc++slnc++slnc++slnc++slnc++slnc++slnc
right = slnc++slnc++slnc++asc ++full++desc++slnc++slnc++slnc++slnc
rsurr = slnc++slnc++slnc++slnc++slnc++asc ++full++full++desc++slnc
lsurr = slnc++slnc++slnc++slnc++slnc++slnc++slnc++asc ++full++desc
LFE = left.amplify(0)

mergechannels(left,right, center, LFE, lsurr, rsurr)

last+last

load this script into your media player and make usage of realtime ac3 encoding and your downmixing matrices.

you'll notice, that this 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
returns a totally mangled surround info. the mono-surround is passed to the center now, which is obviously, because if Ls & Rs are the same (the mono condition!), you get a remaining 0.366 (0.866 - 0.5) in each channel with the SAME phase!

while this 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
returns a nice clockwise panning noise.

Rockaria
9th February 2006, 20:58
I never start coding before verifying the target system model.
But to build the target system model, I do various tests.

Before verifying the avisynth script(right?) if it's reflecting any proper DPL II encoder model, I'd suggest you to test the adjusted matrice on-the-fly. That would make an ideal conversation.

scharfis_brain
9th February 2006, 21:08
It tested the matrices ON-THE-FLY!

This script delivers 48 kHz 5.1 WAV sound, so you can encode it on the fly to AC3 and you can downmix it on the fly using your matrices!

Rockaria
9th February 2006, 21:20
It tested the matrices ON-THE-FLY!
Of course I can test your script on the fly without any verified system model.

But we are getting no resonable feedbacks to confirm. Usually I don't push in this situation. Thanks...

[edit] clarification : no feedbacks-> no reasonable feedbacks,,& my sig.

scharfis_brain
9th February 2006, 21:29
what is a verified system model?

The script produces a very synthetic sound: a in-phase signal blending between the channels. this prooves your matrix being wrong.

and where are publications by dolby that are confirming your style of matix?

Rockaria
9th February 2006, 21:40
what is a verified system model?

The script produces a very synthetic sound: a in-phase signal blending between the channels. this prooves your matrix being wrong.

and where are publications by dolby that are confirming your style of matix?
You started to prove your own belief WRONG from here :

It is the phase difference (180°) between Lt and Rt that counts here.

So I kindly linked the document you asked.

Also I have tried to be very fair to keep the proper approach, but now you start attcking me?
Is it because you have that many useful(?) post count? :readrule:

scharfis_brain
9th February 2006, 21:57
I did not start proving my own belief wrong here.
the 5.1 signal is a IN-PHASE signal blending, which later has to be DOWNMIXED with the 180° phase shift to 2.0.
In order to show you that the surrounds aren't handled correctly with your style of matrix I created this synthetic sound.
This is what I always do (with video and audio): I am creating some artificial references/relations to judge methods.
this 5.1 sound avs-script is such a reference to test proper DPL2 downmixing.

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)

Sorry. I didn't wanted to offend you. Sometimes I use too harsh words :(

EDIT: do you know of any proper commercial Dolby-certified DPL2 encoding software?
a comarision of its result and our matrices should clear up thing quickly.