View Full Version : Plugin and Weave
WarpEnterprises
29th April 2003, 09:29
I made a filter (detecting blended fields) which works well except when I use a Weave after in the script - then VD crashes badly (seems AviSynth loops forever)
Are there any prerequisites when using GetFrame(n-1 // n-2...) ?
This is the only difference from other filters I can see.
(of course I catch n<0 requests)
Or is there a special treatment necessary for the GetParity function?
(I use a GenericVideoFilter class, so I didn't define a GetParity by myself)
sh0dan
29th April 2003, 10:43
I have no idea why it would do that, but I'll need some code to help you.
Mind that weave requests frames from your filter, so it could be something within your filter that does this.
WarpEnterprises
29th April 2003, 20:57
Maybe you can take a glance at the code I posted in this thread:
http://forum.doom9.org/showthread.php?s=&postid=303789
[EDIT]: Is it possible that after SeparateFields the pitch for the frames is different for even and odd frames??
Richard Berg
30th April 2003, 19:18
In short, yes. Pitch is a property of a VideoFrame, not a clip.
WarpEnterprises
1st May 2003, 23:04
OK, found the bug.
I altered the code so that each src-pointer gets its pitch, but that the pitch was not really different.
But of course a memcpy(dstp, srcp, srcpitch) crashes when the pitches are different...
What's the fastest way to copy a frame unchanged to a new frame?
Originally posted by WarpEnterprises
But of course a memcpy(dstp, srcp, srcpitch) crashes when the pitches are different...
What's the fastest way to copy a frame unchanged to a new frame? Use env->BitBlt(). You'll have to do it for all three planes if you have YV12.
Just as an aside on memcpy()... If you are just copying lines in a loop, you can use the rowsize instead of the pitch, thereby avoiding your pitch problem.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.