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. |
![]() |
#1 | Link |
Registered User
Join Date: Mar 2007
Posts: 407
|
TfNLMeans - an AviSynth 2.6 fork of TNLMeans 1.0.3
Anybody (besides me) interested in an AviSynth 2.6 update of the TNLMeans plugin?
here is v1.05. It is a fork of TNLMeans 1.0.3, which was the most recent version I found. Changes + Compiled for AviSynth 2.6 + supports YV16, YV24, YV411, Y8 (plus previous YV12, YUY2) + integer param. planes added to allow faster luma-only processing - internal bitblt() function removed, replaced by AviSynth bitblt() calls (I judge these are best optimized) + float TfNLMeans_VersionNumber() function added, so future extensions can increment and scripts can check it + simple test suite included + ... more, see doc Caveats I am a beginner regarding VS project and compiler configurations, linkage and other AviSynth options, SSE optimizations and many, many other topics. Please do not expect it is bug free. Last edited by martin53; 14th November 2015 at 23:37. Reason: Published V1.05 |
![]() |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,655
|
Thanks martin53, will test it out and report back if I find anything unusual.
I always liked TNLMeans, the only downside is the speed. Hopefully Groucho2004 can give us an ICL10 build. So does the f in TfNLmeans stand for fork? Just curious ![]() |
![]() |
![]() |
![]() |
#4 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Quick speed test: Script: Code:
SetMTMode(2) colorbars(width = 1280, height = 720, pixel_type = "yv12").killaudio().assumefps(24000, 1001) trim(0,499) fadeio(248) trim(0,499) tnlmeans() #tfnlmeans() Code:
Tritical's 1.0.3 DLL: 2.464 fps Tritical's 1.0.3 (ICL10): 4.764 fps Martin53's tfnlmeans: 3.583 fps tfnlmeans (ICL10): 4.645 fps Last edited by Groucho2004; 21st February 2015 at 22:33. |
|
![]() |
![]() |
![]() |
#5 | Link |
Registered User
Join Date: Mar 2007
Posts: 407
|
AviSynth parallel execution
Please note that, with the update, I removed internal BitBlt code from the plugin, and in order to call AviSynth's BitBlt, AviSynth's environment pointer is stored in a class variable (for the sake of small changes, because the given calls did not forward it as a parameter).
I just learned that this can make MT environments (AviSynth MT, AviSynth+, VaporSynth) crash, and will provide an update to meet MT requirements. EDIT: correct IScriptEnvironment pointer forwarding is done, but TNLMeans contained extensive caching and uses forbidden read/write class variables. Pffh... Last edited by martin53; 28th February 2015 at 19:38. |
![]() |
![]() |
![]() |
#7 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | Link |
Registered User
Join Date: Mar 2007
Posts: 407
|
Will post an update soon. I have nearly no spare time to work on this, but an update is almost ready for months and i decided to complete the last 5%.
The update will, in contrast to the published version, be fully MT friendly in almost all modes - only Bx|By>1 is not supported. Last bug I need to fix is Y8 format. |
![]() |
![]() |
![]() |
#11 | Link |
Registered User
Join Date: Mar 2007
Posts: 407
|
Mask With Merge or Hard Switching?
I added a mask option to the filter, so the pixels to be processed can be restricted for speed improvement.
Please comment if the filter mask should just output the filtered pixel if the mask pixel value is > 0, or if the output should be a merge between the input and filtered value for mask values 1...254? The merge option needs one more check even if the mask is binary. An additional mt_binarize() or Levels() filter is needed for hard switching behaviour. Without the internal blend option, an additional merge() is needed if soft borders between filtered and unfiltered pixels are desired. In my personal opinion soft blending (need for binarized mask if desired) is better. |
![]() |
![]() |
![]() |
#13 | Link |
Registered User
Join Date: Nov 2004
Location: Spain
Posts: 404
|
IMHO is better that the filtered output will be blended with the input proportionally at the corresponding value in the mask.
Zero value in the mask means, copy input to output (and do not process input), 255 value means output filtered value and, in the rest of values, output a proportional blend of input-filtered. Then, if I want hard switching, I would prepare a mask with only 0 and 255 values. |
![]() |
![]() |
![]() |
#14 | Link |
Registered User
Join Date: Nov 2004
Location: Spain
Posts: 404
|
Your new version binaries do not load in my system (I lack of any libraries it said). ICL 10 version of former plugin by Groucho2004 loads fine. I understand they are no linked the same (the size isn't the same either).
|
![]() |
![]() |
![]() |
#15 | Link | |
Registered User
Join Date: Mar 2007
Posts: 407
|
Quote:
Since you probably have not yet installed another SW built with this Visual Studio version, you may need a Microsoft library: Usually, Microsoft compiled SW requires that users install a runtime library. Registered SW publishers can include it in their installers, but else MS wants that it is not republished but downloaded directly from their servers. |
|
![]() |
![]() |
![]() |
#16 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,880
|
M53, you could compile static linked, as /MT (multi-threaded) rather than /MD (multi-threaded dll) and avoid having to have the runtimes.
I have not even seen another plug that uses VS2015 runtimes, yet. /MT in "Configuration Properties/C/C++/Code Generation/Runtime Library"
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
![]() |
![]() |
![]() |
#17 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
There is an excellent all-in-one runtime installer. |
|
![]() |
![]() |
![]() |
#18 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,880
|
Thanx Grouchy, I musta missed that thread somehow.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
![]() |
![]() |
![]() |
#19 | Link | |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Quote:
It's working... and I'm not clear about the downsides. Are there serious concerns that should make me change it? |
|
![]() |
![]() |
![]() |
#20 | Link |
Registered User
Join Date: Nov 2004
Location: Spain
Posts: 404
|
Hi,
I've installed VS 2015 runtime and the plugin don't load. Same message "Module not found. ¿Install missing library?. Rebooting the PC don't resolve the problem. Last edited by AVIL; 15th November 2015 at 22:02. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|