15.10.2020, 09:19
Using Hybrid 2020.10.11.1.
Consider this:
We are going to load a 24 bit png image sequence into 32 bit AviSynth.
We are going to run QTGMC.
This is the resulting script:
This script converts the RGB colors to YV24 for QTGMC, then to YV12 for the final output for 4:2:0.
The problem, is that matrix="Rec709" is specified for the ConvertToYV24 filter, but not for the ConvertToYV12 filter.
This results in a color pallette shift. Since nothing is specified for the ConvertToYV12 filter, it must be using some other conversion matrix than Rec709:
So, when ConvertToYV24(interlaced=false, matrix="Rec709") is used in a script, then later in the script ConvertToYV12 is used, it needs to be run as ConvertToYV12(matrix="Rec709"), not ConvertToYV12(). When it is run as ConvertToYV12(matrix="Rec709"), then the color shift that is shown in the above image does not happen. So the matrix= setting should always be used to match whatever matrix is being used for the video.
Consider this:
We are going to load a 24 bit png image sequence into 32 bit AviSynth.
We are going to run QTGMC.
This is the resulting script:
Code:
ClearAutoloadDirs()
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\LoadDll.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ImageSeq.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\AddGrainC.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\dfttest.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\EEDI2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\eedi3.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\FFT3DFilter.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\masktools2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\mvtools2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\TDeint.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\RgTools.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\MedianBlur2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\nnedi3.dll")
LoadCPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\yadif.dll")
LoadDLL("C:\Program Files\Hybrid\32bit\avisynthPlugins\libfftw3f-3.dll")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\QTGMC.avsi")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\SMDegrain.avsi")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\Zs_RF_Shared.avsi")
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
# loading source: E:/USER/Test-AdobeRGB.png
# color sampling RGB32@8, matrix: bt709, scantyp: progressive, luminance scale: limited
ImageReader(file="E:\USER\Test-AdobeRGB.png", end=100, fps=23.976, use_DeviL=true, pixel_type="RGB24")
# current resolution: 1440x1080
# denoising filtering using QTGMC
ConvertToYV24(interlaced=false, matrix="Rec709")
QTGMC(Preset="Fast", InputType=1, TR2=0, Sharpness=0.2, SourceMatch=0, Lossless=0, ediThreads=2)
# adjust color to YV12
ConvertToYV12()
PreFetch(4)
return last
This script converts the RGB colors to YV24 for QTGMC, then to YV12 for the final output for 4:2:0.
The problem, is that matrix="Rec709" is specified for the ConvertToYV24 filter, but not for the ConvertToYV12 filter.
This results in a color pallette shift. Since nothing is specified for the ConvertToYV12 filter, it must be using some other conversion matrix than Rec709:
So, when ConvertToYV24(interlaced=false, matrix="Rec709") is used in a script, then later in the script ConvertToYV12 is used, it needs to be run as ConvertToYV12(matrix="Rec709"), not ConvertToYV12(). When it is run as ConvertToYV12(matrix="Rec709"), then the color shift that is shown in the above image does not happen. So the matrix= setting should always be used to match whatever matrix is being used for the video.