Malcolm
26th May 2004, 10:22
Hi,
i have this strange behaviour of avisynth, that one of my scripts is significantly slower (3 fps instead of 20 fps) when i'm not using viewfields() + unviewfields() in it!! :eek:
Basically using viewfields() + unviewfields() should only slow down but never speed up avisynth! Also the result is the same in both cases.
This is the script (diff_3clips.avs). It compares 3 clips given as parameters and stacks them together with the results:
orig = orig.crop(left,top,width,height).viewfields()
clipA = clipA.crop(left,top,width,height).viewfields()
clipB = clipB.crop(left,top,width,height).viewfields()
d_clipA = subtract(orig, clipA).levels(127-diffRate,1,128+diffRate,0,255)
d_clipB = subtract(orig, clipB).levels(127-diffRate,1,128+diffRate,0,255)
diff_AB = subtract(clipA, clipB).levels(127-diffRate,1,128+diffRate,0,255)
stackhorizontal(clipA, clipB)
upper = stackhorizontal(orig, last).unviewfields()
stackhorizontal(d_clipA, d_clipB)
lower = stackhorizontal(diff_AB, last).unviewfields()
stackvertical(upper, lower)The usage of the script is like this:
orig = mpeg2source("test.d2v")
ClipA = mpeg2source("testA.d2v")
ClipB = mpeg2source("testB.d2v")
diffRate = 32
left = 120
top = 120
width = 336
height = 288
import("C:\avsfilter25\diff_3clips.avs")Is this one of these strange memory misalignment things??
Is this a serious performance-bug in avisynth?? :confused: :confused:
Here are 2 snapshots that shows the different speeds (click on the thumbnails):
http://img47.exs.cx/img47/9536/avisynth_diff3clips_viewfields-ON_crop.th.png (http://img47.exs.cx/my.php?loc=img47&image=avisynth_diff3clips_viewfields-ON_crop.png) http://img36.exs.cx/img36/829/avisynth_diff3clips_viewfields-OFF_crop.th.png (http://img36.exs.cx/my.php?loc=img36&image=avisynth_diff3clips_viewfields-OFF_crop.png)
Greetings,
Malcolm
i have this strange behaviour of avisynth, that one of my scripts is significantly slower (3 fps instead of 20 fps) when i'm not using viewfields() + unviewfields() in it!! :eek:
Basically using viewfields() + unviewfields() should only slow down but never speed up avisynth! Also the result is the same in both cases.
This is the script (diff_3clips.avs). It compares 3 clips given as parameters and stacks them together with the results:
orig = orig.crop(left,top,width,height).viewfields()
clipA = clipA.crop(left,top,width,height).viewfields()
clipB = clipB.crop(left,top,width,height).viewfields()
d_clipA = subtract(orig, clipA).levels(127-diffRate,1,128+diffRate,0,255)
d_clipB = subtract(orig, clipB).levels(127-diffRate,1,128+diffRate,0,255)
diff_AB = subtract(clipA, clipB).levels(127-diffRate,1,128+diffRate,0,255)
stackhorizontal(clipA, clipB)
upper = stackhorizontal(orig, last).unviewfields()
stackhorizontal(d_clipA, d_clipB)
lower = stackhorizontal(diff_AB, last).unviewfields()
stackvertical(upper, lower)The usage of the script is like this:
orig = mpeg2source("test.d2v")
ClipA = mpeg2source("testA.d2v")
ClipB = mpeg2source("testB.d2v")
diffRate = 32
left = 120
top = 120
width = 336
height = 288
import("C:\avsfilter25\diff_3clips.avs")Is this one of these strange memory misalignment things??
Is this a serious performance-bug in avisynth?? :confused: :confused:
Here are 2 snapshots that shows the different speeds (click on the thumbnails):
http://img47.exs.cx/img47/9536/avisynth_diff3clips_viewfields-ON_crop.th.png (http://img47.exs.cx/my.php?loc=img47&image=avisynth_diff3clips_viewfields-ON_crop.png) http://img36.exs.cx/img36/829/avisynth_diff3clips_viewfields-OFF_crop.th.png (http://img36.exs.cx/my.php?loc=img36&image=avisynth_diff3clips_viewfields-OFF_crop.png)
Greetings,
Malcolm