View Full Version : Is a faster Zoom filter available?
AviUser
7th May 2009, 04:10
Hi, I've been using the Zoom filter (http://avisynth.org/warpenterprises/) for AviSynth.
But, the thing is that it is extremely slow. The version I have was last updated in 2005.
Does anyone know if there is a newer version on another website or if there is an alternative filter I could use to zoom in/scroll videos?
If someone is a programmer, they could probably quickly optimize it by taking away the restriction that the video has to be RGB32.
:thanks:
Why not just use one of the built in resize filters in conjunction with animate?
AviUser
7th May 2009, 06:00
The thing is that I can't use animate with resize because it tells me that avisynth can't change the frame size in a video.
I'm not that pro with AviSynth :confused:
Gavino
7th May 2009, 10:18
The thing is that I can't use animate with resize because it tells me that avisynth can't change the frame size in a video.
For zooming, you don't change the frame size, you change the size of the source area that is to be resized with a fixed output size. You can do this by applying Animate to a resizer and varying the cropping zone parameters (src_left, src_top, src_width, src_height), while keeping the output width and height parameters constant.
roozhou
7th May 2009, 14:48
Swscale is much faster than avisynth's built-in resizer
AviUser
23rd May 2009, 19:23
I tried using BicubicResize with the extra parameters, but I couldn't figure out what they do exactly even with the online page describing them.
Maybe WarpEnterprises (http://forum.doom9.org/member.php?u=9802) could just quickly add YV12 support or something instead of only RGB32 (I've never needed the alpha channel when using the zoom filter) to speed it up?
Gavino
23rd May 2009, 23:53
I tried using BicubicResize with the extra parameters, but I couldn't figure out what they do exactly even with the online page describing them.
The extra parameters work like those in Crop, and allow you to select an area of the input clip (effectively cropping it) before resizing, which lets you 'zoom in' on the area in question. Say you have a clip 640x480 and you want to zoom in on the top right quadrant of the frame, you could do
BilinearResize(640, 480, 320.0, 0.0, 320.0, 240.0) # adding left, top, width, height
To make the zoom dynamic, you of course need to use Animate and vary the parameters over time. One thing to watch is that for BicubicResize, you have to supply values for the b and c parameters as well - you can use the default values of 1.0/3 for both.
So it might look something like:
Animate(start, end, "BicubicResize", \
640, 480, 1.0/3, 1.0/3, 0.0, 0.0, 0.0, 0.0, \
640, 480, 1.0/3, 1.0/3, 320.0, 0.0, 320.0, 240.0)
Maybe WarpEnterprises (http://forum.doom9.org/member.php?u=9802) could just quickly add YV12 support or something instead of only RGB32 (I've never needed the alpha channel when using the zoom filter) to speed it up?
I'm not sure that adding YV12 support would speed it up significantly - I think it's more a matter of how the plugin works internally.
Yes, Zoom isn't exactly fast, but it's not usually horrendously slow either. Are you using it in the most effective way?
For example, rather than producing a large image which you then crop to select the bit you want, you should use the width and height parameters to control the output size directly.
AviUser
24th May 2009, 04:19
Thanks for explaining the resize extra parameters and how to use them with animate.
Also, thanks for letting me know about the width and height parameters in the zoom filter--I hadn't noticed them before.
:thanks:
tin3tin
24th May 2009, 15:34
IMHO the real 'Zoom.dll' speed improvement would be to overlay the zoom'ed clip onto a background clip within the plugin.
mikeytown2
28th May 2009, 09:26
You can give KenBurnsEffect (http://forum.doom9.org/showthread.php?t=135776) a shot; it's a lot faster then zoom.dll, and higher quality as well. It's a wrapper for the built in resizers, makes life much better.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.