This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[BUG] AviSynth x86 - Image sequence issue in previewer
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:

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")
# 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
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:

[Image: LVcslCN.gif]

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.
Quote:The problem, is that matrix="Rec709" is specified for the ConvertToYV24 filter, but not for the ConvertToYV12 filter.
That can't be your problem since matrices are only needed during RGB<>YUV conversions.

The problem you see is probably in the preview script.
-> If you open the Avisynth Preview, check your temp folder, there should be a temp file that should contain the preview script.
(alternatively the debug output also should contain the script)

The preview script should end with:
ConvertToRGB32(interlaced=false, matrix="Rec709")

-> would need a debug output to know what is happening.

Cu Selur

Ps.: It'll also send you a link to my current dev version via PM, to be sure this isn't a bug I already fixed somehwere.
You're right... I thought the preview script was loading what was shown on the script preview button.

The problem is fixed in the 2020.10.15.1 dev version.

It appears to be have been caused by the preview script not including ConvertToRGB32(matrix="Rec709") at the end.

Yeah, I rewrote some stuff related to RGB handling. Smile
Btw. this was a 'preview only'-bug, meaning encoding output should have been fine.

Cu Selur

Forum Jump:

Users browsing this thread: 1 Guest(s)