PDA

View Full Version : Filter idea: Proxy()


mf
24th November 2003, 14:12
Here I go again with my crazy filter idea. Here's my latest:
A proxy filter that buffers frames to make random frame access possible for filters that do not support this (seeking would be VERY slow, like an AVI file with only 1 keyframe, with configurable buffer size limit that sends frames to /dev/null when the seek length is too long, the point then would be that the filter has recieved all frames linearly so there shouldn't be any problems), or to equalize frame processing time for filters like Decimate that output 5 frames in fast succession, and then pause and ouput 5 frames again. The reason for the latter would be that you cannot check if Decimate() is discarding the wrong frames because when you play through the avs everything stutters every 5 frames (also, on-the-fly decimating in a directshow player like with ffdshow's AVISynth support is impossible).

Comments please.

Didée
24th November 2003, 16:45
From WarpSharp.dll:

FrameCache( Number_of_frames )

Not as complete as your idea. At least, it helps "smoothing" out decimate.

- Didée

mf
24th November 2003, 19:59
Nice :). I'll try that.

sh0dan
24th November 2003, 21:53
There is a builtin cache automatically inserted inbetween all filters. You can use SetmemoryMax to increase the size.

mf
25th November 2003, 12:51
Originally posted by sh0dan
There is a builtin cache automatically inserted inbetween all filters. You can use SetmemoryMax to increase the size.
But it doesn't request frames linearly when doing random timeline access, does it?

sh0dan
25th November 2003, 16:49
Have you done the math on how much memory it would need? ;)

(Hint one frame, fullframe PAL is ~ 610kb)

Besides, I don't think FrameCache does what you request either.

IMO you should rather recompress to huffyuv/ffv1/vble/whatever.

mf
25th November 2003, 21:45
Originally posted by sh0dan
Have you done the math on how much memory it would need? ;)

(Hint one frame, fullframe PAL is ~ 610kb)

Besides, I don't think FrameCache does what you request either.

IMO you should rather recompress to huffyuv/ffv1/vble/whatever.
Hey, it only needs to *request* all frames linearly, once it runs out of memory it can just throw stuff into /dev/null, as I posted above. It'd take time, yeah :D.

sh0dan
25th November 2003, 23:36
Oh - sorta like EnsureVbrMp3Sync - only for video.

*thinking*

No - such a filter doesn't exist.

Something like "RequestLinear()" sounds like a good name! ;)

mf
26th November 2003, 13:04
Originally posted by sh0dan
Oh - sorta like EnsureVbrMp3Sync - only for video.

*thinking*

No - such a filter doesn't exist.

Something like "RequestLinear()" sounds like a good name! ;)
Well, I more thought of throwing both functions into one filter:
Proxy(linear=true, buffer=50, smoothaccess=7)
Where buffer is buffer size in MB, after which to discard frames and smoothaccess is number of frames to smoothen out frame access over (it would request 7 frames, buffer them, then output each one in the average processing time).