Sorry for poor English.

You can also refer the examples to know how/when to use.


This package contains 3 things:

sorathread.dll
sorasmsource.dll
sroasmserver.exe

build with
windows 7 professional
visual c++ 2010 express
boost 1.48
lua 5.2


I'll give a simple explain about these.


1

sorathread.dll provides a function,
to separate the processing before and after into 2 stand-alone threads.
To use more then 2 threads,
call SoraThread multiple times in appropriate position.

Aims at speeding up the script by making use of cpu with multiple cores.


SoraThread(Clip c, Integer Buffer, Integer Cache, String Prefetch)


Buffer is the number of buffers to prefetch frames, (default: 5)

Cache is the number of caches to preserve processed frames. (default: 0)
I wonder if cache is really needed... just offered.

buffer and cache are on the expense of memory usage.

Prefetch is a lua script to specified a algorithm to have prefetch down
(default: none. simplely read the next n frames)
    In the lua script, global variable FrameCount is given, refer to the
    number of total frames. Each time SoraThread prefetches a frame, it
    calls GetNextFrame function with the parameter "current frame number"
    in the script to get which frame to prefetch

(some filter will reference previous frames so I use a cache)


2

sorasmsource.dll and sorasmserver.exe

they provide a way to separate the processing into multiple processes.
sorasmserver is a stand-alone process which provides frames for sorasmsource.

SoraSMSource(String name_for_shared_memory)

SoraSMServer.exe name_for_shared_memory avs_script_file

Aims at solving the problem of 32-bit process's memory limit.

In the expense of inter-processes communication,
the maximum speed of script is limited.
for example, a max speed of about 250 fps on my computer.



Please feel free to give comments on my work :p

LeiMing (Sorayukinoyume)
2012-2-19




I used boost library for my work. the license of boost is:

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.



I also used lua script engine for my work. the license of lua is:

Copyright ? 1994C2012 Lua.org, PUC-Rio. 

 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 

 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.




source code of my work is under bsd licence:

Copyright (c) 2012, LeiMing(sorayukinoyume)
 All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
The names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.