View Single Post
Old 21st March 2004, 01:40   #6  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
New plug-in: ApplyEvery

ApplyEvery

A generalized function that can apply a specified function at regular intervals in a clip. DeleteEvery can be viewed as a specialized version; DeleteEvery(100, 0) is conceptually equivalent to ApplyEvery(100, "DeleteFrame(0)"). (In practice, DeleteEvery is much more efficient, so if you're only deleting frames, use that. Plus, DeleteEvery modifies the frame-rate appropriately.)

This is basically a straight conversion of my JDL_ApplyEvery user-defined function to an AviSynth plug-in.

I tried the following script with my user-defined version:
Code:
BlankClip(length=2100, pixel_type="yuy2")
ShowFrameNumber()
JDL_ApplyEvery(4, "Reverse()")
On my system, the user-defined version can iterate about 525 times (2100 / 4) without crashing; increasing the source clip's frame count by one causes VirtualDub+AviSynth to crash silently.

If I substitute in the plug-in version, I can increase the clip length to over 80000. (That's 20000+ iterations, a ~40-fold increase.) A script with that many iterations is slow to load, however.

This is an experimental, quick-and-dirty build; source currently isn't included but will be forthcoming eventually, after I ponder some possible improvements.

Last edited by stickboy; 31st March 2004 at 23:25.
stickboy is offline   Reply With Quote