Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQTGMC Mode 2 8 Bit Only Mask color format #7

Closed
Ironclad17 opened this issue Aug 2, 2023 · 2 comments
Closed

SQTGMC Mode 2 8 Bit Only Mask color format #7

Ironclad17 opened this issue Aug 2, 2023 · 2 comments

Comments

@Ironclad17
Copy link

Ironclad17 commented Aug 2, 2023

In VSEditor

src = core.resize.Point(src, matrix_in_s="rgb", transfer_in_s="601", primaries_in_s="170m", range_in_s="full", format=vs.YUV444P16, matrix_s="170m", transfer_s="601", primaries_s="170m", range_s="full")
deint = soi.SQTGMC(src, preset="slowest", input_type=2, tff=True, fps_divisor=2, gpu=True, device=0)

Gave the error

Failed to evaluate the script:
Python exception: Mask: input clip must be GRAY8, YUV420P8, YUV422P8, YUV440P8, or YUV444P8, with constant dimensions.

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2866, in vapoursynth._vpy_evaluate
File "src\cython\vapoursynth.pyx", line 2867, in vapoursynth._vpy_evaluate
File "E:\Editing\TFL.vpy", line 10, in 
deint = soi.SQTGMC(src, preset="slowest", input_type=2, tff=True, fps_divisor=2, gpu=True, device=0)
File "C:\Users\*\AppData\Local\Programs\Python\Python310\lib\site-packages\soifunc\deint.py", line 615, in SQTGMC
input_type_blend = core.mv.Mask(search_clip, b_vec1, kind=1, ml=prog_sad_mask)
File "src\cython\vapoursynth.pyx", line 2612, in vapoursynth.Function.__call__
vapoursynth.Error: Mask: input clip must be GRAY8, YUV420P8, YUV422P8, YUV440P8, or YUV444P8, with constant dimensions.

Only occurs when format is set to a bitdepth above 8. Can mask color format differ from the input clip?

@adworacz
Copy link

This is a known limitation of MVMask (it only supports 8bit right now): dubhater/vapoursynth-mvtools#16

A workaround might be running MVMask on an 8-bit version of the clip, and then scaling the resulting mask clip back up to the desired bit depth.

@Ironclad17
Copy link
Author

Thanks for the clarification. I ended up doing the obvious and only changing bitdepth and colorspace after deinterlacing. That should also be more accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants