PDA

View Full Version : Bicubic/Bilinear resize in Avisynth (exact questions)


HarryM
17th May 2002, 11:04
I have these questions...


1. In complex command,

e.g. BicubicResize(640,272,0,0.5,8,78,706,432).

Calculates Avisynth with nearest outborder pixels (for more precise resize)? Generally. How calculates pixels neighbour upon border? Mirroring?

2. Is possible to make faster with using 3DNow(2)! and SSE(2) optimisations (actually only MMX, right?)?

3. What is better (speed, quality)? Source= PAL, 720x576px

a)
Crop(8,78,706,432)
BicubicResize(640,272,0,0.5)

b)
BicubicResize(640,272,0,0.5,8,78,706,432)

c)
BicubicResize(652,363,0,0.5)
Crop(6,49,640,272)

dividee
17th May 2002, 19:15
1) I had to read the question twice to understand it. I don't think BicubicResize use any "out of frame" pixel to do it's work.

2) I guess you're talking about BicubicResize? yes, it only uses MMX and I don't know if it can be made fasters with SSE/3DNow!/...

3) Speed: b) is fastest, a) is nearly as fast and c) is a bit slower
Quality: a) and b) have identical output, c) could be different (better?) for border pixels but it's undistinguishable to the naked eye.

trbarry
18th May 2002, 03:05
I looked at the version of BicubicResize in DVD2AVI for awhile, which I think is basically the same as in Avisynth. IIRC, there are 2 separate functions, a HorizontalResize and a VerticalResize. It seemed the vertical one could have been sped up a bit using 16 byte P4 sse2 registers, though I didn't do it.

It also looked like there was another speedup available if someone made a ResizeBoth function, combining the horizontal and vertical, and saving one pass through the data. I once set out to do that but ended up writing SimpleResize instead.

- Tom