View Full Version : KNLMeansCL: OpenCL NLMeans de-noising algorithm [2018-01-29]
Groucho2004
15th February 2016, 10:53
Someone needs to write a version of this that DOES support older, lower spec'd cards, 'cause there's a LOT of them out there.
First of all, stop deleting posts to which others already replied. Secondly, if you want to use KNLMeansCL with a GTX5xx card, just use version 0.6.11.
Khanattila
15th February 2016, 11:10
My NVIDIA GeForce GT 630 is also supported.
Just to clarify the "greater".
The GF108 (GT 420/430/440/520/530/620/630) is not reported as conformant product by Khronos.
I think you have a GT 630 OEM, using a GK107 (630/ 640 / 650 / 730 OEM / 740).
EDIT. Another possibility is the GeForce GT 630 Rev. 2, using a GK208 (630, 640, 710, 720, 730). There are four different graphics cards with the same name.
guest
15th February 2016, 12:59
Secondly, if you want to use KNLMeansCL with a GTX5xx card, just use version 0.6.11.
Too many conflicting suggestions here, one person says NO, and others say YES......I haven't had any success.
I am trying to get this to work with Ripbot264.
What other methods/processes can I used KNLMeansCL ??
Does this work with either CPU or GPU support ??
Sparktank
15th February 2016, 14:07
......
Have you even tried the older version suggested?
version 0.6.11.
https://github.com/Khanattila/KNLMeansCL/releases/tag/v0.6.11
guest
15th February 2016, 15:08
Have you even tried the older version suggested?
https://github.com/Khanattila/KNLMeansCL/releases/tag/v0.6.11
Well, the only way I know how to try the older version is to "install", copy v0.6.11 files into the default folder (after having removed the files from v0.7.4) that is part of the Ripbot264 "group".
From memory, it's just causes a different error, but still does not recognise the GTX580. Similar to cannot load, or open library.
Atak_Snajpera
15th February 2016, 15:19
burt123
Blame glorious nvidia for not supporting older gpus. KNLmeanscl author can't do anything to help you. My next gpu will be polaris with opencl 2.1 support than silly nvidia limited to 1.2
soneca
15th February 2016, 15:35
I wrote "NVIDIA GeForce GT 640 or greater". NVIDIA no longer supports the GeForce 500 series...
So my GTX 650 should work...:p
Groucho2004
15th February 2016, 16:30
From memory, it's just causes a different error, but still does not recognise the GTX580. Similar to cannot load, or open library.
That's very vague and doesn't help at all. Create a simple script and try loading it in VirtualDub. Post the exact error message (if any).
It might also be helpful if you posted your OS version, driver version, etc.
guest
16th February 2016, 01:59
That's very vague and doesn't help at all. Create a simple script and try loading it in VirtualDub. Post the exact error message (if any).
It might also be helpful if you posted your OS version, driver version, etc.
Sorry Groucho, I'm not going to pursue this ANY further. !!!
Atak_Snajpera
18th February 2016, 13:17
Khanattila are you sure that HD 4600 series have support for CL_DEVICE_IMAGE_SUPPORT ? My 4850 reports CL_DEVICE_IMAGE_SUPPORT = 0.
Legacy
Version 0.6.11
ATI HD 4600 Series GPU or greater.
NVIDIA GeForce 8400 GS or greater.
Visual C++ Redistributable Package for Visual Studio 2013.
Khanattila
18th February 2016, 13:33
Khanattila are you sure that HD 4600 series have support for CL_DEVICE_IMAGE_SUPPORT ? My 4850 reports CL_DEVICE_IMAGE_SUPPORT = 0.
My fault. Unfortunately, the database is not very accurate.
ATI Radeon HD 5400 Series GPU, should support OpenCL 1.1.
Maybe it's better.
Khanattila
19th February 2016, 19:28
https://github.com/Khanattila/KNLMeansCL/releases/tag/v0.7.5
KNLMeansCL v0.7.5
* New 'wref' (default 1.0) parameter.
* Improved automatic selection of OpenCL device.
* Changed parameters order.
* VapourSynth: fixed missing 's' value check.
Dreamland
20th February 2016, 13:42
Help me!
KNLMeansCL v0.7.4 with Visual C++ Redistributable Package for Visual Studio 2013 works very well
KNLMeansCL v0.7.5 with Visual C++ Redistributable Package for Visual Studio 2013 i have an issue :
http://t7.pixhost.org/thumbs/67/31540561_2016-02-20_133359k.jpg (http://www.pixhost.org/show/67/31540561_2016-02-20_133359k.jpg)
http://t7.pixhost.org/thumbs/67/31540546_2016-02-20_133359.jpg (http://www.pixhost.org/show/67/31540546_2016-02-20_133359.jpg)
win 8.1 64bit AMD R9 380 last Crimson driver
why?
thanks a lot,
Khanattila
20th February 2016, 13:49
Help me!
KNLMeansCL v0.7.4 with Visual C++ Redistributable Package for Visual Studio 2013 works very well
KNLMeansCL v0.7.5 with Visual C++ Redistributable Package for Visual Studio 2013 i have an issue :
http://t7.pixhost.org/thumbs/67/31540561_2016-02-20_133359k.jpg (http://www.pixhost.org/show/67/31540561_2016-02-20_133359k.jpg)
http://t7.pixhost.org/thumbs/67/31540546_2016-02-20_133359.jpg (http://www.pixhost.org/show/67/31540546_2016-02-20_133359.jpg)
win 8.1 64bit AMD R9 380 last Crimson driver
why?
thanks a lot,
Because I'm stupid.
Visual C++ Redistributable for Visual Studio 2015 (https://www.microsoft.com/en-us/download/details.aspx?id=48145)
Dreamland
20th February 2016, 14:10
you are not stupid..you are number one!
now perfect..works 100%
thx a lot
feisty2
21st February 2016, 07:42
you are not stupid..you are number one!
Don't be Siri-ous Haha!
RazorBurn
11th March 2016, 08:43
is it OK to do this to force to process the chroma?
clip = mvsfunc.ToRGB(input = clip)
clip = core.knlm.KNLMeansCL(clip = clip, d = 1, a = 2, h = 2)
clip = mvsfunc.ToYUV(input = clip, css="420", depth = 8)
clip.set_output()
Are_
11th March 2016, 11:21
clip = core.knlm.KNLMeansCL(clip=clip, d=1, a=2, h=2, cmode=True)
clip.set_output()
But I'm not sure if you need to be in 444 to do this.
RazorBurn
11th March 2016, 16:35
clip = core.knlm.KNLMeansCL(clip=clip, d=1, a=2, h=2, cmode=True)
clip.set_output()
But I'm not sure if you need to be in 444 to do this.
The source is YV12, the doc says when source is converted to RGB, all planes will be process.. So i converted it to RGB, process, then back to YV12..
Khanattila
11th March 2016, 17:21
The source is YV12, the doc says when source is converted to RGB, all planes will be process.. So i converted it to RGB, process, then back to YV12..
Three alternatives:
1) Invoke three times the program. Each plane will be processed independently.
2) Convert to YV24.
3) Convert to RGB.
- Mode 1 is slowest.
- Mode 2 and Mode 3 look for the difference between two colors rather than between two gray levels.
Atak_Snajpera
13th March 2016, 16:13
I think you forgot to change version number ;) Latest version still reports 0.7.4
http://i.cubeupload.com/gbLjt3.png
Khanattila
14th March 2016, 16:53
I think you forgot to change version number ;) Latest version still reports 0.7.4
http://i.cubeupload.com/gbLjt3.png
Damn!
Magik Mark
16th March 2016, 01:02
Can somebody confirm if the opencl.dll found in the latest driver of Nvidia (364.51) still causes crashes in GTX 900 series GPUs?
Magik Mark
21st March 2016, 02:46
Khanatilla,
Is the new opencl 2.1 compatible with knlmeans? Will it change how it works ?
Khanattila
22nd March 2016, 01:31
Khanatilla,
Is the new opencl 2.1 compatible with knlmeans? Will it change how it works ?
OpenCL offers backward compatibility. For final user change nothing. ;)
martin53
24th March 2016, 15:02
Specifically image 026_73_k.png of these example images (http://forum.doom9.org/showthread.php?p=1761855#post1761855) indicates that kNLMeansCL might have an accuracy issue next to the image borders.
With substantial noise in test images, I frequently observed this behavior at various borders (024_51_k.png shows it at left, bottom and right, 008_99_k.png at top and right).
Khanattila
25th March 2016, 17:26
Specifically image 026_73_k.png of these example images (http://forum.doom9.org/showthread.php?p=1761855#post1761855) indicates that kNLMeansCL might have an accuracy issue next to the image borders.
With substantial noise in test images, I frequently observed this behavior at various borders (024_51_k.png shows it at left, bottom and right, 008_99_k.png at top and right).
Thanks for reporting this, but it is absolutely normal.
Magik Mark
10th April 2016, 04:26
Khanattila,
I posted this in madvr forum. Maybe you can assist:
While watching video in conjunction of video trancoding in the background using knlmeans filter, I get FSE (full screen exclusive mode) failure right after it finishes encoding
KNLmean uses Opencl and so do some feature of madvr, i think. Or maybe some rendering options found in madvr may be in conflict
Thanks
Khanattila
11th April 2016, 18:21
https://github.com/Khanattila/KNLMeansCL/releases/tag/v0.7.6
KNLMeansCL v0.7.6
* Fixed wrong version displaying.
* VapourSynth: fixed wrong API usage.
Khanattila
11th April 2016, 18:21
Khanattila,
I posted this in madvr forum. Maybe you can assist:
While watching video in conjunction of video trancoding in the background using knlmeans filter, I get FSE (full screen exclusive mode) failure right after it finishes encoding
KNLmean uses Opencl and so do some feature of madvr, i think. Or maybe some rendering options found in madvr may be in conflict
Thanks
Thanks for reporting this, but first I have to be able to replicate the problem.
AMD, Nvidia or Intel?
Magik Mark
11th April 2016, 20:39
Nvidia gtx 960
Sent from my iPhone using Tapatalk
asarian
12th April 2016, 10:07
I'm really starting to like KNLMeansCL. ;) On a 5min vid test, with a GTX 980, I got the following result:
with: 4.95 fps
without: 4.11 fps
Not a super huge difference, but still. :)
asarian
12th April 2016, 10:09
Khanattila,
I posted this in madvr forum. Maybe you can assist:
While watching video in conjunction of video trancoding in the background using knlmeans filter, I get FSE (full screen exclusive mode) failure right after it finishes encoding
KNLmean uses Opencl and so do some feature of madvr, i think. Or maybe some rendering options found in madvr may be in conflict
Thanks
I was actually just thinking along the same line: that gaming is probably out of the question while using KNLMeansCL. :)
Groucho2004
12th April 2016, 10:57
I'm really starting to like KNLMeansCL. ;) On a 5min vid test, with a GTX 980, I got the following result:
with: 4.95 fps
without: 4.11 fps
Not a super huge difference, but still. :)
More speed with a noise filter than without? You must have some weird-ass computer. :D
Nobody knows what you measured there and it clearly makes no sense, at least not with the given context (which is zero).
asarian
12th April 2016, 11:05
More speed with a noise filter than without? You must have some weird-ass computer. :D
Nobody knows what you measured there and it clearly makes no sense, at least not with the given context (which is zero).
Obviously (but apparently not so obvious), 'with' and 'without' referred to either using KNLMeansCL or not, like in:
vid = haf.QTGMC (vid, InputType=0, Preset="Very Slow", TR2=3, TFF=True, Denoiser="KNLMeansCL")
Or removing the Denoiser parameter.
Groucho2004
12th April 2016, 11:11
Obviously (but apparently not so obvious), 'with' and 'without' referred to either using KNLMeansCL or not, like in:
vid = haf.QTGMC (vid, InputType=0, Preset="Very Slow", TR2=3, TFF=True, Denoiser="KNLMeansCL")
Or removing the Denoiser parameter.
Sorry, didn't use my crystal ball so I didn't know that you were talking about QTGMC() in the KNLMeansCL thread. :rolleyes:
shinjico
12th April 2016, 14:33
https://github.com/Khanattila/KNLMeansCL/releases/tag/v0.7.6
KNLMeansCL v0.7.6
* Fixed wrong version displaying.
* VapourSynth: fixed wrong API usage.
I can't make DGNV and KNLmeans work together in avs script.
x264 codec or virtualdub will freeze when I import a script like
DGSource("test.dgi")
KNLMeansCL()
but other sourcefilters will be ok, like
ffms2("test.mkv")
KNLMeansCL()
may be there is some violation bettween DGNV and KNLMeansCL ?
My platform 1 : GTX960 Nv_driver 364.51 win10_1151 avs 2.6.0 DGDecodeNV 2051
My platform 2 : GTX970 Nv_driver 364.72 win10_1151 avs 2.6.0 DGDecodeNV 2051
both of them have the same problem
asarian
12th April 2016, 15:23
Results are even better than I thought. :) (QTGMC was still using FFT3DFilter). Now I did this:
vid = haf.QTGMC (vid, InputType=0, Preset="Very Slow", TR2=3, TFF=True, Denoiser="KNLMeansCL")
vid = core.knlm.KNLMeansCL (vid, d=5, a=5, s=4, h=1.2)
Cut my entire coding time in half even! (As opposed to things I did with FFT3DFilter) :thanks:
PSU load is now wicked too, btw, having both my CPU and GPU burning in tandem!
Seriously, OP, this is a fantastic filter! Wish I had discovered it earlier.
Groucho2004
12th April 2016, 15:43
vid = haf.QTGMC (vid, InputType=0, Preset="Very Slow", TR2=3, TFF=True, Denoiser="KNLMeansCL")
vid = core.knlm.KNLMeansCL (vid, d=5, a=5, s=4, h=1.2)
I must be missing something here. What's the point in using KNLMeansCL() in QTGMC() and denoising again after that?
Khanattila
12th April 2016, 17:38
I can't make DGNV and KNLmeans work together in avs script.
x264 codec or virtualdub will freeze when I import a script like
DGSource("test.dgi")
KNLMeansCL()
but other sourcefilters will be ok, like
ffms2("test.mkv")
KNLMeansCL()
may be there is some violation bettween DGNV and KNLMeansCL ?
My platform 1 : GTX960 Nv_driver 364.51 win10_1151 avs 2.6.0 DGDecodeNV 2051
My platform 2 : GTX970 Nv_driver 364.72 win10_1151 avs 2.6.0 DGDecodeNV 2051
both of them have the same problem
I fear that none of us has done strange things. But it's a problem of NVIDIA.
asarian
12th April 2016, 23:30
I must be missing something here. What's the point in using KNLMeansCL() in QTGMC() and denoising again after that?
The point would be that you can run KNLMeansCL with your own parameters this time.
asarian
13th April 2016, 02:28
So, how do I get SMDegrain to use KNLMeansCL in AviSynth then? Looking thru the code (VapourSynth), it seems 'prefilter=4' might do it there. But 'KNLMeansCL' name doesn't even appear in SMDegrain v.2.2d.avsi script.
Groucho2004
13th April 2016, 08:21
So, how do I get SMDegrain to use KNLMeansCL in AviSynth then? Looking thru the code (VapourSynth), it seems 'prefilter=4' might do it there. But 'KNLMeansCL' name doesn't even appear in SMDegrain v.2.2d.avsi script.
SMDegrain (http://avisynth.nl/index.php/SMDegrain) 2.2d is 3 years old. KNLMeansCL was added a year ago (3.1d). You might think about updating.
Edit: Just realized that you're talking about HAvsfunc. I don't know what version of SMDegrain is used there.
Edit1: It's also the latest (3.1.2d)
tormento
13th April 2016, 08:50
I can't make DGNV and KNLmeans work together in avs script.
Are you on Win10 x64?
The only way to make it work is to use a completely x64 environment, i.e. AviSynth+_x64+DGNV_x64+etc
Tested lot of times and mixed x86+x64 environment doesn't work (yet)
On win8_x64 everything is ok.
asarian
13th April 2016, 14:41
SMDegrain (http://avisynth.nl/index.php/SMDegrain) 2.2d is 3 years old. KNLMeansCL was added a year ago (3.1d). You might think about updating.
Edit: Just realized that you're talking about HAvsfunc. I don't know what version of SMDegrain is used there.
Edit1: It's also the latest (3.1.2d)
Yeah, maybe I just need to leave SMDegrain behind altogether.
asarian
13th April 2016, 15:24
https://github.com/Khanattila/KNLMeansCL/releases/tag/v0.7.5
Isn't it at 0.7.6 now?!
Khanattila
13th April 2016, 15:40
Isn't it at 0.7.6 now?!
Yes, I had not updated the first post.
HOB
15th April 2016, 15:29
Shinjico
I had a similar problem using DGindexNV in MeGUI, I used DGindexNV and KNLmeans together often with excellent results then after DGindexNV updated to 2050 it would just FAIL to even begin the encode, when DGindexNV updated to 2051 it too failed my solution was to revert back to DGindexNV 2049 which worked well for me in the past and was very stable. In MeGUI you can select not to update a plugin which is what I've done with DGindexNV…I don't allow it to update. I don't know if reverting back to 2049 is acceptable to you but it worked for me…give it a try.
Artofeel
29th April 2016, 10:24
I'm a little confused
I have GF 550M, so I guess it's not supported on versions later 0.6.11
But when I run it on v0.7.6, I get error not about compatibility
Python exception: knlm.KNLMeansCL: fatal error!
(clBuildProgram: please report Log-KNLMeansCL.txt.)
Log-KNLMeansCL.txt (http://paste2.org/PIOVKvGI)
on v0.6.11 it's works fine
Win7 64bit
AIDA64 show this (http://paste2.org/jPaU4exV)
OpenCL Compliancy:
OpenCL 1.1 Yes (100%)
OpenCL 1.2 Yes (100%)
OpenCL 2.0 No (62%)
so... %)
Magik Mark
29th April 2016, 10:57
I'm getting this error:
"Display driver stopped responding and has recovered Display driver NVIDIA Windows Kernal Mode Driver, Version 364.96 stopped responding and has successfully recovered"
This happens when I'm running madvr and at the same time running this filter during encoding via staxrip
Is there something we could do about this?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.