View Full Version : KNLMeansCL: OpenCL NLMeans de-noising algorithm [2018-01-29]
jmac698
24th January 2017, 13:50
Tested by playing in media player, running at 30fps results in 97% GPU usage and 24% memory controller load. I had to stop quickly because GPU reached 105deg C and could cause thermal shutdown. I guess I need a laptop cooler to use this :(
Edit:
This is a known issue with my laptop, the heatsink does not physicall touch the Nvidia chip, so there is only a thermal pad. The Nvida chip isn't as tall as the CPU. The mod solution is to insert a 0.8mm copper shim, which reduces temp by 20deg C. So until I can make this mod, I can't use OpenCL :(
The intel hd3000 can use directcompute, but OpenCL is not supported, though there is 1.2 emulation on CPU. Have you looked into this? Does anyone use DirectCompute? It should be supported on any dx10.1 GPU.
kgrabs
25th January 2017, 18:39
I got a log file to report, too. First, the script (same thing happens regardless of the KNL settings tho):
LWLibavVideoSource(source="00001.m2ts")
Dither_convert_8_to_16()
KNLMeansCL(d=1, a=2, s=0, h=7, channels="UV", device_type="GPU", lsb_inout=true)
DitherPost(mode=8)
And the log:
OpenCL Platform
------------------------------------------------------------
CL_PLATFORM_VENDOR: Advanced Micro Devices, Inc.
CL_PLATFORM_NAME: AMD Accelerated Parallel Processing
CL_PLATFORM_VERSION: OpenCL 2.0 AMD-APP (1800.8)
CL_PLATFORM_PROFILE: FULL_PROFILE
OpenCL Device
------------------------------------------------------------
CL_DEVICE_VENDOR: Advanced Micro Devices, Inc.
CL_DEVICE_NAME: BeaverCreek
CL_DRIVER_VERSION: 1800.8 (VM)
CL_DEVICE_VERSION: OpenCL 1.2 AMD-APP (1800.8)
CL_DEVICE_PROFILE: FULL_PROFILE
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_IMAGE2D_MAX_WIDTH: 16384
CL_DEVICE_IMAGE2D_MAX_HEIGHT: 16384
CL_DEVICE_IMAGE_MAX_ARRAY_SIZE: 2048
Program Build
------------------------------------------------------------
CL_PROGRAM_BUILD_OPTIONS: -cl-single-precision-constant
-cl-denorms-are-zero
-cl-fast-relaxed-math
-Werror
-D NLM_CLIP_TYPE_STACKED
-D NLM_CLIP_REF_CHROMA
-D NLM_WMODE_WELSCH
-D VI_DIM_X=960
-D VI_DIM_Y=540
-D HRZ_RESULT=1
-D VRT_RESULT=1
-D HRZ_BLOCK_X=32
-D HRZ_BLOCK_Y=8
-D VRT_BLOCK_X=32
-D VRT_BLOCK_Y=8
-D NLM_D=1
-D NLM_S=0
-D NLM_H=7.000000
-D NLM_WREF=1.000000
CL_PROGRAM_BUILD_LOG:
Warnings being treated as errors
"C:\Users\mikeay\AppData\Local\Temp\OCL6E22.tmp.cl", line 19: error: global
variable declaration is corrected by the compiler to have addrSpace
constant
const sampler_t nne = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_NONE | CLK_FILTER_NEAREST;
^
"C:\Users\mikeay\AppData\Local\Temp\OCL6E22.tmp.cl", line 20: error: global
variable declaration is corrected by the compiler to have addrSpace
constant
const sampler_t clm = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP | CLK_FILTER_NEAREST;
^
"C:\Users\mikeay\AppData\Local\Temp\OCL6E22.tmp.cl", line 198: error: "val_x"
has already been declared in the current scope
float val_x = native_divide(num_y, den);
^
"C:\Users\mikeay\AppData\Local\Temp\OCL6E22.tmp.cl", line 199: error:
identifier "val_y" is undefined
write_imagef(U1_out, s, (float4) (val_x, val_y, 0.0f, 0.0f));
^
"C:\Users\mikeay\AppData\Local\Temp\OCL6E22.tmp.cl", line 199: error: not
enough initializer values
write_imagef(U1_out, s, (float4) (val_x, val_y, 0.0f, 0.0f));
^
"C:\Users\mikeay\AppData\Local\Temp\OCL6E22.tmp.cl", line 295: error:
identifier "u" is undefined
write_imageui(R_lsb, s, (uint4) (u & 0xFF, 0u, 0u, 0u));
^
"C:\Users\mikeay\AppData\Local\Temp\OCL6E22.tmp.cl", line 295: error: not
enough initializer values
write_imageui(R_lsb, s, (uint4) (u & 0xFF, 0u, 0u, 0u));
^
"C:\Users\mikeay\AppData\Local\Temp\OCL6E22.tmp.cl", line 296: error:
identifier "v" is undefined
write_imageui(G_lsb, s, (uint4) (v & 0xFF, 0u, 0u, 0u));
^
"C:\Users\mikeay\AppData\Local\Temp\OCL6E22.tmp.cl", line 296: error: not
enough initializer values
write_imageui(G_lsb, s, (uint4) (v & 0xFF, 0u, 0u, 0u));
^
9 errors detected in the compilation of "C:\Users\mikeay\AppData\Local\Temp\OCL6E22.tmp.cl".
Frontend phase failed compilation.
RETURN: 0
and my version: Avisynth+ 0.1 (r2172, MT, i386) x86
...aaand my computer jazz:
Windows 7 Home Premium 64 bit, Service Pack 1
HP Pavilion dv7 Notebook
AMD A6-3400M APU with Radeon HD Graphics 1.40 GHz
RAM: 6GB (5.48 usable)
Everything is 32 bit, excluding my OS, and possibly my OpenCL driver by proxy. Not sure how to check tbh
The previous beta seemed to have some weird quirks too. With chroma processing it had green bleeding in around the borders. Luma-only mode seemed fine. v0.7.7 had no apparent issues
tormento
25th January 2017, 19:59
Everything is 32 bit, excluding my OS, and possibly my OpenCL driver by proxy. Not sure how to check tbh
Try with a pure 64 bit environment.
KNLMeans gave me problems on Win10_x64 with 32 bit encoding environment.
johnmeyer
25th January 2017, 22:10
I cannot get KNLMeansCL to load.
This one-line script:
loadPlugin("C:\Program Files\AviSynth 2.5\plugins\KNLMeansCL.dll")
Generates this error message ("unable to load ... KNLMeansCL ... error 0x7f"):
http://i177.photobucket.com/albums/w208/johnmeyer/VD%20Error_zpsqwcpqedk.jpg
I ran AVSMeter and generated these two logs:
AVSInfo
Log created with: AVSMeter 2.4.7 (x86)
[OS/Hardware info]
Operating system: Windows XP (x86) Service Pack 3 (Build 2600)
CPU (brand string): Intel(R) Core(TM) i7 CPU 965 @ 3.20GHz
CPU (code name): Bloomfield (Core i7)
CPU instructions sets: MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2
CPU clock (measured): 3340 MHz
CPU cores / Logical cores: 4 / 8
[Avisynth core info]
VersionString: AviSynth 2.60, build:Mar 9 2013 [13:28:27]
VersionNumber: 2.60
File version: 2.6.0.3
Interface Version: 5
Multi-threading support: Yes
Linker/compiler version: 10.0
Avisynth.dll location: C:\WINDOWS\system32\avisynth.dll
Avisynth.dll time stamp: 2013-03-09, 08:28:48 (UTC)
PluginDir2_5 (HKLM, x86): C:\Program Files\AviSynth 2.5\plugins
[CPP 2.5 / 32 Bit plugins]
C:\Program Files\AviSynth 2.5\plugins\AGC.dll
C:\Program Files\AviSynth 2.5\plugins\Average.dll
C:\Program Files\AviSynth 2.5\plugins\avisynth_c.dll
C:\Program Files\AviSynth 2.5\plugins\aWarpSharp.dll
C:\Program Files\AviSynth 2.5\plugins\deblock.dll [1.2.0.0]
C:\Program Files\AviSynth 2.5\plugins\deflicker.dll [0.4.0.0]
C:\Program Files\AviSynth 2.5\plugins\defreq.dll
C:\Program Files\AviSynth 2.5\plugins\DePan.dll [1.10.1.0]
C:\Program Files\AviSynth 2.5\plugins\DePanEstimate.dll [1.9.2.0]
C:\Program Files\AviSynth 2.5\plugins\descratch.dll [0.9.0.0]
C:\Program Files\AviSynth 2.5\plugins\despot.dll [3.6.1.0]
C:\Program Files\AviSynth 2.5\plugins\DGAVCDecode.dll [1.0.9.0]
C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll [1.4.9.0]
C:\Program Files\AviSynth 2.5\plugins\dvinfo.dll
C:\Program Files\AviSynth 2.5\plugins\FDecimate.dll
C:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dll [2.1.1.0]
C:\Program Files\AviSynth 2.5\plugins\GamMac.dll
C:\Program Files\AviSynth 2.5\plugins\GetDups.dll [0.9.1.0]
C:\Program Files\AviSynth 2.5\plugins\GRunT.dll
C:\Program Files\AviSynth 2.5\plugins\GScript.dll
C:\Program Files\AviSynth 2.5\plugins\hotspot.dll [0.1.0.0]
C:\Program Files\AviSynth 2.5\plugins\LimitedSupport_09Jan06B.dll
C:\Program Files\AviSynth 2.5\plugins\LoadDll.dll
C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll [1.5.1.0]
C:\Program Files\AviSynth 2.5\plugins\MPEGDecoder.dll
C:\Program Files\AviSynth 2.5\plugins\MT.dll [0.7.0.0]
C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll [2.0.48.0]
C:\Program Files\AviSynth 2.5\plugins\mt_masktools-26.dll [2.0.48.0]
C:\Program Files\AviSynth 2.5\plugins\MultiDecimate.dll
C:\Program Files\AviSynth 2.5\plugins\nnedi3.dll [0.9.2.0]
C:\Program Files\AviSynth 2.5\plugins\RemoveDirt.dll
C:\Program Files\AviSynth 2.5\plugins\RemoveDirtSSE2.dll
C:\Program Files\AviSynth 2.5\plugins\RoboCrop.dll
C:\Program Files\AviSynth 2.5\plugins\RT_Stats.dll
C:\Program Files\AviSynth 2.5\plugins\TCombMask.dll [0.9.4.0]
C:\Program Files\AviSynth 2.5\plugins\TCPDeliver.dll [1.0.0.6]
C:\Program Files\AviSynth 2.5\plugins\TDeint.dll [1.1.0.0]
C:\Program Files\AviSynth 2.5\plugins\Telecine.dll
C:\Program Files\AviSynth 2.5\plugins\TIVTC.dll [1.0.5.0]
C:\Program Files\AviSynth 2.5\plugins\warpsharp.dll
[CPP 2.6 / 32 Bit plugins]
C:\Program Files\AviSynth 2.5\plugins\AutoGain.dll [1.0.0.0]
C:\Program Files\AviSynth 2.5\plugins\DirectShowSource.dll [2.6.0.0]
C:\Program Files\AviSynth 2.5\plugins\KNLMeansCL.dll
C:\Program Files\AviSynth 2.5\plugins\masktools2.dll [2.1.0.0]
C:\Program Files\AviSynth 2.5\plugins\RoboCrop26.dll
C:\Program Files\AviSynth 2.5\plugins\RT_Stats26.dll
[Plugin errors/warnings]
------------------------------------------------------------------------------
"C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll"
Dependencies that could not be loaded:
MSVCR80.dll
Note: "Visual Studio 2005 Runtime doesn't seem to be installed"
------------------------------------------------------------------------------
LoadPlugin: unable to load "C:\Program Files\AviSynth 2.5\plugins\KNLMeansCL.dll", error=0x7f
------------------------------------------------------------------------------
LoadPlugin: unable to load "C:\Program Files\AviSynth 2.5\plugins\masktools2.dll", error=0x7e
Dependencies that could not be loaded:
MSVCP110.dll
MSVCR110.dll
Note: "Visual Studio 2012 Runtime doesn't seem to be installed"
------------------------------------------------------------------------------
AVSDeps
[DLL dependencies (x86)]
"C:\WINDOWS\system32\avisynth.dll":
MSACM32.dll
AVIFIL32.dll
MSVFW32.dll
KERNEL32.dll
USER32.dll
GDI32.dll
ADVAPI32.dll
ole32.dll
msvcrt.dll
DevIL.dll
"C:\Program Files\AviSynth 2.5\plugins\AGC.dll":
KERNEL32.dll
USER32.dll
GDI32.dll
"C:\Program Files\AviSynth 2.5\plugins\Average.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\avisynth_c.dll":
avisynth.dll
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\aWarpSharp.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\deblock.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\deflicker.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\defreq.dll":
KERNEL32.dll
fftw3.dll
"C:\Program Files\AviSynth 2.5\plugins\DePan.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\DePanEstimate.dll":
KERNEL32.dll
fftw3.dll
"C:\Program Files\AviSynth 2.5\plugins\descratch.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\despot.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\DGAVCDecode.dll":
SHLWAPI.dll
WINMM.dll
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll":
KERNEL32.dll
USER32.dll
GDI32.dll
MSVCR80.dll
"C:\Program Files\AviSynth 2.5\plugins\dvinfo.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\FDecimate.dll":
KERNEL32.dll
MSVCRT.dll
"C:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dll":
KERNEL32.dll
USER32.dll
fftw3.dll
"C:\Program Files\AviSynth 2.5\plugins\GamMac.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\GetDups.dll":
KERNEL32.dll
MSVCRT.dll
"C:\Program Files\AviSynth 2.5\plugins\GRunT.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\GScript.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\hotspot.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\LimitedSupport_09Jan06B.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\LoadDll.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\MPEGDecoder.dll":
KERNEL32.dll
USER32.dll
ole32.dll
"C:\Program Files\AviSynth 2.5\plugins\MT.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\mt_masktools-26.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\MultiDecimate.dll":
KERNEL32.dll
MSVCRT.dll
"C:\Program Files\AviSynth 2.5\plugins\nnedi3.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\RemoveDirt.dll":
KERNEL32.dll
MSVCR71.dll
"C:\Program Files\AviSynth 2.5\plugins\RemoveDirtSSE2.dll":
KERNEL32.dll
MSVCR71.dll
"C:\Program Files\AviSynth 2.5\plugins\RoboCrop.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\RT_Stats.dll":
KERNEL32.dll
USER32.dll
comdlg32.dll
SHELL32.dll
"C:\Program Files\AviSynth 2.5\plugins\TCombMask.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\TCPDeliver.dll":
KERNEL32.DLL
ADVAPI32.dll
COMCTL32.dll
comdlg32.dll
GDI32.dll
SHELL32.dll
USER32.dll
WINSPOOL.DRV
WS2_32.dll
"C:\Program Files\AviSynth 2.5\plugins\TDeint.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\Telecine.dll":
KERNEL32.dll
MSVCR70.dll
"C:\Program Files\AviSynth 2.5\plugins\TIVTC.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\warpsharp.dll":
USER32.dll
MSVCP71.dll
MSVCR71.dll
ole32.dll
OLEAUT32.dll
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\AutoGain.dll":
KERNEL32.dll
USER32.dll
"C:\Program Files\AviSynth 2.5\plugins\DirectShowSource.dll":
KERNEL32.DLL
MSVCRT.dll
ole32.dll
OLEAUT32.dll
QUARTZ.dll
USER32.dll
WINMM.dll
"C:\Program Files\AviSynth 2.5\plugins\KNLMeansCL.dll":
OpenCL.dll
MSVCP140.dll
KERNEL32.dll
VCRUNTIME140.dll
api-ms-win-crt-locale-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
"C:\Program Files\AviSynth 2.5\plugins\masktools2.dll":
KERNEL32.dll
MSVCP110.dll
MSVCR110.dll
"C:\Program Files\AviSynth 2.5\plugins\RoboCrop26.dll":
KERNEL32.dll
"C:\Program Files\AviSynth 2.5\plugins\RT_Stats26.dll":
KERNEL32.dll
USER32.dll
comdlg32.dll
SHELL32.dll
Any clues or help would be appreciated.
Groucho2004
25th January 2017, 22:31
[Avisynth core info]
VersionString: AviSynth 2.60, build:Mar 9 2013 [13:28:27]
VersionNumber: 2.60
File version: 2.6.0.3
Interface Version: 5
Multi-threading support: Yes
Linker/compiler version: 10.0
Avisynth.dll location: C:\WINDOWS\system32\avisynth.dll
Avisynth.dll time stamp: 2013-03-09, 08:28:48 (UTC)
PluginDir2_5 (HKLM, x86): C:\Program Files\AviSynth 2.5\plugins
Any clues or help would be appreciated.
You should do what I suggested (https://forum.doom9.org/showthread.php?p=1794433#post1794433) in the other thread. The dependency issues will be resolved. Also, KNLMeansCL will not load with your version of Avisynth.
johnmeyer
25th January 2017, 22:43
You should do what I suggested (https://forum.doom9.org/showthread.php?p=1794433#post1794433) in the other thread. The dependency issues will be resolved. Also, KNLMeansCL will not load with your version of Avisynth.In that thread you suggested: Get the latest avisynth.dll from SEt (if you need MT).
Uninstall all "Microsoft Visual C++ 2xxx Runtimes/Redistributables"
Re-install the AIO
I did the second two things. I'll now try another version of AVISynth.
johnmeyer
26th January 2017, 00:10
Still no joy. I downloaded Set's 2015 version listed at the top of this long thread:
Avisynth 2.6 MT (https://forum.doom9.org/showthread.php?t=148782)
This is the actual link for the download:
https://www.dropbox.com/s/dckxoowjlzwku1s/avisynth_20150220.7z
I copied that to my System32 folder, and opened the script that does nothing except try to load KNLMeansCL. This time I got a different error message:
AVIsynth open failure:
LoadPlugin: unable to load ... KNLMeansCL.dll", Proc not found. Update library version?"
There is definitely a dependency that is not being picked up by AVSMeter. Whatever it is, it must be quite specific to this plugin because, as you could tell by the message I posted in that other thread, I originally had way more than 50 plugins in my plugins folder, and I've used them all, and they all work with my current setup.
I keep re-reading the KNLMeansCL documentation, but it doesn't mention much about libraries or DLLs that must be present.
Other people are running this without any problem, so I must be doing something very stupid.
I'm stumped.
(P.S. I went to my Windows 7 boot partition and tried it with that installation, but got the same results, so I don't think it is Windows XP Pro SP3 that is the cause).
StainlessS
26th January 2017, 07:25
Perhaps try Dependency Walker:- http://www.dependencywalker.com/
feisty2
26th January 2017, 09:41
In that thread you suggested:I did the second two things. I'll now try another version of AVISynth.
maybe your OpenCL driver is outdated, or OpenCL.dll was placed in the wrong directory.
johnmeyer
26th January 2017, 09:52
It's in the System32 folder. I too thought it might be the problem, but I can't find any link to a newer one. I think the one I was installed by the nVidia driver installer.
feisty2
26th January 2017, 10:13
the latest OpenCL driver should be shipped with the latest video card driver, download the latest video card driver and reinstall it.
and also the Intel OpenCL package for CPUs, https://software.intel.com/en-us/articles/opencl-drivers, no x86 version since that crap is obsolete and we're all on x64 now
after the driver reinstallation, copy Program Files\NVIDIA Corporation\OpenCL\OpenCL.dll to SysWOW64 folder and rename Program Files\NVIDIA Corporation\OpenCL\OpenCL64.dll to OpenCL.dll and copy it to System32
Groucho2004
26th January 2017, 11:15
(P.S. I went to my Windows 7 boot partition and tried it with that installation, but got the same results, so I don't think it is Windows XP Pro SP3 that is the cause).Maybe your graphics card is not supported. What card do you have?
dipje
26th January 2017, 16:31
It's in the System32 folder. I too thought it might be the problem, but I can't find any link to a newer one. I think the one I was installed by the nVidia driver installer.
just a reminder (and 'to be sure'). If you are on a 64 bit OS: 64bit DLLs go into c:\windows\system32, 32bit DLLs go into c:\windows\syswow64.
If you're still tring with 32bit avisynth and 32bit knlmeanscl, did you copy the 32bit opencl.dll to the right folder? (or at least first tried with the version already on your system, the supplied .dll file is only for troubleshooting).
johnmeyer
26th January 2017, 17:40
My graphic card is the Nvidia GeForce 9800GTX 512M PCIe2.0 16x.
My computer is dual boot, with WinXP Pro 32-bit on one drive and Win7 64-bit on a second drive. I have tried both installations, and they both behave the same. The XP installation has the OpenCL.DLL in the c:\windows\system32 folder. It is dated 7/9/2010. The Win7 installation has OpenCL.DLL in the c:\windows\SysWOW64 folder. It is dated 2/25/2013. There is also an nvopencl.dll in that folder as well as a IntelOpenCL32.DLL. The first two also appear in the c:\windows\system32 folder along with IntelOpenCL64.DLL.
The OpenCL.DLL in my XP installation is version 1.0.0 and is signed by the Khronos Group.
We are all focusing on this as the problem, and perhaps it is, but the fact that it exists and is in the correct folder makes me think I'd get a different error message than the one which says the KNLMeansCL.DLL won't load.
BTW, my NVidia drivers are not the latest for my older card because the newer drivers don't work with Sony Vegas, the NLE I use every day.
Groucho2004
26th January 2017, 17:52
My graphic card is the Nvidia GeForce 9800GTX 512M PCIe2.0 16x.
That card does only support OpenCL 1.1. You have to use an older version of KNLMeansCL, see here (https://github.com/Khanattila/KNLMeansCL/wiki/Requirements), last paragraph.
I'm not sure about the minimum required driver version but I think it has to be at least something like 3xx.xx.
Edit: Just googled - it should be at least 258.19 for OpenCL 1.1.
Edit2: As for the correct OpenCL.dll - There should be one in "Program Files\NVIDIA Corporation\OpenCL". This is in most cases the right one to use. If you have an older version in your system32 directory, make a backup of it and then overwrite it with the one from the NVIDIA directory.
johnmeyer
27th January 2017, 00:29
That card does only support OpenCL 1.1. You have to use an older version of KNLMeansCL, see here (https://github.com/Khanattila/KNLMeansCL/wiki/Requirements), last paragraph.Bingo!
The older version, coupled with the older redistributable works. Many thanks.
Groucho2004
27th January 2017, 10:11
Bingo!
The older version, coupled with the older redistributable works. Many thanks.
I'm glad you got it sorted. You should still clean up your plugin directory.
For example mixing old and new, 2.5 and 2.6 versions of plugins is not recommended:
[CPP 2.5 / 32 Bit plugins]
C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll [2.0.48.0]
C:\Program Files\AviSynth 2.5\plugins\mt_masktools-26.dll [2.0.48.0]
C:\Program Files\AviSynth 2.5\plugins\RoboCrop.dll
C:\Program Files\AviSynth 2.5\plugins\RT_Stats.dll
[CPP 2.6 / 32 Bit plugins]
C:\Program Files\AviSynth 2.5\plugins\masktools2.dll [2.1.0.0]
C:\Program Files\AviSynth 2.5\plugins\RoboCrop26.dll
C:\Program Files\AviSynth 2.5\plugins\RT_Stats26.dll
Also, your DGDecode.dll is very old, update it to the latest version unless you have a reason to stick with the old one.
johnmeyer
27th January 2017, 21:58
I don't use DGDecode except to troubleshoot other people's programs, but I definitely need to sort out the masktools conflicts/redundancies. Thanks!
StainlessS
28th January 2017, 15:01
Also these are conflicting, pick only one (SSE2).
C:\Program Files\AviSynth 2.5\plugins\RemoveDirt.dll
C:\Program Files\AviSynth 2.5\plugins\RemoveDirtSSE2.dll
mp3dom
28th January 2017, 15:49
Uhm, I don't know if it was already covered, but I'm getting the following problem:
OpenCL Platform
------------------------------------------------------------
CL_PLATFORM_VENDOR: Advanced Micro Devices, Inc.
CL_PLATFORM_NAME: AMD Accelerated Parallel Processing
CL_PLATFORM_VERSION: OpenCL 2.0 AMD-APP (2236.10)
CL_PLATFORM_PROFILE: FULL_PROFILE
OpenCL Device
------------------------------------------------------------
CL_DEVICE_VENDOR: GenuineIntel
CL_DEVICE_NAME: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
CL_DRIVER_VERSION: 2236.10 (sse2)
CL_DEVICE_VERSION: OpenCL 1.2 AMD-APP (2236.10)
CL_DEVICE_PROFILE: FULL_PROFILE
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_IMAGE2D_MAX_WIDTH: 8192
CL_DEVICE_IMAGE2D_MAX_HEIGHT: 8192
CL_DEVICE_IMAGE_MAX_ARRAY_SIZE: 2048
Program Build
------------------------------------------------------------
CL_PROGRAM_BUILD_OPTIONS: -cl-single-precision-constant
-cl-denorms-are-zero
-cl-fast-relaxed-math
-Werror
-D NLM_CLIP_TYPE_STACKED
-D NLM_CLIP_REF_LUMA
-D NLM_WMODE_WELSCH
-D VI_DIM_X=1440
-D VI_DIM_Y=1080
-D HRZ_RESULT=3
-D VRT_RESULT=3
-D HRZ_BLOCK_X=16
-D HRZ_BLOCK_Y=8
-D VRT_BLOCK_X=16
-D VRT_BLOCK_Y=8
-D NLM_D=1
-D NLM_S=4
-D NLM_H=1.200000
-D NLM_WREF=1.000000
Warnings being treated as errors
"C:\Users\usr\AppData\Local\Temp\OCL123264T1.cl", line 19: error: global
variable declaration is corrected by the compiler to have addrSpace
constant
const sampler_t nne = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_NONE | CLK_FILTER_NEAREST;
^
"C:\Users\usr\AppData\Local\Temp\OCL123264T1.cl", line 20: error: global
variable declaration is corrected by the compiler to have addrSpace
constant
const sampler_t clm = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP | CLK_FILTER_NEAREST;
Using latest AviSynth+ in both x86/x64.
Is the card not supported?
Thanks.
Khanattila
28th January 2017, 16:59
Uhm, I don't know if it was already covered, but I'm getting the following problem:
OpenCL Platform
------------------------------------------------------------
CL_PLATFORM_VENDOR: Advanced Micro Devices, Inc.
CL_PLATFORM_NAME: AMD Accelerated Parallel Processing
CL_PLATFORM_VERSION: OpenCL 2.0 AMD-APP (2236.10)
CL_PLATFORM_PROFILE: FULL_PROFILE
OpenCL Device
------------------------------------------------------------
CL_DEVICE_VENDOR: GenuineIntel
CL_DEVICE_NAME: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
CL_DRIVER_VERSION: 2236.10 (sse2)
CL_DEVICE_VERSION: OpenCL 1.2 AMD-APP (2236.10)
CL_DEVICE_PROFILE: FULL_PROFILE
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_IMAGE2D_MAX_WIDTH: 8192
CL_DEVICE_IMAGE2D_MAX_HEIGHT: 8192
CL_DEVICE_IMAGE_MAX_ARRAY_SIZE: 2048
Program Build
------------------------------------------------------------
CL_PROGRAM_BUILD_OPTIONS: -cl-single-precision-constant
-cl-denorms-are-zero
-cl-fast-relaxed-math
-Werror
-D NLM_CLIP_TYPE_STACKED
-D NLM_CLIP_REF_LUMA
-D NLM_WMODE_WELSCH
-D VI_DIM_X=1440
-D VI_DIM_Y=1080
-D HRZ_RESULT=3
-D VRT_RESULT=3
-D HRZ_BLOCK_X=16
-D HRZ_BLOCK_Y=8
-D VRT_BLOCK_X=16
-D VRT_BLOCK_Y=8
-D NLM_D=1
-D NLM_S=4
-D NLM_H=1.200000
-D NLM_WREF=1.000000
Warnings being treated as errors
"C:\Users\usr\AppData\Local\Temp\OCL123264T1.cl", line 19: error: global
variable declaration is corrected by the compiler to have addrSpace
constant
const sampler_t nne = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_NONE | CLK_FILTER_NEAREST;
^
"C:\Users\usr\AppData\Local\Temp\OCL123264T1.cl", line 20: error: global
variable declaration is corrected by the compiler to have addrSpace
constant
const sampler_t clm = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP | CLK_FILTER_NEAREST;
Using latest AviSynth+ in both x86/x64.
Is the card not supported?
Thanks.
Do not worry about this error.
The final version will work normally.
Khanattila
28th January 2017, 17:06
When the API has bugs: https://www.khronos.org/bugzilla/show_bug.cgi?id=397
mp3dom
28th January 2017, 17:31
Good to know that, thanks!
MysteryX
31st January 2017, 02:34
Does KNLMeans now support AVS+'s native 16-bit clips as input and output? I don't see such a feature in the change log.
Reel.Deel
31st January 2017, 02:42
Does KNLMeans now support AVS+'s native 16-bit clips as input and output? I don't see such a feature in the change log.
Not yet but:
@Khanattila
Thank you for the continued development on this excellent plugin. Any plans on adding native high bit-depth support for AVS+?
Yes, it requires no extra work for me.
Khanattila
31st January 2017, 16:39
Not yet but:
I'm thinking about what formats to support, probably the same as VapourSynth.
Greyscale: 8-bit, 16-bit, 32-bit
YUV: 8-bit, 10-bit, 16-bit, 32-bit
Packed RGB: 8-bit, 16-bit, 32-bit
All other formats are useless.
MysteryX
31st January 2017, 17:00
I was also considering the exact same question for AviSynthShader. Since the GPU processing is done with UINT16 and half-float data, converting to-from 10, 12 or 14 bits is useless. If the user wants 10-bit output, he'll get a 16-bit output from the GPU, then he can ditter it down to 10-bit.
feisty2
31st January 2017, 17:10
half precision is not meant for processing, it's meant for storing.
MysteryX
31st January 2017, 17:30
half precision is not meant for processing, it's meant for storing.
GPU does processing with half-float and can't work well with INT. CPU does processing with INT and can't work well with half-float.
feisty2
31st January 2017, 17:38
GPU does processing with half-float.
bullshit, GPU works with different sizes of floats, half is a very low precision one and should not be used for processing, it was designed to reduce the bandwidth of data transferring (storing, not processing, half precision arithmetics are not any faster than single precision arithmetics)
MysteryX
31st January 2017, 18:11
That's getting off-topic here.
feisty2
31st January 2017, 18:23
I was also considering the exact same question for AviSynthShader. Since the GPU processing is done with UINT16 and half-float data.
no it's not, you CANNOT process things with half precision, even if you do, it will be automatically promoted to single precision inside the hardware, and you lose precision for nothing.
be a good boy, use single precision.
Khanattila
31st January 2017, 18:44
Meanwhile I release this version here.
https://github.com/Khanattila/KNLMeansCL/releases/tag/v1.0.0
KNLMeansCL v1.0.0
* Improved performance with CPU.
* Improved performance with AMD GCN Architecture.
* Reduced CPU overhead in some system.
* Reduced memory usage in some system.
* Advanced OpenCL parameters for fine tuning.
* Replaced 'cmode' with 'channels' and added the options to only process the chroma.
* Two new modified bisquare weighting functions.
* Increased the maximum 's' value to 8.
* Updated to VapourSynth R36.
* Removed Cauchy weighting function.
* Fixed second clip 'rclip' in some circumstances.
MysteryX
31st January 2017, 18:45
How does this have anything to do with KNLMeans?
I believe Madshi experimented with 32-bit GPU float processing in madVR and told me it was dreadfully slow. Either way, I was talking about integer data vs floating point data, not about what precision of floating point would be best. When it comes to Avisynth support, we're not using any floating-point data anyway as Avisynth doesn't use that. I don't think there's anything else to say on this.
Edit: Thanks Khanattila!
feisty2
31st January 2017, 18:58
Wrong again
There's the single precision support in avisynth+
Reel.Deel
31st January 2017, 20:35
https://github.com/Khanattila/KNLMeansCL/releases/tag/v1.0.0
KNLMeansCL v1.0.0
* Improved performance with CPU.
* Improved performance with AMD GCN Architecture.
* Reduced CPU overhead in some system.
* Reduced memory usage in some system.
* Advanced OpenCL parameters for fine tuning.
* Replaced 'cmode' with 'channels' and added the options to only process the chroma.
* Two new modified bisquare weighting functions.
* Increased the maximum 's' value to 8.
* Updated to VapourSynth R36.
* Removed Cauchy weighting function.
* Fixed second clip 'rclip' in some circumstances.
Thanks! I guess we'll have to wait for the next version for native AVS+ high bit depth support. :(
When it comes to Avisynth support, we're not using any floating-point data anyway as Avisynth doesn't use that. I don't think there's anything else to say on this.
As feisty2 already pointed out, AVS+ supports 10-16 bit and 32-bit float. I mentioned that here (https://forum.doom9.org/showpost.php?p=1795309&postcount=2940)when I answered your question.
MysteryX
31st January 2017, 21:02
Wrong again
There's the single precision support in avisynth+
Yes you're right there is 32-bit float support
Khanattila
31st January 2017, 21:45
Thanks! I guess we'll have to wait for the next version for native AVS+ high bit depth support. :(
It is the first thing on the list, v1.1.0.
Khanattila
31st January 2017, 21:48
no it's not, you CANNOT process things with half precision, even if you do, it will be automatically promoted to single precision inside the hardware, and you lose precision for nothing.
be a good boy, use single precision.
The FP16 operations are twice faster than the FP32 operations.
But hardware manufacturers deliberately castrate it to push consumers to buy more expensive products.
For this reason, usually, all the operations are promoted to FP32.
As in my program. It works with FP32 (with some optimizations), but also the FP16 would be sufficient.
Atak_Snajpera
1st February 2017, 11:30
AMD VEGA will support 2xFP16
tormento
1st February 2017, 17:42
Meanwhile I release this version here.
Wow!
Eagerly waiting for full detailed docs!
Groucho2004
1st February 2017, 18:05
Eagerly waiting for full detailed docs!This (https://github.com/Khanattila/KNLMeansCL/wiki/Filter-description) is not good enough?
Khanattila
1st February 2017, 18:16
AMD VEGA will support 2xFP16
It would be a good news.
However, without charging a license to a PRO version of the program, I can not implement it.
Atak_Snajpera
1st February 2017, 19:06
It would be a good news.
However, without charging a license to a PRO version of the program, I can not implement it.
I see no problem here. If you can afford to buy VEGA then you should also have few spare bucks for PRO license.
Khanattila
1st February 2017, 19:37
I see no problem here. If you can afford to buy VEGA then you should also have few spare bucks for PRO license.
If I can get my hands on a device with cl_khr_fp16 extension, I think I'll do that.
feisty2
2nd February 2017, 12:56
the following script
import vapoursynth as vs
core = vs.get_core()
clp = core.std.BlankClip(format=vs.GRAYS)
clp = core.knlm.KNLMeansCL(clp, rclip=clp)
clp.set_output()
gives me instant crash with v1.0.0
Khanattila
2nd February 2017, 13:11
the following script
import vapoursynth as vs
core = vs.get_core()
clp = core.std.BlankClip(format=vs.GRAYS)
clp = core.knlm.KNLMeansCL(clp, rclip=clp)
clp.set_output()
gives me instant crash with v1.0.0
Okay, I will fix it again.
Now I know that it breaks again at the next change.
tuanden0
5th February 2017, 06:21
Okay, I will fix it again.
Now I know that it breaks again at the next change.
Hi Sir,
The filter ver 1.0 make my GPU (GTX 650Ti) crash with default filter setting :confused::confused:
I'm using avs+ r2397
Here's my script:
LWLibavVideoSource("E:\Test zone\test.mkv")
KNLMeansCL()
WolframRhodium
5th February 2017, 18:51
Can Pruned non-local means (https://arxiv.org/abs/1701.08280) further improve the existing KNLMeansCL denoising quality around edges?
I found at least from the information presented in this paper, subjective and objective quality of the algorithm are superior to the existing NLM algorithms, thought there's still a huge gap with respect to BM3D.
feisty2
5th February 2017, 19:03
Can Pruned non-local means (https://arxiv.org/abs/1701.08280) further improve the existing KNLMeansCL denoising quality around edges?
I found at least from the information presented in this paper, subjective and objective quality of the algorithm are superior to the existing NLM algorithms, thought there's still a huge gap with respect to BM3D.
the Bisquare weighting function (wmode=2) does that "pruning" thing exactly, reject a pixel within the search window if the inter-patch correlation (weight) goes below certain threshold, windowed weighting function.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.