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. |
12th August 2014, 19:57 | #2 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Nice.
I looked at the documentation and it lists field as an optional argument but no clear default. I'd put "int field=order" just to make it really obvious. Likewise it doesn't say if all or no planes are processed by default. Only one small code hint: Code:
d.mode = int64ToIntS(vsapi->propGetInt(in, "mode", 0, &err)); if (err) d.mode = 0; Code:
d.mode = int64ToIntS(vsapi->propGetInt(in, "mode", 0, &err)); You could also treat order like a bool so you don't have to check the range of it. This error message is sometimes wrong: Code:
"Yadifmod: edeint clip must have the same number of frames as main clip" Will you try to extend it so it work with 9-16 bits too? It doesn't look that hard to modify.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
13th August 2014, 17:12 | #4 | Link |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Might I suggest you use more functions, so you don't have so much code in GetFrame? It's good for readability.
It's also good to use the multiplication and division operators when you mean to multiply and divide, instead of bit shifts. Compilers are smart enough to turn "x * 2" into "x << 1" on their own.
__________________
Buy me a "coffee" and/or hire me to write code! Last edited by jackoneill; 13th August 2014 at 17:17. |
13th August 2014, 17:15 | #5 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
And since we're using c++ the processing itself looks it could be easily templated for less code duplication.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
16th August 2014, 08:54 | #6 | Link |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 392
|
Released r3.
Add SIMD operations. The provided binary package contains two DLLs for SSE2 and AVX2 each. Roughly test on my E3-1231 v3, the SSE2 version is about 1x~2x% faster than C version, while the AVX2 version is about only 5% faster than SSE2 version. |
16th August 2014, 09:33 | #7 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
The speed observations are normal. Yadifmod is a fairly simple filter so in the end memory bandwidth becomes the limiting factor. You usually don't gain that much from going beyond SSE2 unless there's a particular instruction you need. I strongly disagree with your packaging though. The best code path should be automatically chosen. There's no excuse for having multiple different dlls for this kind of code. If you need hints on how to detect cpu features you can simply borrow/study the cpu* files from libav. I looked at the documentation for the vector classes but couldn't see an easy way to use multiple vector sizes at once in the same project though. You may have to use a messy trick with multiple files to make it work. Personally I wouldn't have bothered to release an AVX2 version at all considering the very small gains.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
18th August 2014, 00:53 | #9 | Link |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
As mentioned in the readme.rst, not yet.
__________________
Buy me a "coffee" and/or hire me to write code! |
14th May 2015, 11:41 | #12 | Link |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 392
|
Update r7.
|
13th June 2016, 13:37 | #15 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
I get an error with the x64 build:
Code:
Python exception: name 'yadifmod' is not defined Traceback (most recent call last): File "src\cython\vapoursynth.pyx", line 1491, in vapoursynth.vpy_evaluateScript (src\cython\vapoursynth.c:26897) File "D:\Temp\Video\Eli_temp\Eli_Editor.vpy", line 7, in <module> clip = yadifmod.Yadifmod(clip, nnedi3.nnedi3(clip), order = 1, field = -1, mode = 0) NameError: name 'yadifmod' is not defined Code:
import vapoursynth as vs core = vs.get_core() core.std.LoadPlugin(r"D:\Projekte\GitHub\staxrip\bin\Apps\Plugins\both\ffms2\ffms2.dll") core.std.LoadPlugin(r"D:\Projekte\GitHub\staxrip\bin\Apps\Plugins\vs\nnedi3\libnnedi3.dll") core.std.LoadPlugin(r"D:\Projekte\GitHub\staxrip\bin\Apps\Plugins\vs\Yadifmod\Yadifmod.dll") clip = core.ffms2.Source(r"D:\Temp\Video\Eli.mp4", cachefile = r"D:\Temp\Video\Eli_temp\Eli.ffindex") clip = yadifmod.Yadifmod(clip, nnedi3.nnedi3(clip), order = 1, field = -1, mode = 0) clip.set_output()
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
13th June 2016, 14:35 | #16 | Link | |
Registered User
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
|
Quote:
|
|
13th June 2016, 15:02 | #17 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
thanks
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
|
|