Log in

View Full Version : Time Travel in writing Avisynth Plugins


Si
25th September 2002, 18:47
Apologies for subject title :D

In my code for Sandwich, I'm asking for the nth frame and also the nth-1 and nth+1 frames. (Lets call them nA(0),nA(-1) and nA(1) )

After processing, I then have an altered nth frame. nA'(0), which I output.

Does this altered frame nA'(0) become the next nth-1 frame, nB(-1), when I move to processing the next frame, nB(0), or will I get the original untouched frame, nA(0)?

I hope there are no typos in this :o

regards
Simon

sh0dan
25th September 2002, 19:33
I hope I understand you correctly - so here is my answer:

You can not in any way request frames, that has been touched by your own filter.
When you request a frame, you get the previous frame BEFORE it came to your filter, so you will always get frames that has been untouched by your filter.
That makes the "time-feedback" situation impossible. Since Avisynth is completely non-linear (opposite VDub), you cannot rely on that the previous frame you processed was frame-1.

Si
25th September 2002, 19:54
Thanks Sh0dan - thats what I'd assumed.

regards
Simon

High Speed Dubb
25th September 2002, 21:12
Originally posted by sh0dan
Since Avisynth is completely non-linear (opposite VDub), you cannot rely on that the previous frame you processed was frame-1. Glurp — Is there any way to get a timestamp for the current frame, so you can at least tell that you’re skipping around?

Guest
25th September 2002, 23:12
You get the frame number, so it's easy to tell if you are skipping around (we code jocks call it "random access" :) ).

High Speed Dubb
26th September 2002, 00:13
Cool — That means things won’t need to get too messed up at skips and transitions.

“Random access” sounds good, but why not use a manlier term, like “Happy happy hop hop access”? ;)

Guest
26th September 2002, 00:49
I wouldn't want to say "manly" because we wouldn't want to imply that the traits you refer to are proprietary to the male sex.