razzeee / xbmc-test

0 stars 0 forks source link

AC3/DTS downmixed to Dolby Pro Logic II #10

Closed razzeee closed 7 years ago

razzeee commented 7 years ago

Reported by Gamester17 on 3 Oct 2003 12:11 UTC

AC3 & DTS downmixed to Dolby Pro Logic II

So those without external AC3 or DTS decoder/amp an still enjoy surround sound in Dolby Pro Logic II.

Dolby Pro Logic II downmix http://forum.doom9.org/showthread.php? s=&threadid=57988

The Dolby Pro Logic II downmix used in programs such as Azid.dll, BeSweet, HeadAc3he and AC3Filter, was derived in this thread: http://forum.doom9.org/showthread.php? s=&threadid=27936

A test sample of 5 channels active one at a time, downmixed to 2 channels with this matrix, should be able to be decoded by a Dolby Pro Logic II decoder back to the original 5 channels. However, I have been disappointed by the rear channel separation of the current DPL2 downmix.

The rear channel separation can be improved by altering the 'balance' of the surround channel downmix while maintaining constant power. That is, BL is downmixed more to Lt, while BR is downmixed more to Rt. However, by skewing the balance too much to either side, we lose phase information, resulting in reduced front-back separation.

Here I describe a method for deriving a better DPL2 downmix

Methods Contents of 5.1 AC3 test source 'Avia ac3test' http://www.digital- digest.com/dvd/downloads/trailers.html

code:------------------------------------------------- -------------------------------time (sec) channel contents (announcer says: ) 12-14 L 'left front' 14-16 C 'centre' 16-18 R 'right front' 18-20 BR 'right surround' 20-22 BL 'left surround' 22-24 L 'LFE' LFE [downmix "C:\tmp\BeSweetv1.5b19\BeSweet.exe" -core( - input "c:\tmp\ac3test.DELAY 0ms.ac3" - output "c:\tmp\ac3test.surround2.wav" -2ch - logfilea "C:\tmp\BeSweetv1.5b19\BeSweet.log" ) -azid( - s surround2 -L -3db )

'4.8 dB' downmix Using AC3Filter in GraphEdit. Exact values of surround downmix coefficients are SQRT(3/4) and SQRT(1/4). The surround power difference is triple, hence 4.8 dB

Lt = L + 0.7071 C + 0.7071 LFE - 0.866 BL - 0.5 BR Rt = R + 0.7071 C + 0.7071 LFE + 0.5 BL + 0.866 BR

'6 dB' downmix Lt = L + 0.7071 C + 0.7071 LFE - 0.8944 BL - 0.4472 BR Rt = R + 0.7071 C + 0.7071 LFE + 0.4472 BL + 0.8944 BR

DPL2 decoding as per thread: http://forum.doom9.org/showthread.php? s=&threadid=57736

Notation of decoded channels: L' R' C' LFE' BL' BR'

Screenshots taken from Cool Edit Pro

Separation between channels calculated from difference in total RMS power of 2 sec segments

Results Figures at http://www.geocities.com/bleo98

Figure 1: surround2 BL' 18-20 sec, BR leaks into BL'. Separation ~ 9 dB

Figure 2: 4.8 dB BL' 18-20 sec, more separation between BL' and BR' ~ 26 dB

Figure 3: 6 dB BL' 18-20 sec, even more separation between BL' and BR' ~ 31 dB

Figure 4: 6 dB L' BUT! 20-22 sec, BL leaks into L'!

Figure 5: 4.8 dB L' 20-22 sec, no leakage of BL into L'

Discussion The 4.8 dB downmix provides optimal separation of all 5 channels. I now use this matrix in AC3Filter, but should the azid.dll matrix be changed?

surround2 is quieter because the downmix coefficients were normalised to prevent arithmetic overload. The 4.8 dB and 6 dB coefficients are not normalised. Overload would only occur if all 6 channels were at full scale during EXACTLY the same time sample, which is highly unlikely. In fact, this did not occur during testing with the Lord of the Rings soundtrack.

The 'pulses' every two seconds are steering artifacts: a delay in steering inherent in the decoder's feedback design (?)

DPL2 cannot steer 5 independent channels simultaneously. For example, during 22-24 sec, L contains 'LFE' and LFE contains [rumble](rumble]----------


'surround2'). Note, LFE is supposed to be decoded to C'. However, DPL2 steers BOTH to L' AND C'

Migrated-From: http://trac.kodi.tv/ticket/10

razzeee commented 7 years ago

Comment by gamester17 on 28 Jun 2004 12:41 UTC

Logged In: YES user_id=630186

re-opening since not implemented, (not: "Dolby Pro Logic II")

razzeee commented 7 years ago

Comment by gamester17 on 14 Jul 2004 14:25 UTC

Logged In: YES user_id=630186

FYI, libdts was just now a few hours ago added to FFmpeg so it will then likely be implemented into MPlayer soon too, (but think probebely not until after they released MPlayer-1.0pre5)

razzeee commented 7 years ago

Comment by gamester17 on 27 Jul 2004 14:36 UTC

Logged In: YES user_id=630186

FYI, from MPlayer mailing list (patch isn't yet in MPlayer CVS):

From: Aurelien Jacobs aurel@gnuage.org To: mplayer-dev-eng@mplayerhq.hu
Subject: [PATCH software dts decoding

Hi,

This patch add software dts decoding using libdts ( http://www.videolan.org/dtsdec.html ). It require the very latest libavcodec (FFmpeg) CVS. I've only tested it with dts track of a vob file.

Aurel

Attatched file: MPlayer-dtsdec.diff (6K)

MPlayer-dev-eng mailing list MPlayer-dev-eng@mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng

razzeee commented 7 years ago

Modified by sho on 8 Aug 2008 22:24 UTC

razzeee commented 7 years ago

Modified by sho on 22 Jun 2010 16:26 UTC

razzeee commented 7 years ago

Modified by vdrfan on 6 Feb 2011 17:27 UTC