HDR -> SDR conversion

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
User avatar
Rocky
Posts: 3525
Joined: Fri Sep 06, 2019 12:57 pm

Re: HDR -> SDR conversion

Post by Rocky »

Wow Bullwinkle. What would we do without you!? Here we go. Whee!
User avatar
Bullwinkle
Posts: 337
Joined: Thu Sep 05, 2019 6:37 pm

Re: HDR -> SDR conversion

Post by Bullwinkle »

That's nothing Rocky watch me pull a rabbit out of my hat...
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: HDR -> SDR conversion

Post by Guest 2 »

Out of curiosity, DGHDRtoSDR uses Reinhard, right?
User avatar
Rocky
Posts: 3525
Joined: Fri Sep 06, 2019 12:57 pm

Re: HDR -> SDR conversion

Post by Rocky »

Yes, it does.
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

HDR -> SDR conversion

Post by Guest 2 »

Where can I find DGHDRtoSDR latest release?

On main site I can download 1.13 only.

Do you plan to integrate the plugin into DGDecodeNV dll?
User avatar
Rocky
Posts: 3525
Joined: Fri Sep 06, 2019 12:57 pm

HDR -> SDR conversion

Post by Rocky »

Fixed the main web page menu for 1.14. Thank you for pointing that out.

Haven't any plans to incorporate it into DGDecodeNV.dll as I want to keep it free.
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

HDR -> SDR conversion

Post by Guest 2 »

Rocky wrote:
Mon Mar 22, 2021 8:57 am
Fixed the main web page menu for 1.14. Thank you for pointing that out.
:hat:
DAE avatar
50vince50
Posts: 1
Joined: Sun May 09, 2021 1:49 pm

HDR -> SDR conversion

Post by 50vince50 »

DG, Rocky, a few words to thank you for this excellent filter (using it with AVS) !!!
User avatar
Rocky
Posts: 3525
Joined: Fri Sep 06, 2019 12:57 pm

HDR -> SDR conversion

Post by Rocky »

Thank you 50vince50 (LOL) and welcome to the forum!
User avatar
Rocky
Posts: 3525
Joined: Fri Sep 06, 2019 12:57 pm

HDR -> SDR conversion

Post by Rocky »

Rocky wrote:
Mon Mar 22, 2021 8:57 am
Haven't any plans to incorporate it into DGDecodeNV.dll as I want to keep it free.
Re-thinking may be in order.
User avatar
Rocky
Posts: 3525
Joined: Fri Sep 06, 2019 12:57 pm

HDR -> SDR conversion

Post by Rocky »

Just for fun I ran a HDR PQ UHD disk with DGSource/DGHDRtoSDR/DGDenoise on the 3090. It hardly breaks a sweat.

Code: Select all

AVSMeter 3.0.9.0 (x64), (c) Groucho2004, 2012-2021
AviSynth+ 3.7.0 (r3382, 3.7, x86_64) (3.7.0.0)

Number of frames:                   201901
Length (hh:mm:ss.ms):         02:20:20.954
Frame width:                          3840
Frame height:                         2160
Framerate:                          23.976 (24000/1001)
Colorspace:                           YV12

Frames processed:                   4800 (0 - 4799)
FPS (min | max | average):          49.09 | 77.08 | 73.97
Process memory usage (max):         552 MiB
Thread count:                       27
CPU usage (average):                6.3%

GPU usage (average):                53%
VPU usage (average):                18%
GPU memory usage:                   2018 MiB
GPU Power Consumption (average):    243.4 W

Time (elapsed):                     00:01:04.893
DAE avatar
Guest

HDR -> SDR conversion

Post by Guest »

Now you need storage for that speed (indexing and demuxing)
User avatar
Rocky
Posts: 3525
Joined: Fri Sep 06, 2019 12:57 pm

HDR -> SDR conversion

Post by Rocky »

Yeah, the 2TB SSD is almost full with ripped disks.
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

HDR -> SDR conversion

Post by Guest 2 »

Is there any way to have chroma 4k 4:2:0 to chroma 1080p 4:4:4 done in CUDA?

It would be nice to have when resizing from DGSource.
User avatar
Rocky
Posts: 3525
Joined: Fri Sep 06, 2019 12:57 pm

HDR -> SDR conversion

Post by Rocky »

Can you please explain the use case and justification for this request?
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

HDR -> SDR conversion

Post by Guest 2 »

Rocky wrote:
Mon Jul 04, 2022 8:27 am
Can you please explain the use case and justification for this request?
AFAIK you can recover full chroma from double the required resolution, such as per post https://forum.doom9.org/showthread.php? ... ost1938846

I was asking myself if all that procedure could be ported inside some of the DGTools libraries.
User avatar
Bullwinkle
Posts: 337
Joined: Thu Sep 05, 2019 6:37 pm

HDR -> SDR conversion

Post by Bullwinkle »

Why do you want to make 1920x1080 4:4:4 material? What players will support it?
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

HDR -> SDR conversion

Post by Guest 2 »

Bullwinkle wrote:
Mon Jul 04, 2022 6:39 pm
Why do you want to make 1920x1080 4:4:4 material? What players will support it?
Any nVidia based PC, as last 2 generations of cards support HEVC 4:4:4.

Anyway, it's not a priority. Many other things are needed first :)
DAE avatar
Dion
Posts: 28
Joined: Sun Dec 04, 2016 12:30 am

HDR -> SDR conversion

Post by Dion »

Did DGHDRtoSDR_1.15 get a different tonemap algorithm vs DGHDRtoSDR_1.14? Results seem very different.
User avatar
Bullwinkle
Posts: 337
Joined: Thu Sep 05, 2019 6:37 pm

HDR -> SDR conversion

Post by Bullwinkle »

No change to the tonemapping. All changes are documented in the Binaries Notification thread.

* HDRtoSDR white parameter (PQ) was made nonlinear to better represent the interesting parameter range.
* HDRtoSDR white parameter (PQ) range was widened and the default is now 2000.
DAE avatar
Dion
Posts: 28
Joined: Sun Dec 04, 2016 12:30 am

HDR -> SDR conversion

Post by Dion »

Mega late reply but I found the reason. Seems the "default" values for .14 and .15 are different.. I just had to adjust .15 back to .14's default values and the results are now identical.
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

HDR -> SDR conversion

Post by Guest 2 »

Dion wrote:
Thu Jul 21, 2022 11:39 pm
Did DGHDRtoSDR_1.15 get a different tonemap algorithm vs DGHDRtoSDR_1.14? Results seem very different.
It's way better to use a proper LUT and DGCube. At least for me and my results.
User avatar
hydra3333
Posts: 393
Joined: Wed Oct 06, 2010 3:34 am
Contact:

HDR -> SDR conversion

Post by hydra3333 »

OK, Looking at the new cudasynth approach, I have 3 dummy's queries:

Code: Select all

DGHDRtoSDR 1.15 by Donald A. Graft
---------------------------------
mode="pq" Source stream is HDR Perceptual Quantizer (PQ)
mode="hlg" Source stream is HDR Hybrid Log Gamma (HLG)
So, I have a samsung S22 phone with HDR+ video settings newly turned on.
I also have a PC with a 1050Ti and another with 2060 Super.

mediainfo says this of a 1 sec video:

Code: Select all

Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format/Url                               : http://www.itu.int
Commercial name                          : HEVC
Format profile                           : Main 10@L5@High
HDR format                               : SMPTE ST 2094 App 4
HDR format                               : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
HDR_Format_Commercial                    : HDR10+
HDR_Format_Version                       : 1
HDR_Format_Compatibility                 : HDR10+ Profile B
Internet media type                      : video/H265
Codec profile                            : Main 10@L5@High
Real frame rate                          : 30.000 FPS
Resolution                               : 10 bits
Colorimetry                              : 4:2:0
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 10 bits
Source duration                          : 00:00:01.800 (00:00:01:24)
Bit rate                                 : 105 Mb/s
Width                                    : 3840
Height                                   : 2160
Pixel aspect ratio                       : 1.000
Display aspect ratio                     : 16:9
Rotation                                 : 90.000
colour_description_present               : Yes
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 200 cd/m2
1. Since mediainfo Transfer characteristics = PQ, does this mean that I use resize_w=1920,resize_h=1080,h2s_enable=1,h2s_mode="pq" for the S22's videos ?
2. Will DGHDRtoSDR pick up what it needs from the metadata of the incoming clip ?
3. Will DGHDRtoSDR successfully decode this using the 1050Ti and with the 2060 Super ?

I hope to use a simple defaults-driven way to convert to 8-bit SDR downsized to 1080 and encoded into h.264 (ffmpeg/vapoursynth) for display on dumber devices.

Thanks.
I really do like it here.
User avatar
Rocky
Posts: 3525
Joined: Fri Sep 06, 2019 12:57 pm

HDR -> SDR conversion

Post by Rocky »

Can you give me a sample source file please?
User avatar
hydra3333
Posts: 393
Joined: Wed Oct 06, 2010 3:34 am
Contact:

HDR -> SDR conversion

Post by hydra3333 »

Sure !
In this folder
https://drive.google.com/drive/folders/ ... sp=sharing

I suspect newer Samsung phones are likely producing this as well if they have HDR+ turned on.

Cheers.
I really do like it here.
Post Reply