Log in

View Full Version : KNLMeansCL: OpenCL NLMeans de-noising algorithm [2018-01-29]


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 [31] 32

MysteryX
16th May 2022, 04:07
I'm trying to get KNLMeansCL to work in my Windows VM (with GPU passthrough), with the latest Avisynth+


ColorBars()
KNLMeansCL()


It throws

System exception: Access Violation

Are there additional dependencies needed to make it run?

Also the CPU-only mode isn't working, are there any plans to fix that?

EDIT: found the Pinterf plugin version and that one works. device_type="cpu" still doesn't work though.

Atak_Snajpera
19th May 2022, 14:35
Are you sure that you have required software installed for OpenCL running on CPU
Check this tool
https://www.mediafire.com/file/fd0jmbs7t642n5y/OpenCLinfo.exe/file
https://i.postimg.cc/5tNYDyS2/Capture.png

Selur
19th May 2022, 14:45
Didn't AMD drop OpenCL support through the CPU a while ago?
(Just checked, at least for my Ryzen 9 3950x I couldn't find any drivers,..)

guest
21st May 2022, 03:38
Didn't AMD drop OpenCL support through the CPU a while ago?
(Just checked, at least for my Ryzen 9 3950x I couldn't find any drivers,..)

I've never been successful at getting OpenCL to work with any CPU, be it Intel or AMD.

Need appropriate GPU !!!

MysteryX
21st May 2022, 05:34
You mean that none of the OpenCL plugins work on the CPU at all? I'm on Intel btw.

Atak_Snajpera
21st May 2022, 14:56
You mean that none of the OpenCL plugins work on the CPU at all? I'm on Intel btw.

KNMEANSCL works fine with device_type="CPU" . You just need proper driver
https://www.intel.com/content/www/us/en/developer/tools/opencl-cpu-runtime/overview.html
https://www.intel.com/content/www/us/en/developer/articles/technical/legacy-opencl-drivers.html#latest_CPU_runtime

kedautinh12
21st May 2022, 15:45
Didn't AMD drop OpenCL support through the CPU a while ago?
(Just checked, at least for my Ryzen 9 3950x I couldn't find any drivers,..)

I using AMD but can use with Knlmeanscl normally

guest
22nd May 2022, 03:32
KNMEANSCL works fine with device_type="CPU" . You just need proper driver
https://www.intel.com/content/www/us/en/developer/tools/opencl-cpu-runtime/overview.html
https://www.intel.com/content/www/us/en/developer/articles/technical/legacy-opencl-drivers.html#latest_CPU_runtime

I have tried this before, without too much luck, but certainly will give it another try, using "device type="CPU" in the command line.

Problem is, you need to sign up for an Intel Account, to get this :(

Thanks

guest
22nd May 2022, 03:33
I using AMD but can use with Knlmeanscl normally

Hi ked,

How ??

What CPU are you running (I know I should know this already, sorry)

kedautinh12
22nd May 2022, 06:57
Hi ked,

How ??

What CPU are you running (I know I should know this already, sorry)

Are you check your GPU support???https://i.imgur.com/P8oqc7v.png

guest
22nd May 2022, 09:43
Are you check your GPU support???https://i.imgur.com/P8oqc7v.png

I think you might have misunderstood, the subject was CPU OpenCL support, NOT GPU's.

Most GPU's DO support it...

kedautinh12
22nd May 2022, 18:03
I think you might have misunderstood, the subject was CPU OpenCL support, NOT GPU's.

Most GPU's DO support it...

Sorry, i'm mistake. I can't use KNLMEANSCL with my AMD GPU too :D

ReinerSchweinlin
23rd May 2022, 15:22
Sorry, i'm mistake. I can't use KNLMEANSCL with my AMD GPU too :D
no openCL support on your AMD GPU ? Which model do you have ?

Selur
23rd May 2022, 17:03
You mean that none of the OpenCL plugins work on the CPU at all? I'm on Intel btw.
No, I afaik. OpenCL stuff just does not work on AMD CPUs for quite some time, I assumed that Intel is working.

ReinerSchweinlin
24th May 2022, 11:51
I remember some driver install packages from AMD without OPENCL support in it, but in general, it always worked.
Since AMD dropped Support of GCN cards, there probably will not be any further development, but I see no reason, why the "old stuff" shouldn`t work anymore...
Did anyone check if the patched Anmermine drivers have OPEN CL included? For gaming and other stuff, these are a very nice option to give older cards new live (after all, a R9 Fury has almost 10tflops of FP32 compute power - not so bad even today...).

CPU-Support: I used to run Ripbot on a XEON Server with no possibility to add a GPU- Atak was so kind to enable the OPEN_CL CPU Switch in Ripbot - after installing the xeon-OpenCL Drivers - I was good to go. But lets not talk about speeds :)
I rememnber many installations with AMD Cards that prompted the CPU as OPENCL device, too. They were running on the AMD Drivers (even Intel CPUs).

So my guess is that in most cases where "its not running" it only takes a little driver installation, fiddling... Last month I trhew together some GCN 2.0 machines and used all kinds of benchmarks for stresstesting - luxmark always being one of them - runs on OPENCL... Mandelbubler is also on of my test-suites, OPENCL... Everythung "just worked"...

ReinerSchweinlin
24th May 2022, 12:04
I have tried this before, without too much luck, but certainly will give it another try, using "device type="CPU" in the command line.

Problem is, you need to sign up for an Intel Account, to get this :(


I remember... But its not too much harm getting an intel account - I recall it was relatively straight forward...
OPEN CL on CPUs really is not a lot of fun if you want to do something that actually nees a GPU... Even a 30 dollar gtx 750 outran my two xeons by A LOT...

kedautinh12
24th May 2022, 16:51
no openCL support on your AMD GPU ? Which model do you have ?

It's from my broken driver GPU. I fixed it and work KNLMEANSCL type GPU normally but still can't work with my AMD CPU

guest
25th May 2022, 03:49
I remember... But its not too much harm getting an intel account - I recall it was relatively straight forward...
OPEN CL on CPUs really is not a lot of fun if you want to do something that actually nees a GPU... Even a 30 dollar gtx 750 outran my two xeons by A LOT...

Somehow I have an Intel account, I just had to update my password, and was good to go.

I totally agree, OpenCL on CPU's is not pretty :(, but if you have no choice...

A $30 GTX 750...hmmm, can't find one of them.

I have a few 760's, 770's, etc, in my my older encoding servers, just incase.

ReinerSchweinlin
25th May 2022, 12:35
A $30 GTX 750...hmmm, can't find one of them.

I have a few 760's, 770's, etc, in my my older encoding servers, just incase.
Check the minimum OPENCL Version you need - head over to techpowerup to see which generation of GPU supports your OPENCL needs. 750 is Maxwell, 770 is Kepler. AFAIR, Kepler still is good for OPENCL 3.0, which should be totally ok.... Kepler is not supported in the newest NVIDIA drivers, but that might not be a problem in your case. Maxwell is supported...
A 770 (Kepler) is more powerfull than a 750 (maxwell), but older, but might still do the job...
AMD Cards from GCN Generation and higher are quite powerfull for OPENCL means... Even with the still a little crazy prices nowadays, it should be no problem to get a GPU for under 50 bucks to support the OPENCL filteriing - even the smallest one will be much more powerfull than a CPU for around the same money.. (So instead of ramping up the CPU - get a GPU).

takla
30th May 2022, 19:11
Just use ffmpegs built-in nlmeans_opencl like this

ffmpeg -y -benchmark -init_hw_device opencl=GPU -filter_hw_device GPU -i INPUT.mkv -map_metadata -1 -vf "format=yuv420p,hwupload,nlmeans_opencl,hwdownload,format=yuv420p" -c:v prores_ks OUTPUT.mov


Here are the available parameters (https://ffmpeg.org/ffmpeg-filters.html#nlmeans-1)
Use them like this nlmeans_opencl=s=1.0:p=7:r=15
Note1: r=15 might be too slow. Use lower values.
Note2: p=7 might be too lossy. Use higher values.
Note3: Anything but 8bit is not supported
Note4: If you have a nvidia GPU or a good CPU, use BM3D (https://github.com/WolframRhodium/VapourSynth-BM3DCUDA/issues/7#issuecomment-886173346)
Note5: Or use MDegrain (https://forum.doom9.org/showpost.php?p=1951459&postcount=1)
Both are much better then nlmeans.

kedautinh12
30th May 2022, 21:08
Just use ffmpegs built-in nlmeans_opencl like this
ffmpeg -y -init_hw_device opencl=ocl -filter_hw_device ocl -i INPUT.avs -c:v prores_ks -filter_complex "format=yuv420p, hwupload, nlmeans_opencl, hwdownload, format=yuv420p" OUTPUT.mkv
Here are the available parameters (https://ffmpeg.org/ffmpeg-filters.html#nlmeans-1)
Use them like this nlmeans_opencl=s=1.0:p=7:r=15
Note1: r=15 might be too slow. Use lower values.
Note2: p=7 might be too lossy. Use higher values.
Note3: Anything but 8bit is not supported
Note4: If you have a nvidia GPU or a good CPU, use BM3D (https://github.com/WolframRhodium/VapourSynth-BM3DCUDA/issues/7#issuecomment-886173346)
Note5: Or use MVtools (https://forum.doom9.org/showpost.php?p=1951459&postcount=1)
Both are much better then nlmeans.

Some people say KNLMeansCL still better than BM3D in here

takla
30th May 2022, 21:29
Some people say KNLMeansCL still better than BM3D in here

I did exactly one test with nlmeans_opencl which was not only MUCH slower then BM3D or MDegrain but also had MUCH worse quality. I tried multiple different parameters to no avail. That is already bad enough for me to never consider it as an option ever again.

guest
31st May 2022, 04:51
Some people say KNLMeansCL still better than BM3D in here

Well, I have to say I did a BM3D (CUDA) encode the other day, and it was NOT good, so that's off my usage list, from now on.

Having said that, BM3D (CPU) is OK :)

Yet to do a proper KNLMeansCL comparison.

Lan4
17th June 2023, 22:18
When this filter is running, my video card starts to squeak. The sound is like a grasshopper. The filter is working fine. Can this be fixed without repairing the video card?

Emulgator
17th June 2023, 23:34
That sqeaking just tells about the load.
If the video card is designed in a way that current draw can lead to magnetostriction
(inductivities can exhibit that), any serious load will trigger similar behaviour, not just KNLMeansCL.

Lan4
18th June 2023, 03:23
I compared the work of KNLMeansCL and FFT3DGPU in GPU-Z. Is the "GPU Load" value important? The load is 100% when KNLMeansCL is running. In other values, the difference is small.

kedautinh12
18th June 2023, 04:27
I compared the work of KNLMeansCL and FFT3DGPU in GPU-Z. Is the "GPU Load" value important? The load is 100% when KNLMeansCL is running. In other values, the difference is small.

For me, KNLMeansCL better than FFT3DGPU, FFT3DGPU ported base old ver of FFT3DFilter so it's even worst than FFT3DFilter

Lan4
25th June 2023, 04:12
Perhaps I have a strange question. How to reduce load and speed of KNLMeansCL? I don't need the maximum speed of the filter, KNLMeansCL is already fast enough. I want to try to reduce the temperature of the video card, the noise of the fans and remove the squeak.

poisondeathray
25th June 2023, 04:33
Perhaps I have a strange question. How to reduce load and speed of KNLMeansCL? I don't need the maximum speed of the filter, KNLMeansCL is already fast enough. I want to try to reduce the temperature of the video card, the noise of the fans and remove the squeak.

Look at various GPU over/underclocking utilities. They can change the core / memory speeds, voltage.

StainlessS
25th June 2023, 10:48
For me, KNLMeansCL better than FFT3DGPU, FFT3DGPU ported base old ver of FFT3DFilter so it's even worst than FFT3DFilter
FFT3DGPU uses less precision than CPU version FFT3DFilter,
it was always of lesser quality.

Lan4
25th June 2023, 14:58
Look at various GPU over/underclocking utilities. They can change the core / memory speeds, voltage.
I already thought about reducing the power of the video card. But is it possible to reduce the power of the filter itself?

OAKside
4th July 2023, 01:27
When this filter is running, my video card starts to squeak. The sound is like a grasshopper. The filter is working fine. Can this be fixed without repairing the video card?

KNLMeansCL does make my graphics card (6600 XT) produce a specific noise, not heard at other times (games, HW encoding, etc). The sound is like a constant white noise (low decibel, barely heard, similar to coil whine). I assumed it was due to the particular or heavy processing that is going on, like Emulgator has explained. It is my least favorite part about KNLMeansCL (haha, I just don't like my GPU yelling at me or screaming in agony). I assume there is no possible potential of damage (temps are fine). Anyway, this may be unrelated to your squeak, which may be due to load, temps, and fan speed (or even certain speed, which resonates, basically a problematic fan).

StainlessS
4th July 2023, 02:18
My GPU used to click [but not just with KNLMeansCL, which I dont think I've ever used],
I removed it, gave it a clean, plugged it back in and hey presto, no clicking now, for a couple of years.

guest
4th July 2023, 02:57
I already thought about reducing the power of the video card. But is it possible to reduce the power of the filter itself?

Try:-

MSI Afterburner (https://www.msi.com/Landing/afterburner/graphics-cards)

You could change the fan "curve", and maybe get passed the "squeak zone".

Katie Boundary
10th July 2023, 23:28
Come to think of it, a throttling parameter could be pretty generally useful. Set it to 30 and it won't use more than 30% of your available GPU power so you can play Cyberpunk 2077 while you render.

ChaosKing
11th July 2023, 10:16
Another way would be to set a lower Process Priority in Task Manager

https://helpdeskgeek.com/wp-content/pictures/2021/08/8-Set-Priority.png

LeXXuz
1st August 2023, 16:38
KNLMeansCL does make my graphics card (6600 XT) produce a specific noise, not heard at other times (games, HW encoding, etc). The sound is like a constant white noise (low decibel, barely heard, similar to coil whine). I assumed it was due to the particular or heavy processing that is going on, like Emulgator has explained. It is my least favorite part about KNLMeansCL (haha, I just don't like my GPU yelling at me or screaming in agony). I assume there is no possible potential of damage (temps are fine). Anyway, this may be unrelated to your squeak, which may be due to load, temps, and fan speed (or even certain speed, which resonates, basically a problematic fan).

Sounds like coil whine. Nothing you need to be afraid of. But it can be annoying depending on how sensitive your hearing is to high frequencies.

Katie Boundary
31st January 2024, 20:55
I have a new laptop and I'm reinstalling everything. I have several versions of KNLmeansCL and none of them work in Win7. I don't know why.

These are the versions that I have:

KNLMeansCL-v0.6.11.zip
KNLMeansCL-v1.1.1.zip
KNLMeansCL_1.1.1_test_for_avs3.5.2.7z
KNLMeansCL_1.1.1e_v20201112-pfmod.7z

Please direct me to one that works in Win7. Thanks.

ChaosKing
31st January 2024, 22:30
Knlmeanscl depends on MSVCP140.dll, VCRUNTIME140.dll, VCRUNTIME140_1.dll
You probably missing 2015-2022 runtimes https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170

Katie Boundary
1st February 2024, 07:01
Knlmeanscl depends on MSVCP140.dll, VCRUNTIME140.dll, VCRUNTIME140_1.dll
You probably missing 2015-2022 runtimes https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170

It's not that. I already have the MSVC++ 2005, 2010, 2012, 2013, and 2015-2022 runtimes in both 32 and 64-bit.

ReinerSchweinlin
1st February 2024, 08:27
Does OPENCL work on your system? In most cases, it is installed together with the GPU driver.
DOwnload GPU-Z to see if OPEN CL is installed
Take something like mandelbuler or an older geekbench version to see if OPEN CL actually works.

Which GPU are you using ?

kedautinh12
1st February 2024, 09:05
It's not that. I already have the MSVC++ 2005, 2010, 2012, 2013, and 2015-2022 runtimes in both 32 and 64-bit.

You need check in avsmeter

Katie Boundary
1st February 2024, 16:58
https://i.imgur.com/LHGHrdP.png

Which GPU are you using ?

Some Intel integrated BS

EDIT: Intel HD 3000, which is the same as my desktop. But KNLmeansCL works on the desktop.

DOwnload GPU-Z to see if OPEN CL is installed

GPU-Z reports that it is not installed... weird.

StainlessS
1st February 2024, 19:42
https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/

OpenCL Runtime
Runtime API's
Buffer Objects
clEnqueueFillBuffer

clEnqueueFillBuffer is missing before version 1.2.
Maybe update Graphics driver, if available.

EDIT: Related, be careful:- https://forum.videohelp.com/threads/388441-dll-errors-when-using-qtgmc-on-windows-7

EDIT: Google Search:- https://www.google.co.uk/search?q=clEnqueueFillBuffer+%22opencl.dll%22

Katie Boundary
1st February 2024, 20:19
Okay, I figured out what's going on. Sandy Bridges just don't support OpenCL. My desktop can run KNLmeansCL mecause it has a discrete graphics card, and my previous laptop could do it because it had a Broadwell or Haswell chip.

tormento
5th February 2024, 07:34
That's a pity that the development of this plugin stopped.

Selur
5th February 2024, 15:05
That's a pity that the development of this plugin stopped.
I totall agree. :)

ChaosKing
6th February 2024, 23:55
Btw there is a faster drop in replacement for KNLMeansCL but written for cuda, only for vapoursynth https://github.com/AmusementClub/vs-nlm-cuda

tormento
7th February 2024, 17:24
Btw there is a faster drop in replacement for KNLMeansCL but written for cuda, only for vapoursynth
DGDenoise from DGToolsNV is actually a NLMeans denoiser.

tebasuna51
11th February 2024, 09:50
DGDenoise from DGToolsNV is actually a NLMeans denoiser.

Posts after that moved to new thread CUDASynth filters (DGdecode, DGdenoise, DGHDRtoSDR) (https://forum.doom9.org/showthread.php?t=185300)