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 10th June 2006, 13:59   #41  |  Link
ursamtl
Registered User
 
Join Date: May 2004
Location: Montreal
Posts: 729
Quote:
Originally Posted by 3dsnar
Yes, you've got the point. It is not so easy to implement hilbert transform.
In practice, the hilbert transform is applied via spectrum operations, not FIR filtering apprach, because convolutive filtering is a bit computationally heavy.
That's not what Dolby says about its approach. I think they are clear in their explanation of why and how for the Hilbert. They designed DPLII, etc., so I hope they know what they're talking about
Quote:
(from Dolby Digital Professional Encoding Guidelines, Appendix D, page 1)

Purpose
The 90-Degree Phase Shift filter provides a means for an encoding engineer to create a multichannel Dolby Digital bitstream that can be downmixed to a Dolby Surroundcompatible Lt/Rt output. Without this filter, point-source elements panned from Surround to Center in the multichannel mix would seem to pan from Surround to Left and then to Center when downmixed to Lt/Rt and reproduced using a Dolby Surround Pro Logic decoder.

This filter should generally be used whenever encoding a multichannel signal unless it is known that the 5.1-channel source does not contain point-source element pans. For example, if the source was recorded using five discrete microphones placed in the corners of an auditorium, there is no panning between channels and the filter could be safely disabled. If in doubt, use a DP562 to downmix the 5.1-channel program to Lt/Rt, Dolby Surround Pro Logic decode the Lt/Rt signals, and then set the filter to the setting that sounds best.

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

Regards,
Steve.

Last edited by ursamtl; 10th June 2006 at 14:13.
ursamtl is offline   Reply With Quote
Old 10th June 2006, 14:06   #42  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,434
Quote:
Originally Posted by DarkAvenger
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
Reading the document:
1) The info is for Dolby Surround Pro Logic (DPL I), nothing about DPL II.
2) Using the info in this DPL II discussion:

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

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

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

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

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

"The Lt/Rt downmix sums the surround channels and adds them in phase to the left channel and out of phase to the right channel.
This allow a Dolby Surround Pro Logic decoder to reconstruct the L/C/R/S channels for a Pro Logic home theater."

If this is true we must use a matrix 3 style, with correct (not inverted) SL, SR channels using software DPL II Cyberlink decoder.
tebasuna51 is offline   Reply With Quote
Old 10th June 2006, 16:30   #43  |  Link
3dsnar
Registered User
 
3dsnar's Avatar
 
Join Date: Dec 2005
Location: Proxima Centauri
Posts: 315
@Ursamtl,
I am just talking about en efficient implementation.
The result should be very similar (i.e. spectral multiplications are equivelent to convolution in the time domain).

@Tebasuna. All I was just going to write you did
All I can say is EXACTLY. 100% agree.
To summarize, the appropriate phase relations in the 5.1 input should be as close as possible to the Dolby specs. (e.g. application of appropriate phase shifts, etc).
The downmixing process can be viewed as a separate thing.
Cheers, 3d
__________________
Aud-X MP3 5.1 Format
3dsnar is offline   Reply With Quote
Old 10th June 2006, 20:21   #44  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
@tebasuna51
I do not understand clearly what you mean by 'in phase', 'out of phase', 'inverted', 'matrix 3' and the use of 'software DPL II Cyberlink decoder' here.
--------------------------

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

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

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

Now the issue is clearly what reasonable DPL II rear stereo seperation plans we can imagine(in combination with existing matrices) :
Code:
<m11> adjusted : no relations between the coefs, polarity between the channel : simple coefs mix
Lt = mix(Lf.0, C.0, *Ls1.+/-90, *Rs2.+/-90) == mix(Lf, C, *mix(Ls1, Rs2).+/-90)
Rt = mix(Rf.0, C.0, Ls2.+/-90, Rs1.+/-90) == mix(Rf, C, mix(Ls2, Ls1).+/-90)
<m12> the prevailing s/w version : we clearly see the Lf<Rf effect
<m13> to be adjusted
...
<m21> : adjusted : phase between the coefs, polarity between the channels
Lt = mix(Lf.0, C.0, *Ls1.+/-90, *Rs2.-/+90) == mix(mix(Lf, C), *mix(Ls1.+/-90, Rs2.-/+90))
Rt = mix(Rf.0, C.0, Ls2.-/+90,  Rs1.+/-90) == mix(mix(Rf, C), mix(Ls2.-/+90, Rs1.+/-90))
<m22> my adjusted s/w emulation that has around 20% better seperations than <m12> : both 180 deg shifts
...
Code:
<m31> : adjusted : polarity between the coefs, phase between the channels 
Lt = mix(Lf.0, C.0, *Ls1.+/-90, Rs2.+/-90) == mix(mix(Lf, C), mix(*Ls1, Rs2).+/-90)
Rt = mix(Rf.0, C.0, Ls2.-/+90, *Rs1.-/+90) == mix(mix(Rf, C), mix(Ls2, *Rs1).-/+90)
<m32> : replaced : polarity between the coefs & channels, phase between the channels 
Lt = mix(Lf.0, C.0, *Ls1.+/-90, Rs2.+/-90) == mix(mix(Lf, C), mix(*Ls1, Rs2).+/-90)
Rt = mix(Rf.0, C.0, *Ls2.-/+90, Rs1.-/+90) == mix(mix(Rf, C), mix(*Ls2, Rs1).-/+90)
<m33> : added : polarity between the coefs & channels
Lt = mix(Lf.0, C.0, *Ls1.+/-90, Rs2.+/-90) == mix(mix(Lf, C), mix(*Ls1, Rs2).+/-90)
Rt = mix(Rf.0, C.0, Ls2.+/-90, *Rs1.+/-90) == mix(mix(Rf, C), mix(Ls2, *Rs1).+/-90)
<m34> : added : polarity between the coefs
Lt = mix(Lf.0, C.0, *Ls1.+/-90, Rs2.+/-90) == mix(mix(Lf, C), mix(*Ls1, Rs2).+/-90)
Rt = mix(Rf.0, C.0, *Ls2.+/-90, Rs1.+/-90) == mix(mix(Rf, C), mix(*Ls2, Rs1).+/-90)
...
. when * = invert(), +/- = + then - phase shift(a), -/+ = - then + phase shift(b) : i.e. <m21a>,, <m32b>
. we are not certain on Dolby's 90 whether - or +, so applying on the models respectively
. not still sure why there need the relations to be established between the channels, but will evaluate them.
. these DPL II model candidates adjustments will be reflected on the original plan.
__________________
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 21:20.
Rockaria is offline   Reply With Quote
Old 11th June 2006, 00:58   #45  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,434
Quote:
Originally Posted by Rockaria
@tebasuna51
I do not understand clearly what you mean by 'in phase', 'out of phase', 'inverted', 'matrix 3' and the use of 'software DPL II Cyberlink decoder' here.
- 'in phase' and 'out of phase' are literal text in document:
Authoring Dolby Digital and Dolby E Bitstreams
Of course is ambiguous, but can be interpreted like the inverted (or {180}) surround signal mus be added to Rt instead to Lt.

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

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

Matrix 3 (with inverted signs for back channels)
LT = L + 0.7 C + 0.8 SL + 0.5 SR 
RT = R + 0.7 C - 0.5 SL - 0.8 SR
Results (L, R, ... input channels, L', R'... output channels) :
Code:
M1 decoded in Movie mode 
L' = 0.7 L 
R' = 0.7 R 
C' = 0.6 C 
SL' = - 0.7 SL 
SR' = - 0.7 SR 

M3 decoded in Movie mode 
L' = 0.7 L 
R' = 0.7 R 
C' = 0.6 C 
SL' = 0.7 SL 
SR' = 0.7 SR
But I don't know if all soft/hard decoders have similar behaviour.

Last edited by tebasuna51; 11th June 2006 at 01:02.
tebasuna51 is offline   Reply With Quote
Old 11th June 2006, 03:19   #46  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
Quote:
can be interpreted like the inverted (or {180})
Yea, literally you are right.
And with the above linked (recentest maybe) doc's mentoned 'polarity', I believe it's a plain invert(mirroring) on the same phase region.

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

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

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

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

[edit]
.The phaseBug input scale seems working strangely : it changes the degree but advances a lot and no negative direction ??
__________________
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; 11th June 2006 at 08:13.
Rockaria is offline   Reply With Quote
Old 11th June 2006, 16:48   #47  |  Link
raquete
Registered User
 
Join Date: Nov 2004
Posts: 741
Quote:
- 'in phase' and 'out of phase' are literal text in document:
Authoring Dolby Digital and Dolby E Bitstreams
Of course is ambiguous, but can be interpreted like the inverted (or {180}) surround signal mus be added to Rt instead to Lt.
a good lecture about phase: http://en.wikipedia.org/wiki/Phase_%28waves%29

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

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

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

raquete is offline   Reply With Quote
Old 11th June 2006, 19:15   #48  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,434
Quote:
Originally Posted by raquete
It is common to speak of inverting the polarity of a wave as "flipping the phase" or "shifting the phase by 180 degrees". These are not completely equivalent, though, since a 180 degree phase shift of all signal frequencies would also delay the signal. Inverting the signal is instantaneous.
Not at all. Any delay is a undesired result, if exist any delay then not all frecuencies have the same phase shift.

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

In matrix equations the terms SL{180} and -SL are absolutely equivalents.
tebasuna51 is offline   Reply With Quote
Old 11th June 2006, 22:47   #49  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
In fact, that's a fundamental issue in the digital world.

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

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

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

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

Any correction is welcomed.
__________________
u know everything in the end, or now if aligned... no right(x).right(y) pls. it's confusing... : phase-shift /Jun.2006
Rockaria is offline   Reply With Quote
Old 11th June 2006, 23:46   #50  |  Link
raquete
Registered User
 
Join Date: Nov 2004
Posts: 741
@ Rockaria....

Quote:
My best imagination is a STRING of COIL, which circulates 0~360 degree, but also advances on the time axis,..
something like this?


more lecture : (Complex sinusoids)
http://en.wikipedia.org/wiki/Negative_frequency
raquete is offline   Reply With Quote
Old 12th June 2006, 02:55   #51  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
Yes, in a microphone's point of view, standing upright, scanning 360 deg. horizantally, 48000times a second(48khz/sec), but mostly recoding the waves from the origin direction [* check edit] on the zero phase degree zone when properly mastered[/*].

The WAV recoded, should be regarded as a bunch of all the waves(coils) scanned having different freq(hz), phases(circles), varying volumes(diameter)..
This might cause a problem synchronizing all the inner waves causing a significant delay in the phase shifting.

The inverting(flipping, mirroring) is a simple negative movement of the wav images on the same time(phase) axis of the grand wav(the captured wave), having no phase advance.
But the changing the polarity might have two different possible interpretations by the axis on the target waves : when the each inner wave is considered, the phase shifting will also make sense, but when the grand wav is considered, the inverting will be more reasonable, provided & proved that the phase shifting on the grand wave will result in different phase shifts on the inner waves because of each differnt frequencies(asking an analogic process or synchroniztions of all the channels when a DSP is used..).
But considering Dolby also included the '90deg phase shifting' in the diagrams, I believe they used the 'polarity' for inverting.

@raquete, thanks for the link that best visually explaining the coil(wave), as well as the related topics.

[edit] The recoded mono wave might having the direction(phase shifted) is based on the fact that Dolby's doc on DD saying 'the simple downmixing the properly mastered waves from mics will be enough for DPL(II)...", just a simple assumption.
. some modification on the polarity change
__________________
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; 12th June 2006 at 05:38.
Rockaria is offline   Reply With Quote
Old 12th June 2006, 23:00   #52  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
A verification of avisynth's Amplify(-n) or MixAudio() when n=0.000~1 == invert()
not -180 deg phase shift as explained in the doc

<shift360.avs>
a=DirectShowSource("SSWAV06.wav")
a1=GetChannel(a,1)
a2=a1.Amplify(-1)
a3=a2.Amplify(-1)
a4=a3.Amplify(-1).Amplify(-1)
a5=a4.Amplify(-1).Amplify(-1)
a6=a5.Amplify(-1).Amplify(-1)
MergeChannels(a1,a2,a3,a4,a5,a6)

<capwav.cmd>
bepipe.exe --script "import(^shift360.avs^)">6ch380sft.wav

Audacity in max magnified scale on 48khz 6~sec 6ch wav clip
. 0.00001 sec increment view :: 0.00001 * 48000hz :: 0.48sample or cycle
. no advance with all 6ch(except a2 exactly inverted), identical

So all the - signed mix in similar scripts/language might also be the simple invert(), no advance in the phase*time domain.
If this is true, all the existing s/w DPL II emulations are using invert() only : partial implementations : no 90 deg phase shifts
Also note that the Hilbert() used in the quoted matlab script is not a built-in function implying the test result having no basis at all.
I believe that's enough for the verification.

I need to find a way to use the PhaseBugMono correctly :
. assuming it being the allpass phase shift filter
http://www.harmony-central.com/Effec...hase_Shifting/
http://en.wikipedia.org/wiki/Phase_shifting
. mapping the input scale(0.000~1.000) to +-90 & +-180 deg scales : it's almost random (to me)
. synchronizing(aligning) the filtered channels to the exact phase*time domain of the clip
. or find other filters to do it more efficiently & effectively.
. or use other environment(tools)

It's taking time...
__________________
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; 12th June 2006 at 23:25.
Rockaria is offline   Reply With Quote
Old 13th June 2006, 06:25   #53  |  Link
raquete
Registered User
 
Join Date: Nov 2004
Posts: 741
from Phase_Shifting article:
"To create the notches, we only need to mix the allpass filters output with the input....So when we mix a delayed copy of the signal with the original, there will be notches at equally spaced frequencies. This is exactly how the flanger operates, and thus, the flanger is merely one type of a phase shifter."
i can "proove" it!
in 1981 i did one miraculous phaser for guitar(inside analog sintesizer) that had 8 all pass filters turning like spiral using 8 FETs(2n3819 if i right remember) and 8 operational amplifiers(741) !

good link and another cool post Rockaria, thanks.
raquete is offline   Reply With Quote
Old 14th June 2006, 05:49   #54  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
A very good news before my conclusion prior to the OPEN varifications if needed.

The invert(), -90 deg phase shift(PhaseBug, allpass filter) and the coefficients did the tric!
The earlier mentioned simplest model with -90 phase shift played by far the closest to the AC3 6ch out mode.
Code:
<m11> adjusted : no relations between the coefs, polarity between the channel : simple coefs mix
Lt = mix(Lf.0, C.0, *Ls1.-90, *Rs2.-90) == mix(Lf, C, *mix(Ls1, Rs2).-90)
Rt = mix(Rf.0, C.0, Ls2.-90, Rs1.-90) == mix(Rf, C, mix(Ls2, Rs1).-90)
Firstly over 95 % of the rear stereo seperation leaded the rest channels seperation further around 85%, considering the center/lfe are inherently unable to be seperated perfectly(simple mix). Now we can say the 90deg shift model reconstructs the channels over 90%.

<PhaseBug>
I had to mess around with the PhaseBugMono input scales to best map to the degrees and the amount of the delay to be adjusted.
. 48k/44.1k PhaseBug value 0.322 shifts -90deg
. 360 deg(4time) advances 0.256 sec
. -90 deg advances 0.064 sec
. +-180(2times of 90deg shifts) deg advances 0.128 sec
. +90(270 : 3times of -90deg shifts) deg advances 0.192 sec
. somebody might be able to theorize and establish a more accurate formula

<6ch source>
I chose the previously mentioned winamp5 bundled aac 'Hey Buddy.....aac' because it's open and by far one of the best clip having variety/clear channel harmony.
. transcoded to ogg -q5 6ch with foobar to be imported in the Audacity.
. the channel order might be different depending on the ogg cli encoder versions. but can be easily verified within Audacity.

<fronts stereo mix>
I made the front mix in a seperate project first because the rear can be simply mixed with the front mix again to make a complete DPL II
. copied L,R,C,LFE to a new project named front. L & R already set to correct channel attributes when imported.
. center -3dB, LFE as it is(kinda low initially)
. performed the quickMix() & played to verify : OK

<rear stereo mix>
I made a rear mix to make a complete mix with the prior front mix
. copied the rears to a new project named rear ans set the channel names/attributes to Ls1 & Rs1 : -3dB
. duplicated the Ls1 to Ls2 having the channel attribute to Right, Rs1 to Rs2 attributed to Left : -9dB
. performed invert() on Ls1 & Rs2
. performed the PhaseBugMono 90deg shifts on all the coefficients(0.322)
. performed the cut() of the beginning 0.064sec(align() also can do it) on all the coefs
. performed the quickMix() & played to verify : it played clearly on each rear speakers.

<complete mix>
I made a complete mix and exported to complete.ogg
. copy the front streo mix to the rear & played to verify : almost identical to the original AC3 out mode
. perform the quickMix() & played to verify : same , now safe to export to complete.ogg.

<remaining issues>
. the worldcup
. refine the models for further test : well, I think the coefs did the 'rear stereo channel seperation algo' perfectly.
. OPENing the conclusion & result : the best way is 'DIY' but can share the clips by email requests.
. Theorizing(formulating) the process and automation(programming) : will discuss some time later

@raquete, thanks for the confirmation(allpass filter) and I want to let you guys know that all the cricial issues are hinted by ursamtl in just few words.
We did some research, reasoning and tried to adapt to the facts and tools....
Also there might be some mistakes I couldn't catch. Any corrections will be apprciated.

Thanks.

[edit] flawed! the rear cancellation occured(in the beginning on Ls). check below details.
[edit jun14] I meant it that we cannot conclude the best model, not flawed in the approach.
[edit Jun17] verified PhaseBugMono(0.322) = -90 deg shift, as said in a Dolby's doc.
[edit Jun18) typo on the model
__________________
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; 18th June 2006 at 16:21.
Rockaria is offline   Reply With Quote
Old 14th June 2006, 17:33   #55  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
Well, it seems too earlier to draw the conclusions. I admit above tests contains some flaws, not enough considerations.
The major problem is the CANCELLATIONS occured when merging the front and rear.inv.90deg-shfted stereos, killing the surround images.(especially the Ls in the beginning). We still need to refine the models and procedures.

. when reviewing the rear channels while phase shfting, I see the image spinning on the time-axis.
. the 90 phase shifted images also contains somewhat altered informations which might be CANCELLED/ALTERED when merged with other channel images which also contains informations on the same phase zones.
. if I understand it correctly, all the channel images reviewed have some directional information(not totally round or flat on the time-aixs, phase shifts imbeded initially), as what DarkAvenger introduced, which might lead to the perfect rear seperation impossible inherently, without any proper mastering maybe.

I's gonna take far more time for me, especially these days....step by step....well, It couldn't be that simple...
__________________
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; 14th June 2006 at 18:04.
Rockaria is offline   Reply With Quote
Old 14th June 2006, 20:14   #56  |  Link
3dsnar
Registered User
 
3dsnar's Avatar
 
Join Date: Dec 2005
Location: Proxima Centauri
Posts: 315
Quote:
Originally Posted by Rockaria
Also note that the Hilbert() used in the quoted matlab script is not a built-in function implying the test result having no basis at all.
1) hilbert(...) one of the functions from signal processing toolbox
http://www.mathworks.com/access/help...l/hilbert.html
2) you can view phase shift as a time delay, but also as an instantaneous operation. I.e. cosinusoid can be viewed as a time shifted sinusoid. Since in digital spectrum, signal is represented as a set of sinusoids/cosinusoids, thus appropriate time shift of each component is equal to instantaneous operation. Hence both are equivelent.
__________________
Aud-X MP3 5.1 Format
3dsnar is offline   Reply With Quote
Old 14th June 2006, 21:19   #57  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
Quote:
Originally Posted by 3dsnar
hilbert(...) one of the functions from signal processing toolbox
OK. Now I see, it is included in a related mathwotk package implying it should perform 90deg shifts correctly on all the inner waves(frequencies) with some delay.
Quote:
Originally Posted by 3dsnar
you can view phase shift as a time delay, but also as an instantaneous operation
I agree we can have different interpretations and applications depending on the point of views, if we can ignore the time(frequency cycle) advance.

But what matters here is, how Dolby used the definitions for the DPL(II) encoding.
. how did you interpret the dolby's DPL I diagram in your formula?
. the - sign in the formula, interpreted as -180deg shift in your formula, actually works as invert() or -180 deg shift with the mathlab script?
. the 90 deg shift as +90 deg shift withs *1/4 cycle advance or something else?
(*1/4cycle : minimum sync cycles +1/4 cycle of the lowest freq.)
__________________
u know everything in the end, or now if aligned... no right(x).right(y) pls. it's confusing... : phase-shift /Jun.2006
Rockaria is offline   Reply With Quote
Old 14th June 2006, 21:45   #58  |  Link
3dsnar
Registered User
 
3dsnar's Avatar
 
Join Date: Dec 2005
Location: Proxima Centauri
Posts: 315
As I understand Dolby recommendations (which identical to Tebasuna's interpretation) that the 90 deg. shift is necessary as some preprocessing operation. I.e. it depends on the signal, and may or may not be applied to achieve the best separation during DPLII decoding. For example, probably in the example that I provided, the 5.1 input had already properly shifted FL and FR signals. But in some cases it may be necessary.
If I am correct, such speculation probably implies that during the decoding phase, the inversion of 90 deg. shift is not applied. Since the decoder cannot assume what was the original signal.
It requires some tests. But I think we are pretty close to find out how is it done.
- 180 deg. shift is identical (from mathematical point of view) to sign change. For example if you would apply the hilbert transform twice, than you would obtain something identical to the sign change (with some numerical error differences, which can be ommited).

imag(hilbert(s)) is like converting sinus to minus cosinus. And it is applied to all sinusoidal components of the input signal.

This is frequency dependent operation, which means that with the increase of frequency, the time shift gets smaller (since period duration decreases). I think that dolby is talking about the same thing. Especially because they refer to the hilbert transoform (which is applied in time domain as convolutive filtration, but this is the same to the FFT based operation used in matlab).
__________________
Aud-X MP3 5.1 Format
3dsnar is offline   Reply With Quote
Old 15th June 2006, 00:48   #59  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
Quote:
Originally Posted by Tebasuna51 identical to 3dsnar's
Matrix 1 (like BeSweet/Azid)
LT = L + 0.7 C - 0.8 SL - 0.5 SR
RT = R + 0.7 C + 0.5 SL + 0.8 SR

Matrix 3 (with inverted signs for back channels)
LT = L + 0.7 C + 0.8 SL + 0.5 SR
RT = R + 0.7 C - 0.5 SL - 0.8 SR
Isn't it too early to say/believe something/somebody is right or wrong?
I believe it just tends to lead to the simple justifications making things ambiguous again..
We are just guessing(interpreting) and testing to figure out the best model for DPL II decoders.
What matters here is the correct OPEN approach to figure out the uncertain matters.

We may not be sure if those rear shifts are meant for the channel seperations in 5.1 DD(I strongly doubt it).
But they may just have some directions by the mic positions(unintended side effects), but certainly not intended for the DPL II channel seperations.

But if you regard the - sign above(180deg phase shift initially to easy implement & replace the 90deg shifts) as the invert() now,
isn't it too dangerous to genralize the formula(without the 90deg shifts) to be used for the general type of clips?
Another irony is Tebasuna seems to have experienced the Matrix3 generally better than the same Matrix1(yours)...

Anyway, if we have to align the shifted channels(like I did), it might have a similar effect as the instantanuous half-flipping.
Maybe I need some more research and tests to understand & implement 'how the 90deg phase shifts works in DPL II with the coefs'.
[edit] moved to http://forum.doom9.org/showpost.php?...8&postcount=65[/edit]

[edit]
The quoted type of models with LS.invert() only(without the 90deg shifts) actually produces unbalanced volumes on the fronts as I theoretically proved before.
Now I am clearly excluding them from the candidate list.
The Matrix1 showed Lf < Rf while the Matrix3 showed Lf > Rf.
The closest-Dolby model <m11> showed no such unbalances.
Also my 90deg version <m21> showed no such unbalance but showed not enough seperation of the rear : rears mixed to fronts.

I want to temporarily conclude the <m11> is the most faithful & simplest model so far, until we get any progress.
Code:
<m11> no other relations between the coefs, polarity between the channel, coefs +90 deg off from the fronts
Lt = mix(Lf.0, C.0, *Ls1.-90, *Rs2.-90) == mix(Lf, C, *mix(Ls1, Rs2).-90)
Rt = mix(Rf.0, C.0, Ls2.-90, Rs1.-90) == mix(Rf, C, mix(Ls2, Rs1).-90)

When * == invert(), -90 == 1/4 phase shift
[edit Jun17] verified PhaseBugMono(0.322) = -90 deg shift, as said in a Dolby's doc.
[eidt Jun18] typo on the model
__________________
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; 18th June 2006 at 16:22.
Rockaria is offline   Reply With Quote
Old 15th June 2006, 04:29   #60  |  Link
raquete
Registered User
 
Join Date: Nov 2004
Posts: 741
i can't do good questions/answers in english then...
the colors in this screenshot are showing the details that are relevants for me, i will this help the thread:


i understand "can be" as "we can" and not as " (we) have to".
please,comments and corrections in my "colored details".

no answers:
and reading lots of .pds from Dolby.Inc i can't find answer for this question:
is -90 or +90 degrees?

thanks.
raquete 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 02:55.


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