Provisions for HDR to SDR conversion?
#1
Does Kodi 18 (or maybe 17) have the ability to down-convert HDR content to a generic SDR color palette, perhaps via pixel shaders? If so, how would I go about enabling it? Thanks.
Reply
#2
So I was told Kodi 18 has HDR to SDR color translation. It does have it, and it is working to some degree, but it is not working completely correctly yet. To illustrate, here is what a lossless MKV rip of the Coco UHD Blu-ray looks like. The colors (see especially Miguel’s red hoodie) are still not deep enough to match what the Coco Blu-ray looks like. Only Kodi 17.6 DSPlayer+MadVR is configured appropriately, whose colors look essentially identical to the non-UHD Blu-ray of Coco:

Kodi 18 x64 (March 27th nightly):
Image

Kodi 17.6:
Image

Kodi 17.6 x64 DSPlayer + MadVR (HDR->SDR with pixel shader math, default settings):
Image

Reference image, Kodi 17.6, Coco Blu-ray (non-UHD):
Image

Please fix this. Let me know if you would like me to fill out a bug report. Thanks for all your efforts and support.
Reply
#3
Looks like a lot of this effort is going to be done in panel http://www.avsforum.com/lg-2018-tv-revie...chnicolor/
Reply
#4
(2018-03-28, 21:03)PatK Wrote: Looks like a lot of this effort is going to be done in panel http://www.avsforum.com/lg-2018-tv-revie...chnicolor/

Thanks for the reply and your free voluntary support to users like me. Sorry. I looked for some talk or reference to Kodi in the article and could not find one. Is there something I should be looking for? It is remarkable HDR is making advancements, but my post is with regards to HDR->SDR color translation in Kodi 18 and how it still a little off.
Reply
#5
This is anything but simple. See the discussion here for information on madVR's approach to this (which is improving by the day):

http://www.avsforum.com/forum/24-digital...ector.html
Reply
#6
I completely agree that HDR-to-SDR translation represents a complex mathematic, physical problem to be solved when taking into consideration the variations in display color characteristics as the post you shared so well explains. But when targeting a standard, ideal reference profile as MadVR does with its default settings, the color and brightness of the UHD material should look, for all intents and purposes, transparent and identical compared to the HD material regardless of the display device. The problem I am concerned with is Kodi 18’s current default HDR-to-SDR translation scheme is not appropriately targeting a reference color profile like MadVR does by default. If it did, it would look like MadVR’s pixel shader implementation does at its default settings—colors and brightness levels are essentially identical between UHD and standard Blu-ray discs. Would it be nice that I could use the HDR source’s expanded color gamut to calibrate individually to my display’s own unique color profile? Yes, but I would first like the standard or reference profile of HDR-to-SDR conversion to be correct beforehand. That is what I would hope is fixed before Kodi 18’s public release.
Reply
#7
I would think it best that a colorist grades the source material for SDR and releases that.  Trying to take a release graded for HDR and reproduce mathematically SDR may approximate what a colorist does, but is always going to be a compromise if the goal is "director's intent".   Maybe using HLG instead of PQ in the encoding can make it easier but still is a compromise.   For a consumer, if you have an SDR display, use SDR media.

scott s.
.
Reply
#8
The problem with this sentiment is finding SDR UHD material, which is essentially nil. I (and I am sure many others as well) would simply like to enjoy the benefits of increased resolution of their SDR 4K displays and projectors, minus the benefits of enhanced dynamic brightness that HDR offers. To repeat, I am not after HDR-to-SDR translation that is accurately tuned to my individual display.  As I explain above, all I am after is a more accurate HDR-to-SDR translation to a theoretically ideal SDR display model like MadVR does by default. This can be done accurately. I can provide more screencap examples (actual digital screen captures rather than photos) that show MadVR works in this regard, while Kodi 18, while much improved, is still off.
Reply
#9
(2018-03-28, 23:09)hifihedgehog Wrote: all I am after is a more accurate HDR-to-SDR translation to a theoretically ideal SDR display model like MadVR does by default.

This would be great to have.
Reply
#10
(2018-03-28, 23:09)hifihedgehog Wrote: The problem with this sentiment is finding SDR UHD material, which is essentially nil. I (and I am sure many others as well) would simply like to enjoy the benefits of increased resolution of their SDR 4K displays and projectors, minus the benefits of enhanced dynamic brightness that HDR offers. To repeat, I am not after HDR-to-SDR translation that is accurately tuned to my individual display.  As I explain above, all I am after is a more accurate HDR-to-SDR translation to a theoretically ideal SDR display model like MadVR does by default. This can be done accurately. I can provide more screencap examples (actual digital screen captures rather than photos) that show MadVR works in this regard, while Kodi 18, while much improved, is still off.
HDR -> SDR conversion still retains the emphasis on highlights and maximizing the luminance you have, so the brightness will not look the same as HD material. It will look different, and hopefully, better. It is still using the same process of converting HDR metadata as an UHD display. The only difference is you are limited by the gamut size and luminance of the SDR display. The gamut is not that different, but the luminance can be very different. So this is still HDR technology we are talking about; it is not the same as HD color. madVR's conversion uses the PQ transfer function to complete its tone mapping. Converting to a pure power gamma is an additional step. So its tone mapping is no different than the tone mapping used by an HDR display, and it uses the same standard tone mapping algorithm. This is HDR on a display with limited luminance and a 26% smaller gamut.
Reply
#11
(2018-03-28, 23:09)hifihedgehog Wrote: The problem with this sentiment is finding SDR UHD material, which is essentially nil. I (and I am sure many others as well) would simply like to enjoy the benefits of increased resolution of their SDR 4K displays and projectors, minus the benefits of enhanced dynamic brightness that HDR offers. To repeat, I am not after HDR-to-SDR translation that is accurately tuned to my individual display.  As I explain above, all I am after is a more accurate HDR-to-SDR translation to a theoretically ideal SDR display model like MadVR does by default. This can be done accurately. I can provide more screencap examples (actual digital screen captures rather than photos) that show MadVR works in this regard, while Kodi 18, while much improved, is still off.
Copying madVR's method won't be that simple. This took lots of trial-and-error by madshi and feedback from users. He is targeting a specific look not a mathematical formula. As I stated, tone mapping provides a standardized formula (BT.2390), but color mapping does not. This is up to the skill and discretion of the programmer with the aid of such tools as an ICtCp color space. He has standards he is trying to adhere to, but it is compromise to make the image look as good as possible, not perfectly faithful to an SDR display. Again, this is HDR not SDR we are talking about. HDR has its own goals, and it is not to look SDR.
Reply
#12
Off-hand, what is required to get donor status? I am sincerely interested given me and my family’s high usage of Kodi.
Reply
#13
(2018-03-29, 00:45)Warner306 Wrote:
(2018-03-28, 23:09)hifihedgehog Wrote: The problem with this sentiment is finding SDR UHD material, which is essentially nil. I (and I am sure many others as well) would simply like to enjoy the benefits of increased resolution of their SDR 4K displays and projectors, minus the benefits of enhanced dynamic brightness that HDR offers. To repeat, I am not after HDR-to-SDR translation that is accurately tuned to my individual display.  As I explain above, all I am after is a more accurate HDR-to-SDR translation to a theoretically ideal SDR display model like MadVR does by default. This can be done accurately. I can provide more screencap examples (actual digital screen captures rather than photos) that show MadVR works in this regard, while Kodi 18, while much improved, is still off.
Copying madVR's method won't be that simple. This took lots of trial-and-error by madshi and feedback from users. He is targeting a specific look not a mathematical formula. As I stated, tone mapping provides a standardized formula (BT.2390), but color mapping does not. This is up to the skill and discretion of the programmer with the aid of such tools as an ICtCp color space. He has standards he is trying to adhere to, but it is compromise to make the image look as good as possible, not perfectly faithful to an SDR display. Again, this is HDR not SDR we are talking about. HDR has its own goals, and it is not to look SDR.

That makes sense. Is there similar plans to improve Kodi’s HDR implementation in a similar manner, then? At present, it looks a tad washed out. Then again, only a week or two ago, Kodi 18’s nightlies were just giving me a white screen with vaguely visible outlines. So we are seeing huge progress in a matter of weeks. I would just like to ditch Kodi DSPlayer+MadVR since I was hoping it could be a temporary solution until HDR->SDR support got baked in.
Reply
#14
(2018-03-29, 00:51)hifihedgehog Wrote:
(2018-03-29, 00:45)Warner306 Wrote:
(2018-03-28, 23:09)hifihedgehog Wrote: The problem with this sentiment is finding SDR UHD material, which is essentially nil. I (and I am sure many others as well) would simply like to enjoy the benefits of increased resolution of their SDR 4K displays and projectors, minus the benefits of enhanced dynamic brightness that HDR offers. To repeat, I am not after HDR-to-SDR translation that is accurately tuned to my individual display.  As I explain above, all I am after is a more accurate HDR-to-SDR translation to a theoretically ideal SDR display model like MadVR does by default. This can be done accurately. I can provide more screencap examples (actual digital screen captures rather than photos) that show MadVR works in this regard, while Kodi 18, while much improved, is still off.
Copying madVR's method won't be that simple. This took lots of trial-and-error by madshi and feedback from users. He is targeting a specific look not a mathematical formula. As I stated, tone mapping provides a standardized formula (BT.2390), but color mapping does not. This is up to the skill and discretion of the programmer with the aid of such tools as an ICtCp color space. He has standards he is trying to adhere to, but it is compromise to make the image look as good as possible, not perfectly faithful to an SDR display. Again, this is HDR not SDR we are talking about. HDR has its own goals, and it is not to look SDR. 

That makes sense. Is there similar plans to improve Kodi’s HDR implementation in a similar manner, then? At present, it looks a tad washed out. Then again, only a week or two ago, Kodi 18’s nightlies were just giving me a white screen with vaguely visible outlines. So we are seeing huge progress in a matter of weeks. I would just like to ditch Kodi DSPlayer+MadVR since I was hoping it could be a temporary solution until HDR->SDR support got baked in. 
 For projector owners with HDR support, good tone mapping can actually look better than the projector's HDR mode. This is due to the limited brightness of projectors, that is often maxed-out at around 100 nits when properly calibrated. So you don't need to enter HDR mode to get an HDR image. This is the main reason why madshi has put so much effort into this. He is a projector owner himself.
Reply
#15
Thank you, Warner306, for all the deep insight. At any rate, here are some actual digital screen captures that may assist developers as reference photos—and to sate curious minds.

Kodi 17.6 (Normal Blu-ray)
Image
Kodi 17.6
Image
Kodi 18 (March 27th Nightly)
Image
Kodi 17.6 DSPlayer + MadVR
Image
Reply

Logout Mark Read Team Forum Stats Members Help
Provisions for HDR to SDR conversion?2