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 > Hardware & Software > Software players

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th January 2020, 11:41   #1  |  Link
pistacho
Registered User
 
Join Date: Feb 2010
Location: Spain
Posts: 493
KODI 19.0 Matrix HDR Windows API

This is a fork of Kodi 19.0 "Matrix" version that adds full HDR support with maximum image quality and HDR10 metadata passthrough in Windows 10 and UWP.

Because we are in January 2020 and Kodi does not have (yet) an official version that supports playing 4K HDR content for Windows 10, I created this fork, as a personal initiative to cover this important lack in the official version.

The source code is publicly available and has also been sent to "Kodi Team" to be merged (if they want).




KEY FEATURES
  • Maximum 4K image quality with passthrough of HDR10 metadata perfectly (independently verified with HDMI analyzer).
  • Perfect adjustment of the display refresh rate to match with content: 23,976 fps, 24,000 fps, etc.
  • No need to install external programs or addons. MadVR, MPC-HC, LAV filters, DSPlayer are not needed.
  • Can activate the "Windows HDR switch" of the display settings from the Kodi power menu with the remote control or activate it automatically when opening Kodi (advancedsettings.xml).
  • Play the SDR content correctly with the Windows HDR switch ON, although it is recommended for maximum quality to play the SDR content with the Windows HDR switch OFF.
  • On systems that do not have an HDR display, it reproduces HDR content by performing tone mapping in both DXVA and pixel shaders (HDR to SDR conversion).
  • Fixed important bugs in the tone mapping function present in the official versions of Kodi 18.5 and 19.0: very dark image or washed colors.
  • It supports the HLG (Hybrid Log-Gamma) format used for HDR in Live TV broadcasts. Compatible with the "IPTV PVR Simple client" addon but in the future more addons can be created / updated supporting it.
  • All HDR functionality has been implemented using only the standard Microsoft Windows API. It does not use pre-compiled external libraries or proprietary APIs from Intel or Nvidia. It does not use hacks that only work for a specific type of HW, therefore, it is highly compatible with most Intel, Nvidia, AMD or Ryzen HDMI 2.0 graphics cards.


Tested on Intel NUC 8i3BEK + Denon AVX-1600H + Sony TV KD-55AG9 OLED.


DOWNLOAD

https://github.com/thexai/xbmc/releases



CHANGE LOG

Code:
Version 1.8.1
Updated at 23-01-2020 (forked from Kodi 19 alpha master).

Fix NVIDIA HDR refresh rate match (tearing).
Updated with latest master branch commits.


Version 1.8.0
Updated at 18-01-2020 (forked from Kodi 19 alpha master).

Improves stability in NVIDIA HDR full screen switching.
Improves detection of HDR display in some multi-screen escenarios.


Version 1.7.5
Updated at 14-01-2020 (forked from Kodi 19 alpha master).

Updated with latest master branch commits. Fix some crashes due recent libraries updates.
No changes in HDR code.


Version 1.7.4
Updated at 10-01-2020 (forked from Kodi 19 alpha master).

New advancedsettings option 'autoHDR' to turn on display HDR when Kodi starts.

(Copy or create text file advancedsettings.xml and place in Kodi 'userdata' folder)


Version 1.7.3
Updated at 07-01-2020 (forked from Kodi 19 alpha master).

Rebased to latest master. Now includes libbluray 1.1.2


Version 1.7.2
Updated at 06-01-2020 (forked from Kodi 19 alpha master).

Eliminate rounding errors when handling HDR metadata.
Updated with latest master branch commits.


Version 1.7.1
Updated at 05-01-2020 (forked from Kodi 19 alpha master).

Power options menu closes dialog when toggle HDR is done.
Code cleanup.


Version 1.7.0
Updated at 04-01-2020 (forked from Kodi 19 alpha master).

Toggle display HDR on/off without restart.
Internal code improvements.
Fixed: small incorrectness DXVA HW tone mapping (clipped high luminance values).


Version 1.6.1
Updated at 31-12-2019 (forked from Kodi 19 alpha master).

Some performance improvements.
Internal code changes and refactorings.


Version 1.6.0
Updated at 27-12-2019 (forked from Kodi 19 alpha master).

Fixed: bad image when is used pixel shaders render method in HDR source to SDR render.
Several internal changes that do not affect functionality but are necessary to merge with Kodi master branch.


Version 1.5.1
Updated at 26-12-2019 (forked from Kodi 19 alpha master).

Fixed: bad image when is used pixel shaders render method in HDR mode.
Improved: prevents use tone mapping when HDR is active (regardless of settings).


Version 1.5.0
Updated at 24-12-2019 (forked from Kodi 19 alpha master).

NEW: Toggles Windows HDR On/Off from power options menu.


Version 1.4.1
Updated at 19-12-2019 (forked from Kodi 19 alpha master).

Fixed: very dark image in HDR10 to SRD conversion using DXVA HW tone mapping.


Version 1.4.0
Updated at 19-12-2019 (forked from Kodi 19 alpha master).

Added support for HLG (Hybrid Log-Gamma) and Rec.2020 for Live TV


Version 1.3.0
Updated at 14-12-2019 (forked from Kodi 19 alpha master).

Improved the detection of some HDR10 streams (The Mandalorian).
Improved handle of changes in metadata at middle of stream.


Version 1.2.0
Updated at 11-12-2019 (forked from Kodi 19 alpha master).

Fixed: Some streams 4K BT.2020 are incorrect detected as HDR resulting in bad image (live IPTV).
Various improvements.


Version 1.1.0
Updated at 08-12-2019 (forked from Kodi 19 alpha master).

New: Handle changes in static HDR metadata.
New: Python 2 & Python 3 compatible versions.   


Version 1.0.0:
Updated at 06-12-2019 (forked from Kodi 19 alpha master).

First release.

Last edited by pistacho; Today at 10:50. Reason: new version
pistacho is offline   Reply With Quote
Old 19th January 2020, 12:34   #2  |  Link
Klaus1189
Registered User
 
Join Date: Feb 2015
Location: Bavaria
Posts: 817
I tested it, but again (I tested Kodi HDR builds already earlier) the HDR image is very greyisch when playing HDR videos, HDR is enabled in windows wia toggle in kodi and TV also shows HDR in OSD.
What do I do wrong here?

I deleted the old Kodi profile folder and used new settings, but the issue appears again like on the older builds.

MPC-BE with madVR looks OK here, but with wrong color because the 5700 XT has the BT2020 issue.
Klaus1189 is offline   Reply With Quote
Old 19th January 2020, 12:46   #3  |  Link
pistacho
Registered User
 
Join Date: Feb 2010
Location: Spain
Posts: 493
Some specific models of graphics cards and some drivers have serious bugs.

"MPC-BE with madVR looks OK here, but with wrong color" OK with wrong color = NG

=> "MPC-BE with madVR also has problems with in my setup"
pistacho is offline   Reply With Quote
Old 19th January 2020, 12:52   #4  |  Link
Klaus1189
Registered User
 
Join Date: Feb 2015
Location: Bavaria
Posts: 817
I tested HDR videos from YouTube, some Samsung HDR testclips and some UHD Blu-rays, but every video is displayed very greyisch and TV is showing HDR in OSD info. With very greyisch I mean very, like displaying HDR video on SDR mode of TV and madVR not doing anything HDR related.

madVR should not have problems at all. I use it for several years now and the only thing is the 5700 XT BT.2020 bug in the drivers up to now. What problems do you have?
Klaus1189 is offline   Reply With Quote
Old 19th January 2020, 13:43   #5  |  Link
pistacho
Registered User
 
Join Date: Feb 2010
Location: Spain
Posts: 493
Quote:
Originally Posted by Klaus1189 View Post
What problems do you have?
With my HW I have no problem:

Intel NUC 8i3BEK + Denon AVX-1600H + Sony TV KD-55AG9 OLED.

also

Nvidia GTX1650 + Denon AVX-1600H + Sony TV KD-55AG9


With this HW, Kodi HDR version works perfect. I don't need madVR at all (I've never tried it).
pistacho is offline   Reply With Quote
Old 19th January 2020, 15:10   #6  |  Link
pistacho
Registered User
 
Join Date: Feb 2010
Location: Spain
Posts: 493
Quote:
Originally Posted by Klaus1189 View Post
the HDR image is very greyisch when playing HDR videos, HDR is enabled in windows wia toggle in kodi and TV also shows HDR in OSD.
What do I do wrong here?
For some odd reason seems Kodi is not detecting HDR capable display in your system.

Check this log line at startup:

Code:
2020-01-18 17:30:04.446 T:8760  NOTICE: -----------------------------------------------------------------------
2020-01-18 17:30:04.446 T:8760  NOTICE: Starting Kodi (19.0-ALPHA1 Git:20200114-2698a89bb6). Platform: Windows NT x86 64-bit
2020-01-18 17:30:04.446 T:8760  NOTICE: Using Release Kodi x64 build
2020-01-18 17:30:04.446 T:8760  NOTICE: Kodi compiled 2020-01-14 by MSVC 191627034 for Windows NT x86 64-bit version 10.0 (0x0A000007)
2020-01-18 17:30:04.446 T:8760  NOTICE: Running on Windows 10, kernel: Windows NT x86 64-bit version 10.0.18362
2020-01-18 17:30:04.446 T:8760  NOTICE: FFmpeg version/source: 4.0.4-Kodi
2020-01-18 17:30:04.446 T:8760  NOTICE: Host CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz, 8 cores available
2020-01-18 17:30:04.446 T:8760  NOTICE: Desktop Resolution: 1920x1200 32Bit at 59Hz
2020-01-18 17:30:04.446 T:8760  NOTICE: Running with restricted rights
2020-01-18 17:30:04.446 T:8760  NOTICE: Aero is enabled
2020-01-18 17:30:04.446 T:8760  NOTICE: HDR Display capable is detected and Windows HDR switch is ON
pistacho is offline   Reply With Quote
Old 19th January 2020, 16:20   #7  |  Link
Klaus1189
Registered User
 
Join Date: Feb 2015
Location: Bavaria
Posts: 817
I enabled debug logging and opened the kodi.log in \AppData\Roaming\Kodi and there is exactly the red marked line in it.
If I disable the windows HDR switch, the video looks better, but still washed out, since HDR is presented as SDR without any processing of HDR metadata.
If I enable the windows switch in Kodi menu, the video looks much more greyisch. So I come to the point where I don't know any further.
Klaus1189 is offline   Reply With Quote
Old 19th January 2020, 16:46   #8  |  Link
pistacho
Registered User
 
Join Date: Feb 2010
Location: Spain
Posts: 493
It is clear that this is not how it has to work.

For some reason it is not going well in your system but i don't know what is happening...

Other users with AMD graphics have reported that works OK. (e.g. AMD RX580)

Last edited by pistacho; 19th January 2020 at 16:50.
pistacho is offline   Reply With Quote
Old 19th January 2020, 17:35   #9  |  Link
Klaus1189
Registered User
 
Join Date: Feb 2015
Location: Bavaria
Posts: 817
As already mentioned I have currently a RX 5700 XT. Has anybody with that card got it working? Probably PEBCAK?
Klaus1189 is offline   Reply With Quote
Old 19th January 2020, 19:04   #10  |  Link
pistacho
Registered User
 
Join Date: Feb 2010
Location: Spain
Posts: 493
I don't know.

People only write in forums when they have issues. If someone works OK with RX 5700 XT, he hasn't said it yet.
pistacho is offline   Reply With Quote
Old Today, 10:52   #11  |  Link
pistacho
Registered User
 
Join Date: Feb 2010
Location: Spain
Posts: 493
Version 1.8.1
Updated at 23-01-2020 (forked from Kodi 19 alpha master).
  • Fix NVIDIA HDR refresh rate match (tearing).
  • Updated with latest master branch commits.
pistacho is offline   Reply With Quote
Reply

Tags
hdr passthrough, hdr player, hdr10, hlg, kodi

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 21:24.


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