Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

View Poll Results: Which samples sound (A or B) better, when decoded with certified DPLII deocers
Clips A sound better 0 0%
Clips B sound better 5 83.33%
Both sound the same 1 16.67%
Voters: 6. You may not vote on this poll

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th June 2006, 13:59   #21  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
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?
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 9th June 2006, 14:15   #22  |  Link
ursamtl
Registered User
 
Join Date: May 2004
Location: Montreal
Posts: 729
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."
ursamtl is offline   Reply With Quote
Old 9th June 2006, 14:43   #23  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
Oh! That's nice stuff. Chaining some filters to achieve a near to constant phase shift over a defined range of frequencies.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 9th June 2006, 15:36   #24  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
I just did a small test with simple 180 degree mixing how the sign affects the surround image:

The Normal mixing:


And the inverted matrix:


samples can be downloaded here:
http://home.arcor.de/scharfis_brain/...raditional.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.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 9th June 2006, 16:55   #25  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
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.
__________________
u know everything in the end, or now if aligned... no right(x).right(y) pls. it's confusing... : phase-shift /Jun.2006

Last edited by Rockaria; 9th June 2006 at 17:13.
Rockaria is offline   Reply With Quote
Old 9th June 2006, 17:20   #26  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
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?
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 9th June 2006, 18:38   #27  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
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.
Quote:
Originally Posted by scharfis : I am at least reading and trying to understand to remember
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
__________________
u know everything in the end, or now if aligned... no right(x).right(y) pls. it's confusing... : phase-shift /Jun.2006

Last edited by Rockaria; 9th June 2006 at 18:44.
Rockaria is offline   Reply With Quote
Old 9th June 2006, 18:51   #28  |  Link
3dsnar
Registered User
 
3dsnar's Avatar
 
Join Date: Dec 2005
Location: Proxima Centauri
Posts: 315
Quote:
Originally Posted by scharfis_brain
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.
__________________
Aud-X MP3 5.1 Format

Last edited by 3dsnar; 9th June 2006 at 19:02.
3dsnar is offline   Reply With Quote
Old 9th June 2006, 19:34   #29  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
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.

Quote:
Originally Posted by Rockaria's draft test plan
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...
__________________
u know everything in the end, or now if aligned... no right(x).right(y) pls. it's confusing... : phase-shift /Jun.2006

Last edited by Rockaria; 9th June 2006 at 21:21.
Rockaria is offline   Reply With Quote
Old 9th June 2006, 23:41   #30  |  Link
DarkAvenger
HeadAC3he coder
 
DarkAvenger's Avatar
 
Join Date: Oct 2001
Posts: 413
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.
DarkAvenger is offline   Reply With Quote
Old 9th June 2006, 23:48   #31  |  Link
ursamtl
Registered User
 
Join Date: May 2004
Location: Montreal
Posts: 729
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.
ursamtl is offline   Reply With Quote
Old 10th June 2006, 00:09   #32  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
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.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 10th June 2006, 00:34   #33  |  Link
ursamtl
Registered User
 
Join Date: May 2004
Location: Montreal
Posts: 729
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.
ursamtl is offline   Reply With Quote
Old 10th June 2006, 08:31   #34  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
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 :
Code:
<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()
Quote:
Originally Posted by Cornucopia posted 2006 Mar 01 23:43
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...&i=vst-enabler
http://www.savioursofsoul.de/Christian/Plugins.htm
__________________
u know everything in the end, or now if aligned... no right(x).right(y) pls. it's confusing... : phase-shift /Jun.2006

Last edited by Rockaria; 10th June 2006 at 08:51.
Rockaria is offline   Reply With Quote
Old 10th June 2006, 08:50   #35  |  Link
3dsnar
Registered User
 
3dsnar's Avatar
 
Join Date: Dec 2005
Location: Proxima Centauri
Posts: 315
Quote:
Originally Posted by DarkAvenger
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.
__________________
Aud-X MP3 5.1 Format
3dsnar is offline   Reply With Quote
Old 10th June 2006, 08:56   #36  |  Link
3dsnar
Registered User
 
3dsnar's Avatar
 
Join Date: Dec 2005
Location: Proxima Centauri
Posts: 315
Quote:
Originally Posted by ursamtl
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/gu...184/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)
__________________
Aud-X MP3 5.1 Format

Last edited by 3dsnar; 10th June 2006 at 09:57.
3dsnar is offline   Reply With Quote
Old 10th June 2006, 09:16   #37  |  Link
DarkAvenger
HeadAC3he coder
 
DarkAvenger's Avatar
 
Join Date: Oct 2001
Posts: 413
Quote:
Originally Posted by 3dsnar
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...Guidelines.pdf
DarkAvenger is offline   Reply With Quote
Old 10th June 2006, 09:21   #38  |  Link
3dsnar
Registered User
 
3dsnar's Avatar
 
Join Date: Dec 2005
Location: Proxima Centauri
Posts: 315
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.
__________________
Aud-X MP3 5.1 Format

Last edited by 3dsnar; 10th June 2006 at 09:26.
3dsnar is offline   Reply With Quote
Old 10th June 2006, 09:34   #39  |  Link
DarkAvenger
HeadAC3he coder
 
DarkAvenger's Avatar
 
Join Date: Oct 2001
Posts: 413
Yes, and I wrote "properly mastered"... and that you are using unsuitable sources for testing.
DarkAvenger is offline   Reply With Quote
Old 10th June 2006, 09:37   #40  |  Link
3dsnar
Registered User
 
3dsnar's Avatar
 
Join Date: Dec 2005
Location: Proxima Centauri
Posts: 315
Uhm, you could be right
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.
__________________
Aud-X MP3 5.1 Format

Last edited by 3dsnar; 10th June 2006 at 09:46.
3dsnar is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 15:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.