diff --git a/GNUmakefile b/GNUmakefile index ac04b31..91145b2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,5 +1,5 @@ #---------------------------------------------------------------------------- -# Makefile for d2vsource +# Makefile for vs_it, modified based on d2vsource/GNUmakefile #---------------------------------------------------------------------------- include config.mak diff --git a/README.md b/README.md index 62143a4..2ee3651 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # VapourSynth-IT -VS_IT.dll v0103.1.1 Copyright(C) 2002 thejam79, 2003 minamina, 2014 msg7086 +VS_IT.dll v0103.1.2 Copyright(C) 2002 thejam79, 2003 minamina, 2014 msg7086 VapourSynth Plugin - Inverse Telecine (YV12 Only, IT-0051 base, IT_YV12-0103 base) @@ -28,7 +28,7 @@ VapourSynth Plugin - Inverse Telecine (YV12 Only, IT-0051 base, IT_YV12-0103 bas ## Usage - core.it.it(clip clip, int fps = 24, int threshold = 20, int pthreshold = 75) + core.it.IT(clip clip, int fps = 24, int threshold = 20, int pthreshold = 75) clip - clip to be processed. Width < 8192 and YV12 only fps - 24: IVTC; 30: frame-matching only @@ -41,7 +41,7 @@ VapourSynth Plugin - Inverse Telecine (YV12 Only, IT-0051 base, IT_YV12-0103 bas ```python v = core.std.BlankClip(format=vs.YUV420P8, color=[40,60,240], fpsnum=30000, fpsden=1001) -v = core.it.it(v) +v = core.it.IT(v) ``` ## Caution @@ -67,6 +67,7 @@ You are welcome to send PR if you can help to improve the code quality. ## ChangeLog +- v1.2 14/10/15 Change function name to PascalCase. - v1.1 14/10/08 Move 2 thread variables back to object to improve speed. Now we support compiling under Linux using g++ and clang++. Clang version appears to be faster but YMMV. - v1.0 14/10/06 All inline asm code has been translated to pure C and SSE2 intrinsics. SSE2 comes with 30% speed up compared to original MMX code. - v0.4 14/10/04 Code cleanup. Special thanks to macromizer for cleaning up macros. diff --git a/configure b/configure index 9372d1c..9b66ed4 100644 --- a/configure +++ b/configure @@ -59,8 +59,8 @@ cc_check() fi echo "int main(void){$4 return 0;}" >> config.log echo "int main(void){$4 return 0;}" >> conftest.cpp - echo $CXX conftest.cpp -o conftest $1 $2 >> config.log - $CXX conftest.cpp -o conftest $1 $2 2>> config.log + echo $CXX conftest.cpp -Werror -o conftest $1 $2 >> config.log + $CXX conftest.cpp -Werror -o conftest $1 $2 2>> config.log ret=$? echo $ret >> config.log rm -f conftest* diff --git a/src/vs_it_interface.cpp b/src/vs_it_interface.cpp index 5042bc7..aa2b605 100644 --- a/src/vs_it_interface.cpp +++ b/src/vs_it_interface.cpp @@ -90,7 +90,7 @@ static void VS_CC itCreate(const VSMap * in, VSMap * out, void * userData, VSCor INSTANCE * d = new INSTANCE(new VSVideoInfo(*vi), node, fps, threshold, pthreshold, vsapi); - vsapi->createFilter(in, out, "it", itInit, itGetFrame, itFree, fmParallel, 0, d, core); + vsapi->createFilter(in, out, "IT", itInit, itGetFrame, itFree, fmParallel, 0, d, core); return; } @@ -98,7 +98,7 @@ VS_EXTERNAL_API(void) VapourSynthPluginInit(VSConfigPlugin configFunc, VSRegiste configFunc("in.7086.it", "it", "VapourSynth IVTC Filter v" IT_VERSION, VAPOURSYNTH_API_VERSION, 1, plugin); - registerFunc("it", + registerFunc("IT", "clip:clip;fps:int:opt;threshold:int:opt;pthreshold:int:opt;", itCreate, nullptr, plugin); } diff --git a/src/vs_it_process.cpp b/src/vs_it_process.cpp index eee0b6b..2f0793f 100644 --- a/src/vs_it_process.cpp +++ b/src/vs_it_process.cpp @@ -345,12 +345,12 @@ bool IT::CompCP(IScriptEnvironment * env) { //1773 int thcomb = AdjPara(20); if (n != 0) { - if ((env->m_iSumC < thcomb && env->m_iSumP < thcomb) || abs(env->m_iSumC - env->m_iSumP) * 10 < env->m_iSumC + env->m_iSumP) { - if (abs(env->m_iSumC - env->m_iSumP) > AdjPara(8)) { + if ((env->m_iSumC < thcomb && env->m_iSumP < thcomb) || labs(env->m_iSumC - env->m_iSumP) * 10 < env->m_iSumC + env->m_iSumP) { + if (labs(env->m_iSumC - env->m_iSumP) > AdjPara(8)) { env->m_iUseFrame = env->m_iSumP >= env->m_iSumC ? 'c' : 'p'; return true; } - if (abs(env->m_iSumPC - env->m_iSumPP) > AdjPara(10)) { + if (labs(env->m_iSumPC - env->m_iSumPP) > AdjPara(10)) { env->m_iUseFrame = env->m_iSumPP >= env->m_iSumPC ? 'c' : 'p'; return true; }