absinthe
12th August 2005, 20:21
Okay, this perhaps isn't really a "bug" per se, but nonetheless ...
I use lanczos to resize as well as to crop. I get my values for cropping by looking at my script in VDub using the 'null transform' filter. Now, it often happens when cropping with precision that you end up cropping one side by an odd number. Now, that's okay as long as the opposite side is also cropped by an odd number (i.e., total crop is even). When the opposite side is not also odd, well then I either sacrifice a line of pixels or leave in a line of black pixels on one side or the other.
Now this all works fine and well until the value which you are left with for horizontal or vertical is the same value to which you are resizing, respectively. That gives an error.
For instance:
LanczosResize(640,272,0,103,720,272)
# i.e. cropping 103 from the top and 105 from the bottom #
will give an error, whereas if the movie was just shifted up or down one pixel in the source it would have been fine (i.e. the "103" would have been 102 or 104).
Also, if I happened to want to resize to something different, such as
LanczosResize(608,256,0,103,720,272)
# i.e. resolution after cropping is still greater than resolution after resizing
That works fine as well.
This has actually happened to me several times, and I've now even found a movie where it happens on the width value as well.
Trying to use the 'crop' command separately before resizing doesn't work. I've gone as far as actually resizing a movie twice in a script to get around this. I'm using AviSynth 2.55 BTW.
Ideas?
-abs
I use lanczos to resize as well as to crop. I get my values for cropping by looking at my script in VDub using the 'null transform' filter. Now, it often happens when cropping with precision that you end up cropping one side by an odd number. Now, that's okay as long as the opposite side is also cropped by an odd number (i.e., total crop is even). When the opposite side is not also odd, well then I either sacrifice a line of pixels or leave in a line of black pixels on one side or the other.
Now this all works fine and well until the value which you are left with for horizontal or vertical is the same value to which you are resizing, respectively. That gives an error.
For instance:
LanczosResize(640,272,0,103,720,272)
# i.e. cropping 103 from the top and 105 from the bottom #
will give an error, whereas if the movie was just shifted up or down one pixel in the source it would have been fine (i.e. the "103" would have been 102 or 104).
Also, if I happened to want to resize to something different, such as
LanczosResize(608,256,0,103,720,272)
# i.e. resolution after cropping is still greater than resolution after resizing
That works fine as well.
This has actually happened to me several times, and I've now even found a movie where it happens on the width value as well.
Trying to use the 'crop' command separately before resizing doesn't work. I've gone as far as actually resizing a movie twice in a script to get around this. I'm using AviSynth 2.55 BTW.
Ideas?
-abs