Tuesday
26th April 2006, 18:45
Hey i'm having some trouble while experimenting with my fist semi-adavanced clip in avisynth.
I'm trying to make a resize function that will resize by AR and mod, i havn't got round to "functionising" it yet as i've run in to this brick wall.
clip=mpeg2source("c:\vid.d2v")
#Resizer
AR = 2
block= 16
y = clip.height
ydiff = y % block
y = (ydiff < (block/2)) ? y - ydiff : y + (block - ydiff)
x = clip.height*AR
xdiff = x % block
x = (xdiff < (block/2)) ? x - xdiff : x + (block - xdiff)
BicubicResize(clip,x,y,0.333,0.666)
# End Resizer
This code works fine when AR is an interger value, but when i try a float Vdub returns ther error:
Avisynth open failure:
Evaluate: operands of `' must be integers
(c:\test.avs, line 13)
which corresponds to the line xdiff = x % block
I've read up on the the docs and LogicalOperators's page in the manual says mod accepts floats so i can't see whats wrong :S
Can anyone help?
(I'm using Avisynth version 2.56)
I'm trying to make a resize function that will resize by AR and mod, i havn't got round to "functionising" it yet as i've run in to this brick wall.
clip=mpeg2source("c:\vid.d2v")
#Resizer
AR = 2
block= 16
y = clip.height
ydiff = y % block
y = (ydiff < (block/2)) ? y - ydiff : y + (block - ydiff)
x = clip.height*AR
xdiff = x % block
x = (xdiff < (block/2)) ? x - xdiff : x + (block - xdiff)
BicubicResize(clip,x,y,0.333,0.666)
# End Resizer
This code works fine when AR is an interger value, but when i try a float Vdub returns ther error:
Avisynth open failure:
Evaluate: operands of `' must be integers
(c:\test.avs, line 13)
which corresponds to the line xdiff = x % block
I've read up on the the docs and LogicalOperators's page in the manual says mod accepts floats so i can't see whats wrong :S
Can anyone help?
(I'm using Avisynth version 2.56)