sscheidegger
1st February 2013, 17:34
Hi all,
I am developing an avisynth interface for Sony Vegas Pro (OFX) in order to use avisynth filters in Sony Vegas. However, the latest version of Vegas is only available in 64bit! So I need to get the interface to run also with a 64bit version of avisynth!
The first version of the interface is working well. I tried some basic avisynth scripts and I also used mvtools2 successfully! However, I would like a mode with disabled avisynth cache because the source in Vegas might change. My idea would be to disable avisynth cache while the user is setting up the filters and to enable caching for rendering. One way to solve this problem is the use of SetCacheHints(CACHE_NOTHING, 0); together with the hack by user stickboy (http://forum.doom9.org/archive/index.php/t-78805.html). This actually works with avisynth 32bit (also with SETs MT version), but it doesn't work with the 64bit port by JoshyD.
I had a look at the avisynth64 source and I think I might have found the reason: In cache.cpp the following lines are commented out:
//should filters should be allowed to just go "forward"?-->we want to use our scripts with any NLE, which means jumping around
//what's the harm in a little extra memory in case other filters want to use the frames of the script anyway?
//#ifndef _AMD64_
//if (h_policy == CACHE_NOTHING) { // don't want a cache. Typically filters that only ever seek forward.
//__asm mov ebx,ebx // Hack! prevent compiler from trusting ebx contents across call
//return childGetFrame(n, env);
//}
/*#else
if (h_policy == CACHE_NOTHING) { // don't want a cache. Typically filters that only ever seek forward.
__asm mov rbx,rbx // Hack! prevent compiler from trusting ebx contents across call
return childGetFrame(n, env);
}
#endif*/
Does anyone know something about this part of cache.cpp and why it would be removed in the 64bit version? Also I do not really understand when the functions in cache.cpp and when the functions in cacheMT.cpp are being used. Does it depend on the SetMTMode? I tried different modes, but the caching behavior didn't seem to change.
Anyone an idea on how to solve this problem? Maybe other suggestions on how to disable Avisynth's cache? And is there an x64 version of Avisynth 2.6.0 planned?
Thanks a lot for any help!
I am developing an avisynth interface for Sony Vegas Pro (OFX) in order to use avisynth filters in Sony Vegas. However, the latest version of Vegas is only available in 64bit! So I need to get the interface to run also with a 64bit version of avisynth!
The first version of the interface is working well. I tried some basic avisynth scripts and I also used mvtools2 successfully! However, I would like a mode with disabled avisynth cache because the source in Vegas might change. My idea would be to disable avisynth cache while the user is setting up the filters and to enable caching for rendering. One way to solve this problem is the use of SetCacheHints(CACHE_NOTHING, 0); together with the hack by user stickboy (http://forum.doom9.org/archive/index.php/t-78805.html). This actually works with avisynth 32bit (also with SETs MT version), but it doesn't work with the 64bit port by JoshyD.
I had a look at the avisynth64 source and I think I might have found the reason: In cache.cpp the following lines are commented out:
//should filters should be allowed to just go "forward"?-->we want to use our scripts with any NLE, which means jumping around
//what's the harm in a little extra memory in case other filters want to use the frames of the script anyway?
//#ifndef _AMD64_
//if (h_policy == CACHE_NOTHING) { // don't want a cache. Typically filters that only ever seek forward.
//__asm mov ebx,ebx // Hack! prevent compiler from trusting ebx contents across call
//return childGetFrame(n, env);
//}
/*#else
if (h_policy == CACHE_NOTHING) { // don't want a cache. Typically filters that only ever seek forward.
__asm mov rbx,rbx // Hack! prevent compiler from trusting ebx contents across call
return childGetFrame(n, env);
}
#endif*/
Does anyone know something about this part of cache.cpp and why it would be removed in the 64bit version? Also I do not really understand when the functions in cache.cpp and when the functions in cacheMT.cpp are being used. Does it depend on the SetMTMode? I tried different modes, but the caching behavior didn't seem to change.
Anyone an idea on how to solve this problem? Maybe other suggestions on how to disable Avisynth's cache? And is there an x64 version of Avisynth 2.6.0 planned?
Thanks a lot for any help!