•   
  • 1
  • 35
  • 36
  • 37(current)
  • 38
  • 39
  • 506
  •   
Kodi DSPlayer – DirectShow Player for Windows
HDR to SDR: Choosing a Gamma Curve

Tip: When watching HDR content, it is always a good idea to increase the backlight or lamp mode of your display, even slightly, to give HDR content additional room to present its high range of contrast. HDR content requires much higher available peak brightness than SDR to keep the image bright and viewable and avoid dimming the image through aggressive high dynamic range compression.

The selection of a gamma curve in madVR and at the display panel is the most important choice in using the HDR to SDR conversion. PQ values represent absolute brightness and the conversion from PQ to gamma is designed to output absolute, not relative PQ luminance.

If the display gamma matches the output gamma from madVR, mapping PQ values to any power-law gamma will result in the identical displayed luminances. So HDR converted to SDR should not change the display gamma at all if both madVR and the display are adjusted to use the same calibrated power-law gamma.

Maintaining the original source luminance of the PQ EOTF 1:1 on dimmer displays simply won't be possible, so your primary concern should be attempting to avoid having the image appear too dark after tone mapping is applied rather than precisely replicating the full brightness of the source levels.

Possible Gamma Conversion Steps:

No 3D LUT:
(madVR) 2.20 -> 2.20 (display): Input and Output Luminances Match;
(madVR) 2.40 -> 2.40 (display): Input and Output Luminances Match;
(madVR) 2.40 -> 2.20 (display): Output Luminance Increased by the Display;
(madVR) 2.20 -> 2.40 (display): Output Luminance Decreased by the Display.

SDR 3D LUT:
(madVR) 2.20 -> 2.20 (3D LUT): Input and Output Luminances Match;
(madVR) 2.20 -> 2.40 (3D LUT): Output Luminance Decreased by the Display.

You can see madVR always converts to gamma 2.20 when a 3D LUT is present. Output values are meant to be absolute, so choosing a 2.40 display LUT may result in an image that is too dark by lowering the brightness of the source too much after the 3D LUT is applied (2.20 input -> 2.40 display).

If you are getting the best black clipping with madVR set to 2.40, it can be acceptable to set the display gamma to 2.20. The 2.40 input will be pulled up by the 2.20 display curve, which will make the displayed image brighter as opposed to darker. To limit any raising of black or washed out images, you may compensate by reporting a higher real display peak nits to madVR. This is preferable to taking any output from madVR and making it any darker at the end display.

Choosing an Output Gamma in madVR

The first step in configuring a display for HDR to SDR tone mapping is to set 16-235 SDR black and white clipping using the instructions provided in the devices section. Once this is accurate, calibrating for HDR playback will be much easier. Your mileage with HDR to SDR tone mapping will vary a lot depending on the accuracy of your display's gamma curve.

You will need these HDR10 test patterns:
  • Black Level 8-bit & 10-bit Combined;
  • Black Level 10-bit v1;
  • Black Level 10-bit v2;
  • White Level 240-1000 nits;
  • White Level 900-4000 nits;
  • White Level 3600-10000 nits.

Download Mehanik HDR10 Test Patterns

Source

The white clipping patterns are only available for general curiosity more than any required calibration. The average user can disregard these patterns.

Black Level

The first test pattern, Black Level 8-bit & 10-bit Combined, should be opened with any media player that uses madVR.

You will get the following image:
Image

There are two settings in madVR that require adjustment with this video:
  • transfer function / gamma;
  • real display peak nits.

devices -> calibration -> this display is already calibrated:
Image

Note: This black clipping video is very short, so consider pausing it while making any control panel adjustments.

The example above shows what happens when the wrong gamma curve is used. Most of the bars past Bar 64 are completely black that means shadow detail is being badly crushed.

If enable gamma processing is not selected in the control panel, the gamma setting in calibration only applies when HDR is converted to SDR. So you may have been unaware of any gamma-related issues when using madVR until you attempted to playback HDR sources. Accurate display gamma mapping is most critical for preserving near black shadow detail.

Most displays will be calibrated to either 2.20 or 2.40. If your display hasn't undergone a full grayscale calibration with a colorimeter and appropriate test patterns, its gamma tracking could be slightly off, or way off the gamma set in its picture options like the example Samsung LED below. Finding a detailed review for your display online is not a bad idea to reference its expected factory-calibrated SDR gamma accuracy.

Example Display: Samsung Q8FN 2.20 Gamma Tracking Before Calibration

Reading the test pattern:
You want a smooth, grey gradient from right-to-left all the way to the very edge of Bar 64. Values at 10-bits are indicated at the top of the pattern with reference black starting at Bar 64. And values at 8-bits are represented as thicker bars along the bottom of the pattern with reference black starting at Bar 16.

You should see a faint, grey gradient that extends from the right of the screen to the left of the screen. Bar 64 is meant to be completely black (reference black). Black level too highBar 64 is visible. Black level too lowBar 65 is black and not visible.

Start with the gamma curve you know or believe is the most accurate for your display (typically, 2.20 or 2.40). To move the gradient closer to Bar 64, you may consider a value of 2.15 to 2.25, or 2.35 to 2.45. I would recommend a base setting of 2.40 if you find you are seeing some black crush at other gamma values. What you lose in black clipping, you gain in color saturation. 

real display peak nits should only impact the black clipping pattern if you use values that are below the actual peak brightness of your display, or values that are too far above the actual display peak nits. This can either raise black if set too low, or crush black slightly if raised especially high. The chosen lower limit for the real display peak nits should not raise black at all.

Black Level 10-bit v1 and Black Level 10-bit v2 are included in the pattern set as additional 10-bit test patterns that will work with most 10-bit or 8-bit display panels. These patterns can also be used to test black clipping using the same instructions as provided above.

White Clipping

The white clipping patterns are included as optional reference patterns. White clipping patterns may be used to configure a static target nits that clips correctly for 1,000 nits, 4,000 nits or 10,000 nits HDR content. The higher the real display peak nits / display target nits set in madVR, the more levels of contrast from the source are preserved by the tone curve.

real display peak nits is the only setting that requires any adjustment if you have set black clipping correctly.

Note: highlight recovery strength could impact the white clipping tests and should temporarily be set to "none."

The availability of a dynamic display target nits and HDR profile rules that automate the selection of a display target nits for each source, or that select the best display target nits for each movie scene, should make setting white clipping points and desired static target nits values unnecessary.

These white clipping patterns are better used to test the tone mapping performance of any HDR display panel video processing. A display that avoids clipping specular highlight detail at the indicated peak white luminance of the pattern will show all visible flashing bars from left-to-right up to the last number on the pattern.
Reply
@djoole

I just checked that the other day, cause reading so many problems wakes my curiosity too. I left a movie get to the end by itself, and i promise, nothing bad happened.
The only problem i have had is when closing Kodi, till i decided to wait before CTRL+ALT+SUP, and it closed without a problem, and it is closing without a problem (it takes something like 1 min. to do, though).
Anyway, to be honest, i didn't update the lastest builds. I have a Kodi build from may be 2 or 3 ago (Isengard), and i didn't download the last madVR either.
HTPC
Silverstone Grandia GD05 - Intel i5 3570k -Asus H61M-G Micro-ATX - Unidad Blu-ray
MSI GTX970 4GB GDDR5 - 8 GB RAM DDR3 - AVR Denon X3400H Atmos - LG  OLED 55C7V
Reply
(2015-05-14, 14:46)aracnoz Wrote: @djoole, @oldpoem

this should fix the black screen on stop

http://www.mediafire.com/download/phq5w6...ngard5.rar

Sorry, but it doesn't Confused
Just got the black screen.
Here are the logs, video ends at 00:42:12 : http://pastebin.com/mW0P8A8b

Complete logs if needed : http://xbmclogs.com/pdqs0xfry
Reply
(2015-05-15, 00:19)vicmanpergar Wrote: to be honest, i didn't update the lastest builds. I have a Kodi build from may be 2 or 3 ago (Isengard), and i didn't download the last madVR either.

That could explain that, I didn't have the black screen problems (well at least i think so) with the previous builds neither (the one on the OP)
But i had other problems (textures screwed up when using jsonrpc stop request) maybe masking it.

Anyway, arcanoz seems quite tenacious, I have no doubt he will kill this bug Wink
Reply
I had this problem since madvr integrated and it still there albeit quite random. It is there with all helix dsplayer build but I seem to be the only one that get that problem while others got locked up / crash issues. The latest one aracnoz posted also had the same problem but I had sometimes freezed gui show up a bit not just blackscreen this time. Power button and ok still can exit Kodi peacefully no need to use ctrl+alt+del.
Reply
(2015-05-15, 00:47)djoole Wrote:
(2015-05-14, 14:46)aracnoz Wrote: @djoole, @oldpoem

this should fix the black screen on stop

http://www.mediafire.com/download/phq5w6...ngard5.rar

Sorry, but it doesn't Confused
Just got the black screen.
Here are the logs, video ends at 00:42:12 : http://pastebin.com/mW0P8A8b

Complete logs if needed : http://xbmclogs.com/pdqs0xfry
bug only happen in full screen exclusive?
Reply
I added this to the set-up guide and thought it might be of interest to others. It is a demonstration of madVR's dithering. It is quite impressive.

Dithering to 2-bits:
2 bit No Dithering
2 bit Ordered Dithering

I thought madVR's claim of preserving 16-bit information at lower bitrates was BS, but I am more convinced than before. I think this is the reason why Lanczos3 + AR in madVR looks superior to DXVA Lanczos3 + AR in DVDPlayer. DVDPlayer has no such dithering...well, as of yet. I've heard it is a planned feature.
Reply
Here is another one, albeit less impressive:

Debanding Example
Reply
And one more...

NNEDI3 Image Scaling
Reply
(2015-05-15, 01:49)tiben20 Wrote:
(2015-05-15, 00:47)djoole Wrote:
(2015-05-14, 14:46)aracnoz Wrote: @djoole, @oldpoem

this should fix the black screen on stop

http://www.mediafire.com/download/phq5w6...ngard5.rar

Sorry, but it doesn't Confused
Just got the black screen.
Here are the logs, video ends at 00:42:12 : http://pastebin.com/mW0P8A8b

Complete logs if needed : http://xbmclogs.com/pdqs0xfry
bug only happen in full screen exclusive?

I am indeed in full screen exclusive.
I can't say if the issue is also occurring with windows mode, because this mode is unusable.
If i start a video in windows mode, i have presentation glitches, and visually it feels like there are 50% frames dropped.
Reply
@djoole

you always had error like this in your debug

21:17:34 T:2768 ERROR: CGUIFontTTFDX::CopyCharToTexture: Failed to upload from sysmem to vidmem (0x8876086C)

because stopping by json api (webserver/smatphone etc etc) was performed with a separate thread
the same thing was happening at video complete without stop by remote

so closing dsplayer with a separate thread was the cause of the error on texture, now these things are fixed and without any error in your debug you have this blackscreen :\

now some question

while blackscreen occurs kodi it's running properly? can you hear the sound from the gui if you move to left right etc etc?
if you stop the playback without complete the movie still happens the black screen?

there is some things that i just noticed in your debug log

are you using pulse eight as remote? can you try without this if still happens the problem, because just before to perform the stop somewhere kodi receives a pause command
i don't know why, i don't know if this it's the problem but i cannot reproduce a situation where the pause it's called just before to execute all stop procedure

@oldpoem

i still need an your debug log because i don't know if the problem it's the same of djoole, Warner306 had some problems on stop with some previous build but the causes was different
anyway you said that you can press power button and ok to close kodi... so can you hear the sound from the gui? kodi responds to the commands but the screen it's black?
Reply
Yes Kodi is still running ok.. i can hear gui sounds.
In order to get the gui back, i need to CTRL-ALT-DEL, open task manager, and ESC to close task manager and focus Kodi again.

I'm using a Pulse Eight CEC adapter, plugged in my computer as USB, and plugged between my comp and AVR via HDMI.
It's to be able to start TV, because my TV is IP controlable for everything but start Undecided

But no, I'm not using the TV remote to control Kodi.
I'm using irule app, sending Json requests or Keyboard strokes to the computer.

I saw the pause but I assumed it was DSPlayer making it automatically just before stopping.
If it's not the case, i shall investigate to see who is sending the pause.
Reply
(2015-05-15, 16:52)aracnoz Wrote: @djoole

you always had error like this in your debug

21:17:34 T:2768 ERROR: CGUIFontTTFDX::CopyCharToTexture: Failed to upload from sysmem to vidmem (0x8876086C)

because stopping by json api (webserver/smatphone etc etc) was performed with a separate thread
the same thing was happening at video complete without stop by remote

so closing dsplayer with a separate thread was the cause of the error on texture, now these things are fixed and without any error in your debug you have this blackscreen :\

now some question

while blackscreen occurs kodi it's running properly? can you hear the sound from the gui if you move to left right etc etc?
if you stop the playback without complete the movie still happens the black screen?

there is some things that i just noticed in your debug log

are you using pulse eight as remote? can you try without this if still happens the problem, because just before to perform the stop somewhere kodi receives a pause command
i don't know why, i don't know if this it's the problem but i cannot reproduce a situation where the pause it's called just before to execute all stop procedure

@oldpoem

i still need an your debug log because i don't know if the problem it's the same of djoole, Warner306 had some problems on stop with some previous build but the causes was different
anyway you said that you can press power button and ok to close kodi... so can you hear the sound from the gui? kodi responds to the commands but the screen it's black?

I think it's the same problem as djoole. I can hear the sound of gui & kodi accept any command through keyboard & remote. The latest build has a little bit different behaviour though, now it most of the time it won't be backscreen part of gui showed up usually some topbar / status bar of skin and when press power button the shutdown menu sometimes popupped but the rest of screen stay black. Seem like not all GUI was restored. I'd try to created debug log next time it happened.

Also I'm not using any other inputs just wireless keyboard & mce remote. Most of the time keyboard stay off and only remote is used.
Reply
(2015-05-15, 16:52)aracnoz Wrote: just before to perform the stop somewhere kodi receives a pause command
i don't know why, i don't know if this it's the problem but i cannot reproduce a situation where the pause it's called just before to execute all stop procedure

I've just found out that there was an option "pause during refresh rate" that was activated in the CEC peripheral options in Kodi.

So now we know who was pausing Smile

I'll try some videos to see if the black screen problem was coming from that but I have good hope Smile
Reply
Just stopped in to say the new madVR is giving me a green screen on some titles. This might have to do with me using the new Direct3D 11 presentation path with fullscreen exclusive mode to take advantage of 10 bit output. My old 2007 Panasonic plasma is a 12 bit display, so I've attempted playback with D3D11 + FSE, as this is required for 10 bit output. Changing the bit depth to 8 bits doesn't seem to fix the problem.
Reply
  •   
  • 1
  • 35
  • 36
  • 37(current)
  • 38
  • 39
  • 506
  •   
 
Thread Rating:
  • 47 Vote(s) - 4.43 Average



Logout Mark Read Team Forum Stats Members Help
Kodi DSPlayer – DirectShow Player for Windows4.4347