•   
  • 1
  • 64
  • 65
  • 66(current)
  • 67
  • 68
  • 513
  •   
Kodi DSPlayer – DirectShow Player for Windows
Introduction to HDR to SDR Tone Mapping

Topics Covered:
Intro to Tone Mapping for Projectors and Low Peak Nits Displays

The majority of HDR tone mapping development in madVR has focused on tone mapping for projectors with a calibrated peak brightness of 50-150 nits. The limited light output of a front projector creates a challenge in displaying HDR videos due to the high mastered nit levels and extreme levels of contrast demanded by PQ HDR content.

The HDR10 standard considers a display to be well-suited for HDR playback, or “UHD Premium,” when it has a minimum brightness of 540 peak nits. While conservative by the standards of many modern flat panel TVs, 540 nits remains hundreds of nits above the maximum calibrated peak brightness (or even the vivid or dynamic picture modes) of all current bulb-based or laser HDR projectors.

The rendering intent of HDR10 video can be best understood by looking at the PQ EOTF used to master all PQ (Perceptual Quantizer) source values. Approximately 58% of the available bits on the PQ source scale are distributed between 0-100 nits (known as PQ “reference white”) with the remaining bits up to 10,000 nits reserved to convey highlight peaks, or HDR “specular highlights.” Each PQ bit is fixed to the original PQ EOTF, so it is intended to be displayed at a precise amount of luminance by any display.

While there is the odd movie such as The Meg with Frame Average Light Levels that consistently reach over 1,000 nits, all brightness peaks greater than 100 nits are still considered specular highlights meant to be used sparingly and not where the majority of HDR videos are mastered. Specular peaks such as fire and flames, headlights, outdoor lighting, sunlight, reflections, open skies and any other sources of direct or indirect lighting are what differentiate HDR content from SDR content and make the HDR image really pop with its enhanced contrast. But, as demonstrated by almost all movies decoded by madMeasureHDR, specular highlights tend to only make up 5-10% of the total mastered brightness levels of most current HDR10 videos. This infrequent use of the brightness levels above 100 nits would be considered a “normal” use of the PQ HDR luminance (bit depth) scale.

Because most bits and source levels (up to 90% or greater) are contained within the first 100 nits of the PQ curve, the PQ EOTF is designed to display most source values 1:1 on true HDR displays (which remember are recommended to have a minimum of 540 nits of peak luminance) and deal with any specular highlight peaks above 100 nits with some type of roll-off curve. Industry standard reports such as Report BT.2390 reinforced this rigid rendering intent by recommending that HDR10 displays start the roll-off point for the tone mapping curve at or above 100 nits to compress the entire 10,000 nits PQ scale if the display could produce at least 479 peak nits in a 10% window.

HDR10 was intended to be an open standard, so not all HDR displays follow this advice and may tone map some of the source values below 100 nits. But maintaining the creative intent of PQ HDR video generally requires linear tracking of the PQ EOTF as far as possible to avoid excessively dimming the Average Picture Level (APL) by starting the roll-off point too early on the EOTF and lowering the brightness of too many source values. This is due to the PQ EOTF being a fixed tone curve designed to be displayed without any increases or decreases to the mastered source luminance to ensure each HDR video is consistently reproduced in the home environment with a neutral presentation that closely mimics the source as it appeared on the original HDR mastering monitor. The PQ HDR standard was designed as a display-referred (or HDR mastering display-referred) method of representing consumer HDR video.

If this mastering display-referred approach is applied to projectors barely able to represent light levels above legacy SDR video, it quickly becomes apparent that the PQ source scale is inadequate for these displays. An HDR display with a peak brightness only slightly higher than 100 nits simply lacks the headroom to have linear tracking of the lower PQ EOTF curve up to 100 nits and still have enough light output (nits) left in reserve to render the brighter specular highlights with representative contrast.

If you start the roll-off of the PQ curve lower, you still may find the display has not reduced the brightness of reference white far enough to adequately compress the brightest specular highlights. For example, starting a roll-off of the PQ EOTF on a 100 nits projector at a mere 20 PQ nits may only reduce reference white from 100 nits to 50 nits and leave only an additional 50 nits (a 2:1 contrast ratio between the highlights and reference white) to handle all brighter source values mastered up to 10,000 nits.

If an HDR scene was graded to 4,000 nits, the contrast ratio between the mastered specular highlights and reference white is 40:1 (4,000 nits frame peak/100 nits reference white = 40:1). Representing this 40:1 contrast ratio on a 100 nits display with a 2:1 contrast ratio between the highlights and reference white makes it quite difficult to render all of the individual source luminance steps from the much brighter reference scene without flattening many of the PQ steps. This can lead to many pixels ending up grouped together at the top of the display curve, either clipping the specular highlights or flattening all detail in these image areas.

This type of aggressive roll-off of the PQ EOTF would only work if the specular highlights represented a very small portion of the overall picture. Further, using a lower roll-off point on a fixed tone curve will create many flat spots from 20 nits to 100 nits where larger numbers of pixels under 100 nits are reduced in visible distance creating more visible overlap of the picture in places where these pixels are compressed.

Trying to find the ideal roll-off point on a projector for a single HDR movie often leads to a need to manually adjust the contrast for every scene in the movie as bright highlights pop-up in each scene.

For example, a fixed roll-off may work for most scenes in a movie until you come across one scene with a patch of very bright specular highlights that don’t quite fit within the existing tone curve:

YouTube Link to Source of Screenshots Below

Sully UHD Blu-ray - VAVA 4K Laser Projector:
Image

When encountering a scene such as this, you might reach for the remote to turn down the brightness or contrast until the highlights are brought back into the frame without looking dark or compressed:

Sully UHD Blu-ray - VAVA 4K Laser Projector:
Image

However, this ideal tone curve might end up looking too dim in the next scene when those bright highlights are no longer present and more content is presented near black:

Sully UHD Blu-ray - VAVA 4K Laser Projector:
Image

A better way to represent HDR video on displays with a limited peak brightness is to use a tone mapping curve that can automatically adjust the source steps to balance the contrast of the image for the entire display curve without having to follow the rigid PQ EOTF at any point and determine how much of the EOTF must be compressed for each movie scene.

It so happens the legacy SDR gamma scale is already optimized for this type of automatic source remapping. Unlike the display-referred HDR PQ standard, SDR Gamma is a scene-referred tone curve (similar to Hybrid-Log Gamma, HLG). This means any SDR source is automatically stretched or compressed by the gamma curve to maintain the same contrast ratio (but not the same absolute brightness) as the original source mastering display at any displayed brightness. The gamma curve will increase or decrease the luminance of all source values based on the calibrated peak nits of the display panel. However, the contrast difference between the brightest and dimmest source values remains the same when scaled in power law gamma.

HDR to SDR tone mapping uses the built-in contrast scaling of the SDR gamma luminance scale to remap all source values of HDR sources to match any SDR gamma curve. This wholesale remapping of the source steps offers far greater control over the Average Picture Level compared to PQ EOTF rendering by changing the composition of the entire image to have the same local contrast at any desired brightness within the available display curve.

In Part II, we will discuss how PQ HDR source values are mapped and rendered on the relative SDR gamma curve.

Part II: HDR to SDR Gamma Compression
Reply
(2015-07-25, 09:22)aracnoz Wrote:
(2015-07-25, 05:49)Warner306 Wrote: I took a low quality video on my iPhone of the delay in refresh rate switching -- from 1080p60 -> 1080p24.

Notice the menu is visible for a second before the video switches to fullscreen. Also, the menu is slightly laggy after the video has stopped (I don't think this is noticeable in the video).

https://www.youtube.com/watch?v=yizGyB5d...e=youtu.be

I am using:

Direct3D 11 Presentation Path
Fullscreen exclusive mode
Kodi Adjust display refresh rate
madVR display modes active (1080p23, 1080p50, 1080p60)
Force madVR to exit Fullscreen exclusive mode before stop

that's expected if you manages the refresh with madvr because it will change the resolution when the pins are attached so before playstart, i cannot change this behavior with madvr
instead with kodi that manages the refresh it's executed at the playstart, then i also added an option to change the refresh with kodi when the pin are attached to anticipate the process to give more possibility if someone was experiencing some problem, so it's normal

the only one difference with this isengard final build it's that now at stop madvr resets the refresh to the original state that was before any modification, so there should not be differences at playstart, using kodi or using madVR, and there are not in my case, I can see in your video that at stop the refresh it's reset to 60hz so it works i suppose

anyway what happens if you change the refresh with kodi?
it still remain at 60hz?
there is a refresh change to 24hz and then back to 60hz?
this happens also with dx9 presentation?

if your problem it's reproducible only with dx11 presentation should execute madVR in debug mode and then catch a debug log of the two situations and send them to madshi

@GlennNZ

i need a FULL debug log to figure out what happens in each executed thread

p.s. you should activate the debug mode in advancedsettings.xml in this way http://kodi.wiki/view/Log_file/Advanced#...ttings.xml

Ok, I can accept the refresh rate change. But the UI is still laggy after a video is stopped despite reporting 60hz refresh. The skin animations become slower after a video is stopped. I will provide a debug log when I get the chance.
Reply
(2015-07-25, 10:17)Werewolf Wrote: what is the different between :
DSPlayer Setup: 15.0 Isengard final - build (20150721-e67b8c1)
DSPlayer ExeOnly: 15.0 Isengard final - build (20150721-e67b8c1)
DSPlayer PDB :15.0 Isengard final - build (20150721-e67b8c1)

thanks

Exe can be ignored; it is simply the Kodi.exe if you want to override the existing Kodi.exe to upgrade. You should be running the full set-up instead.

The PDB is a file needed for debugging purposes. The file is meant to be renamed Kodi.pdb and placed in the same location as Kodi.exe before running debug logs.

So, of the three, choose the Setup installer.
Reply
(2015-07-25, 11:06)Bomeranger Wrote:
(2015-07-23, 21:05)ashlar Wrote: Bomeranger, which version of madVR are you using?
madVR v0.88.20
(2015-07-23, 22:22)aracnoz Wrote:
(2015-07-23, 20:55)Bomeranger Wrote: Hi!
I tested version DSPlayer 15 final, and I am disappointed...

I am trying to play short files *.mov in a folder.

After two or three files starts flickering - switching from a black screen to repeat a few frames. The sound plays normally.
Log http://xbmclogs.com/p9zwemqr3

I tried to make a log when madvr flickering (pressing CTRL+ALT+SHIFT+PAUSE/BREAK when crash/freeze) - but nothing like the log is not found.

you should open madvr stats with ctrl+j while this "repeated frames" occurs and report the "present queue", then you have to try to enable and disable the kodi GUI to see if there is some improvements on the issue
After pressing ctrl+J, I see a normal video playback. Сlose madvr stats with ctrl+j - again see "repeated frames" video.

all as in the post when we play a video with madvr opening the stats with ctrl+j we should see present queue 7-8/8 (with default settings) if there isn't any element of the kodi gui visible/rendered on the video, in this moment the "low latency mode" it's disabled and everything works as he should

but without " any element of the kodi gui"

Are your madVR settings too aggressive (over the average rendering queue of 41 ms)? This will cause presentation glitches. Try setting everything to Bilinear and see if that fixes anything.
Reply
(2015-07-25, 21:58)Warner306 Wrote:
(2015-07-25, 12:42)TMDaines Wrote: 1) I need to do some more experimentation but cannot currently get 25 to 24 fps working the way I would like with Reclock and madVR. I'd like to get 25fps stuff playing back at 24fps in 1080p24, but keep 50fps playing back in 1080p50. The 25fps to 24fps conversion is working sweetly, when I delete the 1080p50 display mode from madVR and turn smooth motion off. 50fps content is then being pushed into 1080p60, unfortunately. As I'm writing this, I am wondering whether I can get around this with a madVR profile?

1) Try using refresh rate overrides via advancedsettings.xml: http://kodi.wiki/view/Advancedsettings.xml#video
That works. I now manage refresh rate changes exclusively through Kodi instead of madVR and I only need one rule it seems (25 to 24) right now.
Reply
@aracnoz, any chance you could please consider looking into the the issue preventing the Trakt.TV addon from reliably opening it's Rating's Dialog box on Player.OnPlaybackStopped? Maybe this is a complication indirectly caused by DSPlayer's OSD lag? I tried to ask for help about this in the trakt.tv forum thread; however, they mentioned the correct place to ask for help is in this thread. Thanks for any help you can offer about this. PS: I'm NOT using FSE.

Looking forward to the next Isengard DSPlayer update!
Reply
I am posting a bug mentioned previously. When DSPlayer is stopped, the main menu experiences slowdown. Skin animations, in particular, slow down and appear choppy. The impact is subtle, but is definitely apparent when compared to DVDPlayer. This stutter may be related to a problem reported in the previous build. Again, stopping playback causes the menu to appear like it is moving at a framerate lower than 60hz.

I can't find anything unusual in the debug log, but it is available here: http://www.xbmclogs.com/pafvp7o6w.

madVR v0.88.21
Direct3D 11 for presentation
fullscreen exclusive mode
Kodi set to Adjust display refresh rate
madVR display modes: 1080p23, 1080p50, 1080p60
Force madVR to exit from fullscreen before stop
Reply
logs as requested:

https://www.mediafire.com/?uyyo3sjyizzyqz6

Issues:
Still occ. d3derr device hung - first smaller log captures that. Not occurring during video now however. And have updated everything possible. may be unrelated and seems system issue - but only occurs within dsplayer.
Does seem to have something to do with directx9 (https://msdn.microsoft.com/en-us/library...s.85).aspx)

2nd
Pause screen not going away - despite video playing - PAUSE button remains in middle of screen.
Intermittent, not always.
Low latency mode continues based on present que of 2 only.
Seek removes PAUSE - however remains in low latency mode.
Best example end of long log, just prior to video stop. Sorry for size.

3rd
Refresh rate changes and start of video quite slow - have turned off Kodi refresh rate change using madVR alone &and still takes 2-3 seconds with menu appearing, disappearing and appearing again, before video starts.

Does it change refresh rate when window mode is backed into again? And then again when FSE mode is exited?
Does seem there are multiple resolution changes.


Still getting there and is useable (I notice madVR having a number of ongoing issues fixed as well)

Thanks for the hard work!


Dsplayer 21.7 build - skin aeon mq5 mod
madVR 0.88.21
Direct3D 11 for presentation
fullscreen exclusive mode
Kodi set to NOT to Adjust display refresh rate
madVR display modes: 1080p23, 1080p50, 1080p60
Force madVR to exit from fullscreen before stop
Reply
(2015-07-27, 06:33)Warner306 Wrote: I am posting a bug mentioned previously. When DSPlayer is stopped, the main menu experiences slowdown. Skin animations, in particular, slow down and appear choppy. The impact is subtle, but is definitely apparent when compared to DVDPlayer.
You can check the framerate the GUI is rendered at in Settings/System. In the past I had, from time to time, the refresh rate at 60Hz and the GUI still rendering at 23.976... Not anymore with Isengard 15.0. But maybe it's the same problem.
For troubleshooting and bug reporting please make sure you read this first.
Reply
(2015-07-26, 21:07)MKANET Wrote: @aracnoz, any chance you could please consider looking into the the issue preventing the Trakt.TV addon from reliably opening it's Rating's Dialog box on Player.OnPlaybackStopped? Maybe this is a complication indirectly caused by DSPlayer's OSD lag? I tried to ask for help about this in the trakt.tv forum thread; however, they mentioned the correct place to ask for help is in this thread. Thanks for any help you can offer about this. PS: I'm NOT using FSE.

Looking forward to the next Isengard DSPlayer update!

fixed with next build

(2015-07-27, 06:33)Warner306 Wrote: I am posting a bug mentioned previously. When DSPlayer is stopped, the main menu experiences slowdown. Skin animations, in particular, slow down and appear choppy. The impact is subtle, but is definitely apparent when compared to DVDPlayer. This stutter may be related to a problem reported in the previous build. Again, stopping playback causes the menu to appear like it is moving at a framerate lower than 60hz.

I can't find anything unusual in the debug log, but it is available here: http://www.xbmclogs.com/pafvp7o6w.

madVR v0.88.21
Direct3D 11 for presentation
fullscreen exclusive mode
Kodi set to Adjust display refresh rate
madVR display modes: 1080p23, 1080p50, 1080p60
Force madVR to exit from fullscreen before stop

that's really strange, anyway can you explain me why are you managing the refresh with both madVR and kodi? maybe could be a solution for someone but it's more possible that there is a fight between kodi and madVR on this
i would know what happens with the refresh handled only by madvr or only by kodi, there is still this problem? also using dx9 as presentation in madvr

ps if you are not experiencing a black screen after stop you could disable the option that force madvr to exit from full screen before stop

(2015-07-27, 14:03)GlennNZ Wrote: logs as requested:

https://www.mediafire.com/?uyyo3sjyizzyqz6

Issues:
Still occ. d3derr device hung - first smaller log captures that. Not occurring during video now however. And have updated everything possible. may be unrelated and seems system issue - but only occurs within dsplayer.
Does seem to have something to do with directx9 (https://msdn.microsoft.com/en-us/library...s.85).aspx)

2nd
Pause screen not going away - despite video playing - PAUSE button remains in middle of screen.
Intermittent, not always.
Low latency mode continues based on present que of 2 only.
Seek removes PAUSE - however remains in low latency mode.
Best example end of long log, just prior to video stop. Sorry for size.

3rd
Refresh rate changes and start of video quite slow - have turned off Kodi refresh rate change using madVR alone &and still takes 2-3 seconds with menu appearing, disappearing and appearing again, before video starts.

Does it change refresh rate when window mode is backed into again? And then again when FSE mode is exited?
Does seem there are multiple resolution changes.


Still getting there and is useable (I notice madVR having a number of ongoing issues fixed as well)

Thanks for the hard work!


Dsplayer 21.7 build - skin aeon mq5 mod
madVR 0.88.21
Direct3D 11 for presentation
fullscreen exclusive mode
Kodi set to NOT to Adjust display refresh rate
madVR display modes: 1080p23, 1080p50, 1080p60
Force madVR to exit from fullscreen before stop

for the first problem it's definitely a system issue because there are alot of "ERROR: ActiveAE::ActiveAE::CActiveAE::InitSink - failed to init" that are nothing todo with dsplayer
for the second problem i don't see nothing strange in the debug log, are you able to reproduce this while madVR stats are opened? there is a repeated frames while playback?
low latency mode should be enabled until there is some element of kodi drawn on madVR

if this problem don't always happens you should try to catch a way to reproduce the pause issue, and then tell me step by step, there should be a pattern

anyway you should try to test everything with a fresh new installation, i see alot of error with old db not updated and other things

are you able to reproduce this only with aeon mq5?


for the refresh let me explain one for all what happens Smile

if madVR manages the refresh it will change the refresh sooner, it's the first thing that happens, after that DSPlayer takes his time to process and open the file
in this case we see again the kodi menu in the while that dsplayer launch the file, i don't know maybe madshi can add an option to change the refresh later but it's not so important to me, it's just a cosmetics

instead with kodi that manages the refresh the first thing that happens it's kodi that process entirely the opening file and only when the process it's ready to start with playback the refresh it's changed to match the fps

but the execution time it's the same in both cases


p.s.

just sent pm to madshi and with a next version of madVR will be added an option for the developers to decide when the player should switch display mode, the he also confirmed me a possible solution to solve the "repeated frames" issue that some of you are experiencing, but before apply this solution i would to know how to reproduce the problem because the cause of that could be more important

so if any of you are experiencing the a sort of loop while madVR playback with few frames pls you have to try to catch a way to reproduce the problem
Reply
Thanks for the updates aracnoz. And thanks to madshi as well if he reads here. He's a really cool guy doing all this stuff for free (as you are, aracnoz).
For troubleshooting and bug reporting please make sure you read this first.
Reply
i prepared a test build

i made some change directly in kodi for the refresh change, the time to execute a file seems similar managing the refresh only by kodi or only by madVR, in my case 3 seconds to do everything (switch refresh and then enter in exclusive mode) even with mpc starting with the monitor at 60hz i employ the same time

i also made compatible the option <latency><delay><refresh> in advancedsetting to assign a personal delay to each refresh even when only madvr manage the refresh

let me know if it works for everyone

http://www.mediafire.com/download/maf798..._test1.rar
Reply
(2015-07-28, 10:32)aracnoz Wrote: i prepared a test build

i made some change directly in kodi for the refresh change, the time to execute a file seems similar managing the refresh only by kodi or only by madVR, in my case 3 seconds to do everything (switch refresh and then enter in exclusive mode) even with mpc starting with the monitor at 60hz i employ the same time

i also made compatible the option <latency><delay><refresh> in advancedsetting to assign a personal delay to each refresh even when only madvr manage the refresh

let me know if it works for everyone

http://www.mediafire.com/download/maf798..._test1.rar

Many thanks for the test build.

I can confirm does seem to change more quickly for MadVR as per my settings above - no more menu shown when starting - seems quicker - will test some more settings.

Still at times getting PAUSE remaining on screen.
Does change to low latency based on 'present que'
UnPause - playback starts with PAUSE on screen - and present que remains 1-2
Now with this build 10 seconds or so later - GUI disappears and low-latency mode turned off.
Seems more apparent with 50hz refresh screen mode (for 25hz file), less occurrences with 23.97 Hz screen refresh

Have uploaded new log
http://www.mediafire.com/download/rqdssd...ersion.zip
(Previous issues with ActiveAE related to new audio driver I had updated, without resetting Kodi audio settings)
Reply
(2015-07-28, 10:32)aracnoz Wrote: i prepared a test build

i made some change directly in kodi for the refresh change, the time to execute a file seems similar managing the refresh only by kodi or only by madVR, in my case 3 seconds to do everything (switch refresh and then enter in exclusive mode) even with mpc starting with the monitor at 60hz i employ the same time

i also made compatible the option <latency><delay><refresh> in advancedsetting to assign a personal delay to each refresh even when only madvr manage the refresh

let me know if it works for everyone

http://www.mediafire.com/download/maf798..._test1.rar
I'll try it in the afternoon but... Tu si na' stellà preziòs su internèt!

EDIT: I didn't resist and tried it now. I substituted the exe file in the Kodi directory, launched Kodi, went into Settings/Video/Playback and set up Kodi so as to switch refresh rate for DVDPlayer only, leaving the refresh switch task to madVR (which already had the video modes configured). Now the refresh rate happens but the audio delay is not working.

When using both Kodi and madVR to switch refresh rate, what I see with these settings:

<latency>
<delay>0</delay>
<refresh>
<min>23</min>
<max>24</max>
<delay>225</delay>
</refresh>
</latency>

is that Kodi sets up LAV Audio with a -224 delay (I kid you not, 224, not 225). Always happens like this.

If I have just madVR doing the switch, even with your new version, aracnoz, that field stays at 0 and the audio is not in sync.
For troubleshooting and bug reporting please make sure you read this first.
Reply
(2015-07-28, 11:56)ashlar Wrote: If I have just madVR doing the switch, even with your new version, aracnoz, that field stays at 0 and the audio is not in sync.

yes i broke this with the latest change for the refresh etc, i prepared another test build

@GlennNZ

let me know if with this build your problem with the pause etc etc it's solved

http://www.mediafire.com/download/ygjoqg..._test2.rar
Reply
  •   
  • 1
  • 64
  • 65
  • 66(current)
  • 67
  • 68
  • 513
  •   



Logout Mark Read Team Forum Stats Members Help
Kodi DSPlayer – DirectShow Player for Windows47
This forum uses Lukasz Tkacz MyBB addons.