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. |
![]() |
#201 | Link |
Registered User
Join Date: Oct 2018
Posts: 314
|
May I ask why the default pct_hdr_skin for PQMode in ConvertXYZ_BT2446_C_HDRtoSDR is set to 0.44? I haven't seen anything in ITU-R BT.2408 regarding this, only about HLG.
__________________
AviSynth AiUpscale |
![]() |
![]() |
![]() |
#202 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,261
|
I don't remember exactly... But if indeed there is nothing in BT.2408, i probably "estimate" it using informations from several BT, and i probably choose this value because "it seems not too bad".
There is probably some curve or anything which lead me to this choice.
__________________
My github. |
![]() |
![]() |
![]() |
#203 | Link |
Registered User
Join Date: Oct 2018
Posts: 314
|
Ah ok, I think I know why you did it. 44% PQ equals 50 nits, same as 50% HLG. It doesn't seem too bad indeed.
__________________
AviSynth AiUpscale |
![]() |
![]() |
![]() |
#204 | Link |
Registered User
Join Date: Oct 2018
Posts: 314
|
I found something funny looking at your code, not that it's in the least important, but I think I should let you know. You use 2.404 as the power in the BT.1886 EOTF, but the last 4 is actually a footnote
![]() Also, I'm not too sure that the inverse OETF should be used, ITU repeats all over the place something that seems to imply this opinion, but I can understand why you do it.
__________________
AviSynth AiUpscale |
![]() |
![]() |
![]() |
#208 | Link |
Registered User
Join Date: Feb 2014
Posts: 351
|
Color Conversion: How To Tonemap BT.2020 To BT.709
First, many thanks jpsdr for all your effort
![]() I was gifted a UHD Blu-ray but don't have a 4K TV, so I figured I'd shrivel it to 1080p using AviSynth after color converting and resizing losslessly with VirtualDub2. Unfortunately, after hours of effort, I can't figure out how to tonemap BT.2020 to BT.709. I'm here because it seems to me that that's what your HDRTools plugin is for but using Code:
ConvertYUVToXYZ(Color=1) ConvertXYZToYUV(pColor=1) Ahhh, a video sample. Last edited by LouieChuckyMerry; 4th June 2023 at 21:18. Reason: Link To Test Clip |
![]() |
![]() |
![]() |
#209 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,727
|
Quote:
Code:
ConvertBits(16) ConvertYUVtoXYZ(Color=0, OutputMode=1, HDRMode=0, fullrange=false) ConvertXYZ_Reinhard_HDRtoSDR(exposure_X=2.5, contrast_X=0.9) ConvertXYZtoYUV(pColor=0) Converttoyuv420() |
|
![]() |
![]() |
![]() |
#210 | Link |
Registered User
Join Date: Feb 2014
Posts: 351
|
Thanks for your reply, FranceBB. Your suggested script runs fine but doesn't appear to change the video in any way; i.e., the output looks the same as the input, dull and muted (the same-looking result as the script I posted above).
|
![]() |
![]() |
![]() |
#211 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,673
|
If you have an nVidia GPU available, you can use DGHDRtoSDR to do the grading in one simple step. DGIndexNV can be used to tune the parameters per source.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
![]() |
![]() |
![]() |
#212 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,727
|
Quote:
Anyway, here's a comparison: ![]() This is done with the following script: Code:
FFVideoSource("D:\TestClip2[2160p].mkv") SinPowerResize(848, 480) original=last.Text("BT2020 HDR PQ 1043 nits - Original") ConvertBits(16) hbd=last ConvertYUVtoXYZ(Color=0, OutputMode=1, HDRMode=0, fullrange=false) ConvertXYZ_Reinhard_HDRtoSDR(exposure_X=2.5, contrast_X=0.9) ConvertXYZtoYUV(pColor=0) Converttoyuv420() ConvertBits(bits=10, dither=1) Text("BT709 SDR 100 nits - Reinhard tonemapping") tonemapped=last ConvertToPlanarRGB(hbd, matrix="Rec2020", interlaced=false) Cube("C:\Programmi\AviSynth+\LUTs\PQ_to_BT709_v2.cube", fullrange=true) Converttoyuv420() ConvertBits(bits=10, dither=1) Text("BT709 SDR 100 nits - FranceBB LUT") lutted=last StackVertical(original, tonemapped, lutted) If you like the last one, then I strongly suggest you to check this out: https://forum.doom9.org/showthread.php?t=176091 |
|
![]() |
![]() |
![]() |
#213 | Link |
Registered User
Join Date: Feb 2014
Posts: 351
|
Boulder: Thanks for your reply. I do have an nVidia GPU and a license for DGIndexNV, so I'll attack your suggestion ASAP.
_____________ FranceBB: Thanks again for your help. Your latest suggestion looks good but I'll need a goodly stretch of free time to wrap my head around it. _____________ I should have time this weekend to work on the above, possibly (but doubtfully) earlier. I really appreciate the help ![]() _____________ Edit: FranceBB: I took a quick look at your last link and, wow, that's really cool! Of course, I understand it intellectually but not really any of the details ![]() Last edited by LouieChuckyMerry; 7th June 2023 at 18:46. Reason: That's Cool |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|