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

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



- GreenEyez - 2012-02-05

11.12 Cat drivers also work fine with this patched version of XBMC, just to let you know.


- DanielaE - 2012-02-05

a11599 Wrote:I just have two movies with dts-ma so that's all I could test but one thing I noticed is that the audio packets are calculated to be of 170.67 ms duration in CDVDPlayerAudio:: DecodeFrame() because audioframe.size is 32768 (it is 2048 for dts core). The invalid duration can cause audio sync issues with drop/dupe packet sync method. I think the packet duration should be the same 10.67 ms for all (?) dts fomats because HD formats are "just" added on top of core so it seems logical that the duration is also the same (although I was unable to find any specs on this).
Thanks for testing! While I have cherry-picked your patch into my repo to play with it for a while, I came to the conclusion that neither the original code nor your fix is correct - for two reasons:

  1. The idea of calculating the duration of an audio frame is a linear function of the size of a chunk of data is true for coding schemes with constant coding gain only. None of the codecs in question has this property. Thusly the calculated duration is a raw estimate - at best. Even more so after pushing it through the output muxer.
  2. The DTS coding scheme has a multiple frame sizes (but I may be wrong here)
Basically, this mess is due to a hierarchy violation in the code abstraction layers. The duration of an audio frame must be supplied by the active codec rather than figured out at an codec-agnostic level which simply put has no real clue on how to accomplish that in the first place.


- DanielaE - 2012-02-05

meridius Wrote:Hi I am using 11.9 as that was the most stable for me as 11.10 had video problems

The AMD HDMI audio driver seems pretty much independent of the rest of the Catalyst package. You may pull it out of the package and save it away for use with different versions of video drivers. This is basically what I did to switch back and forth between AMD HDMI audio and Realtek HDMI audio. XBMC works with both of them here on Windows 7 and Windows 8 - no strings attached, no funny external codec packs required, straight out of the box.


True-HD and Make MKV - dmbmay98 - 2012-02-05

Like a lot of people in this thread I was having issues with true hd. It was out of sync and video issues. I was using MakeMKV to rip these blu ray. I re-ripped the movie using DVDFAB 8 qt. I no longer am having the issue.

So far this has worked for the Dark Knight. Hopefully this will help others.


- Zaxx40 - 2012-02-05

Hi Everyone,


I am stuck. I removed Eden 2 and installed the new version from the link provided. I still not see the option available for DTSMA and Dolby True HD. Only DD and DTS. Not sure what I am doing wrong.


- GreenEyez - 2012-02-05

Try removing your guisettings.xml from the userdata folder.


- DDDamian - 2012-02-05

DanielaE Wrote:The AMD HDMI audio driver seems pretty much independent of the rest of the Catalyst package. You may pull it out of the package and save it away for use with different versions of video drivers. This is basically what I did to switch back and forth between AMD HDMI audio and Realtek HDMI audio. XBMC works with both of them here on Windows 7 and Windows 8 - no strings attached, no funny external codec packs required, straight out of the box.

@meridius @DanielaE - correct it's an independent entity. I've tried previous versions of both the ATI/AMD and Realtek drivers while working on the output sink for WASAPI in AE.

@meridius - the only real issue the latest driver (version 7.12.0.7705 12/6/2011) fixed in my testing was with 88.2 & 176.4khz audio - reported as supported in the driver panel, as well as by the GetSupported() WASAPI method but rejected on actual initialization as unsupported. Corrected in that version. These sample rates are pretty exclusive to SACD DSD/PCM conversion, so if you don't use SACD rips I saw no other benefit.


- DDDamian - 2012-02-05

DanielaE Wrote:Thanks for testing! While I have cherry-picked your patch into my repo to play with it for a while, I came to the conclusion that neither the original code nor your fix is correct - for two reasons:

  1. The idea of calculating the duration of an audio frame is a linear function of the size of a chunk of data is true for coding schemes with constant coding gain only. None of the codecs in question has this property. Thusly the calculated duration is a raw estimate - at best. Even more so after pushing it through the output muxer.
  2. The DTS coding scheme has a multiple frame sizes (but I may be wrong here)
Basically, this mess is due to a hierarchy violation in the code abstraction layers. The duration of an audio frame must be supplied by the active codec rather than figured out at an codec-agnostic level which simply put has no real clue on how to accomplish that in the first place.

@DanielaE - that's very much an issue. From what I've found the DTS-MA extended info is variable-length data. There's currently guesswork even in the AE code. More guesswork is involved in TrueHD decoding - both formats are locked at 16bit, and I have samples of TrueHD in 24bit.

As you say, there are hierarchy issues here - info should be passed from the decoder methods and instead is hard-coded after the fact in the audio handlers.


- Vapour - 2012-02-05

Got this working perfectly, thanks to those who helped!!!!
And a massive thanks to the OP for creatingthis patch.

My question now is:

I have my htpc set up in my dedicated cinema room, works perfectly in there, hd audio, perfect picture. I also have the htpc runnin through a matrix switch to another tv in the in living room. Now I've installed this patch I can't get audio in the living room without changing some settings. Why is that? Any ideas? Patch related?
Not a huge issue, I'm just curious


- Zaxx40 - 2012-02-05

I do not have a guisetting.xml in the xbmc user data folder


- DDDamian - 2012-02-05

Zaxx40 Wrote:I do not have a guisetting.xml in the xbmc user data folder

Does your Audio screen look like that in the first post? If not, you're either running it from the wrong directory/wrong version or as greeneyez suggested, you have a problem with guisettings.xml. You need to find that. In Windows its under c:\users\yourlogin\appdata\roaming\XBMC\userdata.

Rename it, re-install from the link on the first page, and make sure you run that version, so watch where you tell it to install.

Here's a Wiki-link to where your userdata is: http://wiki.xbmc.org/index.php?title=Userdata


- bluray - 2012-02-05

meridius Wrote:Why did u update was there problems with other drivers and if so what where they and driver version.

Was wondering what 12.1 had over the older driver.

Chees
For me, I updated it to 12.1 because it is available. It works great!


- coresw - 2012-02-05

What exactly is this feature?


- bluray - 2012-02-05

Zaxx40 Wrote:Hi Everyone,


I am stuck. I removed Eden 2 and installed the new version from the link provided. I still not see the option available for DTSMA and Dolby True HD. Only DD and DTS. Not sure what I am doing wrong.
Did you do these?

1. Connect your system this way- HTPC-->AVR-->HDTV via two HDMI cables, and set your AVR to pass-thru video.
2. Update your graphic driver
3. Select proper HDMI output in W7 control panel


- bluray - 2012-02-05

coresw Wrote:What exactly is this feature?
DTS-HD and TrueHD audio's.....