Hello guest, if you like this forum, why don't you register? https://fanrestore.com/member.php?action=register (December 14, 2021) x


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tonemapping from HDR to SDR with Dolby Vision 100nit trim pass
#1
I found a pretty cool tool recently when looking foe some HDR analysis stuff called DoVi_Scripts. Not sure how well known this is but it can do some cool stuff with DV so I thought I’d share. (also the YT vid the github links to for this looks to be outdated)

I’m by no means an expert, but, from my understanding, Dolby Vision has these things called trim passes, which basically are data on how to tonemap the image for certain brightness values. One of the passes is for 100nits, which is effectively SDR, so this is data on how to tonemap the HDR image to SDR.

Motivations are hopefully obvious: high quality SDR versions of 4KBDs, especially interesting for titles which the 4KBD differs from the 2KBD in terms of, say, the transfer, or even something more significant like Gemini Man (2019)’s 60fps presentation. The tonemap also can retain 4K 10bit which may be a plus for projects and such.

The main limitation is, of course, that this only applies to Dolby Vision, and that the DV titles need to have the 100nit trim pass. Basically all the titles I’ve tested so far (8) do have it, but I did run into the curious example of The Last of Us (2023) only having it for episode 1, with the other episodes being absent it, so its possible to not be there.

Anyway, enough rambling, how can it be done?

DoVi_Scripts is basically a collection of tools focused around processing and analysing DV and HDR videos, looks to be mostly focused on DV hybrid stuff.

But it can do some other stuff; Under video encoding settings [8 MIXED: Audio/Remover/Encoder/Playlist/Sample → 2 VIDEO Encoding → 4 PRORES DV to SDR], there is a DV to SDR 100nit trim pass delivery option, which is what we’re looking for.

However, a couple of notes first. It doesn’t seem to work properly in v2.0.3 (current), instead just falling back to the standard tonemapping option. v2.0.2 works fine however. Next, you’ll need to download Dolby’s DV tools; you need to sign up but its free so not too much of an issue. DoVi_Scripts is actually using an official Dolby tool for this conversion which is interesting to see.

An optional step is checking to see if your file has a 100nit trim pass. In DoVi_Scripts, option [2 DoVi Fix/Edit/Extract/Verify/Info → 2 RPU Extractor/Reader] you can get a summary of the DV metadata, and youre looking for the line “L2 trims”, and see if 100nits is there. Alternatively just throw your file into the DV to SDR converter and it’ll tell you if there isn’t one, but it does some pre-processing so checking first saves a bit of time.

Finally, note that the conversion results in a ProRes output file. Which is huge. In the 100s of Mbps range, which adds up very quickly. Personally, I have processed everything so far in chunks then compressing each one with x265 to keep the storage usage manageable for me. So far this doesn’t seem to result in any issues.

Ok! so I have tested so far with Gemini Man (2019), and Belle (2021) to see how the results stack up. Gemini Man is 60fps so id like a SDR version, and Belle I remember having some brightness issues with tonemap testing I did a while ago.

As well as comparing against the SDR Blu-ray, I’ve compared against Handbrake’s colourspace filter, and DoVi_Script’s own standard tonemapping (uses DoViBaker/libplacebo). I know there are other (potentially better) methods out there, but I’m not overly familiar, plus all these options are around the same effort level, there’s no tweaking.

Gemini Man:
[Image: MDOc2oL.jpeg]
[Image: srzRb8H.jpeg]
[Image: pVQiXPh.jpeg]
Belle:
[Image: lx8zT1S.jpeg]
[Image: gTleLHq.jpeg]
(there are more comparisons on my Gdrive, all of which are full res PNGs) 

So, overall, its clear handbrake notably undershoots brightness in all of my testing. Belle seems to be graded not super bright so perhaps that’s not entirely unexpected but regardless its not what I would consider to be a good result.

DoVi_Scripts own tonemapping (again, DoViBaker/libplacebo under the hood, which tbh I know nothing about) fairs a bit better. Belle is once again undershot, but Gemini Man is a lot closer and even overshoots in some shots.

The 100nit trim pass basically nails the required brightness. It looks to be slightly more off with Gemini Man than Belle, but its close enough that most of the time even side-by-side its a bit hard to tell.

There are some slight differences in colour temp and contrast (again, more notably in Gemini Man), but small. Super bright elements in Gemini Man (fire/explosions) look to be a bit oversaturated at times where the SDR grade blows them out to white, but again overall I’m quite happy with the results.
Reply
Thanks given by: PDB , stwd4nder2 , Doctor M , SIUse


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Help] How to convert Dolby Vision Profile 8 to 7 to make it UHD BD compliant? Red41804 5 520 2024-10-24, 12:59 PM
Last Post: SHM
Question Convert DTS/DD to Dolby Headphone?? nafroe 15 6,965 2022-03-23, 12:23 PM
Last Post: LucasGodzilla
Sad [Help] Issues while using Ripbot264 for tonemapping myllaki 12 7,234 2020-10-22, 08:04 AM
Last Post: Chewtobacca
  [Help] Dolby Surround 2.0 Matrixed files Upmix CSchmidlapp 67 47,426 2020-08-06, 11:24 PM
Last Post: allldu
  x264 - filesize output calculator for 2-pass and CRF ? loa 7 5,502 2020-08-05, 10:30 PM
Last Post: spoRv
  [Help] Can DaVinci Resolve trim without re-encode? Evit 13 9,115 2019-04-11, 06:41 PM
Last Post: X5gb
  Authoring PCM and Dolby on same blu ray. Booshman 12 11,677 2018-05-21, 10:57 PM
Last Post: bronan

Forum Jump:


Users browsing this thread: 1 Guest(s)