-
Notifications
You must be signed in to change notification settings - Fork 10
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
TFM - Can't override to use clip2 deinterlacer when PP is initially set to 0 #42
Comments
I have to declare that I'm quite dumb in this area, and can only tell you what I see and debug at the code level. (I never used this plugin). I put here code line links, maybe it is helpful and a good starting place for someone smarter or for a future myself :) The options o, m, f, P and i are read from the override file in each frame, this is sure. Then this overridden PP is checked with a combing variable being -1 And now it gets a little bit complicated here inside |
If you substitute a QTGMC deinterlaced pixel into TFM's mask it'll look weird cause QTGMC's pixels have different geometry due to them being always blended with surrounding pixels and you'll see edges of objects popping and getting fatter and thinner as those pixels are substituted. Also TFM's deint mask appears bugged as it often just substitutes all pixels for interpolated pixels for reasons I've yet to determine, so I'd avoid using it and use PP=3 instead so the whole frame gets substituted for the frames from your deint clip which uses its own accurate and reliable mask:
Here are some screenshots showing the differences between InputType=1/2 You needn't bother with the override file instead you can just make 2 TFM clips, one with PP=0 and the other with PP=3 and join the Trim()'d versions of the frame ranges you want to be processed with PP=3. Quick pseudocode example - completely untested but the underlying logic should be sound:
Alternatively you could do the selection logic inside a ScriptClip with "if current_frame >= n && current_frame <= p, return tfm0 else return tfm3". |
After reading your OP again it sounds like you want to deinterlace every frame in section2 in which case set section2 = deint instead. Because TFM's PP>0 will only deinterlace a frame (i.e start using frames from clip2) if the frame was detected as combed, and its combing detection is not reliable on extended combed sequences (it's only good for detecting short clusters of combed frames here and there) . You can lower the combing detection thresh to something absurdly low like cthresh=6, MI=25 but I can't think of any advantage to doing that. If you know that section is interlaced you may as well just deinterlace it. |
Bug Description :
If in the initial tfm call PP is set to 0 and clip2 is defined as an external deinterlacer source, changing the PP value to greater than 1 in the override file will not invoke the clip2 external deinterlacer as expected.
Notes :
I am not really sure if this is a bug, or a feature request, or if I am fundamentally just trying to use the wrong tool for the job. Thank you for this excellent tool in any case.
What I am trying to do is to just stitch/weave all frames together (ideally without any processing on frame match or comb detection) except for the specific frames i specify in the override file which need to be deinterlaced (using QTGMC, not the internal deinterlacer - and ideally only applying the deinterlacing to the detected comb "mask").
My video source is perfect 25p interlaced to 50i except for the credits which have no matching fields (and are followed by more 25p interlaced to 50i content).
This is what I am using to try an accomplish this. Should this work, or am I going about this the wrong way?
avs script :
override.txt :
I have already worked around the issue by changing the initial PP value to 5 and explicitly setting every other frame than the range above as PP=0 and not combed in the override - but is that supposed to be required?
also, the notes for clip2 say
Is this correct and am I using it properly above? Is the particular deinterlacing type specified by the PP value (5=blend,6=cubic,7=modified-ela) simply ignored when calling qtgmc - meaning that choosing 5,6, or 7 will produce the same output and only editing the qtgmc settings will change the deinterlace mode (this is what I assume is happening)?
also, can the slow value be changed in the override? I didn't see any mention of that in the documentation.
The text was updated successfully, but these errors were encountered: