Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
19th September 2011, 05:54 | #1 | Link |
Registered User
Join Date: Sep 2006
Posts: 31
|
avs2yuv/Avisynth memory limit?
I've got a SetMemoryMax(128) call at the beginning of my Avisynth script, but it seems avs2yuv.exe is taking around 500MB of memory.
My machine has 4GB of RAM installed - I believe Avisynth defaults the limit to 512MB, which seems oddly close to the avs2yuv memory usage. The script itself is fairly simple (source -> resize -> trim) so shouldn't need a lot of memory. Is avs2yuv doing its own buffering or similar? On a related note, is there a way to set a default memory limit? All of my scripts are fairly simple, so don't need much, and I tend to forget putting a SetMemoryLimit() at the beginning of every small script. I was thinking that perhaps a .avsi file in the plugins directory should do it, but due to avs2yuv taking more memory, I'm not sure how to correctly test it. Thanks! |
19th September 2011, 15:07 | #2 | Link | ||
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
SetMemoryMax
SetMemoryMax only sets the size of the frame buffer cache. It is independent of any other memory allocation. Memory usage due to the frame cache should ramp up pretty quickly to the limited value and stay there. Setting a lower SetMemoryMax value will make more memory available for other purposes and provide less cache buffer frames. It is pointless having more buffers available than are needed by the scripts temporal requirements. If each and every frame generated at each and every stage of a script is only ever used once then the cache is entirely useless. By definition a cache is only useful if a generated element is needed a second or subsequent time. Quote:
Quote:
|
||
19th September 2011, 22:05 | #4 | Link |
typo lover
Join Date: May 2009
Posts: 595
|
avs2yuv does not prepare even the buffer for file writing.
The memory usage of avs2yuv itself is very small. off topic For this reason, avs2yuv has only 512bytes of writing buffers defined by stdio.h. As a result, it has caused the loss of speed. This is my modified version of avs2yuv(based on MasterNobody's C99 version) ***removed*** This mod is a little faster than the others since this prepares 128KiB buffer for each output.
__________________
my repositories Last edited by Chikuzen; 22nd September 2011 at 17:53. |
Thread Tools | Search this Thread |
Display Modes | |
|
|