Log in

View Full Version : virtualdub compliance: what it is?


vcmohan
25th February 2005, 04:34
In some post or plugin writeup I came across that it is virtualdub (or virtualdubmod ) compliant for viewing/ tracking or some such thing. I am curious as to what one need to ensure for this. And what price?
In some of the plugins I authored, I use some buffers created by new call. As these plugins act on only a part of input length, I delete them the moment it crosses. Now if one tries to view a prior frame using vdub slider he should get a error. If I do not delete that buffer, then in case of multiple calls to various functions in one script, there can be excess memory usage. So which way it is recommended to go? Compatibility or possible memory hogging?
In case of transitions where two clips are joined, it appears that compatibility can not be ensured, as the calculations of vi parameters can all go wrong.

akupenguin
3rd March 2005, 06:04
If you're worried about memory usage, then allocate buffers when they're needed and deallocate when done. If the user seeks back into the area that needs processing, allocate the buffer again. Remember that such seeking is not exclusive to previewing in Vdub; Avisynth filters may request frames out of order too.

If the vi parameters of two clips are incompatible, then you shouldn't have been allowed to join them.

vcmohan
3rd March 2005, 08:57
Well I had in mind the transition plugins. There the num_frames, num_samples parameters of vi, are changed by the constructor. So next time if one tries to retrace on videodub there will be errors. Buffers are a secondary problem. But What I wanted to know is what exactly is meant by Virtualdub compliant in case of Avisynth plugins?

stickboy
3rd March 2005, 09:37
Originally posted by vcmohan
In some post or plugin writeup I came across that it is virtualdub (or virtualdubmod ) compliant for viewing/ tracking or some such thing.Where did you read this? Exactly what was said?
Well I had in mind the transition plugins. There the num_frames, num_samples parameters of vi, are changed by the constructor. So next time if one tries to retrace on videodub there will be errors.That shouldn't matter at all. If changing num_frames or num_samples was problematic, then VirtualDub wouldn't be able to use any AviSynth script that used Trim or Splice.

I don't see how an AviSynth plug-in can be incompatible with VirtualDub since VirtualDub doesn't deal with AviSynth plug-ins directly.

Richard Berg
3rd March 2005, 22:58
There are two "vdub compatibility" issues I can think of:
- vdub plugins sometimes won't load properly in avisynth unless the gui functions are stubbed out (rare these days)
- avs filters that access >1 frame need to have some safeguards in place if they want to be used on vdub's random-access timeline (as opposed to a straight dub with avs2avi)

Dunno if either applies.

vcmohan
4th March 2005, 16:00
Originally posted by stickboy
Where did you read this?

I am sorry I do not remember exactly where I saw that. But it was there and that got my curiosity.