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

sl1pkn07
19th March 2020, 22:01
https://www.dropbox.com/s/xxj86mdfkckgx9b/450.12.zip?dl=0 DCH
https://mega.nz/#!PZ1m0CSK!b5F4edNUcBaaErgjsjuXmLBP7enXL63A_epCzl8ij_E Standard

from Guru3d (https://forums.guru3d.com/threads/nvidia-450-12-whql-for-win10-x64.430333/)

IDK if works outside Insider (XD)

Selur
20th March 2020, 08:19
Installed 450.12 from that link (and rebooted), sadly it did not help, error is still there.

Cu Selur

tormento
20th March 2020, 09:59
Installed 450.12 from that link (and rebooted), sadly it did not help, error is still there.

Cu Selur



Can you be more specific about error?

Selur
20th March 2020, 11:46
@tormento: posted the error message before, see: https://forum.doom9.org/showthread.php?p=1902429

tormento
20th March 2020, 12:17
@tormento: posted the error message before

Tried to set correct device number and see what GPU-Z tells you? I think removing DCH perhaps messed up something with device inf or OpenGL libraries. Try to restore DCH too.

Selur
21st March 2020, 12:16
I use the 442.74 DCH install downloaded from NVIDIA.
I only have one graphic card and using 'KNLMeansCL(device_type="gpu",device_id=0)' sadly does not change anything, error stays the same.

tormento
21st March 2020, 13:00
I use the 442.74 DCH install downloaded from NVIDIA.
I only have one graphic card and using 'KNLMeansCL(device_type="gpu",device_id=0)' sadly does not change anything, error stays the same.



Try to look at dependencies of the dll. Perhaps you uninstalled something necessary.

Selur
21st March 2020, 13:38
Usually when a dependency is missing there should be a problem loading the filter itself, the error:
Avisynth preview error: Avisynth error ��[>: KNLMeansCL: fatal error! (oclUtilsGetPlaformDeviceIDs: OCL_UTILS_UNKNOWN_ERROR) (E:\Temp\TEMPPR~1.AVS, line 11) Couldn't import -1 (1): ��[>
sounds to me more like the ocl interface changed in the new drivers or something similar.

I looked at gpu-z:
http://gpuz.techpowerup.com/20/03/21/a55.png
but don't see anything that seems wrong,...

Since the Vapoursynth gpu filters all work fine it might be that this is only an issue with using 32bit Avisynth (Vapoursynth I use 64bit).

Cu Selur

tormento
21st March 2020, 23:12
Since the Vapoursynth gpu filters all work fine it might be that this is only an issue with using 32bit Avisynth (Vapoursynth I use 64bit).
Definitely use x64 AVS+

Selur
22nd March 2020, 20:22
I mainly use Avisynth for SD content and Vapoursynth for HD+ resolutions, so 32bit is usually fine for me.
Would also first have to check whether all filters I use have 64bit ports.


Cu Selur

tormento
22nd March 2020, 20:24
I mainly use Avisynth for SD content and Vapoursynth for HD+ resolutions, so 32bit is usually fine for me.
Would also first have to check whether all filters I use have 64bit ports.


Cu Selur



I am telling you to use x64 because some people (me included) had problems with x86 and OpenCL.

Selur
25th March 2020, 20:54
worked fine so far, tested 64bit and it worked, but 32bit is still broken :/

tormento
18th April 2020, 14:16
worked fine so far, tested 64bit and it worked, but 32bit is still broken :/
Just installed 450.82 developer drivers. Working fine on my x64 chain.

Selur
19th April 2020, 17:41
Nice, hopefully it will still work with the next normal release. :)

Khanattila
20th April 2020, 16:25
I am telling you to use x64 because some people (me included) had problems with x86 and OpenCL.

Do you have problems with all 32bit opencl applications?
It could be an installer problem ... maybe you can solve it by changing some DLL manually

tormento
20th April 2020, 19:21
It could be an installer problem ... maybe you can solve it by changing some DLL manually
It's a long story... maybe. I use 99.999999% x64, so, no fuss.

Groucho2004
27th April 2020, 20:56
I updated my graphics card from GTX750 to GTX1660 a few days ago. I'm getting about twice the speed with KNLMeansCL. I was expecting a bit more but still, nice speed-up. :)

Atak_Snajpera
27th April 2020, 22:56
I updated my graphics card from GTX750 to GTX1660 a few days ago. I'm getting about twice the speed with KNLMeansCL. I was expecting a bit more but still, nice speed-up. :)

Indeed. Gtx1660 Has 5x more tflops than 750. I wonder where is bottleneck in this case.

videoh
27th April 2020, 23:28
Atak, I was wondering the same. Is Groucho doing an encode at the same time? Assuming not, is the boost coming mainly from faster frame decoding, or from faster KNLMeans?

750 is hybrid decode for HEVC IIRC, so there may be a big improvement in decoding speed. If of course Groucho is processing HEVC.

Groucho2004
28th April 2020, 00:07
Atak, I was wondering the same. Is Groucho doing an encode at the same time? Assuming not, is the boost coming mainly from faster frame decoding, or from faster KNLMeans?

750 is hybrid decode for HEVC IIRC, so there may be a big improvement in decoding speed. If of course Groucho is processing HEVC.Just decoding with DGDevNV is much faster with the 1660. It's just KNLMeansCL that did not quite yield the expected results. I'm testing with AVSMeter.

Groucho2004
28th April 2020, 00:15
Indeed. Gtx1660 Has 5x more tflops than 750. I wonder where is bottleneck in this case.Maybe it's my oldish mobo (P8P67) with PCI Express 2.0 slot.

videoh
28th April 2020, 00:25
Is your test stream HEVC? Frame size? Didn't read the whole thread, perhaps you already said.

Groucho2004
28th April 2020, 00:42
Is your test stream HEVC? Frame size? Didn't read the whole thread, perhaps you already said.Decoding 4K HEVC (SonyCamp4K) I get 155 fps with DGDecNV. 1080p H.264 is ~ 500 fps. That seems pretty fast.

Sparktank
28th April 2020, 01:05
I updated my graphics card from GTX750 to GTX1660 a few days ago. I'm getting about twice the speed with KNLMeansCL. I was expecting a bit more but still, nice speed-up. :)

I need to get one of those.
The 1060 is a nice upgrade over my 750ti.

videoh
28th April 2020, 02:02
Decoding 4K HEVC (SonyCamp4K) I get 155 fps with DGDecNV. Pretty good. I'm getting 326 fps with my 2080 Ti. :D

Groucho2004
28th April 2020, 02:31
I'm getting 326 fps with my 2080 Ti. :DWhich is 6-7 times the price of the 1660. :eek:

videoh
28th April 2020, 03:05
My progress bar of life is nearing the end (probably not soon enough for a lot of you). I'm not leaving my money to anybody. Gonna live it up!

LigH
28th April 2020, 08:05
I still have a PC with Phenom-II X6 and GT450. I seriously need a new PC ... but to be future-proof, it would cost me a month's wages.

Boulder
28th April 2020, 08:15
I still have a PC with Phenom-II X6 and GT450. I seriously need a new PC ... but to be future-proof, it would cost me a month's wages.

An X470 board + Ryzen 3700X is a quite affordable upgrade, which gives a big boost in video encoding and will easily last several years. AVX2 performance was increased substantially compared to the first-gen Ryzens. I don't expect to see any major jumps in the near future so my 3900X will do nicely for years (the next gen will require a new mobo and DDR5 RAM so no rush).
RAM is not too expensive either, the speed won't matter much when encoding.

MeteorRain
28th April 2020, 08:31
I'm on B450 + Ryzen 3600 + GTX 1650S and I feel like it's pretty future proof.

tormento
28th April 2020, 08:49
AVX2 performance was increased substantially compared to the first-gen Ryzens.
Zen 2 is a terrific architecture but about AVX2, that is sort of “emulated”. There are many articles about this topic, look at them if interested.

Boulder
28th April 2020, 09:07
Zen 2 is a terrific architecture but about AVX2, that is sort of “emulated”. There are many articles about this topic, look at them if interested.
I'm not sure I follow you. The first-gen Zen did some tricks which is why it was quite poor in AVX2. The current gen has full AVX2 support.

https://forum.doom9.org/showthread.php?t=174393&page=2 shows nicely how big the difference is. A 32-thread 1950X scored 4.26 for AVX2 and a stock 3900X (24 threads) got 5.51.

MeteorRain
28th April 2020, 09:33
Zen 2 is a terrific architecture but about AVX2, that is sort of “emulated”. There are many articles about this topic, look at them if interested.

Zen2 has full AVX2 capability. Not sure where you got that "emulated" idea.

tormento
28th April 2020, 10:06
Zen2 has full AVX2 capability. Not sure where you got that "emulated" idea.
Unfortunately I can't find the page anymore, I can summarize only.

By SIMDjson benchmark, it was shown that Intel has more AVX2 IPC than Zen2.

Apart from that, the higher core count could nullify that penalty.

Zen3 should come across that and introduce AVX512 too.

MeteorRain
28th April 2020, 10:33
Unfortunately I can't find the page anymore, I can summarize only.

By SIMDjson benchmark, it was shown that Intel has more AVX2 IPC than Zen2.

Apart from that, the higher core count could nullify that penalty.

Zen3 should come across that and introduce AVX512 too.

I found that benchmark. It was concluded that AMD has a poor IPC performance on AVX2. That is kinda expected, and actually many factors matters including that SIMDjson was optimized against Intel processors.
CPU pipelines, instruction order, cache size, even picking one instruction over another, can make a lot difference.

tormento
28th April 2020, 10:42
That is kinda expected, and actually many factors matters including that SIMDjson was optimized against Intel processors.
Wasn't compiled using neutral flags?

Groucho2004
28th April 2020, 10:44
Conversation is getting a bit off-topic...

MeteorRain
28th April 2020, 23:14
Wasn't compiled using neutral flags?

A highly optimized library wouldn't use a neutral flag. Also there's no neutral flag. If you have Intel CPU then all you can do is make sure your program runs fastest on that Intel CPU. If later AMD CPU appears and has different characteristics, likely some of the previous optimization won't make it as fast as on Intel CPU.

One example would be Intel has avx down clocking. So to reduce the chance of that you can carefully reduce the amount of heavy avx computing, and let CPU stay on light load frequency (higher frequency). But AMD doesn't have avx down clocking so the best thing to do is give it all the heavy lifting as much as possible.

Intel compiler for example when compiling avx 512, will take the down clocking in to account, and emit code that is not too hard for the CPU, so it won't run too fast to run slow (lol) but if AMD comes with 512 some day and it does not clock down, then when it runs the same binary it would not use its 100% potential.

tormento
29th April 2020, 00:00
One example would be Intel has avx down clocking.
AFAIK it's a bios option, not mandatory.

hintlou
27th May 2020, 12:58
After I updated some filters (yadifmod2-0.2.4,SangNom2-0.5.0,DCTFilter-0.5.1,vsMSharpen-2.0.0,MatchHistogram-2.1.0,TMM2-0.1.4,CombMask-2.0.0 and MPEG2DecPlus-0.1.2),my QTGMC 3.364 got error and warned me that "KNLMeans.dll cannot be used as a plugin for Avisynth".
I don't know which filter caused it.

pinterf
27th May 2020, 16:12
KNLMeansCL needs to be rebuilt for AviSynth+ 3.6
https://forum.doom9.org/showthread.php?p=1909698#post1909698
Until it is done officially, you can download it from my repository

hintlou
27th May 2020, 16:42
Thanks pinterf!I updated to your KNLMeansCL.
But it also made error:
Script error:expected ')'
((null),line 1,column 4)
(AviSynth+/plugins64+/srestore v2.796.avsi,line 79)
(QTGMC 3.364.avsi,line 186)
(my.avs line 25:QTGMC(preset="Very Slow", InputType=0,sourceMatch=3).SelectEven())

real.finder
27th May 2020, 19:24
Thanks pinterf!I updated to your KNLMeansCL.
But it also made error:
Script error:expected ')'
((null),line 1,column 4)
(AviSynth+/plugins64+/srestore v2.796.avsi,line 79)
(QTGMC 3.364.avsi,line 186)
(my.avs line 25:QTGMC(preset="Very Slow", InputType=0,sourceMatch=3).SelectEven())

update your scripts, especially SMDegrain and Zs_RF_Shared.avsi

hintlou
28th May 2020, 10:25
Thanks!After I updated the Zs_RF_Shared.avsi,problem were solved.

Selur
11th June 2020, 20:03
KNLMeansCL is still (https://forum.doom9.org/showthread.php?p=1902429#post1902429) crashing for me with:
Avisynth error : KNLMeansCL: fatal error! (oclUtilsGetPlaformDeviceIDs: OCL_UTILS_UNKNOWN_ERROR) (E:\Temp\tempPreviewAvisynthFile08_26_19_695.avs, line 11) Couldn't import -1 (1)
also tried the testbuild from pinterf but it doesn't change anything.
Since it there hasn't been a driver version since February that works for me with KNLMeansCL anyone has an idea how to get it working again?
(Problem is only with 32bit Avisynth, works fine in 64bit Vapoursynth)

=> found the problem here, I had an abandoned old OpenCL.dll in the same folder as KNLMeansCL which caused the problem, after removing the OpenCL.dll it's working again :)

Slogra
6th September 2020, 13:42
I'm using Ripbot264 which incluses the KNLMeansCL plugin, but the filter does not work well on my AMD VEGA GPU. (i believe it did not work on my previous AMD RX480 card either).

When i enable KNLMeansCL by using mono noise 2, then the output image gets very dark, almost completely black.

It seems to be minor issue though, because is soon as i resize the video from 1920x1080 to 1904x1072 for example, the output image is normal and the denoising works! It even works fine if i resize to higher resolution.

So resizing is a workaround. But i would like to keep original 1920x1080 resolution, so it's not a good workaround for me.

Does anyone know a better way to fix this issue?

mp3dom
6th September 2020, 20:35
Maybe it's due to a not mod16 resolution? You can workaround with padding, adding borders to the image (just the minimum needed, for example, does it work at 1920x1088?), filters and then crop the borders away to restore the original image.

Slogra
7th September 2020, 09:39
Thanks, that's a good idea.

I would think 1920x1088 would be better, but that resolution did not fix it.

But I know that resizing to 1936x1090 works. So i added 16 and 10, and that works!


video=video.AddBorders(0,0,16,10)
video=KNLMeansCL(video,d=1, a=2, s=4, h=2, device_type="GPU", device_id=0)
video=video.Crop(0,0,-16,-10)

tormento
9th September 2020, 17:03
KNLMeansCL is crashing for me with:
Avisynth error : KNLMeansCL: fatal error! (oclUtilsGetPlaformDeviceIDs: OCL_UTILS_UNKNOWN_ERROR) (E:\Temp\tempPreviewAvisynthFile08_26_19_695.avs, line 11) Couldn't import -1 (1)
Same error here after updating to NVidia drivers 460.15.

Unfortunately no orphaned opencl*.* around.

Reverted to 452.06 and everything works again.

tormento
22nd September 2020, 11:15
460.20 Nvidia drivers solved OpenCL issue.