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 7th July 2023, 16:52   #301  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 407
avsresize_r22 (pass: m6UEtJm68sPV):
- interlaced now works with use_props=1 too.
If interlaced is not specified, frame property "_FieldBased" is read to enable/disable the interlaced mode.
If interlaced is specified, "_FieldBased" doesn't have effect.
- zimg v3.0.5.
StvG is online now   Reply With Quote
Old 7th July 2023, 19:11   #302  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,582
Quote:
Originally Posted by StvG View Post
avsresize_r22 (pass: m6UEtJm68sPV):
- interlaced now works with use_props=1 too.
If interlaced is not specified, frame property "_FieldBased" is read to enable/disable the interlaced mode.
If interlaced is specified, "_FieldBased" doesn't have effect.
- zimg v3.0.5.
thank you, I will test it as soon as possible

edit: everything seems ok, what about chroma subsampling parameter? https://forum.doom9.org/showthread.p...50#post1989150
__________________
See My Avisynth Stuff

Last edited by real.finder; 8th July 2023 at 02:37.
real.finder is offline   Reply With Quote
Old 8th July 2023, 09:59   #303  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 407
Quote:
Originally Posted by real.finder View Post
thank you, I will test it as soon as possible

edit: everything seems ok, what about chroma subsampling parameter? https://forum.doom9.org/showthread.p...50#post1989150
What's the difference between z_ConvertFormat(pixel_type="yuv444p16") and z_ConvertFormat(chroma_subsampling="444") (assuming YUV420P16 input)?
StvG is online now   Reply With Quote
Old 8th July 2023, 13:12   #304  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,582
Quote:
Originally Posted by StvG View Post
What's the difference between z_ConvertFormat(pixel_type="yuv444p16") and z_ConvertFormat(chroma_subsampling="444") (assuming YUV420P16 input)?
with YUV420P16 case both are same but with yv12 (8bit YUV420) z_ConvertFormat(pixel_type="yuv444p16") will convert it from 8 bit to 16 bit and 4:4:4 while z_ConvertFormat(chroma_subsampling="444") will only convert it to 4:4:4 (it will be yv24)

edit: maybe it also worth adding bit_bepth parameter too

and both chroma_subsampling and bit_bepth will be ignored when pixel_type is used
__________________
See My Avisynth Stuff

Last edited by real.finder; 8th July 2023 at 13:29.
real.finder is offline   Reply With Quote
Old 9th July 2023, 06:18   #305  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 407
Quote:
Originally Posted by real.finder View Post
with YUV420P16 case both are same but with yv12 (8bit YUV420) z_ConvertFormat(pixel_type="yuv444p16") will convert it from 8 bit to 16 bit and 4:4:4 while z_ConvertFormat(chroma_subsampling="444") will only convert it to 4:4:4 (it will be yv24)

edit: maybe it also worth adding bit_bepth parameter too

and both chroma_subsampling and bit_bepth will be ignored when pixel_type is used
Code:
z_ConvertFormat(pixel_type="yuv444p" + (ComponentSize() == 4 ? "s" : String(BitsPerComponent())))
Is the above code too complicated?

Don't get me wrong. There are already a lot of parameters that making the usage a bit complicated at first look. Adding more parameters with actions that are already covered is unnecessary further complication imo.
StvG is online now   Reply With Quote
Old 9th July 2023, 10:41   #306  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,582
if the problem that it got lot of parameters, then can we got pixel_type to accept things like "444" (or "yuv444*") or "Y" (without any number or "Y*") and same with bitbepth (like *P16)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 9th July 2023, 14:41   #307  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 407
avsresize_r23 (pass: m6UEtJm68sPV):
- Added parameter bit_depth: output bit depth. It doesn't have effect if pixel_type is defined;
- Added parameter chroma_subsampling: output chroma subsampling. It doesn't have effect if pixel_type is defined;
- zimg v3.0.5.

Last edited by StvG; 10th July 2023 at 02:29. Reason: Fix typo
StvG is online now   Reply With Quote
Old 9th July 2023, 18:05   #308  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,582
Quote:
Originally Posted by StvG View Post
avsresize_r23 (pass: m6UEtJm68sPV):
- Added parameter bit_depth: output bit depth. It doesn't effect if pixel_type is defined;
- Added parameter chroma_subsampling: output chroma subsampling. It doesn't effect if pixel_type is defined;
- zimg v3.0.5.
thanks! both work fine
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 9th July 2023, 19:43   #309  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,719
Quote:
Originally Posted by StvG View Post
- Added parameter bit_depth: output bit depth. It doesn't effect if pixel_type is defined;
- Added parameter chroma_subsampling: output chroma subsampling. It doesn't effect if pixel_type is defined;
- zimg v3.0.5.
So, as long as I specify the pixel_type, everything stays the same as in the last version if I don't specify the two new parameters, right?
FranceBB is offline   Reply With Quote
Old 10th July 2023, 02:31   #310  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 407
Quote:
Originally Posted by FranceBB View Post
So, as long as I specify the pixel_type, everything stays the same as in the last version if I don't specify the two new parameters, right?
Yes, if you specify pixel_type the two new parameters are ignored even if they are specified too.
StvG is online now   Reply With Quote
Old 10th July 2023, 05:25   #311  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,719
Perfect, so it won't break any of my supply chains.

Well, I'm suffering from insomnia due to the heatwave (I'm currently in Milan, Italy and not in the UK unfortunately) and the fan is just blowing hot air on me, which is useless...
So... I might just get up, take a shower, have breakfast, go to the office (where I actually have AC) and update all my servers xD
FranceBB is offline   Reply With Quote
Old 30th July 2023, 07:50   #312  |  Link
joearmstrong
Registered User
 
joearmstrong's Avatar
 
Join Date: Jul 2013
Posts: 38
I'm not sure if I'm using chromaloc_op correctly. I haven't used it so far.

I want to convert HDR PQ to SDR:
Example 1:
z_ConvertFormat(pixel_type="RGBP16", colorspace_op="2020ncl:st2084:2020:limited=>rgb:st2084:2020:full", chromaloc_op="top_left=>top_left", dither_type="none")
Cube("D:\5-NBCU_PQ2SDR_DL_Adobe_v1.cube", interp=1, fullrange=1)
z_ConvertFormat(pixel_type="YV12", colorspace_op="rgb:709:709:full=>709:709:709:limited", chromaloc_op="top_left=>left", dither_type="ordered")

Example 2:
z_ConvertFormat(pixel_type="YUV444P16",colorspace_op="2020ncl:st2084:2020:l=>2020ncl:st2084:2020:l",chromaloc_op="top_left=>top_left",dither_type="none")
ConvertYUVtoXYZ(Color=0,HDRMode=0,OOTF=false,OutputMode=2)
ConverXYZ_BT2446_C_HDRtoSDR(PQMode=true,Lhdr=50000.0,Lsdr=100.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)
z_ConvertFormat(pixel_type="YV12",colorspace_op="709:709:709:l=>709:709:709:l",chromaloc_op="top_left=>left",dither_type="ordered")

I think the change to "left" (mpeg2), which is the standard for Rec709, should be placed at the end of the scripts ?

Last edited by joearmstrong; 30th July 2023 at 10:09.
joearmstrong is offline   Reply With Quote
Old 30th July 2023, 11:04   #313  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,719
It should, in theory, be fine.
When you upscale the chroma to RGB, you're essentially going to the same resolution for both luma and chroma and, just like with 4:4:4, the chroma location loses its meaning.
When you're downscaling the chroma to go back to 4:2:0, however, it actually matters, but given that by default it assumes that you want the classic 4:2:0 (i.e left) and not type 2 (i.e top left), it will automatically get it right even if you don't specify it
FranceBB is offline   Reply With Quote
Old 30th July 2023, 11:46   #314  |  Link
joearmstrong
Registered User
 
joearmstrong's Avatar
 
Join Date: Jul 2013
Posts: 38
Thanks for your answer and explanation, FranceBB.
joearmstrong is offline   Reply With Quote
Old 1st October 2023, 20:11   #315  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 407
The source code is uploaded here.
Builds are here.
StvG is online now   Reply With Quote
Old 2nd October 2023, 11:12   #316  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,429
Quote:
Originally Posted by StvG View Post
Builds are here.
Thank you
__________________
@turment on Telegram
tormento 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 14:01.


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