HDR -> SDR conversion

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
Post Reply
gonca
Distinguished Member
Distinguished Member
Posts: 555
Joined: Sun Apr 08, 2012 6:12 pm

HDR -> SDR conversion

Post by gonca » Tue Jan 23, 2018 12:39 pm

I'll be setting up my new 4K system this weekend.
If it is of any help I can run test scripts right afterward and report back
Or if I can of some help beforehand please let me know

User avatar
admin
Site Admin
Posts: 3831
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin » Tue Jan 23, 2018 1:25 pm

All help will be welcome. Thanks!

What do you mean by a "4K system"?

gonca
Distinguished Member
Distinguished Member
Posts: 555
Joined: Sun Apr 08, 2012 6:12 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by gonca » Tue Jan 23, 2018 5:29 pm

GTX 1080Ti hooked up to a receiver which goes to a 65" 4K TV
All HDR10 and Dolby Vision capable

User avatar
admin
Site Admin
Posts: 3831
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin » Tue Jan 23, 2018 6:33 pm

:bow:

gonca
Distinguished Member
Distinguished Member
Posts: 555
Joined: Sun Apr 08, 2012 6:12 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by gonca » Tue Jan 23, 2018 6:55 pm

Hopefully I'll be able to do a comparison of HDR to HDR>SDR to a native SDR clip
P.S.
Santa was good to me... until he stuck me with the bill for this stuff

User avatar
hydra3333
Distinguished Aussie Member
Distinguished Aussie Member
Posts: 115
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by hydra3333 » Fri Jan 26, 2018 1:54 am

my goodness gonca, envious of the equipment if not the bill.

A query ...

I have (a) an old PC with a 750Ti nvidia card and another with a low-cost 1050Ti (b) a low cost samsung telly which claims to do 4k and hdr ... but no media player which does 4k or hdr.
I do have a chromecast ultra attached to that telly though.
In your view, would this be reasonable to test and compare with ?
1. for HDR
save native HDR file -> on a chromecast server filesystem (on a raspberry pi3) -> use a tablet to cast the HDR file from the Pi3 to the chromecast ultra
2. for SDR:
convert HDR file -> h.264.avc.SDR.mp4 using NVENC to a chromecast server filesystem (on a raspberry pi3) -> use a tablet to cast the SDR file from the Pi3 to the chromecast ultra

PS IIRC the 750Ti won't encode h.265 nor HDR using NVENC in ffmpeg, but does a 1050Ti do either/both ?

gonca
Distinguished Member
Distinguished Member
Posts: 555
Joined: Sun Apr 08, 2012 6:12 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by gonca » Fri Jan 26, 2018 4:31 pm

You need to make all your devices are HDMI 2.0 capable.
Make your HDMI cables are rated, Amazon basics cables are good enough (18Gbps)
The 1050Ti can decode and encode HEVC, don't think the 750 can do hardware decoding of HEVC
CPU decoding of 4K HEVC would be a massive load
If everything is decrypted HDCP is not an issue

1050Ti > TV (4K+HDR) with proper cables sounds good enough
NVEnc does not retain the HDR metadata, (it does use the parameters) meaning you have to turn on HDR manually on the TV
or
Use nvhsp to apply the metadata back into the HEVC stream
Its quite easy to use

User avatar
admin
Site Admin
Posts: 3831
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin » Fri Jan 26, 2018 5:27 pm

Link for nvhsp?

gonca
Distinguished Member
Distinguished Member
Posts: 555
Joined: Sun Apr 08, 2012 6:12 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by gonca » Fri Jan 26, 2018 6:15 pm

https://github.com/SK-Hardwired/nv_hevc ... /nvhsp.zip

my template command line
"C:\Program Files (Portable)\HDRpatcher\nvhsp.exe" -full_range tv -colorprim bt2020 -colormatrix bt2020nc -transfer smpte-st-2084 -chromaloc 2 -maxcll 1000,300 -masterdisplay "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,0)" "T:\IMPORTS\.hevc" "I:\.hevc"
This is good for P65? I believe, change maxcll and L values as required
MediaInfo 17.10 still gives the actual numbers
G, B, R, and WP are the numbers reported by MediaInfo x 50000

Edit
P65 should actually read DCI-P3 D65
Last edited by gonca on Sat Jan 27, 2018 7:16 am, edited 1 time in total.

User avatar
admin
Site Admin
Posts: 3831
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin » Fri Jan 26, 2018 6:37 pm

Thanks!

Post Reply