PDA

View Full Version : Lanczos Resize Bug


Ebobtron
23rd December 2005, 15:49
Hi,
I noticed this a couple of weeks ago.
I spent sometime with it this week to see if I could nail it down a little.

When using expanded syntax which crops before resizing.
Lanczos4Resize and LanczosResize produce fine darkened lines at the very top and bottom of the frame.

Lanczos4Resize(720, 240, 8, 22, 708, 192)

Using Crop before the resize produces no lines
Crop(8, 22, 708, 192)
Lanczos4Resize(720, 240)

I checked the other resizers and could not duplicate this behavior with any other than Lanczos and Lanczos4.

I’ll be happy to post this to sourceforge if that is where it should go.

Thanks,

Ebobtron
http://members.aol.com/avsfilmcutter

morsa
24th December 2005, 03:00
Well, something strange also happens to my videos when using Lanczos3 and 4.
Anyway I nver mentioned it because I thought it was just a problem related to the stuff I deal with.
Everytime I use Lanczosresizing (upsize) I get some kind of "boosting" of "salt and pepper" like noise.
I guess that if indeed this is a bug it should be related to some clipping...
Anybody else having the same behaviour?

IanB
24th December 2005, 04:32
Waiting for the image approval to confirm it but I will guess it is this old horny chestnut Bug or feature: differences between crop before resize and crop in resize function. (http://forum.doom9.org/showthread.php?p=627396#post627396) All the resizers have this feature but Lanczos has the widest sampling wings so is most affected.

For an extreme exampleBlankClip(1000, 14, 14, Color=$202040)
AddBorders(1,1,1,1, Color=$dfdfaf)
A=AddBorders(8,8,8,8, Color=$202040).LanczosResize(160,160, 8,8,16,16)
B=LanczosResize(160,160)
Interleave(A,B)
PointResize(640,640)
AddBorders(8,8,8,8, Color=$808080)For the really keen, test all the resizers.

Ebobtron
26th December 2005, 20:56
IanB,
I going to assume that the lines are as you describe them. The distance between edge and line look the same as the script example you provided. Thanks for the demo script, makes really pretty pictures. :)

I just assumed that crop was crop and because I can not see the effect with the other resizers I considered it a Lanczos problem.

Thanks again,
Ebt