20 Nov 2019 - TVDB Scraper v3.2.0 is now available which reinstates scraping. TVDB are still in the process of fixing a number of bugs so there may still be further breakages. See this post. 2901570 (post)

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 avoid dimming the image excessively through high dynamic range compression.

The selection of a gamma curve in madVR and at the display 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 values. 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 the same calibrated gamma curve.

Maintaining the original luminance of the PQ curve 1:1 on a dim display 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 brightness of the source values.

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 2.20 gamma 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 the output from madVR and making it any darker at the display.

Choosing an Output Gamma in madVR

The first step in configuring a display for HDR to SDR 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 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 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 adjustments.

The example above shows what happens when the wrong gamma curve is used. Most of the bars past Bar 16 are completely black, which means shadow detail is being badly crushed. If enable gamma processing is not active, the gamma setting in madVR only applies to the conversion of HDR to SDR. You may have been unaware of any gamma-related issues with madVR until you attempted to playback HDR content. Gamma is most critical for preserving shadow detail.

Most displays will be calibrated to either 2.20 or 2.40. If your display hasn't undergone a proper grayscale calibration, its gamma tracking may be slightly off, or way off like the Samsung LED below. Finding an online review for your display is not a bad idea to determine its 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 16. The 8-bit values are represented as thick bars along the bottom of the pattern. You should see a faint, grey gradient that extends from the right of the screen to the left of the screen. Bar 16 is meant to be completely black (reference black). Black level too highBar 16 is visible. Black level too lowBar 17 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 16, 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 also included as additional 10-bit test patterns that will work for most 8-bit or 10-bit displays. These patterns are also used to test black clipping using the same instructions as above.

White Clipping

The white clipping patterns are included as an optional reference. These can be used to configure a static target nits that clips correctly for 1,000 nits, 4,000 nits or 10,000 nits content. The higher the real display peak nits / display target nits, the more levels of contrast are preserved.

real display peak nits is the only setting requiring 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 target nits and HDR profile rules that automate the selection of a display target nits for each source, or even per scene, should make the use of a static display target nits unnecessary.

These white clipping patterns are better used to test the performance of the tone mapping of any HDR display. A display that does not clip specular highlight detail at the indicated peak white luminance on the pattern will show visible flashing bars all the way from left-to-right to the end of the pattern.
Reply
 
Thread Rating:
  • 46 Vote(s) - 4.41 Average


Messages In This Thread
Lockup on STOP issue resolved! - by MKANET - 2015-04-11, 21:59
RE: Kodi DSPlayer – DirectShow Player for Windows - by Warner306 - 2015-05-14, 23:42
RE: 4G aware patch - by MagikMark - 2015-09-08, 03:27
Alt-F4 no longer quits - by JeffA - 2015-10-31, 20:38