Log in

View Full Version : easy way for conversion from Rec 601 to Rec 709 using Avisynth+


yup
11th July 2017, 14:00
Hi all!
Please advice.
My source analog capture Rec 601 how right convert to Rec 709 under Avisynth+ 64 bit?
yup.

shae
11th July 2017, 14:20
I'm not an authority, but perhaps this:
http://avisynth.nl/index.php/Colorimetry#Should_I_correct_anything_when_processing_my_content.3F

yup
11th July 2017, 15:35
May be easy way for 16 bit depth source will be?
ConvertToRGB48( matrix="Rec709").ConvertToYV16()
yup.

shae
13th July 2017, 01:48
Don't know. I suppose you could compare the results against RGB48->RGB24->YV12.

hello_hello
13th July 2017, 11:55
There appears to be a 64 bit version of the Color Matrix plugin here:
https://code.google.com/archive/p/avisynth64/wikis/PluginLinks.wiki

yup
16th July 2017, 17:46
hello_hello!
If my source high bit depth? How use Colormatrix?
yup.

poisondeathray
16th July 2017, 18:18
z_lib
https://forum.doom9.org/showthread.php?p=1784316

eg 16bit444 YUV normal range source, 601 to 709

#16bit444 YUV source
z_ConvertFormat(pixel_type="YUV444P16", colorspace_op="170m:601:170m:l=>709:709:709:l")

yup
17th July 2017, 08:31
poisondeathray!
:thanks: for advice.
Full script could be

ConvertToYUV444()
z_ConvertFormat(pixel_type="YUV444P16", colorspace_op="170m:601:170m:l=>709:709:709:l")
ConvertToYV16()

I am not familiar with colorspace conversion.
yup.

poisondeathray
17th July 2017, 16:51
poisondeathray!
:thanks: for advice.
Full script could be

ConvertToYUV444()
z_ConvertFormat(pixel_type="YUV444P16", colorspace_op="170m:601:170m:l=>709:709:709:l")
ConvertToYV16()

I am not familiar with colorspace conversion.
yup.

What are you starting with, what do you want to end up with, and why are you doing this ?

You could have specified YUV422P16 for the pixel type directly instead of converting it later in 2nd step

Up/downsampling chroma is not a lossless transformation, unless you use nearest neighbor and dimensions are evenly divisibly by 2

yup
17th July 2017, 18:56
What are you starting with, what do you want to end up with, and why are you doing this ?
I am starting with YUY2 PAL 576i source, ConvertToYV16, after 16 bits and denoising, deinterlacing using QTGMC at 50 fps, upscaling up to 720p and encoding using x265 at 10 bit. Better way make colorspace conversion before denoising?
yup.

yup
17th July 2017, 18:57
You could have specified YUV422P16 for the pixel type directly instead of converting it later in 2nd step

Up/downsampling chroma is not a lossless transformation, unless you use nearest neighbor and dimensions are evenly divisibly by 2
How this organizing?
yup.

poisondeathray
17th July 2017, 19:10
YUY2 means 8bit 4:2:2 , ConvertToYV16 just converts to planar 8bit 4:2:2

If your denoising and high bit depth filters don't need 4:4:4 , there is no reason to convert to 4:4:4 . (You don't need ConvertToYUV444() ; just use pixel_type="YUV422P16" for z_ConvertFormat) . Scaling up and down is lossy unless you use nearest neighbor on 2x multiples (default resizer uses bicubic)

I don't think it matters where you do the 601=>709 step . It should more accurate at higher bit depth, but I doubt it makes a significant difference at end result when you go down to 10bit, and when you start with 8bit in the first place

yup
17th July 2017, 19:21
poisondeathray!
I coul use for my YV16 16 bit source only command:
z_ConvertFormat(pixel_type="YUV444P16", colorspace_op="170m:601:170m:l=>709:709:709:l")
And it is will be enough? Right?
yup.

poisondeathray
17th July 2017, 19:27
poisondeathray!
I coul use for my YV16 16 bit source only command:
z_ConvertFormat(pixel_type="YUV444P16", colorspace_op="170m:601:170m:l=>709:709:709:l")
And it is will be enough? Right?
yup.

If your other filters don't use or need 444, don't use it.

Use YUV422P16 instead of YUV444P16 (422 instead of 444)

yup
17th July 2017, 19:33
If your other filters don't use or need 444, don't use it.

Use YUV422P16 instead of YUV444P16 (422 instead of 444)
:thanks:
understand.
yup.