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.

[HELP] AviSynth 32 bit - ColorMatrix filter not working for video?
#18
The scripts do not really help since those are not the preview, but the encoding scripts.
Looking at the debug output for the preview scripts:
Correct:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ImageSeq.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ColorMatrix.dll")
# loading source: E:/USER/Test/Test-AdobeRGB.png
#  color sampling RGB32@8, matrix: bt709, scantyp: progressive, luminance scale: limited
ImageReader(file="E:\USER\Test\Test-AdobeRGB.png", end=100, fps=23.976, use_DeviL=true, pixel_type="RGB24")
# current resolution: 1440x1080
ConvertToYUY2(interlaced=false, matrix="Rec601") # <- this is wrong
# color modifications
ColorMatrix(mode="Rec.709->Rec.601",interlaced=false,hints=false)
# filtering
# adjust color to RGB32
ConvertToRGB32(matrix="Rec601")
PreFetch(4)
return last
1020_InCorrect:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ImageSeq.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ColorMatrix.dll")
# loading source: E:/USER/Test/Test-AdobeRGB.png
#  color sampling RGB32@8, matrix: bt709, scantyp: progressive, luminance scale: limited
ImageReader(file="E:\USER\Test\Test-AdobeRGB.png", end=100, fps=23.976, use_DeviL=true, pixel_type="RGB24")
# current resolution: 1440x1080
ConvertToYUY2(interlaced=false, matrix="Rec601")
# color modifications
ColorMatrix(mode="Rec.709->Rec.601",clamp=3,interlaced=false,hints=false)
# filtering
# adjust color to RGB32
ConvertToRGB32(matrix="Rec709") # <- this should be 601 for normal Preview and 709 only for FilterPreview
PreFetch(4)

1028_Incorrect:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ImageSeq.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ColorMatrix.dll")
# loading source: E:/USER/Test/Test-AdobeRGB.png
#  color sampling RGB24@8, matrix: bt709, scantyp: progressive, luminance scale: limited
ImageReader(file="E:\USER\Test\Test-AdobeRGB.png", end=100, fps=23.976, use_DeviL=true, pixel_type="RGB24")
# current resolution: 1440x1080
ConvertToYUY2(interlaced=false, matrix="Rec709") # <- correct
# color modifications
ColorMatrix(mode="Rec.709->Rec.601",clamp=3,interlaced=false,hints=false)
# filtering
# adjust color to RGB32 (color matrix: Rec601)
ConvertToRGB32(matrix="Rec601") # <- correct for preview
PreFetch(4)
# setting output fps to 23.976fps
AssumeFPS(24000,1001)
#  output: color sampling RGB32@8, matrix: Rec.601, scantyp: progressive, luminance scale: limited
return last

I have no clue why you would say that 1028 is correct in how it handles the source.
Source is specified as " RGB24@8 " with color matrix " bt709 ".
Hybrid converts to " YUY2 " with " Rec709 ".
Then it applies " ColorMatrix(mode="Rec.709->Rec.601",clamp=3,interlaced=false,hints=false) "
and converts to " RGB32 " for the preview using " ConvertToRGB32(matrix="Rec601") "

-> if you can tell me where Hybrid goes wrong I can adjust it, but to me the handling seems correct.
(Assuming the source is really color sampling RGB32@8, matrix: bt709, scantyp: progressive, luminance scale: limited.)

Cu Selur

Ps.: "And I also haven't even checked this in VapourSynth." me neither Wink
Reply


Messages In This Thread
RE: AviSynth 32 bit - ColorMatrix filter not working for video? - by Selur - 02.11.2020, 17:46

Forum Jump:


Users browsing this thread: 4 Guest(s)