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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th May 2020, 11:49   #141  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,899
Not sure RGB64 is slower, and i don't intend to start a huge work, because as i said, changing/adding output supported formats means also changing/adding supported formats input for the next filter.
This will be a long work, and i don't intend to spend time on something i think unecessary (again, you can convert lossless afterward).

Edit
Again i may have misunderstood... I mean for me not sure RGB64 is slower for the specific case of these plugins.
After, of course, for others plugins, it's another story.
__________________
My github.

Last edited by jpsdr; 24th May 2020 at 11:55.
jpsdr is offline   Reply With Quote
Old 24th May 2020, 11:49   #142  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 5,061
I just tested a 1000-frame encode,
outputmode = 0, 2.25 fps, 8825.11 kbps, avg QP 15.11
outputmode = 2, 2.26 fps, 8595.19 kbps, avg QP 14.76

Using outputmode = 2 was a tiny bit faster to encode but probably due to the lower avg bitrate. The difference in avg QP is quite big. But like I said, I cannot tell the difference in frame-by-frame comparison of the source, so it probably just stabilizes things.
What I found odd was that outputmode = 2 produces one keyframe more than outputmode = 0. I need to investigate where it is to see what's happening there
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 3rd September 2020, 13:48   #143  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Metropolitan City of Milan, Italy
Posts: 1,399
Quote:
I'd like to convert an SDR video (rec709) to HDR (rec2020)?
I tried feeding this directly into x265:
Code:
ConvertYUVtoXYZ()
ConvertXYZtoYUV(Color=1, pColor=2)
Am I missing something?
I don't think that's what you're doing.
Simply using

Code:
ConvertYUVtoXYZ()
ConvertXYZtoYUV(Color=1, pColor=2)
will NOT give you any kind of HDR, you're essentially just converting from BT709 SDR to BT2020 SDR, that's it.
And of course, colors should be identical (if seen using an appropriate display) as it's SDR to SDR.
To properly encode it in x265 make sure you're setting: --colorprim bt2020 --transfer bt2020-10 --colormatrix bt2020nc and nothing else as it's not HDR, it's SDR, BT2020 SDR.

If you wanna go to "fake" HDR for any kind of reason and you wanna use HDRTools, the thing you're looking for is: ConvertXYZ_Scale_SDRtoHDR() with the appropriate parameters. Otherwise, there are always my matrices. I gotta say, though, that unlike SDR to SDR (like BT709 SDR to BT2020 SDR), if you go to HDR (namely BT2020 + a color curve) you're not gonna get an output that is identical to the input even if displayed with a proper display as you're essentially faking a color curve and HDR Metadata. This should be avoided unless you really need to. A common scenario is when you're producing something in HDR PQ or HDR HLG (like a Documentary) and you have some legacy footages to insert every now and then between interviews (and therefore you need to bring those BT709 SDR footages to HDR PQ or HLG).
Anyway, if this is NOT what you're doing, stick with BT2020 SDR.
if your final result is in PQ, make sure to specify:

Code:
--hdr-opt --hrd --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,0.0050)" --max-cll 1000,400
(that's an example, you have to set master display and cll yourself according to your values)

for HDR HLG:

Code:
--hdr-opt --hrd --colorprim bt2020 --transfer arib-std-b67 --colormatrix bt2020nc --atc-sei 18 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,0.0050)" --max-cll 1000,400

Last edited by FranceBB; 4th September 2020 at 10:34.
FranceBB is offline   Reply With Quote
Old 20th April 2021, 23:30   #144  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 115
A question about parameters for ConvertYUVtoLinearRGB : If I need to got inverse-OETF for given input system - which combination of EOTF and OOTF bools must be used ?

As I read from https://www.itu.int/dms_pub/itu-r/op...2019-PDF-E.pdf the EOTF even for old enough BT.709 is not complete inverse of OETF so resulting OOTF is not completely linear. Leaving System Gamma about 1.2.

Readme says about OOTF param:
OOTF -
Color = 0:

HDRMode = 0, 1, 2:
If set to false, the OOTF-1 step will be skipped during the linear convertion.

Color <> 0:
If EOTF is false, nothing is done whatever OOTF => Output will be standard RGB.
If OOTF is false and EOTF is true, the output will be the linear displayed data (Fd).

Default: true (bool)

For BT.709 input Color=2, so if EOTF=true and OOTF=true and Color=2 - what is output ?

Also for terms:
"Output will be standard RGB." - it mean RGB with OOTF not removed and target for displaying ?
"output will be the linear displayed data (Fd)." - it mean original true-linear RGB (inverse-OETF) ?

Or OOTF only applicable to BT.2100 (Color=0) and not applicable to BT.709 so it can not make real inverse-OETF for BT.709 to get initial true-linear data ?
DTL is offline   Reply With Quote
Old 21st April 2021, 18:03   #145  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,899
Don't make the same mistake than me at the begining, believing EOTF is the inverse of OETF. That's not it. Did you read the PDF i've provided with the plugin where i try to explain how it works and the paths with the functions name ?

Es = true original linear (directly from sensor)
E' = non lineard (what we are working with on our PCs).
Ed = linear displayed (what the screen displays/uses).
E' = OETF(Es)
Ed = EOTF(E')
Ed = OOTF(Es)
Again, read the PDF provided.

Standard RGB : Simple matrix conversion YUV <-> RGB, so E'.
It's not that's OOTF is not applicable, it's just that there is no one direct function. For BT.709 to have OOTF you do EOTF(OETF()).

BT.709 EOTF=true & OOTF=true you have inverse OETF, so Es.
BT.709 EOTF=true & OOTF=false you have inverse EOTF, so Ed.

From what i understood reading all the REC i list in the pdf.
__________________
My github.

Last edited by jpsdr; 21st April 2021 at 18:10.
jpsdr is offline   Reply With Quote
Old 21st April 2021, 19:01   #146  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 115
Oh - I found .pdf document only in the release .zip. The github files only have HDRTools - readme.txt. Now it is more sources to read. Thank you.
DTL is offline   Reply With Quote
Old 21st April 2021, 21:51   #147  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 1,084
Couldn't find any tool to TM without issues.

madVR


HDRTools

Code:
ConvertYUVtoXYZ(Color=0, OutputMode=2, HDRMode=0, fullrange=false, OOTF=false)
# Lhdr at 50000 otherwise overexposed output as pointed by someone before, Lsdr has no effect
ConverXYZ_BT2446_C_HDRtoSDR(PQMode=true,Lhdr=50000.0,Lsdr=200.0,pColor=0,pct_ref=0.6,pct_ip=0.6,pct_wp=1.0,pct_sdr_skin=1.0,pct_hdr_skin=0.44)
ConvertXYZtoYUV(Color=2,pColor=0,OOTF=false)
Converttoyuv420(interlaced=false, matrix="Rec.709")
ConvertBits(bits=8, dither=1)

This is with Reinhard
Code:
# Reinhard has better TM, but the exposure value is a bit random
ConvertXYZ_Reinhard_HDRtoSDR(exposure_X=28.0)


DGHDRtoSDR
Code:
# White Point is too cool, maybe a chromatic adaptation issue
DGHDRtoSDR(mode="pq",white=48)
ConvertBits(bits=8, dither=1)



There's also heavy banding with HDRTools (EDIT: nevermind fixed adding OutputMode=2):



By the way, it would be cool to support .measurement files made with madMeasureHDR so TM could be done dynamically.

Last edited by Dogway; 21st April 2021 at 22:02.
Dogway is offline   Reply With Quote
Old 30th April 2021, 15:32   #148  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,899
New version, see first post.
__________________
My github.
jpsdr is offline   Reply With Quote
Old 30th April 2021, 16:23   #149  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 9,114
And thanx for this one too, and the other one [EDIT: two, EDIT: three] I aint comented on. (you've been a busy boy/girl )
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 30th April 2021 at 16:33.
StainlessS is offline   Reply With Quote
Old 30th April 2021, 19:06   #150  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Metropolitan City of Milan, Italy
Posts: 1,399
Quote:
Originally Posted by StainlessS View Post
(you've been a busy boy/girl )
I'm pretty sure Jean Philippe is a dude xD

Quote:
And thanx for this one too
Yep, thank you, Jean
FranceBB is offline   Reply With Quote
Old 30th April 2021, 20:05   #151  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,899
Yes, i'm a dude.

Almost everything was allready done, but i wanted to finish fixing the aWarp4 issue before releasing new builds.
I was waiting to have time to investigage it, and this is my first day of my holydays, so i finaly got the time, and also i wanted to "get rid of it", to be quiet for the rest of my holydays...
__________________
My github.
jpsdr is offline   Reply With Quote
Old 30th April 2021, 21:59   #152  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 9,114
OK dude, have a nice holiday.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 1st May 2021, 10:47   #153  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Metropolitan City of Milan, Italy
Posts: 1,399
Quote:
Originally Posted by jpsdr View Post
i wanted to "get rid of it", to be quiet for the rest of my holydays...
Smart move. Enjoy your vacation
FranceBB is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.