ccitydesign
31st March 2011, 14:11
Hello everyone,
first post, first question. I'm trying to optimize the performance of my Avisynth scripts but I have only minor knowledge of the way Avisynth (or any software for that matter) process commands and how the memory management works.
The question is basically if Avisynth works significantly 'better'/faster with external (i.e. already masked, resized sources, etc.) or internally calculated solutions.*1
For example, does it pay to, e.g. resize, crop, edit images (sic) with external applications in advance or let all the things aforementioned be done by Avisynth alone? My guess is, the difference is most of the time a mere seconds for a single frame, but if Avisynth completely re-processes the same command line for, let's say, 500 frames - even if there is no change in the settings - the amount of additional processing time would rise dramatically.
So, does Avisynth ...
a) ... fully process all operations like specified for every one of the 500 frames in the example again and again OR ...
b) ... does it process the commands of a line once and then - saving the intermediary result - uses this for the final 499 times, just until specified otherwise?
I would imagine that for a video editing software a) is more likely but I simply don't know. And if a) is indeed the standard mode, is there possibly a way to force Avisynth into processing like mentioned in b) (see last lines)?
Any info on the matter is appreciated.
thanks,
Christopher
*1: Here sources are meant to be images, NOT film.
--------------edit
P.S. scripting examples
a) A1=ImageSource("HQ.JPG", start=0, end=500).Crop(500,45,-250,-100).BilinearResize(400,300).AddBorders(200, 150, 200, 150)
A1
Another question. Will the following make a difference in processing time to the example a) just above?
a) A1=ImageSource("HQ.JPG", start=0, end=1).Crop(500,45,-250,-100).BilinearResize(400,300).AddBorders(200, 150, 200, 150)
A2=A1.Loop(500)
A2
first post, first question. I'm trying to optimize the performance of my Avisynth scripts but I have only minor knowledge of the way Avisynth (or any software for that matter) process commands and how the memory management works.
The question is basically if Avisynth works significantly 'better'/faster with external (i.e. already masked, resized sources, etc.) or internally calculated solutions.*1
For example, does it pay to, e.g. resize, crop, edit images (sic) with external applications in advance or let all the things aforementioned be done by Avisynth alone? My guess is, the difference is most of the time a mere seconds for a single frame, but if Avisynth completely re-processes the same command line for, let's say, 500 frames - even if there is no change in the settings - the amount of additional processing time would rise dramatically.
So, does Avisynth ...
a) ... fully process all operations like specified for every one of the 500 frames in the example again and again OR ...
b) ... does it process the commands of a line once and then - saving the intermediary result - uses this for the final 499 times, just until specified otherwise?
I would imagine that for a video editing software a) is more likely but I simply don't know. And if a) is indeed the standard mode, is there possibly a way to force Avisynth into processing like mentioned in b) (see last lines)?
Any info on the matter is appreciated.
thanks,
Christopher
*1: Here sources are meant to be images, NOT film.
--------------edit
P.S. scripting examples
a) A1=ImageSource("HQ.JPG", start=0, end=500).Crop(500,45,-250,-100).BilinearResize(400,300).AddBorders(200, 150, 200, 150)
A1
Another question. Will the following make a difference in processing time to the example a) just above?
a) A1=ImageSource("HQ.JPG", start=0, end=1).Crop(500,45,-250,-100).BilinearResize(400,300).AddBorders(200, 150, 200, 150)
A2=A1.Loop(500)
A2