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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th December 2013, 14:28   #21  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
I would like the temporal only version, this is a very important operation for a technique which uses 3+ passes of a VHS to reduce "comet" noise effect.

Btw, the original medianblurT is described here:
http://forum.doom9.org/showthread.php?t=84636

The temporal median is a very slow operation currently but I use it a lot. Also used for astronomy pictures.
jmac698 is offline   Reply With Quote
Old 14th December 2013, 20:47   #22  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
2) Have never used this function, just going by the name "median" to guess what it does... what's the difference between -1=copy and setting all radiuses to 0? Also, what about setting the plane to 0?
Anyway, to try to give a suggestion to this question, you could allow other types of input than just ints. False could be used to disable spatial filtering. Not sure what true would do, but maybe it's not even needed.
ajp_anton is offline   Reply With Quote
Old 17th December 2013, 00:34   #23  |  Link
mountiedm
Registered User
 
Join Date: May 2013
Posts: 2
I'd love an autocrop plugin/script
mountiedm is offline   Reply With Quote
Old 19th December 2013, 12:30   #24  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
New filter: checkmate!
It now has correct border processing, a bit more checking for arguments (doesn't crash with max=0 for example), and should be a lot faster when SSE2 is available. As usual, x64 version is also included.
This version has a bit lower precision so you might get +-1 difference on random pixels. This difference is hardly important.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth
TurboPascal7 is offline   Reply With Quote
Old 20th December 2013, 11:10   #25  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
Not like anyone cares, but here's another "new" filter: masktools2.
This is the most controversial plugin update so far, considering that original masktools already worked fine on both x64 and x86. I still had my fun and started this thing way before avs+ was born.

You can read what got changed in this wiki post. In short: some filters got less bad, some bugs fixed, a lot easier to understand codebase. This had to be done if we ever want to add 16-bit support and AVX2 (which I will do at some point). Yes, I'm fully aware that some filters got slower on some CPUs. I'm not gonna change that and you most likely won't notice the difference, since it's usually something like "omg 1000 fps instead of 1050". MMX optimization is also dropped because come on, it's almost 2014.

This branch will be called b* as opposed to a* of original masktools. Three builds are published: x86 avs 2.5 version called masktools2-25.dll plus x86 and x64 avs+/avs2.6 version called masktools2.dll. 2.6. doesn't have any postfix because it won't make sense in the future since I'll be dropping 2.5.8 support. 2.5 version is statically linked, 2.6/avs+ reguires vs2012 runtime as usual.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth
TurboPascal7 is offline   Reply With Quote
Old 20th December 2013, 12:15   #26  |  Link
zero9999
Registered User
 
Join Date: Oct 2011
Posts: 52
Quote:
Originally Posted by TurboPascal7 View Post
Not like anyone cares, but here's another "new" filter: masktools2.
This is the most controversial plugin update so far, considering that original masktools already worked fine on both x64 and x86. I still had my fun and started this thing way before avs+ was born.
I care and it's a substantial improvement. Thanks a lot!
zero9999 is offline   Reply With Quote
Old 20th December 2013, 12:54   #27  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by TurboPascal7 View Post
Not like anyone cares, but here's another "new" filter: masktools2.
I also care and thank you for all your efforts. My newly built computer [i7-4930K] seems to like your filters. Nice performance increase over the "official" versions.
Reel.Deel is offline   Reply With Quote
Old 20th December 2013, 13:57   #28  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
I also care, for first experience seems to be best than Previous versions

next is mvtool2, right?
real.finder is offline   Reply With Quote
Old 20th December 2013, 14:02   #29  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
Quote:
Originally Posted by real.finder View Post
next is mvtools2, right?
No, mvtools2 is a major challenge that I'm not prepared to take up yet. I also hope Myrsloik will rewrite it for vsynth before I start.

As for what's next - I don't know. I have a few filters in works like VariableBlur and TTempSmooth but if something simple/fun comes up, I'll be doing that instead.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth
TurboPascal7 is offline   Reply With Quote
Old 20th December 2013, 17:10   #30  |  Link
mastrboy
Registered User
 
Join Date: Sep 2008
Posts: 365
Quote:
Originally Posted by TurboPascal7 View Post
MMX optimization is also dropped because come on, it's almost 2014.
Wish more developers had your mindset about CPU instructions...

And thanks for all the plugin updates

Btw, how did you manage to "modernize" checkmate? I thought the source code was never published?
__________________
(i have a tendency to drunk post)
mastrboy is offline   Reply With Quote
Old 20th December 2013, 23:35   #31  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
Thanks for this update.

Edit :
Need a little help. When i try to compile filters putting the new version of avisynth.h,
i have the following error (translated) :
Code:
1>RawSource.obj : error LNK2001: external symbol not solved "struct AVS_Linkage const * const AVS_linkage" (?AVS_linkage@@3PEBUAVS_Linkage@@EB)
Help... Thanks...

Last edited by jpsdr; 20th December 2013 at 23:58.
jpsdr is offline   Reply With Quote
Old 21st December 2013, 00:41   #32  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Thanks for masktools, I care about this effort but this was the first filter released that I use albeit rarely. Looking forward to tivtc, I think there's a lot to be gained from it, especially tfm() which acts as if it's single-threaded the only other common filters I use is:
- nnedi3, already multithreaded, not sure there's much, if any, to be gained
- colormatrix, maybe could see some gain but already fast
- autocrop, gain would be minimal, might reduce time by 500ms
- decomb, already well multi-threaded but would be much more useful if decimate had y0/y1 that functioned like it does in telecide/tfm, x0/x1 would also be of benefit.
- resizers which is avisynth+ related, its unfortunate they are ~4% slower in most cases, in rare cases much slower but maybe that will change some day.
__________________
PC: FX-8320 GTS250 HTPC: G1610 GTX650
PotPlayer/MPC-BE LAVFilters MadVR-Bicubic75AR/Lanczos4AR/Lanczos4AR LumaSharpen -Strength0.9-Pattern3-Clamp0.1-OffsetBias2.0
turbojet is offline   Reply With Quote
Old 21st December 2013, 00:49   #33  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
jpsdr
Here's an example of how you register a filter with new 2.6 header. Yes, the AVS_linkage thing is required.

turbojet
You probably shouldn't expect any performance gains on tritical's filters (TIVTC, nnedi3). In fact, some might get a bit slower in singlethreaded mode. We'll see how it goes when avs+ gets multithreading.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth

Last edited by TurboPascal7; 21st December 2013 at 00:51.
TurboPascal7 is offline   Reply With Quote
Old 21st December 2013, 01:02   #34  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Don't TFM() and Telecide() basically do the same thing? If so, I can't figure out why the former is almost twice as slow as the latter. Even the fastest tfm settings are significantly slower then the slowest telecide settings. Isn't this a signal of some flawed code?

TDecimate which is often seen as slow is actually a little faster than decimate, it just has a very slow filter, tfm, feeding it.
__________________
PC: FX-8320 GTS250 HTPC: G1610 GTX650
PotPlayer/MPC-BE LAVFilters MadVR-Bicubic75AR/Lanczos4AR/Lanczos4AR LumaSharpen -Strength0.9-Pattern3-Clamp0.1-OffsetBias2.0
turbojet is offline   Reply With Quote
Old 21st December 2013, 01:06   #35  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
Quote:
Originally Posted by turbojet View Post
Don't TFM() and Telecide() basically do the same thing? If so, I can't figure out why the former is almost twice as slow as the latter. Even the fastest tfm settings are significantly slower then the slowest telecide settings. Isn't this a signal of some flawed code?
No idea, I have never looked at the source code of both. But in general tritical's filters are optimized to the extent where you can't do much about them, other than maybe rewriting the whole algorithm from scratch which is "a bit" time-consuming.
Also, if telecide works for you fine, why don't you just use it over tfm? Not to mention tfm is way beyond realtime anyway.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth
TurboPascal7 is offline   Reply With Quote
Old 21st December 2013, 02:09   #36  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
@TurboPasal7
Where can i get the right avisynth.h to use ?
I've took it from one of your ported filter, but i'm having the following (translated) error :
Code:
1>RawSource.cpp(541): error C2259: 'RawSource'*: impossible to [don't know how to translate "instance"...?] an abstract class
1>          because of following mebers*:
1>          'int IClip::SetCacheHints(int,int)'*: is abstract
1>          f:\prg\visual_2010\rawsource\rawsource\../avs2x/avisynth-2_6.h(671)*: see declaration of 'IClip::SetCacheHints'
In the file i've took from your's ported filter, there is :
Code:
int __stdcall SetCacheHints(int cachehints,int frame_range) { return 0; } ;  // We do not pass cache requests upwards, only to the next filter.
In the exemple you've linked there is :
Code:
int __stdcall SetCacheHints(int cachehints,int frame_range);  // We do pass cache requests upwards, to the cache!
And in this exemple, the .cpp code don't have any SetCacheHints declaration.

If in the project i'm trying to compile i remove any SetCacheHints declaration in the .cpp, i have the error described (with both cases of SetCacheHints in avisynth.h). I must put the following code in the .cpp to compile :
Code:
int __stdcall SetCacheHints(int cachehints,int frame_range) {return 0;} ;
Don't know if it's the correct thing, and don't know how this is supposed to be.

Thanks for your help already provided.

Note : NNEDI3 is still advancing, i've put out all the asm functions from core file, it's compiling and seems working (no crash and a picture is displayed... ).
jpsdr is offline   Reply With Quote
Old 21st December 2013, 02:20   #37  |  Link
Plorkyeran
Registered User
 
Join Date: Mar 2008
Posts: 26
Quote:
Originally Posted by turbojet View Post
Don't TFM() and Telecide() basically do the same thing?
No. Completely different algorithms and different metrics for deciding when a frame is combed.
Plorkyeran is offline   Reply With Quote
Old 21st December 2013, 02:24   #38  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
jpsdr
Avisynth.h from any of the updated filters should work as they should use the same header anyway. Do not touch it. Don't modify anything there. If it doesn't compile - it's a problem in your code. As for RawSource, there's already a 2.6 version.

Ok, found your problem:
Code:
class RawSource: public IClip {
Filters should inherit GenericVideoFilter rather than IClip. Or define all abstract methods like Chikuzen did in the linked plugin.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth

Last edited by TurboPascal7; 21st December 2013 at 02:31.
TurboPascal7 is offline   Reply With Quote
Old 21st December 2013, 06:20   #39  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Quote:
Originally Posted by TurboPascal7 View Post
No idea, I have never looked at the source code of both. But in general tritical's filters are optimized to the extent where you can't do much about them, other than maybe rewriting the whole algorithm from scratch which is "a bit" time-consuming.
Also, if telecide works for you fine, why don't you just use it over tfm? Not to mention tfm is way beyond realtime anyway.
I need to use TDecimate because this is pretty common in most tv caps. Telecide().TDecimate() works most of the time but at times it picks the wrong frames, switching to TFM().TDecimate() fixes it. TFM is on the borderline of realtime here on a 1080i clip:
-TFM() 52 fps (below sources 60 fps)
-TFM(clip2=nnedi3(),pp=1,mchroma=false,slow=0) 67 fps, complex nnedi3 is faster than all of the tfm simpler deinterlacers.
-TFM(clip2=nnedi3(),pp=1,mchroma=false,slow=0,micmatching=0) 74 fps, any way it's faster?
-Telecide() 110 fps, deinterlacing complexity is about in the middle of tfm's.

Quote:
Originally Posted by Plorkyeran View Post
No. Completely different algorithms and different metrics for deciding when a frame is combed.
Right but the output is very similar, most of the time, shouldn't an improved algorithm that's performing the same task be faster?
__________________
PC: FX-8320 GTS250 HTPC: G1610 GTX650
PotPlayer/MPC-BE LAVFilters MadVR-Bicubic75AR/Lanczos4AR/Lanczos4AR LumaSharpen -Strength0.9-Pattern3-Clamp0.1-OffsetBias2.0

Last edited by turbojet; 21st December 2013 at 07:18.
turbojet is offline   Reply With Quote
Old 21st December 2013, 09:14   #40  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
Quote:
Originally Posted by TurboPascal7 View Post
jpsdr
As for RawSource, there's already a 2.6 version.
Ok, didn't know, i've taken this one. I just had to update the avisynth.h to compile in x64.

Thanks.
jpsdr is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.