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 13th November 2014, 15:39   #1  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
KNLMeansCL: OpenCL NLMeans de-noising algorithm [2018-01-29]

--> pinterf's fork

--> https://github.com/Khanattila/KNLMea...ses/tag/v1.1.1
Code:
KNLMeansCL v1.1.1
* Added more check of rclip.
* Fixed build programm error in some circumstances. 
* Fixed Avisynth YUV444P10 video format.
* Fixed Vapoursynth RGB30 video format.
* Fixed clip processing with higher resolution than 4K.
KNLMeansCL is an optimized OpenCL implementation of the Non-local means de-noising algorithm. The NLMeans filter, originally proposed by Buades et al., is a very popular filter for the removal of white Gaussian noise, due to its simplicity and excellent performance. The strength of this algorithm is to exploit the repetitive character of the image in order to de-noise the image unlike conventional de-noising algorithms, which typically operate in a local neighbourhood.

For end user KNLMeansCL is a plugin for AviSynth, AviSynth+ and for VapourSynth. Windows, OS X and Linux are supported. Read more on the Wiki.

KNLMeansCL is available under the GNU GPL v3 license.

FAQ
Q) I can't make DGNV and KNLmeansCL work together in avs script.
A) Post #664.
__________________
github.com

Last edited by Khanattila; 29th October 2022 at 00:00.
Khanattila is offline   Reply With Quote
Old 13th November 2014, 16:19   #2  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Works right out of the box (well, apart from the obligatory MS*120.dlls) unlike the original NLMeansCL which I never got to work properly. Seems very fast as well, even on my lowly GT240 card.

Awesome!
Groucho2004 is offline   Reply With Quote
Old 13th November 2014, 16:31   #3  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by Khanattila View Post
Code:
NLMeansCL(clip src, int A, int Ay, int S, int Sy, int B, int By, float aa, float h, bool sse, string device_type, int y, int u, int v, bool info)
That should read "NLMeansCL2".
Groucho2004 is offline   Reply With Quote
Old 13th November 2014, 16:34   #4  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
Quote:
Originally Posted by Groucho2004 View Post
That should read "NLMeansCL2".
thanks
Khanattila is offline   Reply With Quote
Old 15th November 2014, 22:52   #5  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
Edit.

Last edited by Khanattila; 6th May 2016 at 15:42.
Khanattila is offline   Reply With Quote
Old 15th November 2014, 23:12   #6  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Thanks Khanattila, very nice indeed. Briefly tested it on my GTX780 and it's pretty fast. What source filter did you use for the benchmark? Also, any interest in showing some love to Y8?
Reel.Deel is offline   Reply With Quote
Old 15th November 2014, 23:14   #7  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
Still no support of YUY2 ? What about temporal denoising ??
Mounir is offline   Reply With Quote
Old 15th November 2014, 23:17   #8  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by Mounir View Post
Still no support of YUY2?
Use the planar equivalent YV16 instead.
Reel.Deel is offline   Reply With Quote
Old 15th November 2014, 23:56   #9  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
why would you ever want yuy2 support
TheFluff is offline   Reply With Quote
Old 16th November 2014, 00:20   #10  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
Quote:
Originally Posted by Reel.Deel View Post
Thanks Khanattila, very nice indeed. Briefly tested it on my GTX780 and it's pretty fast. What source filter did you use for the benchmark? Also, any interest in showing some love to Y8?
Y8 support? It's easy, I will add in the next release.
For benchmark... I use AVSMeter.
To get a clean result, you should subtract the time of ffms2 & co.

Example:
ffms2 + Dither_convert_8_to_16() -> 326.4 FPS -> 3.0637 ms for frame.
ffms2 + Dither + NLMeansCL2() -> 60.46 FPS -> 16.5399 ms for frame

So NLMeansCL2() take 13.4762 ms for frame -> 74.2 FPS
Khanattila is offline   Reply With Quote
Old 16th November 2014, 03:10   #11  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
gorgeous
add temporal mode maybe?
feisty2 is offline   Reply With Quote
Old 16th November 2014, 06:03   #12  |  Link
Bloax
The speed of stupid
 
Bloax's Avatar
 
Join Date: Sep 2011
Posts: 317
Testing on an ancient 9800 GT I didn't expect much, but it turns out that it still works!
Unless you set U=3,V=3 or the input isn't YV24. (although it works fine with YV12 if the UV channels aren't set to be processed) :v
or if you set the A value too high (a >= 10)

Last edited by Bloax; 16th November 2014 at 06:09.
Bloax is offline   Reply With Quote
Old 16th November 2014, 12:42   #13  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
Edit.

Last edited by Khanattila; 6th May 2016 at 15:42.
Khanattila is offline   Reply With Quote
Old 16th November 2014, 15:19   #14  |  Link
Bloax
The speed of stupid
 
Bloax's Avatar
 
Join Date: Sep 2011
Posts: 317
I can confirm that A >= 10 (output isn't buggy garbage even at a=21) works now, as does chroma processing.
Bloax is offline   Reply With Quote
Old 16th November 2014, 16:27   #15  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Wow, one of my favorite filters reborn without these annoying dependencies! Haven't tried it but still nice!

As for temporal, I remember Malcolm gave up on it cause it didn't produced decent results and his recommendation was something like "Just use MVTools". That's why temporal thingy in his plugin is buggy, was never completed and v0.4 branch abandoned.
Keiyakusha is offline   Reply With Quote
Old 16th November 2014, 16:51   #16  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
az works nicely on tritical's original version, is it very hard to port it from cpp to opencl? sorry, i got little programming knowledge, dunno much about it
feisty2 is offline   Reply With Quote
Old 16th November 2014, 17:01   #17  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
Quote:
Originally Posted by Mounir View Post
Still no support of YUY2 ?
YUY2 is packed.
NLMeansCL2() with YUY2 support have the same performance of YUY2Clip.ConvertToYV16().NLMeansCL2()

Last edited by Khanattila; 16th November 2014 at 17:09.
Khanattila is offline   Reply With Quote
Old 16th November 2014, 17:09   #18  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by Khanattila View Post
Y8 support? It's easy, I will add in the next release.
Y8 support would be great

Quote:
Originally Posted by Khanattila View Post
YUY2 is packed.
NLMeansCL2() with YUY2 support have the same performance of ConvertToYUY2().NLMeansCL2()
Shouldn't it be ConvertToYV16().NLMeansCL2()?

Edit:
Might be worth mentioning that NLMeansCL2 already supports YV16/YV24.
Reel.Deel is offline   Reply With Quote
Old 16th November 2014, 18:36   #19  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
Quote:
Originally Posted by Reel.Deel View Post
Y8 support would be great



Shouldn't it be ConvertToYV16().NLMeansCL2()?

Edit:
Might be worth mentioning that NLMeansCL2 already supports YV16/YV24.
yes in both cases
Khanattila is offline   Reply With Quote
Old 16th November 2014, 21:20   #20  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
Edit.

Last edited by Khanattila; 6th May 2016 at 15:43.
Khanattila 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 07:48.


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