Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
18th February 2020, 09:50 | #61 | Link | ||||
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,903
|
Quote:
Quote:
Quote:
Quote:
|
||||
18th February 2020, 22:22 | #62 | Link |
Registered User
Join Date: Jun 2017
Posts: 18
|
Thanks FranceBB.
I think I managed to figure most of it out. Looks like the bright setting in DGHDRtoSDR around 150 produces results that looks like SDR Blu-ray but with better colors. This is very good. Makes sense as HDR assumes 1000 nits and that is why almost all conversions look way too dark when played on a regular monitor. I have used the HDRTools Hable for years, and even with all the manual color tweaks always looked dull and a slight green tint that I could never correct. Thus giving up and trying to brute force with risky auto-levels functions. Oh, my laptop is 400 nits HDR. 400 nits in my face hurts my eyes. Good times. |
19th February 2020, 03:14 | #67 | Link |
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
Mr Stax could include documentation for included tools, imho.
Here is the 1.12 help file: DGHDRtoSDR 1.12 by Donald A. Graft --------------------------------- This Avisynth+/Vapoursynth filter converts HDR10 PQ from UHD blurays to 8-bit SDR YV12 or 10-bit SDR stored in YUV420P16. The input must be YUV420P16, e.g., from DGSource(fulldepth=true). Support for HDR10 HLG will be added in a future version. This filter runs on both CUDA and in software mode. If you try to run in CUDA mode without an nVidia card and driver installed, you will get an error. Use the parameter impl="sw" to run in software mode. Here is a typical Avisynth+ script using default parameters: loadplugin("dgdecodenv.dll") loadplugin("dghdrtosdr.dll") DGSource("hdr_sample.dgi",fulldepth=true) DGHDRtoSDR() prefetch(6) Here is the Vapoursynth equivalent: import vapoursynth as vs core = vs.get_core() core.std.LoadPlugin(path="DGHDRtoSDR.dll") core.std.LoadPlugin(path="DGDecodeNV.dll") video=core.dgdecodenv.DGSource("hdr_sample.dgi",fulldepth=True) video=core.dghdrtosdr.DGHDRtoSDR(clip=video,fulldepth=True) video.set_output() The parameters are: impl="sw" Software mode (very slow). impl="255" Use CUDA, device is chosen automatically. impl="0" Use CUDA on device 0 (use desired device number). Default is "255". fulldepth=false When set to false, 8-bit YV12 is output. When set to true, 10-bit stored in YUV420P16 is output. Use fulldepth=true if you intend to make a 10-bit encoding. The default is false. light=300.0 Target display brightness, lower values increase the resulting output brightness. A good starting point is the maximum nits of your intended display, although you may have to tweak it depending on the source mastering. Default is 300.0. gamma=0.42 Final gamma for the output. The default is 0.42, standard for Rec.709. hue=0.0 Hue adjustment used to correct hue shift. Values above 0.0 shift toward red. Values below 0.0 shift toward green. The default value is 0.0. r=1.0 Saturation adjustment used to desaturate or resaturate red in the output. Do not overdo it; 0.5 to 1.5 is probably the most you can get away with without ruining colors. Values below 1.0 reduce saturation and values above 1.0 increase saturation. The default is 1.0. g=1.0 Saturation adjustment used to desaturate or resaturate green in the output. Do not overdo it; 0.5 to 1.5 is probably the most you can get away with without ruining colors. Values below 1.0 reduce saturation and values above 1.0 increase saturation. The default is 1.0. b=1.15 Saturation adjustment used to desaturate or resaturate blue in the output. Do not overdo it; 0.5 to 1.5 is probably the most you can get away with without ruining colors. Values below 1.0 reduce saturation and values above 1.0 increase saturation. The default is 1.15. tm=0.9 Strength of tonemapping. Reduce this towards 0.0 to smoothly transition to blowout (clipping) of highlights. This value controls a LERP between Reinhard tonemapping and no tonemapping. Default is 0.9. roll=0.7 Rolloff strength of the tonemapping. Increase this towards 1.0 to soften and desaturate the result. The default value of 0.7 is effective at retaining saturation and contrast. This parameter also affects overall brightness so you may have to adjust the light parameter as needed when changing the rolloff. Cropping and Resizing: Often the goal is to convert to HD bluray with a size of 1920 x 1080. And sometimes one wants to crop as well. The fastest way to do this is to use DGSource() cropping and resizing. Following is a typical script: loadplugin("dgdecodenv.dll") loadplugin("dghdrtosdr.dll") dgsource("hdr sample.dgi",crop_t=276,crop_b=276,resize_w=1920,resize_h=804,fulldepth=true) dghdrtosdr() prefetch(6) Alternatively, the cropping and resizing can be done in Avisynth. Do it before calling dghdrtosdr() for best performance. Here is a script corresponding to the one above: loadplugin("dgdecodenv.dll") loadplugin("dghdrtosdr.dll") dgsource("hdr sample.dgi",fulldepth=true) crop(0,276,-0,-276) spline36resize(1920,804) dghdrtosdr() prefetch(6) Copyright (c) 2018 Donald A. Graft, All Rights Reserved Last edited by videoh; 19th February 2020 at 04:33. |
30th March 2020, 15:34 | #69 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Code:
z_ConvertFormat(colorspace_op="470bg:470bg:470bg:limited=>709:709:709:limited",dither_type="ordered") Code:
ColorMatrix(mode="Rec.601->Rec.709")
__________________
See My Avisynth Stuff |
31st March 2020, 03:54 | #70 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
real.finder,
ColorMatrix converts YV12 directly without converting to RGB and back (which is why it's not a plugin for creating color banding), and I assume z_ConvertFormat does it's thing in 16 bit otherwise it'd have banding issues. HDRTools causes lots of banding if you color convert at 8 bit. It turns out that this is wrong: z_ConvertFormat(colorspace_op="470bg:470bg:470bg:limited=>709:709:709:limited") I've been experimenting with conversions via XYZ, but that shouldn't change 470bg being incorrect for transfer characteristics. The gamma is wrong. TheFluff explained it in this post , which I read at the time, but obviously didn't take enough in, so today I wasted lots of time trying to discover why AVSResize appeared to be messing with the luminance levels. When I eventually realised the problems all involved 470bg, aside from one caused by a typo to throw me off the track, the penny finally dropped. For YUV, this seems to be close to having each conversion method agree. I haven't bypassed XYZ yet to see if it's better or worse. It probably doesn't matter unless a conversion to/from 2020 is involved, if at all. AVSResize 170m-709 z_ConvertFormat(colorspace_op="170m:601:170m:l=>170m:601:xyz:l", dither_type="error_diffusion") z_ConvertFormat(colorspace_op="170m:601:xyz:l=>709:709:709:l", dither_type="error_diffusion") HDRTools 170m-709 This picture is named "HDRTools-470bg-709.png" but it's really 170m-709. PostImg has been messing with the file names during uploading lately. AVSResize 470bg-709 z_ConvertFormat(colorspace_op="470bg:601:470bg:l=>470bg:601:xyz:l", dither_type="error_diffusion") z_ConvertFormat(colorspace_op="470bg:601:xyz:l=>709:709:709:l", dither_type="error_diffusion") HDRTools 470bg-709 ColorMatrix 601-709 DitherTools 601-709 If anyone's interested, there's also some 2020 conversion comparisons here. https://postimg.cc/gallery/4Tr8RzC Last edited by hello_hello; 1st April 2020 at 20:11. |
2nd April 2020, 00:59 | #71 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
so for upscaling DVD (NTSC DVD) to HD
Code:
z_ConvertFormat(colorspace_op="470bg:601:170m:limited=>709:709:709:limited",dither_type="ordered") BTW how one know the color info in DVD? in dgindex it only has Colorimetry: BT.470-2 B,G*
__________________
See My Avisynth Stuff |
22nd April 2020, 04:42 | #72 | Link | |
Registered User
Join Date: Jan 2018
Posts: 2,156
|
Quote:
|
|
22nd April 2020, 13:50 | #73 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Yeah, I'm sure ColorMatrix 709 to 2020 conversion are different to every other program (2020 to 709 seems okay). Just as bad, you can specify a conversion between 601 & 2020 (either direction) and instead of producing an error message, it does nothing.
|
Thread Tools | Search this Thread |
Display Modes | |
|
|