Kodi Community Forum
[WINDOWS][PATCH]Bitstream output of HD audio formats - Printable Version

+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+--- Thread: [WINDOWS][PATCH]Bitstream output of HD audio formats (/showthread.php?tid=121877)



[WINDOWS][PATCH]Bitstream output of HD audio formats - DanielaE - 2012-02-03 21:00

In case anybody is interested, I've created a small patch to the main development trunk to enable HD audio bitstreaming for my (still-in-the-works) HTPC project. This is not a competitor to the much more ambitious AE branch, but rather a stability and feature patch which affects the trunk code as little as possible.

Test system:
  • AMD Fusion E-350 running Windows 8 DP 32bit, Realtek HDMI audio
  • Yamaha RX-V1900
  • Pulse-Eight CEC-USB adapter
tests were also run with AMD Catalyst HDMI audio driver and on Windows 7 HP 64bit

Added features:
  • Bitstream output to HDMI for Dolby Digital Plus, Dolby TrueHD, DTS-HD HR & MA, Meridian Lossless Packing
  • DTS core bitstreaming of DTS-HD audio to non-DTS-HD-capable equipment
Caution: I've enhanced the Windows WASAPI and DirectSound renderers only. Audio renderers for other platforms need some loving by interested parties!

Stability Fixes:
  • Fix buffer overruns when muxing MAT frames (Dolby TrueHD, Meridian Lossless Packing)
  • Fix wrong frame length calculation in passthrough of 14-bit-encoded DTS streams
  • Work around seemingly broken Dolby Digital Plus output to Realtek HDMI audio driver
Tested audio formats:
  • Dolby Digital Plus up to 7.1 48kHz 16bit
  • Dolby TrueHD up to 7.1 48kHz 24bit, also with interleaved AC3
  • DTS-HD up to 7.1 96kHz 24bit, also with DTS-96/24 core up to 6.1
  • Meridian Lossless Packing up to 5.1 176.4kHz 24bit
Audio files were either raw files or muxed streams in MKV, M2TS, MKA, or WAV container.
Dolby audio test files come from well-renowned internet sources.
DTS audio test files come from well-renowned internet sources, or were encoded by myself.
MLP audio test files are from DVD-Audio disks.

Additional GUI settings:

When output to HDMI is selected, bitstream output of high-res audio formats becomes enabled:

[Image: screenshot000.jpg]

In case of DTS, the maximum supported DTS format of the connected DTS decoder may be selected. Unsupported DTS formats may be output as core bitstream then, or as LPCM decoded by XBMC:

[Image: screenshot001.jpg]

Bitstreaming is not enabled for the XBMC music player (yet), but for testing purposes all of the above audio formats may be played with XBMC's video player.

Links:
Source: on GitHub
Binaries (Windows installer):


- DDDamian - 2012-02-03 21:21

Welcome to the forums. I think you've just made a lot of friends Laugh

Will test when I get a chance on: Win 7 x64, ATI 6450, AMD 7.12.0.7705 drivers dated 12/6/2011 (believed latest), HDMI to a Denon 3808CI receiver supporting all formats.

NOTE: Link to Eden RC2 + Daniela's excellent HD Audio patch


- DDDamian - 2012-02-03 21:34

Confirmed working on:
DTS-MA
Dolby TrueHD
DTS 1500kbps

haven't tested MLP yet (just have to re-rip a DVD-A, all mine are converted to mc FLAC)

In a word - brilliant!! Add in 24-bit audio via PAPlayer and you have advanced XBMC audio light-years!


- Memphiz - 2012-02-03 21:37

We want it on iOS and OSX Big Grin


- DDDamian - 2012-02-03 21:41

@Daniela - for a first post in the forums this is an amazing achievement! Wow- that was out of the blue. Great work - let's see how other's fare testing it, but my tests worked like a charm.


- bluray - 2012-02-03 22:01

Thanks for great work....welcome to the forum. If my kids and wife let me get on E350 tonight, I'll try it! Smile


- steelman1991 - 2012-02-03 22:18

Got to agree with DDDamien an outstanding first contrubution - where have you been hiding these past months.

At the risk of tempting fate - this works perfectly on my set-up

ATI 5670, Onkyo 805 receiver (5.1)

Your going to make lots of new friends very quickly

Great work


- Wanilton - 2012-02-03 22:25

Great work, this run fine here, using onkyo 705 (5.1), ATI 5450...

congratulations...well done.

Wanilton


- meridius - 2012-02-03 22:28

Was just wondering does this have any sync problems as xbmc 10 you have to delay my dts audio by 200ms when sync video to source is used.

Also can this be used in xbmc 10 or is this a complete new install of xbmc.

Cheers and fantastic work


- DDDamian - 2012-02-03 22:43

meridius Wrote:Was just wondering does this have any sync problems as xbmc 10 you have to delay my dts audio by 200ms when sync video to source is used.

Also can this be used in xbmc 10 or is this a complete new install of xbmc.

It's a new install. I saw a slight sync issue on a TrueHD sample, perfect on DTS-MA, but every setup is different and depends on video-processing in receiver and TV


- paavor - 2012-02-03 22:50

Just a quick test with nVidia GTS 450 / HDMI / WASAPI / W2008R2 / Onkyo TX SR608 (using 5.1 speakers).

This seems to work fine with DTS-MA and other "regular" formats, but a small audio sync problem with TrueHD. Easy to fix though and I had only 2 TrueHD movies to test. Perfect with DTS-MA.

Note, that this upgrades database from ver 58 to 60, if you install this over Eden Beta 2.

Great work for the unpatient ones. Big Grin


- Slipx - 2012-02-03 22:52

Absolutely brilliant !!

Working fine on Intel Core i3 and Denon AVR-2310. I use sync to video and have a delay of 225ms as per the previous beta 2 I was running.


- steelman1991 - 2012-02-03 22:53

DDDamian Wrote:It's a new install. I saw a slight sync issue on a TrueHD sample, perfect on DTS-MA, but every setup is different and depends on video-processing in receiver and TV
Noticed a number of drop frames on Cars (TrueHD track), other TrueHD tracks work perfectly. Agreed about DTS-MA tracks.


- DDDamian - 2012-02-03 22:55

Ah yes - I see the database change. Good you pointed that out in case anyone tries it and needs to revert.


- discinabq - 2012-02-04 00:26

Great Job - Will test with my win 7 x86 | GT430 | Integra DTR 5.9 when i get home