View Full Version : NLMeansCL: GPU based Non Local Means Denoising


Malcolm
5th January 2011, 23:34
Hi,
i would like to introduce a new filter for avisynth: NLMeansCL.
The filter is my try on the NLMeans algorithm. Tritical already wrote TNLMeans in 2006, which is also an implementation of the NLMeans algorithm. (Thanks for your work tritical!)
In contrast to tritical's implementation - which is written in C++ and runs on the CPU, my implementation is written in OpenCL and runs on the GPU (typically).
Note: I will update this post to reflect all changes to the filter. The most recent modifications will be marked in blue.

I was only able to test the filter on my NVIDIA Geforce 9600 GT. Therefore i can give no guarantee that it runs on your GPU or even crashes or kills your PC! (Not that i think it would do...) ;) The wrapper around the OpenCL algorithm is written in C#.

Syntax:
NLMeansCL(int A, int Ay, int Az, int S, int Sy, int B, int By, float aa, float h, float hC, int plane, bool debug, string debugpath, string smf, bool cpu, bool buffer, bool sse)

If you want to know some background information about the NLMeans algorithm, i'd like to point you to the very well written readme.txt that is part of tritical's TNLMeans filter package. He also explaines all the parameters of the filter in detail.

The syntax of NLMeansCL:


Parameter A: Sets the value for Ax and Ay. If you want to use the same values for Ax and Ay, you only have to specify one parameter. The same applies for S (-> Sx, Sy) and B ( -> Bx, By). You can specify a different value for Ay by using the explicit Ay parameter.
(default = 4)
Parameter Az: Sets the temporal radius. At the moment only 1 and 2 are supported. (default = 0)
Parameter S/Sy: default = 2
Parameter B/By: default = 1
Parameter aa: This parameter is equivalent to the parameter 'a' in TNLMeans. (default = 1.0)
Parameter h/hC: h defines the strength of the filter both for luma and chroma planes. hC is an addition to h. With hC you can set a different filter strength for the color channels U and V. (default = 1.8)
Parameter plane: Here you can specify, which color planes should be processed (similar to FFT3DFilter):
0 - luma (Y),
1 - chroma U,
2 - chroma V,
3 - chroma planes U and V,
4 - both luma and chroma
5 - copy all planes. In this mode, all planes are just copied by a very simple OpenCL kernel. In case NLMeansCL does not run on your GPU, this might help to check if a very simple OpenCL kernel executes.
(default = 0)
Parameter debug: Specifies, if a file with debug informations and error messages should be written. The debug file is named 'NLMeansCL_debug.txt'. (default = false)
Parameter debugpath: Specifies the path to the debug file. (default = C:\Temp\)
Parameter smf: This is a purely technical parameter to specifiy different memory allocation strategies. Possible values are "nan", "ahp", "chp", "achp" and "uhp". (default = ahp)
Parameter cpu: Specifies if the filter should be executed on the CPU rather than the GPU. (default = false)
Parameter buffer: Specifies if OpenCL buffers are used instead of OpenCL image objects to process the video data. (default = false)
Parameter sse: Specifies if the sum of squared differences is used (sse=true) or the sum of absolute differences (sse=false). (default = true)


Running the filter on CPUs:
To be able to run the filter on the CPU, you have to install the ATI Stream SDK. Furthermore, you have to set 2 parameters: cpu=true and buffer=true.
Using the parameter combination cpu=true and buffer=false will fail to execute, since AMD has not implemented image support for the CPU version of its OpenCL drivers yet!
The support for buffers is preliminary. That means i'm undecided if i will keep or remove it in future versions of the filter. If AMD adds image support to its drivers (either CPU or GPU), there is not much reason to leave it in the filter.
NLMeansCL will take full advantage of multiple CPU cores. There is no need to use MT() or setMTmode()! (It will rather degrade performance.)

When forcing to use buffers instead of images, the fps on my Geforce drops from 23.05 to 3.90

Here's how the content of the debug log file will look if the filter initializes correctly:
NLMeansCL Version 0.3.2
ScriptEnvironment present.
Number of OpenCL Compute Platforms = 2.
Trying OpenCL Compute Platform
NVIDIA Corporation.
OpenCL 1.0 CUDA 3.2.1.
Number of OpenCL Devices in Platform = 1.
Trying OpenCL Device GeForce 9600 GT.
Device available.
Wrong Device Type (Gpu) requesting Cpu.
Trying OpenCL Compute Platform
Advanced Micro Devices, Inc..
OpenCL 1.1 ATI-Stream-v2.3 (451).
Number of OpenCL Devices in Platform = 1.
Trying OpenCL Device Intel(R) Core(TM)2 CPU 4400 @ 2.00GHz.
Device available.
Device Type Cpu.
Device does not support images.
Using Device Intel(R) Core(TM)2 CPU 4400 @ 2.00GHz.
OpenCL Compute Context successfully created.
OpenCL Command Queue successfully created.
OpenCL Program successfully built.
Prog Y Build log:
Prog UV Build log:
OpenCL kernels successfully created.

Now, what do you have to do to get the filter running:
1. The NLMeansCL Filter DLL itself:
Link and attachment at the end of my post.
Put it in you avisynth plugin folder. And don't rename it!

2. CLOO: A .net library for OpenCL. Needed to run NLMeansCL.
You can download it here: http://sourceforge.net/projects/cloo/
Take the Cloo.dll file from \bin\release inside the zip file and put it in your avisynth plugin folder.

3. AvsFilterNet: A .net library to write Avisynth filters. Needed to run NLMeansCL.
You can download it here: http://avsfilternet.codeplex.com/
Take the AvsFilterNet.dll and put it in your avisynth plugin folder.

That's it.

Performance:
I evaluated some figures for my system:
CPU: Core2Duo, running on 3.2GHz
GPU: NVIDIA Geforce 9600GT, 512MB GDDR3, 650MHz Core / 900MHz Memory / 1600MHZ Shader, not overclocked
I typically get a speed improvement of factor 18 to 25 compared to TNLMeans.

For example:
Video: 720x576, YV12
Parameter: A=4, S=2, B=1
TNLMeans: 0.98 fps
NLMeansCL: 23.93 fps (cpu=false, buffer=false)
NLMeansCL: 3.90 fps (cpu=false, buffer=true)
NLMeansCL: 1.40 fps (cpu=true, buffer=true)

The speed factor between NLMeansCL and TNLMeans is similar for different video sizes (e.g. 1920x1080 or 360x288). As well as for different filter parameters (Bx = 0, By = 0).
On my GPU, the implementation does NOT benefit if you use values of 2 or above for B/By! I have some explanations for this behaviour, but it would lead to far to explain it...
I'm highly interested to see performance figures for different GPUs as well as the feedback if it runs on different graphic cards.

A typical script to test the performance would be the following. Load the script in Virtualdub and check the 'video rendering rate' in the status window.
mpeg2source(...)
trim(0, 1)
assumefps(500)
last = last + last + last + last
last = last + last + last + last
last = last + last + last + last
last = last + last + last + last
NLMeansCL(A=4, S=2, B=1, aa=1.0, h=1.8, plane=4)

Parameter values:
My findings so far are, that the default values for A, S and B work very well! Typically there is no improvements by setting A or S higher. It only get's a lot slower!
IMHO there is no need to change aa to something other than 1.0.
Playing around with h and hC is sufficient.

Problems:
If you have any problems with the filter, especially if i doesn't work at all. Please use GPU Caps Viewer (http://www.ozone3d.net/gpu_caps_viewer/) and check first, if the included OpenCL demos do run! Then go to the tab named 'Tools' and send me the 'Full XML Export'! There's an extra button for it on the tab. Also, please send me the log file, that NLMeansCL creates!
I cannot guarantee to help you out quick, since i'm rather busy!

Version 0.4.0 alpha:
This version is only a preliminary version (created in January) that implements a temporal version of the algorithm. Currently, it only supports a temporal window of 1, respectively 2 frames (in both directions). The temporal mode is only implemented for the image based algorithm, not the buffer based. On my PC, the algorithm produces some non deterministic artefacts in the video that are visible as small blocks of completely black pixels. I assume some runtime problems / asychronity between the shaders and writing out the memory to the host PC. I haven't worked for months now on the algorithm and this will probably be the status for the rest of the summer. I have also a version for arbitrary values of Az, but i'm not satisfied with the results (it's too slow and the computed values are incorrect)

TODOs:
- (Better) Temporal mode
- Make NLMeansCL work on AMD graphic cards
- x64 version
- Other color spaces (YUY2, RGB)

Changelog:

Changes from v0.1 to v0.1.1
Added some debug informations. See above for parameter description.
Added parameter to specify memory allocation strategy. Mainly to do technical low level tests.
Added mode 5 for parameter 'plane' for debug reasons. See above for parameter description
Changed the calculation of the imags areas for processing to prevent misbehaviour at certain video sizes like 1280x720. As a result, some pixels at the video borders might not be processed. (Just do an addborder() in your script to work around this)


Changes from v0.1.1 to v0.1.2
Resolved the misbehaviour at certain video sizes. Namely where RowSize == PitchSize. Now the processing is exact up to the video boundaries. No need to do addborder() / crop() anymore.


Changes from v0.1.2 to v0.2
Added support for execution on CPUs and hopefully on Radeon cards. Added 2 parameters 'cpu' and 'buffer' for that.
Fixed a bug where values near 1.0 (like 1.00000001) for parameter h lead to an error.


Changes from v0.2 to v0.2.1
Changed the device selection strategy. Hope now it will work for Platforms where GPU and CPU devices are mixed (AMD Radeon with ATI Stream SDK installed).


Changes from v0.2.1 to v0.2.2
Had to change again device selection strategy. Hope this works now in all cases.


Changes from v0.2.1 to v0.3
Added mode for sum of absolute differences when computing neighborhood similarity (Parameter sse)
Performance improvements in cases where not all planes are processed (plane != 4)


Changes from v0.3 to v0.3.1
Changed memory allocation strategy from uhp to ahp due to userreported errors. -> Changed default value for parameter smf to 'ahp'.
Fixed kernel name bug


Changes from v0.3.1 to v0.3.2
Switched to .Net 4
Switched to the latest version of Cloo (v0.9.0)
Switched to the latest version of AvsFilterNet (r62998)
NLMeansCL now reports errors the normal way (like all other avisynth plugins do)
When an error occurs, NLMeansCL does not crash avisynth anymore
Minor changes in the OpenCL code


v0.4.0 alpha
Implemented preliminary temporal version for Az=1 and Az=2.
v0.4.0 alpha is still based on .Net 3.5 as well as the older versions of Cloo (0.8.1) and AvsFilterNet (1.0 beta 2)!


Download latest version:
v0.3.2 :http://www.mediafire.com/?q4butkseucz9tin
v0.3.2 sources:http://www.mediafire.com/?l3swlzu2pm3375l
v0.4.0 alpha : http://www.mediafire.com/?9osy86a14u0qxr6

Malcolm

TheRyuu
6th January 2011, 00:05
Avisynth is telling me that NLMeansCL_netautoload.dll is not an avisynth 2.5 plugin.

Edit: Am I suppose to load this differently from other plugins other than just a simple LoadPlugin("X:\path\to\filter.dll")?

Malcolm
6th January 2011, 00:13
Huh?
You don't have to load it explicitly. AvsFilterNet does that for you if the filename ends with _netautoload.dll and it resides in the same folder.

If you remove the suffix, you can load it manually with LoadPlugin(). Still you need the AvsFilterNet.dll (i guess)

Malcolm

mastrboy
6th January 2011, 01:17
interesting filter, we have too few filters which run on the GPU.

Could you post some screenshots comparing NLMeansCL and TNLMeans?

Malcolm
6th January 2011, 01:28
@masterboy
When called with the same parameters, both filters produce exactly(*) the same result!

http://img340.imageshack.us/img340/4742/tnlmeansnlmeanscl.th.jpg (http://img340.imageshack.us/i/tnlmeansnlmeanscl.jpg/)

(*) The difference that you see on the right is 16 times enhanced. It contains only a few individual 'dots'. They arise from minor differences in the mathematical calculation. For performance reasons the calculation in OpenCL is performed with 'relaxed-math' optimization and with single-precision (float instead of double)

mastrboy
6th January 2011, 01:45
thats quite impressing considering the speed increase, will try it tomorrow together with DGNVIndex, and see what i can get out of it...

TheRyuu
6th January 2011, 01:48
Well unless I'm doing it wrong (I just threw all 3 things in the autoload folder for testing it) it caused my graphics drivers to 'crash' and have to recover (when loading in vdub).

Vdub says nothing on crash, avsp is saying some sort of null pointer exception when I try and run the script (and doesn't cause a driver recovery), dunno if that helps.

Running a GTX 570 here with the latest beta drivers (266.35).

GoodzMastaJ
6th January 2011, 02:40
I gave it a try. All three linked dll's in avisynth plugins folder, installed Catalyst 10.12 (APP version that has OpenCL support), and the StreamSDK which has the OpenCL libraries and whatnot. I get the below exception on my Radeon HD 4870. Any ideas how I can determine what actually failed (I know OpenCL on AMD is ?? at best, especially older cards like this one)?

Picture too wide for forum so linked (http://stuff.damagedgoodz.net/forumposts/openclex.png)

Hiritsuki
6th January 2011, 07:29
I wait for this filter long long time.
I test it right now. -w-

Dogway
6th January 2011, 08:52
The long awaited denoiser!! Thank you!
I get an error previewing in avspmod:
error messege (http://img534.imageshack.us/img534/9973/ataj.png)

Also will you implement temporal Az? I think it was something tritical did by himself, but itd be very welcome.
I have a Geforce 9600M GT card
driver version: 197.16

Hiritsuki
6th January 2011, 09:25
@Dogway
I think driver upate to 260.99 will fix that error.

Dogway
6th January 2011, 10:34
Thanks, it worked CL implementation is on the latter drivers only.
Some questions:
-the default behaviour is sse=true (as tnlmeans)? I like using sse=false for animation sources, it works nice for large flat colors.
-If you feel like, could you make some kind of dark protection? if a source has very dark scenes it completly turns into a mud secuence (just like tnl or dfttest).
-Do I need to make it MT or something?

benchmark:

# 0.40fps
MT("tnlmeans(ax=4,ay=4,az=1,sx=2,sy=2,bx=1,by=1,h=1.8,sse=true)",2,2)
# 0.19fps
NLMeansCL(A=4, S=2, B=1, aa=1.0, h=1.8, plane=4)

Malcolm
6th January 2011, 10:38
Well unless I'm doing it wrong (I just threw all 3 things in the autoload folder for testing it) it caused my graphics drivers to 'crash' and have to recover (when loading in vdub).Ok, let me explain: Under 'normal' circumstances, windows recovers your graphics card driver because it crashed. However, windows also does this, if your driver doesn't respond within 2 seconds. (You can change the time, as well as the general behaviour of windows by editing the registry).
That means: If you have a very complex OpenCL kernel, that computes for more than 2 seconds on one video frame, then windows will kill and restart your driver!
Since you have a GTX 570 i would assume that it's fast enough. So this shouldn't happen unless you use parameters like A=8, S=6 or so. But since i haven't tested the filter on that GPU i can only guess!

Malcolm
6th January 2011, 10:45
Any ideas how I can determine what actually failed (I know OpenCL on AMD is ?? at best, especially older cards like this one)?You can check if OpenCL is working on your configuration with this tool: http://www.ozone3d.net/gpu_caps_viewer/ It contains some OpenCL demos. You can as well choose on which 'hardware' you would like to execute the demo (if you have more than one GPU, or on the CPU if you have the ATI Stream SDK installed)

I will provide a version of the filter that spits out the real message. What you see on the picture is the mentioned general exception saying that the filter called env.ThowError(...)

Malcolm
6th January 2011, 10:57
-the default behaviour is sse=true (as tnlmeans)? I like using sse=false for animation sources, it works nice for large flat colors.
-If you feel like, could you make some kind of dark protection? if a source has very dark scenes it completly turns into a mud secuence (just like tnl or dfttest).
-Do I need to make it MT or something?- yes, i have only implemented sse. sad should be no problem. i will consider adding this.
- dark scene protection: actually i would recommend to do that with a little bit of scripting in avisynth.
- Using MT will not help. NLMeansCL itself is already mutithreaded on the GPU by nature. That's where the real work is done. So multithreading the wrapper-part, which runs on the CPU doesn't help improving performance.

0.19 fps?!? Wow! i cannot imagine how this number comes to existance. At 720x576? What's your script?

Dogway
6th January 2011, 12:07
Thanks for the answers, something must have been wrong, as there's no temporal I used an image and that was the speed. Now I tried with a video source and results were more optimistic:

# 0.77fps
MT("tnlmeans(ax=4,ay=4,az=1,sx=2,sy=2,bx=1,by=1,h=1.8,sse=true)",2,2)
# 12.77fps
NLMeansCL(A=4, S=2, B=1, aa=1.0, h=1.8, plane=4)
So maybe it doesn't like images or non mod16?
The dark protection is not only scenes, but part of the scenes, but I will look into that.

Malcolm
6th January 2011, 13:48
So maybe it doesn't like images or non mod16?
The dark protection is not only scenes, but part of the scenes, but I will look into that.
12.77 fps is pretty good for a mobile GPU like the 9600M GT i would say!
The filter doesn't care if it's mod16. Did you process only one frame? The initialization of the OpenCL stuff takes some time. That means processing the first frame is WAY slower than all following frames! Repeat your single frame 512 times and let the video play. What fps do you get after 256 frames?
Yes, i understand. it's about dark areas inside the video frame. But atm. i have to focus on the core functionality of the filter. 'dark scene protection' ist really something that can be added on top of any filter by scripting.
To the temporal filter mode: I have implemented this as a protoype, but i'm reluctant to investigate deeper at the moment.
Reasons are:

It doesn't bring that much benefit that one might think. (Maybe i will correct myself here in the future...)
It slows down the filtering. (Though it's not as slow as i expected)
Due to the nature of OpenCL / CUDA (that means to get fast executing code!), i'd have to write a second specialized kernel besides the existing one to realize Az=1. I'd have to write a third specialized kernel to realize Az=2, ...
A generalized kernel is possible but would be very slow! (And since it's all about performance...) At the current stage, i'd like to focus on the core kernel itself and work this out first.

Dogway
6th January 2011, 14:40
It's really strange, if I process my image with the example script of your first post, it goes nice (5.85fps), but with the next script I only get 0.19fps:
ImageReader("C:\image.jpg")
setmtmode(2)
mmod(2,2) #final resolution 1000x572
converttoyv12
NLMeansCL(A=4, S=2, B=1, aa=1.0, h=1.8, plane=4)
Im testing with AVSinfo.exe

I always use az=3, sometimes 6 depending on sources, I think it would benefit from still areas, taking advantage of temporal information (noise,codec blocks...), but that's only me, Im aware this is still in experimental phase, I just wanted to help a bit. Nice 3 wise present! Keep the good work :P

naoan
6th January 2011, 16:22
I got this error when trying to test the filter on avspmod

http://i.imgur.com/OITBQ.png

My system is using Windows 7 x64 and GPU AMD Radeon HD4850, checked using GPU-Z and opencl is ticked.

Didée
6th January 2011, 16:26
@ Dogway: Just kill that SetMTmode(2) out of your your script.

Simple logic: [SetMTmode(2)] AND [GPU filter] == FAIL

Malcolm
6th January 2011, 16:41
My system is using Windows 7 x64 and GPU AMD Radeon HD4850, checked using GPU-Z and opencl is ticked.The error message means, that the filter cannot use the retrieved GPU device. (for whatever reasons...)
AFAIK GPU-Z only checks your hardware and tells if your GPU can be used as OpenCL device. It doesn't tell if you have installed the necassary drivers.
Please download the above mentioned tool GPU Caps Viewer and start one of the incuded OpenCL GPU Demos. Do they run? Link: http://www.ozone3d.net/gpu_caps_viewer/

@Dogway
Didée is right, you are instancing NLMeansCL multiple times by using SetMTmode. Which doesn't help at all because now all instances must run in parallel and eat up your GPU memory! Also you have LESS shaders available per instance to do the work! FAIL! ;)

Dogway
6th January 2011, 16:45
@Didée: I use it for mmod and converttoyv12, doesnt it make sense? Either way it stays at 0.19fps

Didée
6th January 2011, 16:51
The bare minimum is that you switch back to SetMTmode(5) right before the GPU filter.

naoan
6th January 2011, 18:37
The error message means, that the filter cannot use the retrieved GPU device. (for whatever reasons...)
AFAIK GPU-Z only checks your hardware and tells if your GPU can be used as OpenCL device. It doesn't tell if you have installed the necassary drivers.
Please download the above mentioned tool GPU Caps Viewer and start one of the incuded OpenCL GPU Demos. Do they run? Link: http://www.ozone3d.net/gpu_caps_viewer/


Yes, I could run all the GPU OpenCL test, got nice fps too compared to CPU test...

Hiritsuki
7th January 2011, 08:17
Using author's sitting is more quality and more faster than PNLM default sitting,
That is true TNL's effect on the GPU.
Thanks Malcolm very very much. -w-++

test pic I'll upload when my MeGUI's job is over.

naoan
7th January 2011, 14:15
I updated Catalyst to 10.12 and it's still no good... :(

Damn, really want to use this filter, maybe it's time to upgrade, this time on green route...

Malcolm
7th January 2011, 14:24
I updated Catalyst to 10.12 and it's still no good... :(
Damn, really want to use this filter, maybe it's time to upgrade, this time on green route...I don't see a fundamental problem with my code and Radon GPUs. I just couldn't test it! So i guess it's just a simple obstacle that can be overcome. I'll provide a version soon, that gives out more debug information.

@Hiritsuki
Your english is really weird! ;)

Hiritsuki
7th January 2011, 14:59
Orz, I had test remote to run NLMeansCL and it's cannot run.

--[Error] An error occurred: avs [error]: NLMeansCL1 initialization error: System.Reflection.TargetInvocationException: 引動過程的目標傳回例外狀況。 ---> System.TypeInitializationException: 'Cloo.ComputePlatform' 的型別初始設定式發生例外狀況。 ---> Cloo.ComputeException: OpenCL error code detected: CL_PLATFORM_NOT_FOUND_KHR.
--[Error] An error occurred: 於 Cloo.ComputeException.ThrowOnError(ComputeErrorCode errorCode)
--[Error] An error occurred: x264 [error]: could not open input file `G:\OREIMO\11\OREIMO 11.avs'
--[Error] [2011/1/7 下午 09:56:00] Process exits with error code: -1

Hiritsuki
7th January 2011, 15:01
I don't see a fundamental problem with my code and Radon GPUs. I just couldn't test it! So i guess it's just a simple obstacle that can be overcome. I'll provide a version soon, that gives out more debug information.

@Hiritsuki
Your english is really weird! ;)

Sorry my english is broken.

naoan
7th January 2011, 15:30
I don't see a fundamental problem with my code and Radon GPUs. I just couldn't test it! So i guess it's just a simple obstacle that can be overcome. I'll provide a version soon, that gives out more debug information.


I'd be glad to help you by providing any info you need. :)

Thank you for this awesome filter, been waiting something like this for a long time now. :D

aegisofrime
7th January 2011, 15:43
Congrats Malcolm, on what I think is the first ever OpenCL Avisynth filter!

I just tried it, followed your instructions and called the function on a TGMC deinterlacing script. I loaded that into VDub, seems to work fine! Haven't tested speed yet as I'm currently encoding a video now.

Hopefully your work inspires more development in the field of OpenCL Avisynth :D

BTW, any plans for a 64-bit version?

Didée
7th January 2011, 17:34
I'm facing a serious problem here. (Nvidia GT240 on Win7 HP x64.)

- With Nvidia driver 258.96, the filter won't work. (Note: all GPU OpenCL tests from gpu_caps_viewer are working correctly with this driver ! )

- With Nvidia driver 260.66, the filter itself works. But I can't use my PC with this driver - the desktop and all application windows are scattered horribly with randomly changing pixel dot artifacts. It looks pretty much like the problem as described here (http://neuron2.net/board/viewtopic.php?f=8&t=49) - just much worse.

Dead road for me.

-----

Edit - one thing catched my eye. This is the error I get with driver 258.96:

http://img5.imageshack.us/img5/5203/nlmeansclerror.th.png (http://img5.imageshack.us/i/nlmeansclerror.png/)

Note the red marked part of the error. I've no clue about this programming language, but the double-dot thingy seems like a *syntax* issue to me. (?)

ChaosKing
7th January 2011, 18:56
Here's my quick benchmark:
CPU: q9550
GPU: 260GTX (896MB RAM)


Video: DVD (720x480, YV12) (+AnimIVTC)
Parameter: Ax=4, Ay=4, Sx=2, Sy=2, Bx=1, By=1 (same as yours)
TNLMeans: 1.15 fps
NLMeansCL(+AnimeIVTC): ~57-58 fps
NLMeansCL: ~86-90 fps

tested with Vdub: Run video analysis pass

amazing speed gain :D thx for the filter.

Malcolm
7th January 2011, 20:11
@aegisofrime
Yeah, thanks! The first OpenCL filter ever... sounds good! ;)
A 64bit version. Yes, i intend to do that. I just haven't used Avisynth 64bit yet, so i have to set up that first before i can tackle it.

@Didée
Hi!
I run driver version 263.06. Have you tried that?

I guess your screen looks like that, right?
http://img141.imageshack.us/img141/847/sterneb.th.png (http://img141.imageshack.us/i/sterneb.png/)
Well, that's serious! This is a case where the filter goes wild and writes to arbitrary memory locations on the graphics card. This looks like a real bug inside the filter. I will upload a version of the filter that gives out some debug information. Can you use the new version once available with the same video and send me the debug info? Thanks.

To the error dialoge. You have good eyes! ;)
But this is just an abbreviation in the message to tell that the error was thrown from inside the 'constructor' method of the filter class. Thanks anyway!

@ChaosKing
Now THAT are figures i like! 90 fps! :D

@To all others:
If you have any problems with the filter, especially if i doesn't work at all. Please use GPU Caps Viewer (http://www.ozone3d.net/gpu_caps_viewer/), go to the tab named 'Tools' and send me the 'Full XML Export'! There's an extra button for it on the tab.

mastrboy
7th January 2011, 21:45
i had the same problem as Didee with 258.96 on Win7 x64, upgraded to driver 260.99 today and it startet working without problems.
Hardware: Nvidia GTX260

FPS on a 720x480 anime with only tfm().tdecimate(mode=1).NLMeansCL() : 85-90~ fps, depending on scenes... :D

Using the settings specified in the first post: 60-70~ fps (NLMeansCL(A=4, S=2, B=1, aa=1.0, h=1.8, plane=4))

Testing in combination with DGNVIndex:

DGSource("D:\Video\Dragon Ball Z Kai\EP13\EP13_00035.dgi",crop_b=8,crop_l=240,crop_r=240,resize_w=960,resize_h=720)
NLMeansCL()
Results in 45-50~ fps

This is absolutely amazing if you ask me, never thought that the GPU would be so much faster than the CPU for denoising... (You should port dfttest also ;) )

GoodzMastaJ
7th January 2011, 23:20
You can check if OpenCL is working on your configuration with this tool: http://www.ozone3d.net/gpu_caps_viewer/ It contains some OpenCL demos. You can as well choose on which 'hardware' you would like to execute the demo (if you have more than one GPU, or on the CPU if you have the ATI Stream SDK installed)

I will provide a version of the filter that spits out the real message. What you see on the picture is the mentioned general exception saying that the filter called env.ThowError(...)

Thanks for the link, that tool has some interesting info. On the OpenCL tab it shows it supports OpenCL 1.0 on my GPU and OpenCL 1.1 on the CPU. The HD 4870 is one of the earliest OpenCL supported GPUs so that may have some effect. The OpenCL demos in the tool all ran fine. I'll just hang tight and wait for an updated version of your filter that might give a hint on where I'm going wrong.
Cheers

edit - Just in case it helps, here is the full report from GPU Caps viewer -> Link (http://stuff.damagedgoodz.net/forumposts/HD4870_GPU_Caps.txt)

Malcolm
7th January 2011, 23:22
I have updated the filter to version 0.1.1.
All changes are described in my first post.
The link for the DLL at Mediafire now points to v0.1.1.
Please read the changelog and look at the changed description of parameters.

Radeon users: Please play around with the 'smf' parameter. I don't know if changing the memory allocation strategy helps to get the filter running. I have some more things in mind that can be modified, but i need some time to implement. I just wanted to get the new version out quick, so anyone can use it.

Malcolm

GoodzMastaJ
7th January 2011, 23:32
It seems I found my problem using the version 0.1.1 you just posted (note: the dll in your zip needs to have _netautoload.dll appended to work like the previous version did). Also, if C:\Temp does not exist, the filter will throw an exception even if debug is false.

Here is the debug file:
NLMeansCL Version 0.1.1
ScriptEnvironment present.
Number of OpenCL Compute Platforms = 1.
Using first OpenCL Compute Platform.
Advanced Micro Devices, Inc..
OpenCL 1.1 ATI-Stream-v2.3 (451).
OpenCL Compute Context successfully created.
Number of OpenCL Devices in first Platform = 2.
Using first OpenCL Device.
ATI RV770.
Device available.
Parameter smf = chp
Device does not support images!


The last line is the same no matter what smf is set to. It seems my card is too old to use this filter :(

Malcolm
7th January 2011, 23:47
@GoodzMastaJ
Thanks!
I've quickly changed the implementation around the debug path. It should be more robust now! I guess i'm too tired to go on...

For your GPU: Please send me the full XML from GPU Caps Viewer as PN.
And be patient, we've just started with this filter! 'No image support' does not mean that it's all over...

Wilbert
7th January 2011, 23:53
Could you release the source code so that the community can enjoy your magic?

I have a GeFore 6800LE, is that good enough? Nvidia driver 61.76.

Malcolm
8th January 2011, 00:15
@Wilbert
I will do that. But i would like to work some things out first!
I don't think your 6800LE will be capable of executing OpenCL. it's from around 2004 if i'm right. That's long, long ago... And even if, the performance would probably be not much better that TNLMeans.

TheRyuu
8th January 2011, 00:51
Could you release the source code so that the community can enjoy your magic?

I have a GeFore 6800LE, is that good enough? Nvidia driver 61.76.

Only 8 series or higher supports OpenCL.

Edit: on a side note v 0.1.1 actually works for me. I did get a green bar on the bottom of the screen with non-mod16 resolution. I also get a green bar on the right side of the screen with plane=4 at 1280x720.

With plane=0 about 4-8 pixels on the right side turn black.

Edit2: padding like 16 pixels (addborders) on each side then cropping later seems to work.

naoan
8th January 2011, 18:14
Well I played around with smf parameters but it still won't work.

Here's the full XML export of my GPU, radeon HD4850 http://www.mediafire.com/?f4s4ktmocfk2hot

Hope that could help!

tormento
8th January 2011, 20:36
Major issues when trying to load avs in VirtualDub. Same errors as some seen here.

P.S: x64 version please =)

Malcolm
8th January 2011, 22:14
Here's the full XML export of my GPU, radeon HD4850 http://www.mediafire.com/?f4s4ktmocfk2hot
Hope that could help!Yes, that helped.
Seems like all RV770 users are out of business at the moment.
The AMD OpenCL drivers do not suppport images.
Same issue as GoodzMastaJ.
Please see below for a snippet of the full XML export from GPU Caps Viewer.
CL_DEVICE_NAME="ATI RV770"
CL_DEVICE_VENDOR="Advanced Micro Devices, Inc."
CL_DRIVER_VERSION="CAL 1.4.900"
CL_DEVICE_PROFILE="FULL_PROFILE"
CL_DEVICE_VERSION="OpenCL 1.0 ATI-Stream-v2.3 (451)"
CL_DEVICE_TYPE="GPU"
CL_DEVICE_IMAGE_SUPPORT="NO"
CL_DEVICE_IMAGE2D_MAX_WIDTH="0"
CL_DEVICE_IMAGE2D_MAX_HEIGHT="0"

@tormento
Please provide the contents of the debug file and the xml export of GPU Caps Viewer. Otherwise i can't help.

@all
I have uploaded version 0.1.2.
See the changelog in my first post for details.

@Didée
Version 0.1.2 should fix you error with the dots spread all over the screen! Can you give me feedback if this version works for you? Thanks.

TheRyuu
9th January 2011, 00:51
Getting a weird issue with regards to setting h = 1.0

Setting it to 1.0 will cause it to not work (gives error) but 0.9, 1.1 both work (any other value works I do believe).

Some tests someone I know did (credits to mirkosp):
nlmeanscl(h=1.0000001) <<< works
nlmeanscl(h=1.00000001) <<< gives error
nlmeanscl(h=1.00000006) <<< works
nlmeanscl(h=1.00000005) <<< gives error

Edit: more random stuff
nlmeanscl(h=1.0000000596046449899999990) <<< will work
nlmeanscl(h=1.000000059604644989999999) <<< gives error
19:14 < mirkosp> that's the limit, btw

Malcolm
9th January 2011, 01:30
Getting a weird issue with regards to setting h = 1.0Confirmed. It's a simple bug. Already fixed and will be gone with the next version.

tormento
9th January 2011, 11:35
Here you are. I noticed even GPU Caps Viewer crashes in CL test. An encoding is going now, I'll try to change drivers version ASAP and report you.

===================================================
GPU Caps Viewer v1.9.4
http://www.ozone3d.net/gpu_caps_viewer/
===================================================


===================================[ System / CPU ]
- CPU Name: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
- CPU Core Speed: 3600 MHz
- CPU Num Cores: 8
- Family: 6 - Model: 10 - Stepping: 4
- Physical Memory Size: 4087 MB
- Operating System: Windows 7 64-bit build 7600 [No Service Pack]
- DirectX Version: 10.0
- PhysX Version: 9100514


===================================[ Graphics Adapter / GPU ]
- SLI: disabled
- GPUs: 1
- Logical GPUs: 1
- OpenGL Renderer: GeForce GTX 460/PCI/SSE2
- Drivers Renderer: NVIDIA GeForce GTX 460
- DB Renderer: NVIDIA GeForce GTX 460
- Device Description:
- Adapter String: GeForce GTX 460
- Vendor: NVIDIA Corporation
- Vendor ID: 0x10DE
- Device ID: 0x0E22
- Sub device ID: 0x2381
- Sub vendor ID: 0x1462
- Drivers Version: 8.17.12.6590 (11-25-2010) - nvoglv64
- GPU Codename: GF104
- GPU Unified Shader Processors: 336
- GPU Vertex Shader Processors: 0
- GPU Pixel Shader Processors: 0
- TPD (Watts): 160
- Video Memory Size: 1024 MB
- Video Memory Type: GDDR5
- Clocks level #0: Core: 50MHz - Memory: 135MHz - Shader: 101MHz
- Clocks level #1: Core: 405MHz - Memory: 324MHz - Shader: 810MHz
- Clocks level #2: Core: 405MHz - Memory: 1950MHz - Shader: 810MHz
- Clocks level #3: Core: 811MHz - Memory: 1950MHz - Shader: 1622MHz
- BIOS String: 70.4.1b.0.2
- Current Display Mode: 1920x1080 @ 60 Hz - 32 bpp


===================================[ OpenGL GPU Capabilities ]
- OpenGL Version: 4.1.0
- GLSL (OpenGL Shading Language) Version: 4.10 NVIDIA via Cg compiler
- ARB Texture Units: 4
- Vertex Shader Texture Units: 32
- Pixel Shader Texture Units: 32
- Geometry Shader Texture Units: 32
- Max Texture Size: 16384x16384
- Max Anisotropic Filtering Value: X16.0
- Max Point Sprite Size: 63.4
- Max Dynamic Lights: 8
- Max Viewport Size: 16384x16384
- Max Vertex Uniform Components: 4096
- Max Fragment Uniform Components: 2048
- Max Geometry Uniform Components: 2048
- Max Varying Float: 60
- Max Vertex Bindable Uniforms: 12
- Max Fragment Bindable Uniforms: 12
- Max Geometry Bindable Uniforms: 12
- Frame Buffer Objects (FBO) Support:[yes]
- Multiple Render Targets / Max draw buffers: 8
- Pixel Buffer Objects (PBO) Support:[yes]
- S3TC Texture Compression Support:[yes]
- ATI 3Dc Texture Compression Support:[no]
- Texture Rectangle Support:[yes]
- Floating Point Textures Support:[yes]
- MSAA: 2X
- MSAA: 4X
- MSAA: 8X
- MSAA: 16X
- MSAA: 32X
- OpenGL Extensions: 245 extensions (GL=222 and WGL=23)
<li>GL_ARB_blend_func_extended</li>
<li>GL_ARB_color_buffer_float</li>
<li>GL_ARB_compatibility</li>
<li>GL_ARB_copy_buffer</li>
<li>GL_ARB_debug_output</li>
<li>GL_ARB_depth_buffer_float</li>
<li>GL_ARB_depth_clamp</li>
<li>GL_ARB_depth_texture</li>
<li>GL_ARB_draw_buffers</li>
<li>GL_ARB_draw_buffers_blend</li>
<li>GL_ARB_draw_indirect</li>
<li>GL_ARB_draw_elements_base_vertex</li>
<li>GL_ARB_draw_instanced</li>
<li>GL_ARB_ES2_compatibility</li>
<li>GL_ARB_explicit_attrib_location</li>
<li>GL_ARB_fragment_coord_conventions</li>
<li>GL_ARB_fragment_program</li>
<li>GL_ARB_fragment_program_shadow</li>
<li>GL_ARB_fragment_shader</li>
<li>GL_ARB_framebuffer_object</li>
<li>GL_ARB_framebuffer_sRGB</li>
<li>GL_ARB_geometry_shader4</li>
<li>GL_ARB_get_program_binary</li>
<li>GL_ARB_gpu_shader5</li>
<li>GL_ARB_gpu_shader_fp64</li>
<li>GL_ARB_half_float_pixel</li>
<li>GL_ARB_half_float_vertex</li>
<li>GL_ARB_imaging</li>
<li>GL_ARB_instanced_arrays</li>
<li>GL_ARB_map_buffer_range</li>
<li>GL_ARB_multisample</li>
<li>GL_ARB_multitexture</li>
<li>GL_ARB_occlusion_query</li>
<li>GL_ARB_occlusion_query2</li>
<li>GL_ARB_pixel_buffer_object</li>
<li>GL_ARB_point_parameters</li>
<li>GL_ARB_point_sprite</li>
<li>GL_ARB_provoking_vertex</li>
<li>GL_ARB_robustness</li>
<li>GL_ARB_sample_shading</li>
<li>GL_ARB_sampler_objects</li>
<li>GL_ARB_seamless_cube_map</li>
<li>GL_ARB_separate_shader_objects</li>
<li>GL_ARB_shader_bit_encoding</li>
<li>GL_ARB_shader_objects</li>
<li>GL_ARB_shader_precision</li>
<li>GL_ARB_shader_subroutine</li>
<li>GL_ARB_shading_language_100</li>
<li>GL_ARB_shading_language_include</li>
<li>GL_ARB_shadow</li>
<li>GL_ARB_sync</li>
<li>GL_ARB_tessellation_shader</li>
<li>GL_ARB_texture_border_clamp</li>
<li>GL_ARB_texture_buffer_object</li>
<li>GL_ARB_texture_buffer_object_rgb32</li>
<li>GL_ARB_texture_compression</li>
<li>GL_ARB_texture_compression_bptc</li>
<li>GL_ARB_texture_compression_rgtc</li>
<li>GL_ARB_texture_cube_map</li>
<li>GL_ARB_texture_cube_map_array</li>
<li>GL_ARB_texture_env_add</li>
<li>GL_ARB_texture_env_combine</li>
<li>GL_ARB_texture_env_crossbar</li>
<li>GL_ARB_texture_env_dot3</li>
<li>GL_ARB_texture_float</li>
<li>GL_ARB_texture_gather</li>
<li>GL_ARB_texture_mirrored_repeat</li>
<li>GL_ARB_texture_multisample</li>
<li>GL_ARB_texture_non_power_of_two</li>
<li>GL_ARB_texture_query_lod</li>
<li>GL_ARB_texture_rectangle</li>
<li>GL_ARB_texture_rg</li>
<li>GL_ARB_texture_rgb10_a2ui</li>
<li>GL_ARB_texture_swizzle</li>
<li>GL_ARB_timer_query</li>
<li>GL_ARB_transform_feedback2</li>
<li>GL_ARB_transform_feedback3</li>
<li>GL_ARB_transpose_matrix</li>
<li>GL_ARB_uniform_buffer_object</li>
<li>GL_ARB_vertex_array_bgra</li>
<li>GL_ARB_vertex_array_object</li>
<li>GL_ARB_vertex_attrib_64bit</li>
<li>GL_ARB_vertex_buffer_object</li>
<li>GL_ARB_vertex_program</li>
<li>GL_ARB_vertex_shader</li>
<li>GL_ARB_vertex_type_2_10_10_10_rev</li>
<li>GL_ARB_viewport_array</li>
<li>GL_ARB_window_pos</li>
<li>GL_ATI_draw_buffers</li>
<li>GL_ATI_texture_float</li>
<li>GL_ATI_texture_mirror_once</li>
<li>GL_S3_s3tc</li>
<li>GL_EXT_texture_env_add</li>
<li>GL_EXT_abgr</li>
<li>GL_EXT_bgra</li>
<li>GL_EXT_bindable_uniform</li>
<li>GL_EXT_blend_color</li>
<li>GL_EXT_blend_equation_separate</li>
<li>GL_EXT_blend_func_separate</li>
<li>GL_EXT_blend_minmax</li>
<li>GL_EXT_blend_subtract</li>
<li>GL_EXT_compiled_vertex_array</li>
<li>GL_EXT_Cg_shader</li>
<li>GL_EXT_depth_bounds_test</li>
<li>GL_EXT_direct_state_access</li>
<li>GL_EXT_draw_buffers2</li>
<li>GL_EXT_draw_instanced</li>
<li>GL_EXT_draw_range_elements</li>
<li>GL_EXT_fog_coord</li>
<li>GL_EXT_framebuffer_blit</li>
<li>GL_EXT_framebuffer_multisample</li>
<li>GL_EXTX_framebuffer_mixed_formats</li>
<li>GL_EXT_framebuffer_object</li>
<li>GL_EXT_framebuffer_sRGB</li>
<li>GL_EXT_geometry_shader4</li>
<li>GL_EXT_gpu_program_parameters</li>
<li>GL_EXT_gpu_shader4</li>
<li>GL_EXT_multi_draw_arrays</li>
<li>GL_EXT_packed_depth_stencil</li>
<li>GL_EXT_packed_float</li>
<li>GL_EXT_packed_pixels</li>
<li>GL_EXT_pixel_buffer_object</li>
<li>GL_EXT_point_parameters</li>
<li>GL_EXT_provoking_vertex</li>
<li>GL_EXT_rescale_normal</li>
<li>GL_EXT_secondary_color</li>
<li>GL_EXT_separate_shader_objects</li>
<li>GL_EXT_separate_specular_color</li>
<li>GL_EXT_shader_image_load_store</li>
<li>GL_EXT_shadow_funcs</li>
<li>GL_EXT_stencil_two_side</li>
<li>GL_EXT_stencil_wrap</li>
<li>GL_EXT_texture3D</li>
<li>GL_EXT_texture_array</li>
<li>GL_EXT_texture_buffer_object</li>
<li>GL_EXT_texture_compression_latc</li>
<li>GL_EXT_texture_compression_rgtc</li>
<li>GL_EXT_texture_compression_s3tc</li>
<li>GL_EXT_texture_cube_map</li>
<li>GL_EXT_texture_edge_clamp</li>
<li>GL_EXT_texture_env_combine</li>
<li>GL_EXT_texture_env_dot3</li>
<li>GL_EXT_texture_filter_anisotropic</li>
<li>GL_EXT_texture_integer</li>
<li>GL_EXT_texture_lod</li>
<li>GL_EXT_texture_lod_bias</li>
<li>GL_EXT_texture_mirror_clamp</li>
<li>GL_EXT_texture_object</li>
<li>GL_EXT_texture_shared_exponent</li>
<li>GL_EXT_texture_sRGB</li>
<li>GL_EXT_texture_swizzle</li>
<li>GL_EXT_timer_query</li>
<li>GL_EXT_transform_feedback2</li>
<li>GL_EXT_vertex_array</li>
<li>GL_EXT_vertex_array_bgra</li>
<li>GL_EXT_vertex_attrib_64bit</li>
<li>GL_IBM_rasterpos_clip</li>
<li>GL_IBM_texture_mirrored_repeat</li>
<li>GL_KTX_buffer_region</li>
<li>GL_NV_blend_square</li>
<li>GL_NV_conditional_render</li>
<li>GL_NV_copy_depth_to_color</li>
<li>GL_NV_copy_image</li>
<li>GL_NV_depth_buffer_float</li>
<li>GL_NV_depth_clamp</li>
<li>GL_NV_explicit_multisample</li>
<li>GL_NV_fence</li>
<li>GL_NV_float_buffer</li>
<li>GL_NV_fog_distance</li>
<li>GL_NV_fragment_program</li>
<li>GL_NV_fragment_program_option</li>
<li>GL_NV_fragment_program2</li>
<li>GL_NV_framebuffer_multisample_coverage</li>
<li>GL_NV_geometry_shader4</li>
<li>GL_NV_gpu_program4</li>
<li>GL_NV_gpu_program4_1</li>
<li>GL_NV_gpu_program5</li>
<li>GL_NV_gpu_program_fp64</li>
<li>GL_NV_gpu_shader5</li>
<li>GL_NV_half_float</li>
<li>GL_NV_light_max_exponent</li>
<li>GL_NV_multisample_coverage</li>
<li>GL_NV_multisample_filter_hint</li>
<li>GL_NV_occlusion_query</li>
<li>GL_NV_packed_depth_stencil</li>
<li>GL_NV_parameter_buffer_object</li>
<li>GL_NV_parameter_buffer_object2</li>
<li>GL_NV_pixel_data_range</li>
<li>GL_NV_point_sprite</li>
<li>GL_NV_primitive_restart</li>
<li>GL_NV_register_combiners</li>
<li>GL_NV_register_combiners2</li>
<li>GL_NV_shader_buffer_load</li>
<li>GL_NV_texgen_reflection</li>
<li>GL_NV_texture_barrier</li>
<li>GL_NV_texture_compression_vtc</li>
<li>GL_NV_texture_env_combine4</li>
<li>GL_NV_texture_expand_normal</li>
<li>GL_NV_texture_multisample</li>
<li>GL_NV_texture_rectangle</li>
<li>GL_NV_texture_shader</li>
<li>GL_NV_texture_shader2</li>
<li>GL_NV_texture_shader3</li>
<li>GL_NV_transform_feedback</li>
<li>GL_NV_transform_feedback2</li>
<li>GL_NV_vertex_array_range</li>
<li>GL_NV_vertex_array_range2</li>
<li>GL_NV_vertex_attrib_integer_64bit</li>
<li>GL_NV_vertex_buffer_unified_memory</li>
<li>GL_NV_vertex_program</li>
<li>GL_NV_vertex_program1_1</li>
<li>GL_NV_vertex_program2</li>
<li>GL_NV_vertex_program2_option</li>
<li>GL_NV_vertex_program3</li>
<li>GL_NVX_conditional_render</li>
<li>GL_NVX_gpu_memory_info</li>
<li>GL_SGIS_generate_mipmap</li>
<li>GL_SGIS_texture_lod</li>
<li>GL_SGIX_depth_texture</li>
<li>GL_SGIX_shadow</li>
<li>GL_SUN_slice_accum</li>
<li>GL_WIN_swap_hint</li>
<li>WGL_EXT_swap_control</li>
<li>WGL_ARB_buffer_region</li>
<li>WGL_ARB_create_context</li>
<li>WGL_ARB_create_context_profile</li>
<li>WGL_ARB_create_context_robustness</li>
<li>WGL_ARB_extensions_string</li>
<li>WGL_ARB_make_current_read</li>
<li>WGL_ARB_multisample</li>
<li>WGL_ARB_pbuffer</li>
<li>WGL_ARB_pixel_format</li>
<li>WGL_ARB_pixel_format_float</li>
<li>WGL_ARB_render_texture</li>
<li>WGL_ATI_pixel_format_float</li>
<li>WGL_EXT_create_context_es2_profile</li>
<li>WGL_EXT_extensions_string</li>
<li>WGL_EXT_framebuffer_sRGB</li>
<li>WGL_EXT_pixel_format_packed_float</li>
<li>WGL_NVX_DX_interop</li>
<li>WGL_NV_DX_interop</li>
<li>WGL_NV_float_buffer</li>
<li>WGL_NV_multisample_coverage</li>
<li>WGL_NV_render_depth_texture</li>
<li>WGL_NV_render_texture_rectangle</li>


===================================[ NVIDIA CUDA Capabilities ]
- CUDA Device 0
- Device name: GeForce GTX 460
- Compute Capability: 2.1
- Total Memory: 993 MB
- Shader Clock Rate: 1622 MHz
- Multiprocessors: 7
- Warp Size: 32
- Max Threads Per Block: 1024
- Threads Per Block: 1024 x 1024 x 64
- Grid Size: 65535 x 65535 x 1
- Registers Per Block: 32768
- Texture Alignment: 512 byte
- Total Constant Memory: 64 Kb


===================================[ OpenCL Capabilities ]
- Num OpenCL platforms: 1
- Name: NVIDIA CUDA
- Version: OpenCL 1.0 CUDA 3.2.1
- Profile: FULL_PROFILE
- Vendor: NVIDIA Corporation
- Num devices: 1

- CL_DEVICE_NAME: GeForce GTX 460
- CL_DEVICE_VENDOR: NVIDIA Corporation
- CL_DRIVER_VERSION: 265.90
- CL_DEVICE_PROFILE: FULL_PROFILE
- CL_DEVICE_VERSION: OpenCL 1.0 CUDA
- CL_DEVICE_TYPE: GPU
- CL_DEVICE_VENDOR_ID: 0x10DE
- CL_DEVICE_MAX_COMPUTE_UNITS: 7
- CL_DEVICE_MAX_CLOCK_FREQUENCY: 1622MHz
- CL_NV_DEVICE_COMPUTE_CAPABILITY_MAJOR: 2
- CL_NV_DEVICE_COMPUTE_CAPABILITY_MINOR: 1
- CL_NV_DEVICE_REGISTERS_PER_BLOCK: 32768
- CL_NV_DEVICE_WARP_SIZE: 32
- CL_NV_DEVICE_GPU_OVERLAP: 1
- CL_NV_DEVICE_KERNEL_EXEC_TIMEOUT: 1
- CL_NV_DEVICE_INTEGRATED_MEMORY: 0
- CL_DEVICE_ADDRESS_BITS: 32
- CL_DEVICE_MAX_MEM_ALLOC_SIZE: 254320KB
- CL_DEVICE_GLOBAL_MEM_SIZE: 993MB
- CL_DEVICE_MAX_PARAMETER_SIZE: 4352
- CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 128 Bytes
- CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 112KB
- CL_DEVICE_ERROR_CORRECTION_SUPPORT: NO
- CL_DEVICE_LOCAL_MEM_TYPE: Local (scratchpad)
- CL_DEVICE_LOCAL_MEM_SIZE: 48KB
- CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 64KB
- CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3
- CL_DEVICE_MAX_WORK_ITEM_SIZES: [1024 ; 1024 ; 64]
- CL_DEVICE_MAX_WORK_GROUP_SIZE: 1024
- CL_EXEC_NATIVE_KERNEL: 4746436
- CL_DEVICE_IMAGE_SUPPORT: YES
- CL_DEVICE_MAX_READ_IMAGE_ARGS: 128
- CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 8
- CL_DEVICE_IMAGE2D_MAX_WIDTH: 4096
- CL_DEVICE_IMAGE2D_MAX_HEIGHT: 32768
- CL_DEVICE_IMAGE3D_MAX_WIDTH: 2048
- CL_DEVICE_IMAGE3D_MAX_HEIGHT: 2048
- CL_DEVICE_IMAGE3D_MAX_DEPTH: 16
- CL_DEVICE_MAX_SAMPLERS: 16
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 1
- CL_DEVICE_EXTENSIONS: 16
- Extensions:
- cl_khr_byte_addressable_store
- cl_khr_icd
- cl_khr_gl_sharing
- cl_nv_d3d9_sharing
- cl_nv_d3d10_sharing
- cl_khr_d3d10_sharing
- cl_nv_d3d11_sharing
- cl_nv_compiler_options
- cl_nv_device_attribute_query
- cl_nv_pragma_unroll
-
- cl_khr_global_int32_base_atomics
- cl_khr_global_int32_extended_atomics
- cl_khr_local_int32_base_atomics
- cl_khr_local_int32_extended_atomics
- cl_khr_fp64


===================================[ Misc. ]


===================================[ Related Graphics Drivers ]
- http://www.geeks3d.com/?page_id=752
- http://downloads.guru3d.com/download.php?id=10
- http://www.tweakguides.com/NVFORCE_1.html
- http://www.nvidia.com/object/winxp-2k_archive.html
- http://www.geeks3d.com/?p=65


===================================[ Related Graphics Cards Reviews ]
- http://www.geeks3d.com/?tag=geforce-gtx-460
- http://www.google.us/search?q=NVIDIA+GeForce+GTX+460+review

Dogway
9th January 2011, 12:51
-Remember my post (http://forum.doom9.org/showpost.php?p=1468978&postcount=12)?
It was caused by source being non mod16. I made work a few images with mod4, but below mod16 performance. I havent checked video sources, but its something to look up.
-Also there are some aliasing issues on b>0 (less than tnlmeans but still)
-crashed on a 1280x688 (mod16) video source with this message (http://img510.imageshack.us/img510/8287/afag.png). (mkv through ffmpegsource) (Edit: problem was setting h<1.1 on v. 0.1.2)

tormento
9th January 2011, 18:51
Ok, updated to 266.44 drivers and works.

If only I could figure how to get a good value for parameters... They are a bit obscure to me.

For example, in a 1080p x264 encoding, what should I put to mimic SMDegrain (tr=3,thSAD=300,blksize=16,overlap=8) ? I suppose not... The temporal part is missing..

frustum
10th January 2011, 20:42
My understanding is that OpenCL programs can be compiled to run either on a GPU or on the host CPU. If this is true, I'm curious, Malcom, if you have tried this, and how fast the filter runs on the host CPU vs the original TNLmeans filter. How much penalty is there (if any) for writing it as OpenCL vs C if there is no GPU to help out.

yup
11th January 2011, 10:21
Malcolm :thanks: for Your time.
NLMeansCL work on my 8800 GTS 512 with last Nvidia driver (260.99). Speed for SD content little faster than real time 26-27 fps.
If You find time add also Az support for Az=1 and Az=2 it may be useful for motion compensating filtering.
yup.

Malcolm
12th January 2011, 00:04
My understanding is that OpenCL programs can be compiled to run either on a GPU or on the host CPU. If this is true, I'm curious, Malcom, if you have tried this, and how fast the filter runs on the host CPU vs the original TNLmeans filter. How much penalty is there (if any) for writing it as OpenCL vs C if there is no GPU to help out.

I have created a version that runs on the CPU. Please see my first post for explanations as well as some performance figures.

Let me explain some aspects regarding CPU vs. GPU:
- CPUs are not generally slower than CPUs. The performance does heavily depend on the algorithm that is implemented. For NLMeans, the results are clear. But that's just one example. There are algorithms that will always be slower on a GPU than on a CPU.
- You can see from my performance measurements, that using buffers instead of images is much slower. But that's only half the truth. I have a version of NLMeansCL on my harddisk, that is faster on my Geforce when using buffers instead of images! So the execution speed does also heavily depend on how memory is used and accessed inside the filter. But on the other hand this version is actually even slower on the CPU that version 0.2 when using buffers! So though OpenCL executes on GPUs as well as CPUs, you typically have to code to the exact hardware to achieve peak performance!
- One benefit of OpenCL is that it's naturally multithreaded. So if you throw in another CPU with double the number of cores (or a new gfx card), it will typically scale well. That's not true for TNLMeans.
- My current implementation is tuned for execution on GPUs. There are some micro optimizations for individual math functions and so on. For a serious CPU version of the filter, i would go over the implementation and play around with different expressions to see if they execute faster than the existing ones. But this is - as i said -a micro optimization.

@tormento
Sorry, i can't help you out with suggestions to mimic SMDegrain.

@yup
Yeah, i will see what i can do.

naoan
12th January 2011, 03:55
I dunno what I did wrong, but I still get the same error message as the one in earlier version with 0.2

Have tried setting buffer and cpu to true (either and both).

ChaosKing
12th January 2011, 11:39
yep, i have problems with cpu and buffer too.

Malcolm
12th January 2011, 11:51
@naoan, ChaosKing
If anyone of you would send me the logfile....:rolleyes:

naoan
12th January 2011, 12:20
Oh, sorry. Here it is (with buffer=true) :

NLMeansCL Version 0.2
ScriptEnvironment present.
Number of OpenCL Compute Platforms = 1.
Trying OpenCL Compute Platform
Advanced Micro Devices, Inc..
OpenCL 1.1 ATI-Stream-v2.3 (451).
OpenCL Compute Context successfully created.
Number of OpenCL Devices in Platform = 2.
Using first OpenCL Device.
ATI RV770.
Device available.
OpenCL Command Queue successfully created.
OpenCL error code detected: BuildProgramFailure.


The log is exactly the same with buffer=false and stop at "Device available." with cpu and buffer set at true.

Thanks again. :)

Malcolm
12th January 2011, 13:49
Ok, i see. There are 2 problems.
The behaviour of AMDs OpenCL platform is different than i thought. So if you have an AMD gfx card, as well as the CPU as OpenCL device, then the selection of the CPU fails and it is using the GPU. I can change the selection strategy, to overcome this. (Selecting the CPU as computation device actually works if you have an Nvidia GPU). I will provide this ASAP.

The second thing is, that the compilation of the kernel fails. Since i don't own an AMD gfx card, it's nearly impossible for me to tell what the reason could be!
So far i can only tell that my implementation is correct, since it runs on Nvidia GPUs as well as the CPU.
The cause can only be that i'm using some functions that are not implemented by AMD and thus the AMD OpenCL driver refuses to compile!
Sorry for any inconvenience i have caused, by providing something which obviously doesn't run on Radeons. But i'm just trying to give you someting..

naoan
12th January 2011, 14:50
Hey, no worries there, in fact I'm very thankful you even try to do something about it and for making this plugin available to community for free. :o

I've been meaning to upgrade my GPU, and now my choice is clear, thanks to this plugin. ;)

ChaosKing
12th January 2011, 18:13
NLMeansCL(cpu=true) -> http://img141.imageshack.us/img141/4598/nlm.th.png (http://img141.imageshack.us/i/nlm.png/)
My CPU: Intel Q9550

I can't find a debug log, c:\temp is empty

===================================================
GPU Caps Viewer v1.9.5
http://www.ozone3d.net/gpu_caps_viewer/
===================================================


===================================[ System / CPU ]
- CPU Name: Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz
- CPU Core Speed: 2833 MHz
- CPU Num Cores: 4
- Family: 6 - Model: 7 - Stepping: 10
- Physical Memory Size: 4095 MB
- Operating System: Windows 7 64-bit build 7600 [No Service Pack]
- DirectX Version: 10.0
- PhysX Version: 9100514


===================================[ Graphics Adapter / GPU ]
- SLI: disabled
- GPUs: 1
- Logical GPUs: 1
- OpenGL Renderer: GeForce GTX 260/PCI/SSE2
- Drivers Renderer: NVIDIA GeForce GTX 260
- DB Renderer: NVIDIA GeForce GTX 260
- Device Description: NVIDIA GeForce GTX 260
- Adapter String: GeForce GTX 260
- Vendor: NVIDIA Corporation
- Vendor ID: 0x10DE
- Device ID: 0x05E2
- Sub device ID: 0x1109
- Sub vendor ID: 0x19DA
- Drivers Version: 8.17.12.6099 (10-16-2010) - nvoglv64
- GPU Codename: GT200
- GPU Unified Shader Processors: 192
- GPU Vertex Shader Processors: 0
- GPU Pixel Shader Processors: 0
- SM / SIMD: 24
- TPC: 8
- TPD (Watts): 182
- Video Memory Size: 896 MB
- Video Memory Type: GDDR3
- Clocks level #0: Core: 300MHz - Memory: 100MHz - Shader: 600MHz
- Clocks level #1: Core: 400MHz - Memory: 300MHz - Shader: 800MHz
- Clocks level #2: Core: 576MHz - Memory: 999MHz - Shader: 1242MHz
- BIOS String: 62.0.61.0.0
- Current Display Mode: 1280x1024 @ 60 Hz - 32 bpp


===================================[ OpenGL GPU Capabilities ]
- OpenGL Version: 3.3.0
- GLSL (OpenGL Shading Language) Version: 3.30 NVIDIA via Cg compiler
- ARB Texture Units: 4
- Vertex Shader Texture Units: 32
- Pixel Shader Texture Units: 32
- Geometry Shader Texture Units: 32
- Max Texture Size: 8192x8192
- Max Anisotropic Filtering Value: X16.0
- Max Point Sprite Size: 63.4
- Max Dynamic Lights: 8
- Max Viewport Size: 8192x8192
- Max Vertex Uniform Components: 4096
- Max Fragment Uniform Components: 2048
- Max Geometry Uniform Components: 2048
- Max Varying Float: 60
- Max Vertex Bindable Uniforms: 12
- Max Fragment Bindable Uniforms: 12
- Max Geometry Bindable Uniforms: 12
- Frame Buffer Objects (FBO) Support:[yes]
- Multiple Render Targets / Max draw buffers: 8
- Pixel Buffer Objects (PBO) Support:[yes]
- S3TC Texture Compression Support:[yes]
- ATI 3Dc Texture Compression Support:[no]
- Texture Rectangle Support:[yes]
- Floating Point Textures Support:[yes]
- MSAA: 2X
- MSAA: 4X
- MSAA: 8X
- MSAA: 16X
- OpenGL Extensions: 221 extensions (GL=199 and WGL=22)
<li>GL_ARB_blend_func_extended</li>
<li>GL_ARB_color_buffer_float</li>
<li>GL_ARB_compatibility</li>
<li>GL_ARB_copy_buffer</li>
<li>GL_ARB_debug_output</li>
<li>GL_ARB_depth_buffer_float</li>
<li>GL_ARB_depth_clamp</li>
<li>GL_ARB_depth_texture</li>
<li>GL_ARB_draw_buffers</li>
<li>GL_ARB_draw_elements_base_vertex</li>
<li>GL_ARB_draw_instanced</li>
<li>GL_ARB_ES2_compatibility</li>
<li>GL_ARB_explicit_attrib_location</li>
<li>GL_ARB_fragment_coord_conventions</li>
<li>GL_ARB_fragment_program</li>
<li>GL_ARB_fragment_program_shadow</li>
<li>GL_ARB_fragment_shader</li>
<li>GL_ARB_framebuffer_object</li>
<li>GL_ARB_framebuffer_sRGB</li>
<li>GL_ARB_geometry_shader4</li>
<li>GL_ARB_get_program_binary</li>
<li>GL_ARB_half_float_pixel</li>
<li>GL_ARB_half_float_vertex</li>
<li>GL_ARB_imaging</li>
<li>GL_ARB_instanced_arrays</li>
<li>GL_ARB_map_buffer_range</li>
<li>GL_ARB_multisample</li>
<li>GL_ARB_multitexture</li>
<li>GL_ARB_occlusion_query</li>
<li>GL_ARB_occlusion_query2</li>
<li>GL_ARB_pixel_buffer_object</li>
<li>GL_ARB_point_parameters</li>
<li>GL_ARB_point_sprite</li>
<li>GL_ARB_provoking_vertex</li>
<li>GL_ARB_robustness</li>
<li>GL_ARB_sampler_objects</li>
<li>GL_ARB_seamless_cube_map</li>
<li>GL_ARB_separate_shader_objects</li>
<li>GL_ARB_shader_bit_encoding</li>
<li>GL_ARB_shader_objects</li>
<li>GL_ARB_shading_language_100</li>
<li>GL_ARB_shadow</li>
<li>GL_ARB_sync</li>
<li>GL_ARB_texture_border_clamp</li>
<li>GL_ARB_texture_buffer_object</li>
<li>GL_ARB_texture_compression</li>
<li>GL_ARB_texture_compression_rgtc</li>
<li>GL_ARB_texture_cube_map</li>
<li>GL_ARB_texture_env_add</li>
<li>GL_ARB_texture_env_combine</li>
<li>GL_ARB_texture_env_crossbar</li>
<li>GL_ARB_texture_env_dot3</li>
<li>GL_ARB_texture_float</li>
<li>GL_ARB_texture_mirrored_repeat</li>
<li>GL_ARB_texture_multisample</li>
<li>GL_ARB_texture_non_power_of_two</li>
<li>GL_ARB_texture_rectangle</li>
<li>GL_ARB_texture_rg</li>
<li>GL_ARB_texture_rgb10_a2ui</li>
<li>GL_ARB_texture_swizzle</li>
<li>GL_ARB_timer_query</li>
<li>GL_ARB_transform_feedback2</li>
<li>GL_ARB_transpose_matrix</li>
<li>GL_ARB_uniform_buffer_object</li>
<li>GL_ARB_vertex_array_bgra</li>
<li>GL_ARB_vertex_array_object</li>
<li>GL_ARB_vertex_buffer_object</li>
<li>GL_ARB_vertex_program</li>
<li>GL_ARB_vertex_shader</li>
<li>GL_ARB_vertex_type_2_10_10_10_rev</li>
<li>GL_ARB_viewport_array</li>
<li>GL_ARB_window_pos</li>
<li>GL_ATI_draw_buffers</li>
<li>GL_ATI_texture_float</li>
<li>GL_ATI_texture_mirror_once</li>
<li>GL_S3_s3tc</li>
<li>GL_EXT_texture_env_add</li>
<li>GL_EXT_abgr</li>
<li>GL_EXT_bgra</li>
<li>GL_EXT_bindable_uniform</li>
<li>GL_EXT_blend_color</li>
<li>GL_EXT_blend_equation_separate</li>
<li>GL_EXT_blend_func_separate</li>
<li>GL_EXT_blend_minmax</li>
<li>GL_EXT_blend_subtract</li>
<li>GL_EXT_compiled_vertex_array</li>
<li>GL_EXT_Cg_shader</li>
<li>GL_EXT_depth_bounds_test</li>
<li>GL_EXT_direct_state_access</li>
<li>GL_EXT_draw_buffers2</li>
<li>GL_EXT_draw_instanced</li>
<li>GL_EXT_draw_range_elements</li>
<li>GL_EXT_fog_coord</li>
<li>GL_EXT_framebuffer_blit</li>
<li>GL_EXT_framebuffer_multisample</li>
<li>GL_EXTX_framebuffer_mixed_formats</li>
<li>GL_EXT_framebuffer_object</li>
<li>GL_EXT_framebuffer_sRGB</li>
<li>GL_EXT_geometry_shader4</li>
<li>GL_EXT_gpu_program_parameters</li>
<li>GL_EXT_gpu_shader4</li>
<li>GL_EXT_multi_draw_arrays</li>
<li>GL_EXT_packed_depth_stencil</li>
<li>GL_EXT_packed_float</li>
<li>GL_EXT_packed_pixels</li>
<li>GL_EXT_pixel_buffer_object</li>
<li>GL_EXT_point_parameters</li>
<li>GL_EXT_provoking_vertex</li>
<li>GL_EXT_rescale_normal</li>
<li>GL_EXT_secondary_color</li>
<li>GL_EXT_separate_shader_objects</li>
<li>GL_EXT_separate_specular_color</li>
<li>GL_EXT_shadow_funcs</li>
<li>GL_EXT_stencil_two_side</li>
<li>GL_EXT_stencil_wrap</li>
<li>GL_EXT_texture3D</li>
<li>GL_EXT_texture_array</li>
<li>GL_EXT_texture_buffer_object</li>
<li>GL_EXT_texture_compression_latc</li>
<li>GL_EXT_texture_compression_rgtc</li>
<li>GL_EXT_texture_compression_s3tc</li>
<li>GL_EXT_texture_cube_map</li>
<li>GL_EXT_texture_edge_clamp</li>
<li>GL_EXT_texture_env_combine</li>
<li>GL_EXT_texture_env_dot3</li>
<li>GL_EXT_texture_filter_anisotropic</li>
<li>GL_EXT_texture_integer</li>
<li>GL_EXT_texture_lod</li>
<li>GL_EXT_texture_lod_bias</li>
<li>GL_EXT_texture_mirror_clamp</li>
<li>GL_EXT_texture_object</li>
<li>GL_EXT_texture_shared_exponent</li>
<li>GL_EXT_texture_sRGB</li>
<li>GL_EXT_texture_swizzle</li>
<li>GL_EXT_timer_query</li>
<li>GL_EXT_transform_feedback2</li>
<li>GL_EXT_vertex_array</li>
<li>GL_EXT_vertex_array_bgra</li>
<li>GL_IBM_rasterpos_clip</li>
<li>GL_IBM_texture_mirrored_repeat</li>
<li>GL_KTX_buffer_region</li>
<li>GL_NV_blend_square</li>
<li>GL_NV_conditional_render</li>
<li>GL_NV_copy_depth_to_color</li>
<li>GL_NV_copy_image</li>
<li>GL_NV_depth_buffer_float</li>
<li>GL_NV_depth_clamp</li>
<li>GL_NV_explicit_multisample</li>
<li>GL_NV_fence</li>
<li>GL_NV_float_buffer</li>
<li>GL_NV_fog_distance</li>
<li>GL_NV_fragment_program</li>
<li>GL_NV_fragment_program_option</li>
<li>GL_NV_fragment_program2</li>
<li>GL_NV_framebuffer_multisample_coverage</li>
<li>GL_NV_geometry_shader4</li>
<li>GL_NV_gpu_program4</li>
<li>GL_NV_half_float</li>
<li>GL_NV_light_max_exponent</li>
<li>GL_NV_multisample_coverage</li>
<li>GL_NV_multisample_filter_hint</li>
<li>GL_NV_occlusion_query</li>
<li>GL_NV_packed_depth_stencil</li>
<li>GL_NV_parameter_buffer_object</li>
<li>GL_NV_parameter_buffer_object2</li>
<li>GL_NV_pixel_data_range</li>
<li>GL_NV_point_sprite</li>
<li>GL_NV_primitive_restart</li>
<li>GL_NV_register_combiners</li>
<li>GL_NV_register_combiners2</li>
<li>GL_NV_shader_buffer_load</li>
<li>GL_NV_texgen_reflection</li>
<li>GL_NV_texture_barrier</li>
<li>GL_NV_texture_compression_vtc</li>
<li>GL_NV_texture_env_combine4</li>
<li>GL_NV_texture_expand_normal</li>
<li>GL_NV_texture_multisample</li>
<li>GL_NV_texture_rectangle</li>
<li>GL_NV_texture_shader</li>
<li>GL_NV_texture_shader2</li>
<li>GL_NV_texture_shader3</li>
<li>GL_NV_transform_feedback</li>
<li>GL_NV_transform_feedback2</li>
<li>GL_NV_vertex_array_range</li>
<li>GL_NV_vertex_array_range2</li>
<li>GL_NV_vertex_buffer_unified_memory</li>
<li>GL_NV_vertex_program</li>
<li>GL_NV_vertex_program1_1</li>
<li>GL_NV_vertex_program2</li>
<li>GL_NV_vertex_program2_option</li>
<li>GL_NV_vertex_program3</li>
<li>GL_NVX_conditional_render</li>
<li>GL_NVX_gpu_memory_info</li>
<li>GL_SGIS_generate_mipmap</li>
<li>GL_SGIS_texture_lod</li>
<li>GL_SGIX_depth_texture</li>
<li>GL_SGIX_shadow</li>
<li>GL_SUN_slice_accum</li>
<li>GL_WIN_swap_hint</li>
<li>WGL_EXT_swap_control</li>
<li>WGL_ARB_buffer_region</li>
<li>WGL_ARB_create_context</li>
<li>WGL_ARB_create_context_profile</li>
<li>WGL_ARB_create_context_robustness</li>
<li>WGL_ARB_extensions_string</li>
<li>WGL_ARB_make_current_read</li>
<li>WGL_ARB_multisample</li>
<li>WGL_ARB_pbuffer</li>
<li>WGL_ARB_pixel_format</li>
<li>WGL_ARB_pixel_format_float</li>
<li>WGL_ARB_render_texture</li>
<li>WGL_ATI_pixel_format_float</li>
<li>WGL_EXT_create_context_es2_profile</li>
<li>WGL_EXT_extensions_string</li>
<li>WGL_EXT_framebuffer_sRGB</li>
<li>WGL_EXT_pixel_format_packed_float</li>
<li>WGL_NVX_DX_interop</li>
<li>WGL_NV_float_buffer</li>
<li>WGL_NV_multisample_coverage</li>
<li>WGL_NV_render_depth_texture</li>
<li>WGL_NV_render_texture_rectangle</li>


===================================[ NVIDIA CUDA Capabilities ]
- CUDA Device 0
- Device name: GeForce GTX 260
- Compute Capability: 1.3
- Total Memory: 877 MB
- Shader Clock Rate: 1242 MHz
- Multiprocessors: 24
- Warp Size: 32
- Max Threads Per Block: 512
- Threads Per Block: 512 x 512 x 64
- Grid Size: 65535 x 65535 x 1
- Registers Per Block: 16384
- Texture Alignment: 256 byte
- Total Constant Memory: 64 Kb


===================================[ OpenCL Capabilities ]
- Num OpenCL platforms: 1
- Name: NVIDIA CUDA
- Version: OpenCL 1.0 CUDA 3.2.1
- Profile: FULL_PROFILE
- Vendor: NVIDIA Corporation
- Num devices: 1

- CL_DEVICE_NAME: GeForce GTX 260
- CL_DEVICE_VENDOR: NVIDIA Corporation
- CL_DRIVER_VERSION: 260.99
- CL_DEVICE_PROFILE: FULL_PROFILE
- CL_DEVICE_VERSION: OpenCL 1.0 CUDA
- CL_DEVICE_TYPE: GPU
- CL_DEVICE_VENDOR_ID: 0x10DE
- CL_DEVICE_MAX_COMPUTE_UNITS: 24
- CL_DEVICE_MAX_CLOCK_FREQUENCY: 1242MHz
- CL_NV_DEVICE_COMPUTE_CAPABILITY_MAJOR: 1
- CL_NV_DEVICE_COMPUTE_CAPABILITY_MINOR: 3
- CL_NV_DEVICE_REGISTERS_PER_BLOCK: 16384
- CL_NV_DEVICE_WARP_SIZE: 32
- CL_NV_DEVICE_GPU_OVERLAP: 1
- CL_NV_DEVICE_KERNEL_EXEC_TIMEOUT: 1
- CL_NV_DEVICE_INTEGRATED_MEMORY: 0
- CL_DEVICE_ADDRESS_BITS: 32
- CL_DEVICE_MAX_MEM_ALLOC_SIZE: 224608KB
- CL_DEVICE_GLOBAL_MEM_SIZE: 877MB
- CL_DEVICE_MAX_PARAMETER_SIZE: 4352
- CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 0 Bytes
- CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 0KB
- CL_DEVICE_ERROR_CORRECTION_SUPPORT: NO
- CL_DEVICE_LOCAL_MEM_TYPE: Local (scratchpad)
- CL_DEVICE_LOCAL_MEM_SIZE: 16KB
- CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 64KB
- CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3
- CL_DEVICE_MAX_WORK_ITEM_SIZES: [512 ; 512 ; 64]
- CL_DEVICE_MAX_WORK_GROUP_SIZE: 512
- CL_EXEC_NATIVE_KERNEL: 4751356
- CL_DEVICE_IMAGE_SUPPORT: YES
- CL_DEVICE_MAX_READ_IMAGE_ARGS: 128
- CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 8
- CL_DEVICE_IMAGE2D_MAX_WIDTH: 4096
- CL_DEVICE_IMAGE2D_MAX_HEIGHT: 32768
- CL_DEVICE_IMAGE3D_MAX_WIDTH: 2048
- CL_DEVICE_IMAGE3D_MAX_HEIGHT: 2048
- CL_DEVICE_IMAGE3D_MAX_DEPTH: 16
- CL_DEVICE_MAX_SAMPLERS: 16
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 1
- CL_DEVICE_EXTENSIONS: 16
- Extensions:
- cl_khr_byte_addressable_store
- cl_khr_icd
- cl_khr_gl_sharing
- cl_nv_d3d9_sharing
- cl_nv_d3d10_sharing
- cl_khr_d3d10_sharing
- cl_nv_d3d11_sharing
- cl_nv_compiler_options
- cl_nv_device_attribute_query
- cl_nv_pragma_unroll
-
- cl_khr_global_int32_base_atomics
- cl_khr_global_int32_extended_atomics
- cl_khr_local_int32_base_atomics
- cl_khr_local_int32_extended_atomics
- cl_khr_fp64


===================================[ Misc. ]


===================================[ Related Graphics Drivers ]
- http://www.geeks3d.com/?page_id=752
- http://downloads.guru3d.com/download.php?id=10
- http://www.tweakguides.com/NVFORCE_1.html
- http://www.nvidia.com/object/winxp-2k_archive.html
- http://www.geeks3d.com/?p=65


===================================[ Related Graphics Cards Reviews ]
- http://www.geeks3d.com/?tag=geforce-gtx-260
- http://www.google.us/search?q=NVIDIA+GeForce+GTX+260+review

Malcolm
12th January 2011, 21:58
I have uploaded version 0.2.1. I hope, now the selection of CPU devices will also work if and AMD Radeon is installed. See my first post for the download link

GoodzMastaJ
13th January 2011, 01:54
Version 0.2.1 on i7 860 and Radeon HD 4870. When I load my avs script, I see a couple dos windows flash by quickly but I get this error from Avisynth (http://stuff.damagedgoodz.net/forumposts/nlcl-buffertrue-cputrue.png) when using cpu=true and buffer=true. I seem to be getting a little bit closer to actually seeing what this filter does :)

Debug log:
NLMeansCL Version 0.2.1
ScriptEnvironment present.
Number of OpenCL Compute Platforms = 1.
Trying OpenCL Compute Platform
Advanced Micro Devices, Inc..
OpenCL 1.1 ATI-Stream-v2.3 (451).
OpenCL Compute Context successfully created.
Number of OpenCL Devices in Platform = 2.
Trying OpenCL Device
ATI RV770.
Device available.
Trying OpenCL Device
Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz.
Device available.
Device Type Cpu.
Device does not support images.
Using Device Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz.
OpenCL Command Queue successfully created.
OpenCL Program successfully built.
Prog Y Build log: .
Prog UV Build log: .

Malcolm
13th January 2011, 11:10
Version 0.2.1 on i7 860 and Radeon HD 4870. When I load my avs script, I see a couple dos windows flash by quickly but I get this error from Avisynth (http://stuff.damagedgoodz.net/forumposts/nlcl-buffertrue-cputrue.png) when using cpu=true and buffer=true.Hi!
the flashing of the dos windows is normal. It is caused by the AMD OpenCL driver. I will look into the remaining erro that prevents execution. I assume this is only a minor problem.

Malcolm
13th January 2011, 23:36
I have uploaded version 0.2.2. I really hope this is it now!

Hiritsuki
14th January 2011, 06:38
I want to know what "Parameter buffer", is this effect when Parameter cpu is true?
and using DDR RAM not GDDR RAM?

tormento
14th January 2011, 08:10
Do you have a timeframe for the temporal part? =)

Malcolm
14th January 2011, 15:58
I want to know what "Parameter buffer", is this effect when Parameter cpu is true?Think of it like this:
When using OpenCL image objects, the video frames are stored as textures on the gfx cards main memory. GPUs have very fast texture caches. Therefore, reading and writing from/to images is fast.
When using OpenCL buffers, the video frames are placed as 'arrays' into the main memory of the gfx card. Access is not cached. Therefore the performace is very low in comparison! (*)
When you are using a CPU as OpenCL device, this difference doesn't matter, since there are no 'texture caches' in CPUs. (memory is cached anyway)
AMD has not implemented image support in its CPU OpenCL driver yet (but it's planned!). There is no performance drawback per se as explained above. But the pity is, that you cannot execute OpenCL kernels that uses images...
AMDs RV7xxx cards don't have image support either, although they are GPUs and have texture caches for sure! It's just that the image capabilities of these GPUs is not compliant to the OpenCL spec. Therefore -> no support.

* You can get around this limitation and be faster than using images. It's just that you have to hand-tune to the exact hardware you are using and it also depends on the dimensions of the processed data. Both things are not known beforehand for avisynth filters typically (the used hardware (gfx card) and the data dimensions (video sizes)). Therefore i have implemented it only for my gfx card with hand-tuned values for 720x576 video. It's faster than using images. But it doesn't make sens to release it.

Malcolm
14th January 2011, 20:09
I have uploaded version 0.3. See first post.

Changes
Added mode for sum of absolute differences when computing neighborhood similarity (Parameter sse)
Performance improvements in cases where not all planes are processed (plane != 4)

Hiritsuki
15th January 2011, 09:51
Why do I setting avs in NLMeansCL(buffer=true) and it's seem...

http://imagewtf.com/11941.png/images/11941.png

Hiritsuki
15th January 2011, 09:57
and 0.3 All Default () is...

http://imagewtf.com/11942.png/images/11942.png

Malcolm
15th January 2011, 13:10
Why do I setting avs in NLMeansCL(buffer=true) and it's seem...

http://imagewtf.com/11941.png/images/11941.pngTry the different values for parameter smf (nan, ahp, uhp, ...). This might solve it.
Otherwise: Please send me the XML report of GPU Caps Viewer as well as the logfile of NLMeansCL.

Archimedes
15th January 2011, 17:49
Version 0.2.2 works fine with NLMeansCL(cpu=true, buffer=true), but with Version 0.3 an error occurred.

Here is the log file:

NLMeansCL Version 0.3
ScriptEnvironment present.
Number of OpenCL Compute Platforms = 1.
Trying OpenCL Compute Platform
Advanced Micro Devices, Inc..
OpenCL 1.1 ATI-Stream-v2.3 (451).
Number of OpenCL Devices in Platform = 1.
Trying OpenCL Device Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz.
Device available.
Device Type Cpu.
Device does not support images.
Using Device Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz.
OpenCL Compute Context successfully created.
OpenCL Command Queue successfully created.
OpenCL Program successfully built.
Prog Y Build log:
Prog UV Build log:
OpenCL error code detected: InvalidKernelName.

Malcolm
15th January 2011, 22:59
I have uploaded version 0.3.1.
This should solve Archimedes and Hiritsukis problems.

Working on a theoretical basis without all the platforms for testing is really a minefield! So sorry, if it takes several iterations until it runs without hiccups!

To the change of the memory allocation strategy. The different possible OpenCL memory allocation strategies are really badly documented in the OpenCL spec. There are various discussions in OpenCL forums around it. It seems no one except NVidias and AMDs core developers knows what's really going on under the hood and how they are supposed to be used...

Hiritsuki
16th January 2011, 01:25
ok, this is my GPU's OpenCL XML
http://www.mediafire.com/?y04xn3m1qxfby2v

Hiritsuki
16th January 2011, 02:51
I just found when buffer is True, I should set NLMeansCL(smf="ahp",buffer=true) to run.
btw, using buffer is slower than all default setting.
buffer=true GPU 2~8%
buffer=false GPU 23~27%

Dogway
16th January 2011, 06:14
@Malcolm: Just wanted to say thanks again for this great filter. I saw az implementation on the todo list so besides that, and although Im going to stick to b=0 you might want to see the aliasing issues when b>0.

http://img130.imageshack.us/img130/4021/18701094.png
http://img140.imageshack.us/img140/7246/56416655.png

Hiritsuki
16th January 2011, 09:06
I just test 0.31 to compare with 0.22 speed.
0.22 is fatser than 0.31
5.5fps:5.0fps

And 0.31 GPU using is lower than 1% ... this is cannot to use GPU?

TheProfileth
16th January 2011, 23:21
An interesting filter, can get good results without killing details if you set the h and hc below 1 , I suggest using something like nlmeanscl(plane=4,b=0,h=0.5,hc=0.6)
Edit:
I forgot to mention I was having problems where I got this error message
http://img510.imageshack.us/img510/8287/afag.png
But then I updated my graphics card driver to the new beta (I had the most recent stable version before) and now it works fine
http://www.nvidia.com/object/win7-winvista-32bit-266.35-beta-driver.html

tormento
17th January 2011, 19:22
I think the TODO should contain PRESET modes ;) a-la MCTD

Dogway
17th January 2011, 22:40
I think the TODO should contain PRESET modes ;) a-la MCTD

I think it's easy enough, you'd mostly use only A and H parameters

Malcolm
18th January 2011, 23:21
I just found when buffer is True, I should set NLMeansCL(smf="ahp",buffer=true) to run.
btw, using buffer is slower than all default setting.
buffer=true GPU 2~8%
buffer=false GPU 23~27%
I just found when buffer is True, I should set NLMeansCL(smf="ahp",buffer=true) to run.
Yes, smf=ahp is now the default from version 0.3.1 on.

btw, using buffer is slower than all default setting.
Let me cite myself: When using OpenCL buffers... Access is not cached. Therefore the performace is very low in comparison!
To the 2~8% resp. 23~27% GPU utilization:
i don't know where you got your numbers from, but let's assume that they are right (i can imagine that they ARE right indeed). What does this mean? Is 27% bad? Sure 100% would be better. Are 100% realistically achievable? I don't think so.
Massively parallel computing is really about keeping your computing cores busy. Now for GPU processing (the following is a strong simplification, but it's true at the core): Let's say that you have a given algorithm where you read in 9 Pixel values (one center value and 8 surrounding values) and do a number of 40 arithmetic operations (5 for each surrounding pixel) before you can write back one resulting pixel value to your destination.
Let's also assume that reading or writing a pixel value from memory (uncached!) takes 400 cycles where doing an arithmetic calculation takes only 4 cycles.
For the calculation of one resulting destination pixel, your GPU is waiting 9x400 cycles (= 3600 cycles) while reading from / writing to the memory. In this time your GPU can do 900 arithmetic calculations (3600 / 4), but it only has to do 40 calculations. For the rest of the time it's simply waiting for the data from the memory to arrive. Therefore the utilization is at ~ 4.4%
Now what do you do to increase utilization?

Take a look at these slides from Nvidia
http://img140.imageshack.us/img140/1130/gpu1.th.jpg (http://img140.imageshack.us/i/gpu1.jpg/) http://img153.imageshack.us/img153/1764/gpu2j.th.jpg (http://img153.imageshack.us/i/gpu2j.jpg/)

Now for the 2~8% utilization. Yes i know, using uncached buffers directly for calculations on the GPU is a bad idea. I already wrotethat it would be terribly slow in comparison. But for execution on CPUs it really doesn't matter at all. Therefore buffer=true is useful only in conjunction with cpu=true.

Hiritsuki
20th January 2011, 15:37
ah...but I say faster is just compare with 2.2 and 3.1.

and the gpu using is from AIDA64 Extreme's show

SilaSurfer
26th January 2011, 22:20
~Malcolm~

Wow a cousin of TnlMeans just faster. Is this filter ready for general use?

TheProfileth
26th January 2011, 23:54
~Malcolm~

Wow a cousin of TnlMeans just faster. Is this filter ready for general use?

Definitely great results too when you lower the h and hc

SilaSurfer
27th January 2011, 20:08
I wonder if my Geforce 9500gt is fast enough?

tormento
29th January 2011, 08:46
Any news about temporal part?

Joachim Buambeki
4th February 2011, 20:51
Hi,

great port to OpenCL, thanks for that. The speed-up is incredible.

Are there any restrictions regarding the image size?
Is it possible to process a 40mpix image with a card like the GTS 450 1024mb?

What about recommended settings at such a resolution? With TNLmeans I used these settings for a 16mpix image and liked the results very much (based on the examples in the 3rd page of the TNLmeans thread):
tnlmeans(h=1.7,ax=10,ay=10,bx=0,by=0,sx=3,sy=3,a=1.3)
Are there recommendations for the settings that are based on the fact that the image has much more details than a simple full HD or even SD image?
Though processing time is not really an issue for me, I obviously don't want to unnecessarily waste processing time.

What about YV24 support in the future?

I would also appreciate a temporal mode. :)

Best Regards
David

Malcolm
5th February 2011, 12:19
Are there any restrictions regarding the image size?Yes, your graphics card has a limitation for the dimensions of images/textures you can process. For my 9600 GT its 4096 x 32768 pixels. But you can always help yourself out by doing for example 4 crops to divide the video in 4 parts, call NLMeansCL 4 times and 'stack' the results together again. If you choose an overlap when cropping that is bigger than A+B there should be no visible difference compared to processing the video in one part.Is it possible to process a 40mpix image with a card like the GTS 450 1024mb?With the above mentioned workaround, yes. It could happen - depending of how big you choose parameters A & B and how big your video dimensions are, that the processing of one frame takes longer that 2 or 3 seconds. MS Windows will then kill & restart your graphics card driver bacause it assumes that it has crashed. You can change the timeout as well as the general behaviour of windows by changing some registry entries. Google will help you to find the proper way to do this.What about YV24 support in the future?Should be pretty easy to add.I would also appreciate a temporal mode. :)I have implemented a version with temporal support that is able to handle an arbitrary number of frames. So you can pass in parameter Az=[any number].
But this version is still buggy (some image artifacts & results slightly different from TNLMeans). So i will not release it until this has been fixed.

Besides of that: You should not expect too much from the temporal mode. In theory - when you look at the way the non-local means algorithm works - it should make no / little difference from where the color values are aquired. Either from frames before / after the current or from a bigger radius (parameter A) around the current pixel inside the current frame. That is because the algorithm works non-locally! The algorithm really works in a different way than most of the other temporal-enabled noise filters!

But i guess you guys won't be satisfied until you get your temporal mode... ;)

TheProfileth
6th February 2011, 00:11
personally I think you should stay away from the temporal mode since most temporal filtering is a waste of time, I would focus more on improving things and maybe adding other parts or something. great job btw
also just a dream
If you were able to make a version of tbilateral run on the gpu I would be insanely happy :3

markanini
6th February 2011, 02:30
I think such a plugin exists in the form of a virtualdub plugin by a russian company. FWIW

Dogway
6th February 2011, 07:07
Is temporal an intrinsic feature of nlmeans algorithm, or just an addon feature tritical made on his filter?

tritical
6th February 2011, 08:21
Is temporal an intrinsic feature of nlmeans algorithm, or just an addon feature tritical made on his filter?
I was going to write a long reply relating bilateral filtering/nl-means, but I'm too tired :). Really there is no reason to limit nl-means to the current image when processing video - aside from limiting the search area to make the algorithm faster. If you look at the papers I have on my website under tnlmeans you will see that the original nl-means creator is actually the one who proposed extending it to 3d when processing video.

The extension itself makes perfect sense... in nl-means all you are doing is searching for pixels that are similar to the current pixel, where similarity is defined by the gaussian-weighted sum of squared differences between the neighborhoods of the pixels in question. It is this definition of similarity that makes nl-means unique (and also slow) - as opposed to say bilateral filtering that looks only at individual pixel differences, and therefore has to add in distance weighting to overcome the weaknesses of a much laxer definition of similarity. The more high similarity pixels you find the better the result. I think it is easy to see how expanding the search to surrounding frames can be of great benefit, especially in static scenes - or motion scenes if you perform motion compensation, for detailed parts of the image which you do not expect to be duplicated within a single frame. In fact, if you expand the spatial search area to the entire frame - while adding the temporal search, then there is no need to perform motion compensation, but it would be unusably slow. For flat/low detail areas or often repeated structures, expanding the search to surrounding frames is probably useless. It would of course depend on the exact properties of the noise.

Malcolm
6th February 2011, 22:54
The extension itself makes perfect sense...Hi tritical,
you are right in what you say about the algorithm.
When i wrote about the limited use of the temporal mode, i only mentioned some of the theoretical aspects. I also had something from the practical side in mind too but actually missed to mention that. So i wasn't very precise. One thing is the additional computation time. My implementation is less efficient in the temporal mode than in purely spatial mode. So you have to balance what you gain when using temporal mode instead of a bigger radius for A/S.
Also, as i said, the NLMeans algorithm is different from most other temporal noise algorithms since i doesn't do a temporal averaging in a way that one is used from the 'other' filters. That means clips with flickering and 'nervous' pixels will be less calmed than you might expect.
In that sense i think i am right when i say that one should not expect 'too much' from the temporal mode. You could also say: The spatial mode already does a great job and there will be no fundamental difference in the result of the temporal mode.

bus_labi
7th February 2011, 21:36
Version .2 and 0.31 on PhenomII X6 1055 with Radeon HD 5770

Updated latest Catalyst drivers, OpenCL. All GPU Caps Demos run successfully
OpenCL 1.1 ATI-Stream-v2.3 (451) Driver CAL 1.4.900

Debug file contains only one line "NLMeansCL Version 0.3.1"

Experimented with cpu, buffer and smf - all with same error (achp throw a different error)

:confused:

GPU Caps XML
===================================================
GPU Caps Viewer v1.9.6
http://www.ozone3d.net/gpu_caps_viewer/
===================================================


===================================[ System / CPU ]
- CPU Name: AMD Phenom(tm) II X6 1055T Processor
- CPU Core Speed: 2812 MHz
- CPU Num Cores: 6
- Family: 15 - Model: 10 - Stepping: 0
- Physical Memory Size: 4094 MB
- Operating System: Windows 7 64-bit build 7600 [No Service Pack]
- DirectX Version: 10.0
- PhysX Version: drivers not installed


===================================[ Graphics Adapter / GPU ]
- CrossFire: disabled
- GPUs: 1
- Physical adapters: 1
- OpenGL Renderer: ATI Radeon HD 5700 Series
- Drivers Renderer: ATI Radeon HD 5700 Series
- DB Renderer: ATI Radeon HD 5770
- Device Description: ATI Radeon HD 5700 Series
- Adapter String: ATI Radeon HD 5700 Series
- Vendor: ATI Technologies Inc.
- Vendor ID: 0x1002
- Device ID: 0x68B8
- Sub device ID: 0xE147
- Sub vendor ID: 0x1002
- Perf Level 0 - GPU: 157 MHz
- Perf Level 0 - Memory: 300 MHz
- Perf Level 1 - GPU: 600 MHz
- Perf Level 1 - Memory: 1200 MHz
- Perf Level 2 - GPU: 850 MHz
- Perf Level 2 - Memory: 1200 MHz
- Drivers Version: 8.812.0.0 - Catalyst 10.12 (1-4-2011) - atig6pxx.dll
- ATI Catalyst Version String: 10.12
- ATI Catalyst Release Version String: 8.812-110104a-111988C-ATI
- GPU Codename: Juniper
- GPU Unified Shader Processors: 800
- GPU Vertex Shader Processors: 0
- GPU Pixel Shader Processors: 0
- TPD (Watts): 108
- Video Memory Size: 1024 MB
- Video Memory Type: unknown
- Clocks: Level 157 - GPU: 300MHz - Memory: 1630692MHz
- Clocks: Level 600 - GPU: 1200MHz - Memory: 1630692MHz
- Clocks: Level 850 - GPU: 1200MHz - Memory: 1630692MHz
- BIOS String: 113-E14701-X05
- Current Display Mode: 1920x1200 @ 60 Hz - 32 bpp


===================================[ OpenCL Capabilities ]
- Num OpenCL platforms: 1
- Name: ATI Stream
- Version: OpenCL 1.1 ATI-Stream-v2.3 (451)
- Profile: FULL_PROFILE
- Vendor: Advanced Micro Devices, Inc.
- Num devices: 2

- CL_DEVICE_NAME: Juniper
- CL_DEVICE_VENDOR: Advanced Micro Devices, Inc.
- CL_DRIVER_VERSION: CAL 1.4.900
- CL_DEVICE_PROFILE: FULL_PROFILE
- CL_DEVICE_VERSION: OpenCL 1.1 ATI-Stream-v2.3 (451)
- CL_DEVICE_TYPE: GPU
- CL_DEVICE_VENDOR_ID: 0x1002
- CL_DEVICE_MAX_COMPUTE_UNITS: 10
- CL_DEVICE_MAX_CLOCK_FREQUENCY: 850MHz
- CL_DEVICE_ADDRESS_BITS: 32
- CL_DEVICE_MAX_MEM_ALLOC_SIZE: 131072KB
- CL_DEVICE_GLOBAL_MEM_SIZE: 512MB
- CL_DEVICE_MAX_PARAMETER_SIZE: 1024
- CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 0 Bytes
- CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 0KB
- CL_DEVICE_ERROR_CORRECTION_SUPPORT: NO
- CL_DEVICE_LOCAL_MEM_TYPE: Local (scratchpad)
- CL_DEVICE_LOCAL_MEM_SIZE: 32KB
- CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 64KB
- CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3
- CL_DEVICE_MAX_WORK_ITEM_SIZES: [256 ; 256 ; 256]
- CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
- CL_EXEC_NATIVE_KERNEL: 4755436
- CL_DEVICE_IMAGE_SUPPORT: YES
- CL_DEVICE_MAX_READ_IMAGE_ARGS: 128
- CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 8
- CL_DEVICE_IMAGE2D_MAX_WIDTH: 8192
- CL_DEVICE_IMAGE2D_MAX_HEIGHT: 8192
- CL_DEVICE_IMAGE3D_MAX_WIDTH: 2048
- CL_DEVICE_IMAGE3D_MAX_HEIGHT: 2048
- CL_DEVICE_IMAGE3D_MAX_DEPTH: 16
- CL_DEVICE_MAX_SAMPLERS: 16
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR: 16
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT: 8
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 4
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 2
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 4
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 0
- CL_DEVICE_EXTENSIONS: 12
- Extensions:
- cl_khr_global_int32_base_atomics
- cl_khr_global_int32_extended_atomics
- cl_khr_local_int32_base_atomics
- cl_khr_local_int32_extended_atomics
- cl_khr_3d_image_writes
- cl_khr_byte_addressable_store
- cl_khr_gl_sharing
- cl_amd_device_attribute_query
- cl_amd_printf
- cl_amd_media_ops
- cl_amd_popcnt
- cl_khr_d3d10_sharing

- CL_DEVICE_NAME: AMD Phenom(tm) II X6 1055T Processor
- CL_DEVICE_VENDOR: AuthenticAMD
- CL_DRIVER_VERSION: 2.0
- CL_DEVICE_PROFILE: FULL_PROFILE
- CL_DEVICE_VERSION: OpenCL 1.1 ATI-Stream-v2.3 (451)
- CL_DEVICE_TYPE: CPU
- CL_DEVICE_VENDOR_ID: 0x1002
- CL_DEVICE_MAX_COMPUTE_UNITS: 6
- CL_DEVICE_MAX_CLOCK_FREQUENCY: 2812MHz
- CL_DEVICE_ADDRESS_BITS: 32
- CL_DEVICE_MAX_MEM_ALLOC_SIZE: 524288KB
- CL_DEVICE_GLOBAL_MEM_SIZE: 1024MB
- CL_DEVICE_MAX_PARAMETER_SIZE: 4096
- CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 64 Bytes
- CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 64KB
- CL_DEVICE_ERROR_CORRECTION_SUPPORT: NO
- CL_DEVICE_LOCAL_MEM_TYPE: Global
- CL_DEVICE_LOCAL_MEM_SIZE: 32KB
- CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 64KB
- CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3
- CL_DEVICE_MAX_WORK_ITEM_SIZES: [1024 ; 1024 ; 1024]
- CL_DEVICE_MAX_WORK_GROUP_SIZE: 1024
- CL_EXEC_NATIVE_KERNEL: 4755440
- CL_DEVICE_IMAGE_SUPPORT: NO
- CL_DEVICE_MAX_READ_IMAGE_ARGS: 0
- CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 0
- CL_DEVICE_IMAGE2D_MAX_WIDTH: 0
- CL_DEVICE_IMAGE2D_MAX_HEIGHT: 0
- CL_DEVICE_IMAGE3D_MAX_WIDTH: 0
- CL_DEVICE_IMAGE3D_MAX_HEIGHT: 0
- CL_DEVICE_IMAGE3D_MAX_DEPTH: 0
- CL_DEVICE_MAX_SAMPLERS: 0
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR: 16
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT: 8
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 4
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 2
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 4
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 0
- CL_DEVICE_EXTENSIONS: 13
- Extensions:
- cl_amd_fp64
- cl_khr_global_int32_base_atomics
- cl_khr_global_int32_extended_atomics
- cl_khr_local_int32_base_atomics
- cl_khr_local_int32_extended_atomics
- cl_khr_byte_addressable_store
- cl_khr_gl_sharing
- cl_ext_device_fission
- cl_amd_device_attribute_query
- cl_amd_media_ops
- cl_amd_popcnt
- cl_amd_printf
- cl_khr_d3d10_sharing

Malcolm
9th February 2011, 16:47
It seems none of the moderstors wants to approve your attached image...

bus_labi
9th February 2011, 19:52
:) approved :)

kypec
10th February 2011, 10:13
:) approved :)
Yeah, but you should crop only the important part of the image next time before posting. Otherwise it looks awfully and screws whole forum layout.:mad:

bus_labi
10th February 2011, 10:49
Yeah, but you should crop only the important part of the image next time before posting. Otherwise it looks awfully and screws whole forum layout.:mad:

Yeah, my fault. Did not realise i had posted whole screen.
Fixed now.

markanini
28th February 2011, 00:26
Ok, let me explain: Under 'normal' circumstances, windows recovers your graphics card driver because it crashed. However, windows also does this, if your driver doesn't respond within 2 seconds. (You can change the time, as well as the general behaviour of windows by editing the registry).
That means: If you have a very complex OpenCL kernel, that computes for more than 2 seconds on one video frame, then windows will kill and restart your driver!
Since you have a GTX 570 i would assume that it's fast enough. So this shouldn't happen unless you use parameters like A=8, S=6 or so. But since i haven't tested the filter on that GPU i can only guess!

Can you tell me more about the registry hack? Is it a viable solution for use of extreme settings (A=20, S=6 on large stills)or is a hardware upgrade ultimately necessary? I'm using a Geforce 9800GT.

markanini
1st March 2011, 02:19
Found my answer here:
http://www.blog-gpgpu.com/index.php?post/2010/07/22/Windows-Vista-7-%3A-How-to-disable-the-Timeout-Detection-and-Recovery-of-GPUs-through-WDDM

Finally I can use insane A and S parameters :D

Stereodude
5th March 2011, 00:59
Which AvsFilterNet and Cloo version does this need? I can't get it to work on my system.

http://img848.imageshack.us/img848/5203/nlmeansclerror.th.png (http://img848.imageshack.us/img848/5203/nlmeansclerror.png)

Edit: It needs Cloo .8.2 The .9.2 alpha doesn't work.

===================================[ System / CPU ]
- CPU Name: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
- CPU Core Speed: 3401 MHz
- CPU Num Cores: 8
- Family: 6 - Model: 10 - Stepping: 7
- Physical Memory Size: 3319 MB
- Operating System: Windows XP 32-bit build 2600 [Service Pack 3]
- DirectX Version: 9.0c
- PhysX Version: 9100514


===================================[ Graphics Adapter / GPU ]
- SLI: disabled
- GPUs: 1
- Logical GPUs: 1
- OpenGL Renderer: GeForce GT 440/PCI/SSE2
- Drivers Renderer: NVIDIA GeForce GT 440
- DB Renderer: NVIDIA GeForce GT 440
- Device Description: NVIDIA GeForce GT 440
- Adapter String: GeForce GT 440
- Vendor: NVIDIA Corporation
- Vendor ID: 0x10DE
- Device ID: 0x0DE0
- Sub device ID: 0x4188
- Sub vendor ID: 0x19DA
- Drivers Version: Forceware 6.14.12.6658 (1-7-2011)
- GPU Codename: GF108
- GPU Unified Shader Processors: 96
- GPU Vertex Shader Processors: 0
- GPU Pixel Shader Processors: 0
- TPD (Watts): 65
- Video Memory Size: 1024 MB
- Video Memory Type: GDDR5
- Clocks level #0: Core: 405MHz - Memory: 324MHz - Shader: 810MHz
- Clocks level #1: Core: 405MHz - Memory: 324MHz - Shader: 810MHz
- Clocks level #2: Core: 810MHz - Memory: 1600MHz - Shader: 1620MHz
- BIOS String: 70.08.45.00.01
- Current Display Mode: 1600x1200 @ 60 Hz - 32 bpp


===================================[ OpenGL GPU Capabilities ]
- OpenGL Version: 4.1.0
- GLSL (OpenGL Shading Language) Version: 4.10 NVIDIA via Cg compiler
- ARB Texture Units: 4
- Vertex Shader Texture Units: 32
- Pixel Shader Texture Units: 32
- Geometry Shader Texture Units: 32
- Max Texture Size: 16384x16384
- Max Anisotropic Filtering Value: X16.0
- Max Point Sprite Size: 63.4
- Max Dynamic Lights: 8
- Max Viewport Size: 16384x16384
- Max Vertex Uniform Components: 4096
- Max Fragment Uniform Components: 2048
- Max Geometry Uniform Components: 2048
- Max Varying Float: 60
- Max Vertex Bindable Uniforms: 12
- Max Fragment Bindable Uniforms: 12
- Max Geometry Bindable Uniforms: 12
- Frame Buffer Objects (FBO) Support:[yes]
- Multiple Render Targets / Max draw buffers: 8
- Pixel Buffer Objects (PBO) Support:[yes]
- S3TC Texture Compression Support:[yes]
- ATI 3Dc Texture Compression Support:[no]
- Texture Rectangle Support:[yes]
- Floating Point Textures Support:[yes]
- MSAA: 2X
- MSAA: 4X
- MSAA: 8X
- MSAA: 16X
- MSAA: 32X
- OpenGL Extensions: 245 extensions (GL=222 and WGL=23)
<li>GL_ARB_blend_func_extended</li>
<li>GL_ARB_color_buffer_float</li>
<li>GL_ARB_compatibility</li>
<li>GL_ARB_copy_buffer</li>
<li>GL_ARB_debug_output</li>
<li>GL_ARB_depth_buffer_float</li>
<li>GL_ARB_depth_clamp</li>
<li>GL_ARB_depth_texture</li>
<li>GL_ARB_draw_buffers</li>
<li>GL_ARB_draw_buffers_blend</li>
<li>GL_ARB_draw_indirect</li>
<li>GL_ARB_draw_elements_base_vertex</li>
<li>GL_ARB_draw_instanced</li>
<li>GL_ARB_ES2_compatibility</li>
<li>GL_ARB_explicit_attrib_location</li>
<li>GL_ARB_fragment_coord_conventions</li>
<li>GL_ARB_fragment_program</li>
<li>GL_ARB_fragment_program_shadow</li>
<li>GL_ARB_fragment_shader</li>
<li>GL_ARB_framebuffer_object</li>
<li>GL_ARB_framebuffer_sRGB</li>
<li>GL_ARB_geometry_shader4</li>
<li>GL_ARB_get_program_binary</li>
<li>GL_ARB_gpu_shader5</li>
<li>GL_ARB_gpu_shader_fp64</li>
<li>GL_ARB_half_float_pixel</li>
<li>GL_ARB_half_float_vertex</li>
<li>GL_ARB_imaging</li>
<li>GL_ARB_instanced_arrays</li>
<li>GL_ARB_map_buffer_range</li>
<li>GL_ARB_multisample</li>
<li>GL_ARB_multitexture</li>
<li>GL_ARB_occlusion_query</li>
<li>GL_ARB_occlusion_query2</li>
<li>GL_ARB_pixel_buffer_object</li>
<li>GL_ARB_point_parameters</li>
<li>GL_ARB_point_sprite</li>
<li>GL_ARB_provoking_vertex</li>
<li>GL_ARB_robustness</li>
<li>GL_ARB_sample_shading</li>
<li>GL_ARB_sampler_objects</li>
<li>GL_ARB_seamless_cube_map</li>
<li>GL_ARB_separate_shader_objects</li>
<li>GL_ARB_shader_bit_encoding</li>
<li>GL_ARB_shader_objects</li>
<li>GL_ARB_shader_precision</li>
<li>GL_ARB_shader_subroutine</li>
<li>GL_ARB_shading_language_100</li>
<li>GL_ARB_shading_language_include</li>
<li>GL_ARB_shadow</li>
<li>GL_ARB_sync</li>
<li>GL_ARB_tessellation_shader</li>
<li>GL_ARB_texture_border_clamp</li>
<li>GL_ARB_texture_buffer_object</li>
<li>GL_ARB_texture_buffer_object_rgb32</li>
<li>GL_ARB_texture_compression</li>
<li>GL_ARB_texture_compression_bptc</li>
<li>GL_ARB_texture_compression_rgtc</li>
<li>GL_ARB_texture_cube_map</li>
<li>GL_ARB_texture_cube_map_array</li>
<li>GL_ARB_texture_env_add</li>
<li>GL_ARB_texture_env_combine</li>
<li>GL_ARB_texture_env_crossbar</li>
<li>GL_ARB_texture_env_dot3</li>
<li>GL_ARB_texture_float</li>
<li>GL_ARB_texture_gather</li>
<li>GL_ARB_texture_mirrored_repeat</li>
<li>GL_ARB_texture_multisample</li>
<li>GL_ARB_texture_non_power_of_two</li>
<li>GL_ARB_texture_query_lod</li>
<li>GL_ARB_texture_rectangle</li>
<li>GL_ARB_texture_rg</li>
<li>GL_ARB_texture_rgb10_a2ui</li>
<li>GL_ARB_texture_swizzle</li>
<li>GL_ARB_timer_query</li>
<li>GL_ARB_transform_feedback2</li>
<li>GL_ARB_transform_feedback3</li>
<li>GL_ARB_transpose_matrix</li>
<li>GL_ARB_uniform_buffer_object</li>
<li>GL_ARB_vertex_array_bgra</li>
<li>GL_ARB_vertex_array_object</li>
<li>GL_ARB_vertex_attrib_64bit</li>
<li>GL_ARB_vertex_buffer_object</li>
<li>GL_ARB_vertex_program</li>
<li>GL_ARB_vertex_shader</li>
<li>GL_ARB_vertex_type_2_10_10_10_rev</li>
<li>GL_ARB_viewport_array</li>
<li>GL_ARB_window_pos</li>
<li>GL_ATI_draw_buffers</li>
<li>GL_ATI_texture_float</li>
<li>GL_ATI_texture_mirror_once</li>
<li>GL_S3_s3tc</li>
<li>GL_EXT_texture_env_add</li>
<li>GL_EXT_abgr</li>
<li>GL_EXT_bgra</li>
<li>GL_EXT_bindable_uniform</li>
<li>GL_EXT_blend_color</li>
<li>GL_EXT_blend_equation_separate</li>
<li>GL_EXT_blend_func_separate</li>
<li>GL_EXT_blend_minmax</li>
<li>GL_EXT_blend_subtract</li>
<li>GL_EXT_compiled_vertex_array</li>
<li>GL_EXT_Cg_shader</li>
<li>GL_EXT_depth_bounds_test</li>
<li>GL_EXT_direct_state_access</li>
<li>GL_EXT_draw_buffers2</li>
<li>GL_EXT_draw_instanced</li>
<li>GL_EXT_draw_range_elements</li>
<li>GL_EXT_fog_coord</li>
<li>GL_EXT_framebuffer_blit</li>
<li>GL_EXT_framebuffer_multisample</li>
<li>GL_EXTX_framebuffer_mixed_formats</li>
<li>GL_EXT_framebuffer_object</li>
<li>GL_EXT_framebuffer_sRGB</li>
<li>GL_EXT_geometry_shader4</li>
<li>GL_EXT_gpu_program_parameters</li>
<li>GL_EXT_gpu_shader4</li>
<li>GL_EXT_multi_draw_arrays</li>
<li>GL_EXT_packed_depth_stencil</li>
<li>GL_EXT_packed_float</li>
<li>GL_EXT_packed_pixels</li>
<li>GL_EXT_pixel_buffer_object</li>
<li>GL_EXT_point_parameters</li>
<li>GL_EXT_provoking_vertex</li>
<li>GL_EXT_rescale_normal</li>
<li>GL_EXT_secondary_color</li>
<li>GL_EXT_separate_shader_objects</li>
<li>GL_EXT_separate_specular_color</li>
<li>GL_EXT_shader_image_load_store</li>
<li>GL_EXT_shadow_funcs</li>
<li>GL_EXT_stencil_two_side</li>
<li>GL_EXT_stencil_wrap</li>
<li>GL_EXT_texture3D</li>
<li>GL_EXT_texture_array</li>
<li>GL_EXT_texture_buffer_object</li>
<li>GL_EXT_texture_compression_latc</li>
<li>GL_EXT_texture_compression_rgtc</li>
<li>GL_EXT_texture_compression_s3tc</li>
<li>GL_EXT_texture_cube_map</li>
<li>GL_EXT_texture_edge_clamp</li>
<li>GL_EXT_texture_env_combine</li>
<li>GL_EXT_texture_env_dot3</li>
<li>GL_EXT_texture_filter_anisotropic</li>
<li>GL_EXT_texture_integer</li>
<li>GL_EXT_texture_lod</li>
<li>GL_EXT_texture_lod_bias</li>
<li>GL_EXT_texture_mirror_clamp</li>
<li>GL_EXT_texture_object</li>
<li>GL_EXT_texture_shared_exponent</li>
<li>GL_EXT_texture_sRGB</li>
<li>GL_EXT_texture_swizzle</li>
<li>GL_EXT_timer_query</li>
<li>GL_EXT_transform_feedback2</li>
<li>GL_EXT_vertex_array</li>
<li>GL_EXT_vertex_array_bgra</li>
<li>GL_EXT_vertex_attrib_64bit</li>
<li>GL_IBM_rasterpos_clip</li>
<li>GL_IBM_texture_mirrored_repeat</li>
<li>GL_KTX_buffer_region</li>
<li>GL_NV_blend_square</li>
<li>GL_NV_conditional_render</li>
<li>GL_NV_copy_depth_to_color</li>
<li>GL_NV_copy_image</li>
<li>GL_NV_depth_buffer_float</li>
<li>GL_NV_depth_clamp</li>
<li>GL_NV_explicit_multisample</li>
<li>GL_NV_fence</li>
<li>GL_NV_float_buffer</li>
<li>GL_NV_fog_distance</li>
<li>GL_NV_fragment_program</li>
<li>GL_NV_fragment_program_option</li>
<li>GL_NV_fragment_program2</li>
<li>GL_NV_framebuffer_multisample_coverage</li>
<li>GL_NV_geometry_shader4</li>
<li>GL_NV_gpu_program4</li>
<li>GL_NV_gpu_program4_1</li>
<li>GL_NV_gpu_program5</li>
<li>GL_NV_gpu_program_fp64</li>
<li>GL_NV_gpu_shader5</li>
<li>GL_NV_half_float</li>
<li>GL_NV_light_max_exponent</li>
<li>GL_NV_multisample_coverage</li>
<li>GL_NV_multisample_filter_hint</li>
<li>GL_NV_occlusion_query</li>
<li>GL_NV_packed_depth_stencil</li>
<li>GL_NV_parameter_buffer_object</li>
<li>GL_NV_parameter_buffer_object2</li>
<li>GL_NV_pixel_data_range</li>
<li>GL_NV_point_sprite</li>
<li>GL_NV_primitive_restart</li>
<li>GL_NV_register_combiners</li>
<li>GL_NV_register_combiners2</li>
<li>GL_NV_shader_buffer_load</li>
<li>GL_NV_texgen_reflection</li>
<li>GL_NV_texture_barrier</li>
<li>GL_NV_texture_compression_vtc</li>
<li>GL_NV_texture_env_combine4</li>
<li>GL_NV_texture_expand_normal</li>
<li>GL_NV_texture_multisample</li>
<li>GL_NV_texture_rectangle</li>
<li>GL_NV_texture_shader</li>
<li>GL_NV_texture_shader2</li>
<li>GL_NV_texture_shader3</li>
<li>GL_NV_transform_feedback</li>
<li>GL_NV_transform_feedback2</li>
<li>GL_NV_vertex_array_range</li>
<li>GL_NV_vertex_array_range2</li>
<li>GL_NV_vertex_attrib_integer_64bit</li>
<li>GL_NV_vertex_buffer_unified_memory</li>
<li>GL_NV_vertex_program</li>
<li>GL_NV_vertex_program1_1</li>
<li>GL_NV_vertex_program2</li>
<li>GL_NV_vertex_program2_option</li>
<li>GL_NV_vertex_program3</li>
<li>GL_NVX_conditional_render</li>
<li>GL_NVX_gpu_memory_info</li>
<li>GL_SGIS_generate_mipmap</li>
<li>GL_SGIS_texture_lod</li>
<li>GL_SGIX_depth_texture</li>
<li>GL_SGIX_shadow</li>
<li>GL_SUN_slice_accum</li>
<li>GL_WIN_swap_hint</li>
<li>WGL_EXT_swap_control</li>
<li>WGL_ARB_buffer_region</li>
<li>WGL_ARB_create_context</li>
<li>WGL_ARB_create_context_profile</li>
<li>WGL_ARB_create_context_robustness</li>
<li>WGL_ARB_extensions_string</li>
<li>WGL_ARB_make_current_read</li>
<li>WGL_ARB_multisample</li>
<li>WGL_ARB_pbuffer</li>
<li>WGL_ARB_pixel_format</li>
<li>WGL_ARB_pixel_format_float</li>
<li>WGL_ARB_render_texture</li>
<li>WGL_ATI_pixel_format_float</li>
<li>WGL_EXT_create_context_es2_profile</li>
<li>WGL_EXT_extensions_string</li>
<li>WGL_EXT_framebuffer_sRGB</li>
<li>WGL_EXT_pixel_format_packed_float</li>
<li>WGL_NVX_DX_interop</li>
<li>WGL_NV_DX_interop</li>
<li>WGL_NV_float_buffer</li>
<li>WGL_NV_multisample_coverage</li>
<li>WGL_NV_render_depth_texture</li>
<li>WGL_NV_render_texture_rectangle</li>


===================================[ NVIDIA CUDA Capabilities ]
- CUDA Device 0
- Device name: GeForce GT 440
- Compute Capability: 2.1
- Total Memory: 1023 MB
- Shader Clock Rate: 1620 MHz
- Multiprocessors: 2
- Warp Size: 32
- Max Threads Per Block: 1024
- Threads Per Block: 1024 x 1024 x 64
- Grid Size: 65535 x 65535 x 1
- Registers Per Block: 32768
- Texture Alignment: 512 byte
- Total Constant Memory: 64 Kb


===================================[ OpenCL Capabilities ]
- Num OpenCL platforms: 1
- Name: NVIDIA CUDA
- Version: OpenCL 1.0 CUDA 3.2.1
- Profile: FULL_PROFILE
- Vendor: NVIDIA Corporation
- Num devices: 1

- CL_DEVICE_NAME: GeForce GT 440
- CL_DEVICE_VENDOR: NVIDIA Corporation
- CL_DRIVER_VERSION: 266.58
- CL_DEVICE_PROFILE: FULL_PROFILE
- CL_DEVICE_VERSION: OpenCL 1.0 CUDA
- CL_DEVICE_TYPE: GPU
- CL_DEVICE_VENDOR_ID: 0x10DE
- CL_DEVICE_MAX_COMPUTE_UNITS: 2
- CL_DEVICE_MAX_CLOCK_FREQUENCY: 1620MHz
- CL_NV_DEVICE_COMPUTE_CAPABILITY_MAJOR: 2
- CL_NV_DEVICE_COMPUTE_CAPABILITY_MINOR: 1
- CL_NV_DEVICE_REGISTERS_PER_BLOCK: 32768
- CL_NV_DEVICE_WARP_SIZE: 32
- CL_NV_DEVICE_GPU_OVERLAP: 1
- CL_NV_DEVICE_KERNEL_EXEC_TIMEOUT: 1
- CL_NV_DEVICE_INTEGRATED_MEMORY: 0
- CL_DEVICE_ADDRESS_BITS: 32
- CL_DEVICE_MAX_MEM_ALLOC_SIZE: 262032KB
- CL_DEVICE_GLOBAL_MEM_SIZE: 1023MB
- CL_DEVICE_MAX_PARAMETER_SIZE: 4352
- CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 128 Bytes
- CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 32KB
- CL_DEVICE_ERROR_CORRECTION_SUPPORT: NO
- CL_DEVICE_LOCAL_MEM_TYPE: Local (scratchpad)
- CL_DEVICE_LOCAL_MEM_SIZE: 48KB
- CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 64KB
- CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3
- CL_DEVICE_MAX_WORK_ITEM_SIZES: [1024 ; 1024 ; 64]
- CL_DEVICE_MAX_WORK_GROUP_SIZE: 1024
- CL_EXEC_NATIVE_KERNEL: 4755444
- CL_DEVICE_IMAGE_SUPPORT: YES
- CL_DEVICE_MAX_READ_IMAGE_ARGS: 128
- CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 8
- CL_DEVICE_IMAGE2D_MAX_WIDTH: 4096
- CL_DEVICE_IMAGE2D_MAX_HEIGHT: 32768
- CL_DEVICE_IMAGE3D_MAX_WIDTH: 2048
- CL_DEVICE_IMAGE3D_MAX_HEIGHT: 2048
- CL_DEVICE_IMAGE3D_MAX_DEPTH: 16
- CL_DEVICE_MAX_SAMPLERS: 16
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 1
- CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 1
- CL_DEVICE_EXTENSIONS: 13
- Extensions:
- cl_khr_byte_addressable_store
- cl_khr_icd
- cl_khr_gl_sharing
- cl_nv_d3d9_sharing
- cl_nv_compiler_options
- cl_nv_device_attribute_query
- cl_nv_pragma_unroll
-
- cl_khr_global_int32_base_atomics
- cl_khr_global_int32_extended_atomics
- cl_khr_local_int32_base_atomics
- cl_khr_local_int32_extended_atomics
- cl_khr_fp64


===================================[ Misc. ]
- NVIDIA OGL_ThreadControl: Auto-Select


===================================[ NVIDIA Control Panel ]
- NVIDIA CPL: Core Temperature: 43 degrees
- NVIDIA CPL: Display Adapter: GeForce GT 440
- NVIDIA CPL: Display Board: [GeForce]
- NVIDIA CPL: Display Driver: 6.14.12.6658
- NVIDIA CPL: Bus Mode: PCI-Express
- NVIDIA CPL: Bus transfer rate: 16X
- NVIDIA CPL: Video Memory Size: 1024 MBytes
- NVIDIA CPL: Number of GPUs: 1
- NVIDIA CPL: Number of SLI GPUs: 1
- NVIDIA CPL: SLI rendering mode: DISABLED

Stereodude
5th March 2011, 14:37
In case my last post wasn't clear...

The first post should be updated to indicate the version numbers of AvsFilterNet and Cloo that it's intended to run with.

On my system It doesn't work with Cloo 0.9.2 alpha, but does with Cloo 0.8.2 (http://sourceforge.net/projects/cloo/files/0.8/Cloo-0.8.2.zip/download). It also doesn't seem to work with AvsFilterNet r62998 (.NET 4), but rather needs AvsFilterNet 1.0 beta 2 (.NET 2).

soulstaker
6th March 2011, 00:00
In case my last post wasn't clear...

The first post should be updated to indicate the version numbers of AvsFilterNet and Cloo that it's intended to run with.

On my system It doesn't work with Cloo 0.9.2 alpha, but does with Cloo 0.8.2 (http://sourceforge.net/projects/cloo/files/0.8/Cloo-0.8.2.zip/download). It also doesn't seem to work with AvsFilterNet r62998 (.NET 4), but rather needs AvsFilterNet 1.0 beta 2 (.NET 2).

Got it running with AvsFilterNet r62998 (.NET 4) here, but only when i downgraded Cloo to 0.8.2


Now let's test this bad boy :devil:

--edit--

Quick test with a DVD i'm playing right now

dgSource("D:\Encodes\AMS Ova\raw\megami_ova.dgi")
NLMeansCL()
trim(0,500)

========================

D:\Encodes\AMS Ova>avs2avi teste.avs -c null -o n

AVS2AVI v1.39 (c) 2002-2004:
Christophe Paris, David Leatherdale, int21h, Moitah
http://www.avs2avi.org/

Source:
* Filename: "D:\Encodes\AMS Ova\teste.avs"
* FourCC: YV12
* Frames: 501
* Resolution: 720x480
* Frame rate: 29.970 FPS
Compressor:
* No Recompression
Destination:
* Format: Null
* Pass 1/1: Finished in 00:00:26.535 (18.88 FPS)
* Frames: 501 (501 keyframes)
* Size: 247.69 MB

8600 GT + C2D E4300. Impressive =O

tormento
11th March 2011, 20:32
I'd like to see temporal part...

Dogway
11th March 2011, 21:46
Today magically this plugin gave me problems. I was just loading a heavy script into vdub, when prompted asking for msvcr100.dll. Once loaded, it failed when encoding. So I installed again the 2010 Redistributable and loading went fine but not encoding (avisynth), I checked and the guilty file was avsfilternet

I just read a few posts above and I also have the 62998 version. It would be nice some guidance about these two files (cloo, avsfilternet) in first post, as well as the limitation of the 7 pixel window for "a".

markanini
11th March 2011, 22:24
...the limitation of the 7 pixel window for "a".

This is news to me. What happens when you set it above 7?

mastrboy
9th April 2011, 14:29
Will this filter be able to take advantage of a Nvidia SLI setup?

Malcolm
9th April 2011, 20:45
No. AFAIK NVidias OpenCL driver does not support SLI. But even then, i don't have a SLI setup. So icannot test it. And i imagine that you don't get SLI support completely free without setting up some things in your filter first.

Hiritsuki
12th April 2011, 05:11
Now,the GPU's Filter is all only used in single card to compute.
I had tested.

tormento
12th April 2011, 09:14
I use the following code to offload some of the load from CPU to GPU:

LoadPlugin("D:\eseguibili\media\dgdecnv\x64\DGDecodeNV.dll")
DGSource("E:\….dgi")

SetMTMode(5,8)

sigma = 16
prefilter = FFT3Dgpu(sigma=sigma*0.8, sigma2=sigma*0.6, sigma3=sigma*0.4, sigma4=sigma*0.2, bw=32, bh=32, ow=8, oh=8, plane=0)

SetMTMode(2,8)

MCTemporalDenoise(settings="very high",useEEDI2=true,bwbh=32,owoh=8,p=prefilter,chroma=false,sharp=false,pel=1)

Do you think I could use NLMeansCL to replace FFT3DGPU and get similar results?

How could I parametrize sigma "general value" to get progressive NLMeansCL results?

TheProfileth
22nd April 2011, 19:07
Has Malcolm made any progress towards implementing a temporal mode yet?
Also I was wondering if he could release the source for this, might be useful for other people and lead to better gpu powered filters.

Malcolm
22nd April 2011, 21:38
There you go! Temporal mode. (See first post)

TheProfileth
23rd April 2011, 21:39
There you go! Temporal mode. (See first post)

awesome :cool:
will definitely give a try, will also test using it by mocomping it :devil:

tormento
24th April 2011, 08:28
awesome :cool:
will definitely give a try, will also test using it by mocomping it :devil:
Please post your working scripts ;)

Hiritsuki
25th April 2011, 04:26
What is Az?
It's useful for quality?

TheProfileth
26th April 2011, 00:44
What is Az?
It's useful for quality?
AZ= number of frames to process >1 should initiate temporal mode
speaking of which anything above az=2 causes a fantastical error to pop up, much like the ones previously shown.

sho_t
4th May 2011, 14:17
Thank you for a great filter!

By the way, will it work on Radeon in the near future?
Or do you recommend me to buy Geforce?

Dogway
4th May 2011, 16:31
My 2 favourite denoisers are dfttest and tnlmeans, this one because it produces more painterly denoise where dfttest tends to blur more, so it works pretty nice for 2D animation. But the main problem is, its SLOW!! so this GPU version was more than welcome. Still there are many drawbacks which refrains me from using it every time I give it a try. Here I made a list as for version v0.4.0 alpha:

b=1 still produces artifacts
GPU timeout error
can't use az>2
got some white stains artefacts in encodings, not in previews. Probably related to temporal mode.
stability

yup
4th May 2011, 17:42
@Dogway
Changes from v0.3.1 to v0.4.0 alpha
Implemented preliminary temporal version for Az=1 and Az=2
Az>2 not implemented.
I am using intermediate AVI lossless file before encoding, especially with high loaded CPU and GPU script.
yup.

Dogway
4th May 2011, 17:53
I didnt miss the reading, I just listed in a row some known facts as a reminder. I also encode lossless.
But temporal mode creates some artifactings, I will test more later on.

TheProfileth
4th May 2011, 23:16
AZ=2 produces weird edge artifacts that really have no actual reason other than either
A:poor implementation of temporal code
or
B:the gpu elements don't like this utilization of the code
or
C:(insert correct answer here)
anyways looking forward to having a gpupowered spatiotemporal filter that is not fft3dgpu :)

Dogway
6th May 2011, 23:53
some further testings:
I fixed the GPU timeout thing in regedit to discard errors.
One good point in using this fast GPU version is that now we can avoid using b=1 which is the cause of some artifacts (http://forum.doom9.org/showthread.php?p=1471712#post1471712). So these are my results:

when there is no az parameter b=0 works
when az=0, b=0 works but with (black) image artifacts
when az=1, hangs up.
az=2 and az=1 both produces artifacts if Im not wrong.

Here is my graphic card test with GPU Caps:
Geforce 9600M GT (http://www.mediafire.com/?55141k9df4w52qb)

Hiritsuki
20th May 2011, 01:54
May I ask how many GPU's rops filter support it?

Hiritsuki
21st May 2011, 03:56
BTW the GPU's rops is fallow the image.

http://imagewtf.com/12904.png/images/12904.png

Malcolm
21st May 2011, 21:03
May I ask how many GPU's rops filter support it?Ok, you cannot directly equate ROPs to computing cores, but without going too deep into the OpenCL / GPU computing details i can say the following: NLMeansCL uses as many ROPs as there are on your gfx card. That's because i let the OpenCL driver decide how to partition the video frame for processing (to optimally use the computing cores of the GPU). If not all ROPs are used, then because NVidias driver chose a partitioning that is not optimal (which indeed can occur). By hand tuning the partitioning for a specific GPU, you can get a performance gain of 5 - 10%. But you have to know what GPU to tune for. Letting the driver decide is the best way to support as many NVidia cards as possible with a speed that is ~95% at the maximum possible in average.

Hiritsuki
22nd May 2011, 02:56
So... I need to change the driver version to test which is the best support of OpenCL.

CruNcher
22nd May 2011, 12:06
The Nvidia driver is very modular build most components can be exchanged if they are from the same CUDA version without problems mostly but in this case im not sure if that would work painless but you could still try just to replace OpenCL.dll with another driver version (new or old driver) or copy the dll in the main directory of NLMeansCL it should load it then instead of the one in your system directory (current driver)

Hiritsuki
22nd May 2011, 15:06
Well, I'll follow this tip to test, wait for my report soon.

tormento
28th May 2011, 09:28
It's a real pity Az mode is not working.

Gerry62
27th June 2011, 20:10
Its not too bad!

I get 5-6fps on my 'steam powered, leather' computer.
Thats a jump from about 1fps, Need to play more.

Malcolm
8th August 2011, 20:19
I have decided to release the sources for version 0.3.1 to the public. See the first post.

VincAlastor
9th August 2011, 20:46
thank you malcolm!

i hope you will get the spartio-temporal mode to run. and would you implement a sharpener and maybe a banding protection if possible?

Malcolm
11th August 2011, 10:27
and would you implement a sharpener and maybe a banding protection if possible?Not very likely. I have no time at all atm.
My intention was to release the source code to help other people get started to write their own OpenCL plugins. :)

mastrboy
11th August 2011, 10:57
What is the reason that 0.4.0 sourcecode was not released?

Malcolm
12th August 2011, 13:52
What is the reason that 0.4.0 sourcecode was not released?
- Buggy
- individual algorithms needed for each value of Az (no generic algorithm for Az=n)

Zero1
14th August 2011, 03:51
Hi. Wanted to try your filter but unfortunately I ran into this error:
http://img810.imageshack.us/img810/775/capturexep.png

I have a Gefore GT330M GPU.
I am using avisynth 2.5.8, and have placed the plugins in the plugin folder so they auto load. I also installed Visual C redist 2010 since Virtualdub gave me a message about a missing dll at first (something like msvcr100.dll).

The versions I have are:
nlmeanscl: 0.4.0 (I also tried with 0.3.1 with the same error, but I do require the temporal cleaning if possible)
Cloo 0.9.0
avsfilternet 1.0.0.1

My nvida drivers are 267.76

I didn't install the ATI stream SDK because I was under the impression that was for if you wanted CPU rendering as opposed to GPU?

The AVS I am using is simply:
dgsource("live.dgi")
bilinearresize(1280,720)
NLMeansCL(A=4, S=2, B=1, aa=1.0, h=1.8, plane=4)
trim(14000,15000)
(The nlmeanscl args are just from an example you posted in the first post - I just wanted to check it worked before messing with stuff)

Finally, I've been testing the dither tools to output high bit depth for avs2yuv/x264 to encode. Do you think your function would work with the following?
dgsource("live.dgi")
Dither_convert_8_to_16 ()
Dither_resize16(1280,720, kernel="bilinear")
trim(14000,15000)
NLMeansCL(A=4, S=2, B=1, aa=1.0, h=1.8, plane=4)
Dither_convey_yuv4xxp16_on_yvxx()

Thanks a lot


Edit
Tried Cloo 0.8.2 and it works. It also seems to work with dither/16bit too. Thanks


While I am here, any advice for preventing this blotchy effect as seen in the right half processed image?
http://img835.imageshack.us/img835/5913/nlmeans.th.png (http://imageshack.us/photo/my-images/835/nlmeans.png/)

cretindesalpes
14th August 2011, 09:48
dgsource("live.dgi")
Dither_convert_8_to_16 ()
Dither_resize16(1280,720, kernel="bilinear")
trim(14000,15000)
NLMeansCL(A=4, S=2, B=1, aa=1.0, h=1.8, plane=4)
Dither_convey_yuv4xxp16_on_yvxx()

You shouldn't mix 8 and 16 bit processing like that. Process 16-bit clips only with filters designed for that. Here NLMeansCL will just screw up the LSB part with artifacts (this is probably one of the causes of the "blotchy effect"); the whole processing in 8 bits will give a better result.

If you still have visible blotchy effects, use a debanding filter such as GradFun3 or flash3kyuu_deband, or keep a bit of noise in the darkest parts of the picture.

Zero1
14th August 2011, 10:39
That particular screenshot was a pure 8 bit process. I ended up not bothering with it in 16 bit because I could forsee the problems you described (but it would be Ok to clean the source before it converts it to 16 bit I presume).

zys4416
2nd September 2011, 02:17
I have a problem with my Nvidia GT 520 cards, it throws the error:

http://imagewtf.com/14248.jpg/images/14248.jpg

I through all OpenCL testing of gpu_caps_viewer, and I updated the lastest drivers.

Malcolm
2nd September 2011, 09:16
Do you use this (http://sourceforge.net/projects/cloo/files/0.8/Cloo-0.8.2.zip/download) version of Cloo?

Malcolm
2nd September 2011, 21:07
I have updated NLMeansCL to version 0.3.2.
Please see the first post.

mastrboy
3rd September 2011, 14:58
Thanks :)

Will we see a update of the 0.4.x temporal version soon?

dispatcher7007
7th November 2011, 18:00
Is there any progress towards temporal denoising? The spatial version works fine. In fact there are just minor quality drawbacks towards MDegrainX (no vigorous testing!), so Im quite curious what the temporal implementation may be able to do...

BTW: Kudos! There are way to few GPU-Plugins out there, and this is a magnificent new approach...

Greetings, Dis!

Edit1:
PS:
Did some more tests and screenshots NLmeansCL vs MDegrain3 and original (just recoded from BR):
http://www.mediafire.com/file/k951brd1f4c54v2/screenshots.rar

The speed-value is not worth much, because it wasnt a real benchmark setting, with idle computer and several repeats. just for the clue.

original:
speed 100%
size 100%

NLmeansCL
Speed 105,8%
Size 73,45%

MDegrain3
Speed 106,6%
Size 62,89%

X264 commandline
x264.exe --preset slow --tune film --crf 18.0 --ref 8 --bframes 8 --subme 9 --output "output.mkv" "source.avs"

MDegrain3.avs
SetMTMode(2)
DGSource("test.dgi")
AssumeFPS(23.976)
ConvertToYV12()
Crop(0,140,-0,-140)
super = MSuper(pel=1, sharp=1)
backward_vec3 = MAnalyse(super, isb = true, delta = 3, overlap=4, blksize=16, truemotion=false)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4, blksize=16, truemotion=false)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4, blksize=16, truemotion=false)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4, blksize=16, truemotion=false)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4, blksize=16, truemotion=false)
forward_vec3 = MAnalyse(super, isb = false, delta = 3, overlap=4, blksize=16, truemotion=false)
MDegrain3(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD = 400)

NLmeansCL.avs
SetMTMode(2)
DGSource("test.dgi")
AssumeFPS(23.976)
ConvertToYV12()
Crop(0,140,-0,-140)
NLMeansCL(A=4, S=2, B=1, aa=1.0, h=1.8, plane=4)

Conclusions:
This first test was targeted towards conservation of detail, because the denoising-quality of MDegrain3 is out of question to me.
The results of NLmeansCL are a bit too smooth to me (tested just the suggestet settings from its website), especially if there is no impact on compressibility. I find MDegrain3 more natural, which is even smaller in size.

Remarkably is the lack of speed improvement, which may be caused by GPU decoding in addition to GPU filtering OR by the slow x264 settings. I guess its the last one.

Edit2: The Speed suffers from both things. Following tests are kind of synthetic, because nobody uses high-end filters with ultrafast x264-Settings:
While Mdegrain3 can profit by DGdecodeNV (GPU decoding and sourcefilter), NLmeansCL is bothered by GPU decoding, up to 50% slower than MDegrain3 at x264 ultrafast settings (18,29fps to 12,6 fps). Using FFMS NLmeansCL (20,21fps) is 10% faster than MDegrain3 with GPU decoding (18,29fps). With the real x264-settings, there is no Change in speed, whatever sourcefilter is used.

Nonetheless, there are no speed improvements compared to other high-end filters like MDegrain3. I use a GTX560, which should be fast enough anyway...

Fullmetal Encoder
13th November 2011, 01:28
Has there been any progress regarding these NLMeansCL initialization errors? I just recently downloaded updated drivers for my HD Radeon 5850 along with the AMD APP SDK (just in case).

I tried uploading an image of the error but the forum keeps telling me that it's not a valid image file.

I have installed Cloo version 0.8.2 and am using version 1.0.0.1 of AvsFilterNet.

I have also confirmed that my card does support images.

Also, can anyone tell me why the forum might be refusing any JPG or PNG images from my system?

If the error image is absolutely necessary I can try to get a file hosting site.

Thanks for any help with this.

Mounir
1st December 2011, 13:20
I have an initialisation error aswell, i thought i had installed everything right but it appears not.
I have downloaded:
- NLMEANS v0.4.0 alpha
- AvsFilterNet r62998 (.NET 4)
- Cloo 0.9.0

error message:
system reflection targetinvocationexception....."VoidCloo.computeContext".....

Any suggestion to solve this issue ?

Stereodude
2nd December 2011, 01:10
I have an initialisation error aswell, i thought i had installed everything right but it appears not.
I have downloaded:
- NLMEANS v0.4.0 alpha
- AvsFilterNet r62998 (.NET 4)
- Cloo 0.9.0

error message:
system reflection targetinvocationexception....."VoidCloo.computeContext".....

Any suggestion to solve this issue ?Try the older Cloo .8.2. I couldn't get it to work with the .9.2 alpha when I tried it months ago.

Keiyakusha
2nd December 2011, 03:28
don't use v0.4.0 alpha it was experimental and contains more bugs and it is older than v0.3.2. Because of that it doesn't supports Cloo 0.9.0 and AvsFilterNet r62998. just forget it.

Mounir
7th December 2011, 08:33
Ok well i tried with the following "filters" but it still don't work:
- Cloo 0.8.2
- AvsFilterNet r62998 (.NET 4) (version 1.0 beta)
- NLMEANS v0.3.2

The error: "There is no function named "NLMeansCL"

Keiyakusha
8th December 2011, 03:52
use Cloo 0.9.0 instead of Cloo 0.8.2
Basically you need nlmeanscl v0.3.2 and everything else to be latest

Mounir
21st December 2011, 09:38
I had no luck thus far ! I did like you suggested i always get an error "there is no function NLMeansCL()"

Perhaps it has something to do with the autoload thing, not sure

Mounir
15th May 2012, 05:13
I have a problem with the az parameter
i quote (from the 1st page):
Parameter Az: Sets the temporal radius. At the moment only 1 and 2 are supported. (default = 0)

When i use AVSp it return an error Nlmeans does not have an argument named az

I wanna try az=1 at least

Bloax
15th May 2012, 13:59
The temporal part of it is also messed up, as it makes random solid green (perhaps also black if memory serves) blocks all over the video.

Mounir
15th May 2012, 23:52
I guess i will have to stick with the v 0.3.2 then, thanks for the info

ben13
30th May 2012, 06:27
nvm got the error fixed.
Thanks for the plugin. works great!

mastrboy
7th October 2012, 16:20
Malcolm: have you given up on making the temporal (0.4.0) release stable?

bcn_246
11th October 2012, 22:54
Looks nice. When I get my 670 back (being RMA'd) I will do some tests against an i7@4.2GHz.

Edit:
I am using a GTX 630 (a very low-end card!) while the RMA is going on, decided to try it out with that.
Had no problems loading with the newest WHQL GeForce drivers (v306.97).

Due to not being able to get MT("*",threads=*,overlap=*) with AviSynth v2.6 I still use v2.58. I had no problems running it using MT("NLMeansCL",threads=8,overlap=8).

Screenshots:

Original - NTSC DVD -> 848x456p24 YV12 -> AVISource("rip.avi")
Renders @ ~900-1100fps
http://i.imgur.com/3MhRS.png

CPU - (above+)MT("TNLMeans",threads=8,overlap=8):
Renders @ ~5-6FPS
http://i.imgur.com/quVnq.png

GPU - (above+)MT("NLMeansCL",threads=8,overlap=8):
Renders @ ~30-35fps
http://i.imgur.com/JELYn.png

Really quite impressed. Got a significant speed-up against a pretty powerful CPU using crappy GPU.
Compared a few screen-grabs and found the output image is pretty close to TNLMeans.

Farfie
26th December 2012, 08:05
Getting some weird artifacts using it with Avisynth 2.5.8, Cloo 0.9.0, AvsFilter r62988, Win7 x64. They're like either black dots, or they form (usually horizontal) black lines together.
And by dots I don't mean pixels, they're like groups of pixels that form a square. They appear randomly it seems, for like 1 frame. They're not THAT often, but I caught them pretty quickly. And sometimes they do happen frequently, but I can't find a pattern for it.
Using NLMeansCL with default settings.

Any ideas? I'm no Avisynth pro, but I don't think I'm doing anything wrong.

yup
27th December 2012, 06:59
Getting some weird artifacts using it with Avisynth 2.5.8, Cloo 0.9.0, AvsFilter r62988, Win7 x64. They're like either black dots, or they form (usually horizontal) black lines together.
And by dots I don't mean pixels, they're like groups of pixels that form a square. They appear randomly it seems, for like 1 frame. They're not THAT often, but I caught them pretty quickly. And sometimes they do happen frequently, but I can't find a pattern for it.
Using NLMeansCL with default settings.

Any ideas? I'm no Avisynth pro, but I don't think I'm doing anything wrong.
Try switch to last Avisynth 2.6. I do not have problem with official and Set build Avisynth 2.6 under Win7 x64.
yup.

Farfie
27th December 2012, 14:19
Try switch to last Avisynth 2.6. I do not have problem with official and Set build Avisynth 2.6 under Win7 x64.
yup.

Okay, so I installed 2.6.0 a3 (official build), but to no avail. Whenever I use this filter, alone or with others, I get the random black dots/bars. It's very hard to believe no one else has this problem. I would LOVE to just look at my dll's again (Cloo and whatnot) and see that one of them is the wrong version or something, but they're not.

Could it be that I'm using a 10 bit encoder? Does it even work like that? I've been using this exact enc for months now with no problems.
The only thing I can say is that when I load NLMeansCL to preview the output in MeGui, there are no black dots anywhere. Only after it's encoded do they miraculously get there. Also, I can encode over the same thing many many times, and there's no pattern. They could be anywhere, or not show up at all sometimes. These are the only clues I have to go on. :(

yup
27th December 2012, 15:43
Farfie!
:script:
Avisynth without hack support only 8-bit.
Try open your script in Virtualdub and save loseless codec Ut recomended and after encode in MeGUI. May be power supply problem not enough for CPU and GPU simultaneously during encoding in MeGUI?
yup.

Farfie
29th December 2012, 17:08
Farfie!
:script:
Avisynth without hack support only 8-bit.
Try open your script in Virtualdub and save loseless codec Ut recomended and after encode in MeGUI. May be power supply problem not enough for CPU and GPU simultaneously during encoding in MeGUI?
yup.

First of all yup, I wan to thank you for helping me :thanks:

The script I use is simple, it just runs ffvideosource on an 8bit mkv, and then calls NLMeansCL on it with default settings. No other filters are used, nothing fancy.

As far as the hack goes, I believe that only affects 10bit video input, I don't think what the encoder does to whatever avisynth feeds it matters, which is why I didn't think the 10bit encoder mattered, but I could always be wrong.

In any case, I successfully loaded the script into virtualdub to save as lossless avi. I actually thought this would work, but it did not. I ended up finding black squares. :(

Even if I could blame the encoder or something else, I have been using the 10bit encoder without any problems for at least a year now, throwing all kinds of filters at it with all sorts of different sources (10bit or not), and have never had any problems before this filter. It's very difficult to think that the problem is on my end, when I can fire up any filter on this source, like dfttest, or even the original TNLMeans on it, and have no problems with my output. But as I said, I'm no pro.. and I'm not here to tell you guys you are wrong.

I really love this filter. The output it produces is excellent when there are no artifacts. I don't want to give up on it :)

Farfie
2nd January 2013, 17:59
Hey all. I believe I have found the cause of my problem, or more like, I have found the catalyst. It seems as though whenever I have GPU activity while encoding (playing back an mkv, playing a video game, maybe even just having hardware acceleration on in my browser and using the internet), these black squares can appear at any time. How I stumbled upon this was just very lucky: I was encoding a test file and about 1/3 the way through, I played it back, and saw no problems by the time it stopped on its own (out of frames.) However, I for some reason didn't close the mkv this time around, and after some more had finished, I had unpaused to continue looking for squares, and noticed that the very next frame after the pause point had quite a few black squares in it. I kept watching, and black squares were pretty much everywhere (equal to the duration of me watching the mkv up until the pause point). Pretty interesting.

I then decided to see if the amount of black squares was proportional to the amount of GPU load (more work for gpu = more artifacts?): but that, even more interestingly, came up negative. Across 3 games while simultaneously encoding, I couldn't see an increase in amount of black squares from the games, or just playing an mkv. I also tried different renderers (I usually use madVR), like EVR-CP with a PS 2.0 resizer, bilinear, and then tried regular EVR. Everything gave very similar results, so I pretty much called it at that point. As you can imagine though, as soon as I figured this out, I turned off everything that could be using the GPU, and started a ton of test encodes to see if I could find any squares. As expected, I couldn't find any.

Unfortunately though, due to the nature of this problem, I don't think I can particularly trust the filter to not put a random black square somewhere because of some spike. Also, I suppose the problem could be some kind of CPU thing instead of GPU. I could run prime95 while encoding to see about that really quick. Anyway, my hardware is a 3930k and GTX 680, using latest 310.70 drivers. If anyone has any other questions, I'd be more than happy to oblige; this is easily one of the best denoisers, especially when factoring in speed. Thanks for reading!

dadix
4th January 2013, 10:14
My processor is i5 2410m (hd 3000 graphic processor included -Sandy Bridge 2) and GeForce GT 520MX graphic card - laptop with Nvidia Optimus. I have 4 fps with NLMeanscl and 7 fps with FFT3dGPU. Is this speed normal ? I read about 20 fps or more on this post. NLMeanscl is spatial or temporal denoiser? My scripts:

1DirectShowSource("C:\Users\tetris\Downloads\end_of_the_world_shootout_-_part_2_1280x720.mp4")

#ConvertTorgb32()
#RGBAdjust(1.0, 1.0, 1.0, 1.0, 0.0, 0.0, -8.0, 0.0, 1, 1, 1, 1,analyze=false)

ConvertToYV12(matrix="Rec709")
Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\mvtools\mvtools.dll")
Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\fft3dgpu\FFT3dGPU.dll")
Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\dither-1.21.0\dither.dll")
Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\RemoveGrain\RSharpen.dll")
Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\RemoveGrain\RemoveGrain.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\dither-1.21.0\dither.avsi")
Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\gradfun2db\gradfun2db.dll")

Dither_convert_8_to_16 ()
FFT3dGPU(bt=1,plane=4,bw=48,bh=48,ow=16,oh=16,sigma=2.0,interlaced=false)
gradfun2db(1.2)
Dither_Resize16(1280,720)
ditherpost()

#HistoGram("luma")


bt=1 --> only spatial

2.DirectShowSource("C:\Users\tetris\Downloads\end_of_the_world_shootout_-_part_2_1280x720.mp4")
ConvertToYV12(matrix="Rec709")

Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\mvtools\mvtools.dll")
Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\fft3dgpu\FFT3dGPU.dll")
Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\dither-1.21.0\dither.dll")
Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\RemoveGrain\RSharpen.dll")
Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\RemoveGrain\RemoveGrain.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\dither-1.21.0\dither.avsi")
Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\gradfun2db\gradfun2db.dll")

Dither_convert_8_to_16 ()
NLMeanscl(A=4, S=2, B=1, aa=1.0, h=1.8, plane=4)
gradfun2db(1.2)
Dither_Resize16(1280,720)
ditherpost()

#HistoGram("luma")

x265
30th January 2013, 18:42
Avspmod crashes when i set the value of B(NLMeansCL) to 0.

yup
1st February 2013, 11:08
Avspmod crashes when i set the value of B(NLMeansCL) to 0.

x265 Avspmod problem.
I try B=0 and load to Virtualdub work without problem.
yup.

x265
1st February 2013, 12:31
It crashes even when i load the script for encoding in MeGUI.

Mounir
9th February 2013, 18:26
NLMeansCL(A=4, S=2, B=1, aa=1.0, h=2.0,HC=3.5, plane=4,cpu=false,buffer=false,sse=true) #

The only two parameters you should change in my experience are h and HC (strength for luma and chroma planes respectively) but feel free to experiment

you have to load this dll in you script:
LoadPlugin("AvsFilterNet.dll")

You need all these dll (i made a .rar for you), put everything in the plugins folder
http://www.mediafire.com/?5prcoh3a9ost3al

This version does a spatial filtering (intra frame) only there is another with temporal denoising but it's buggy i've read, thus best to avoid for now i guess.

Farfie
2nd March 2013, 20:28
Some time has passed, and I still get strange artifacts with this filter, though they have changed a bit I guess... I just don't know what to blame anymore. I used to get little black boxes, but after trying it again recently (after not using it for awhile) I got this, long green bars, which is even worse I suppose. I just wish I had some kind of a lead. Is it possible that it could be something to do with GTX 6 series and up GPUs? Has anyone used this filter with their GTX 6xx cards?

http://puu.sh/2aRYo

Bloax
3rd March 2013, 06:49
What version of the filter are you using, because I'm too lazy to check?
Because you should be using 0.3.2.

yup
3rd March 2013, 09:51
Farfie!
I see the same artifacts at big value A and S.
I remember Your post.
I do not see one at A=2 or 3.
I do not have time testing with cpu=true and buffer=true, but when I install Intel OpenCL SDK 1.1 it is work but slow comparing to GPU.
If I have time I make testing.
yup.

Farfie
4th March 2013, 06:17
What version of the filter are you using, because I'm too lazy to check?
Because you should be using 0.3.2.
Yeah, it's 0.3.2.

Farfie!
I see the same artifacts at big value A and S.
I remember Your post.
I do not see one at A=2 or 3.
I do not have time testing with cpu=true and buffer=true, but when I install Intel OpenCL SDK 1.1 it is work but slow comparing to GPU.
If I have time I make testing.
yup.

You know yup, I was getting really excited. I lowered the A to 2 and it was doing great. Put it at 3, and got through a few episodes without seeing any, but eventually I did find one of the old artifacts I talked about in the past (little black boxes or rectangles).
I'm going to try A=2 again, but I feel like it's just going to have less artifacts rather than fix the problem, which is just a no go unfortunately.

yup
4th March 2013, 11:12
Farfie!
Your source is HD, my source is SD with A up to 3 and even B=0 I do not have problem.
I think problem with frame memory between CPU and GPU.
Try Intel OpenCL SDK (for my computer it is slower with factor near 30) if will be O'k, may be problem Nvidia OpenCL implementation, Nvidia prefer proprietary CUDA for application.
It is only suggestion.
Interest link http://www.ipol.im/pub/art/2011/bcm_nlm/
For small noise level recomend A=1 and S=10 and h=0.4*sigma may be work with HD source without bug.
yup.

LigH
21st March 2013, 14:20
Interesting project.

Brief test on a Phenom-II X4 945 (3 GHz) and a GeForce 9600 GT with a 1080p FullHD AVC video via FFMS2:

• NLMeansCL 0.3.2: ~3 fps, clean
• NLMeansCL 0.4a(Az=2): ~2 fps, many artefacts

Will check again with a GeForce GTS 450 during the weekend.

LigH
23rd March 2013, 08:54
Phenom-II X6 1045T and a GeForce GTS 450 (GF116) with a 1080p FullHD AVC video via FFMS2:

• NLMeansCL 0.3.2: ~10.8 fps, clean
• NLMeansCL 0.4a(Az=2): ~2.6 fps, some artefacts: Occasional green blocks; ghosts of the second-next frame before scene changes
__

P.S.: Had a wrong speed for 0.3.2 due to surprising technical issues.

BTW:

Parameter Az: Sets the temporal radius. At the moment only 1 and 2 are supported. (default = 0)

Strictly, this is nonsense, somehow... ;)

x265
25th April 2013, 07:45
When is it useful to use a spatial denoiser instead of a temporal denoiser?

olcifaraga
17th September 2013, 14:59
I can't use the plugin.

Specs;
Win8x64
Nvidia GT750M with latest driver. (Nvidia Optimus)
NLMeansCL 0.3.2
Cloo 0.9.2
AvsFilterNet r62998 (.NET 4)

Error Message
NLMeansCL initialization error: System.Reflection.TargetInvocationException: ... ---> Cloo.InvalidCommandQueueFlagsComputeException: OpenCL error code detected: InvalidCommandQueueFlags.
konum: Cloo.ComputeException.ThrowOnError(ComputeErrorCode errorCode)
konum: Cloo.ComputeCommandQueue..ctor(ComputeContext context, ComputeDevice device, ComputeCommandQueueFlags properties)
konum: NLMeansCL.NLMeansCL.initOpenCL(ScriptEnvironment env)
konum: NLMeansCL.NLMeansCL..ctor(AVSValue args, ScriptEnvironment env)
--- İç özel durum yığını izlemesinin sonu ---
konum: System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
konum: System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
konum: System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
konum: System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
konum: System.Activator.CreateInstance(Type type, Object[] args)
konum: CreateNetPluginImpl(AVSValue* , AVSValue* args, Void* user_data, IScriptEnvironment* env)

I tried older versions of Cloo but not worked. I put the GPU Caps Viewer log report at attachments.

Found a solution:
In SysWow64 folder, rename the "IntelOpenCL32.dll" file to something else.
Now able to use plugin.

l33tmeatwad
9th June 2014, 00:00
Not sure what I'm missing here, but I can't get it to autoload and when I try to manually load I get "Unable to load plugin, make sure it is a valid .Net assembly"...

LigH
9th June 2014, 00:16
In general (may or may not be important here): Have your 7-zip up to date if you have to unpack a *.7z; an older 7-zip (up to ~9.20) may unpack an archive made with a newer 7-zip (from ~9.22) incorrectly without complaining.

Read the instructions in the starting post of this thread carefully. There is a specific combination of Cloo and AvsFilterNet matching a specific version of NLMeansCL. Don't mix different versions in the same directory. Don't unpack into the AviSynth 2.5+ plugins folder if it isn't expected there, prefer own (sub-) directories instead where possible.

l33tmeatwad
9th June 2014, 02:33
In general (may or may not be important here): Have your 7-zip up to date if you have to unpack a *.7z; an older 7-zip (up to ~9.20) may unpack an archive made with a newer 7-zip (from ~9.22) incorrectly without complaining.

Read the instructions in the starting post of this thread carefully. There is a specific combination of Cloo and AvsFilterNet matching a specific version of NLMeansCL. Don't mix different versions in the same directory. Don't unpack into the AviSynth 2.5+ plugins folder if it isn't expected there, prefer own (sub-) directories instead where possible.
Well I got version 4 alpha loading (although I was never able to get version 3.2 to work...). That said...now I'm getting "Error reading source frame 0: Avisynth read error: NLMeansCL: Cloo.InvalidHostPointerComputeException: OpenCL error code detected: Invalid HostPointer. at Cloo.ComputerException.ThrowOnError(ComputeErrorCode errorCode)..."

LigH
9th June 2014, 08:28
Well, that sounds like you don't have compatible OpenCL drivers for your graphic card installed. Reporting your exact graphic chipset and driver version may tell us if your graphic hardware is at all suitable to use NLMeansCL.

Keiyakusha
9th June 2014, 23:00
Hey guys, its being a long time since I played with this plugin. But since I see a lot of people are still trying it, I thought I'll post a few things I do remember.
- v0.4.0 alpha should not be used. It is broken and sometimes produces incorrect results. Also regardless of what the version number says v0.3.2 is actually newer. 0.4.0 is a kind of experimental branch of the earlier version.
- v0.3.2 (as well as other versions) require additional dlls and their versions are very important. They shouldn't be even a single revision higher or lower. If you managed to load 0.4.0, then there is a high chance that additional dlls you use are not good for 0.3.2 and need to be updated. in other words, v0.3.2 and v0.4.0 wont work with the same set of additional dlls.

Also these plugins require different .NET framework versions. This may be important too.

Still it looks to me that l33tmeatwad's problem might be related to something else.

HOB
15th August 2014, 22:14
Can NLmeansCL be used in MeGUI?

LigH
16th August 2014, 07:32
MeGUI is only a user interface generating an AviSynth script and calling an encoder with it. It allows you to manually add plugins it does not yet offer on its own. So: Yes, you can. Just probably not with "one click only".

HOB
16th August 2014, 16:50
Hello LigH
Your quick response is most appreciated along with being encouraging.

Before I posted I had copied the NLMeansCL_netaoutoload.dll to the same folder I have copied other .dll plugins, in my case…Desktop\Desktop Folders and Files\MeGUI_2507_x86 BU\tools\avisynth_plugin. When the time came to load the .dll in "AviSynth script creator" in MeGUI the procedure seemed to proceed in proper fashion but when I added arguments to the MeGUI avs script and clicked the "Preview AVS Script" button I got the following error message.

AviSynth script error:
'C:/Users/XXXX/Desktop/MeGUI_2507_86/tools/avisynth_plugin/NLMeansCL_netautoload.dll' cannot be used as a plugin for AviSynth

It seems to me the failure to run may have something to do with the netautoload phrase in the NLMeansCL_netautoload.dll, it looks as if this kind of .dll loads in a different way than say the autoadjust.dll from LaTo, and if that's the case I'm a bit lost on how to go about loading this .dll correctly to get it to run in MeGUI.

I read a post from Mounir which suggested adding more .dll's to get NLMeansCL to run so I added those to my plugin folder and added "AvsFilterNet.dll" to my MeGUI avs script, that got me PAST the error message above - PROGRESS! - but when I tried to encode the movie MeGUI changed the pointer icon to a circle, indicating it was working, but it STAYED that way as if it was in a loop, after ten minutes of waiting I had to shut down MeGUI through Task Manager. Any ideas you could suggest that might get NLMeansCL working in MeGUI would be as appreciated as your quick response…

The latest VidCoder v1.5.24.0 Beta (x64) has a version of NLMeansCL incorporated in to it and I've used it on some very old black and white movies I have on DVD that are more noise than movie, the results were very impressive and as a consequence I'd like to be able to use this filter in MeGUI which of course allows endless manipulations over and above those available in VidCoder, which I think is a MOST excellent program for encoding movies that do not require "adjustment".

HOB
20th August 2014, 01:45
To borrow a phrase from Dr Hans Zarkov…I did some "exhaustive experimentations" with NLMeansCL in MeGUI…and they paid off - I was able to get NLMeansCL to work, after a fashion. It would be an understatement to say they don't work well together.

Khanattila
19th November 2014, 17:54
Continuation of this project: http://forum.doom9.org/showthread.php?t=171379.

Mounir
28th January 2021, 13:45
All links to download the DLL are now DEAD; where can i get NLMeans i need it for old scripts i use

Groucho2004
28th January 2021, 16:47
All links to download the DLL are now DEAD; where can i get NLMeans i need it for old scripts i use
Any reason you can't use KNLMeansCL? It's still being supported and probably more flexible and better than that old version.
What version of Avisynth and what graphics card are you using ?

Selur
31st January 2021, 11:42
All links to download the DLL are now DEAD; where can i get NLMeans i need it for old scripts i use
got a 32bit NLMeansCL2.dll I use in Hybird, uploaded to my GoogleDrive (https://drive.google.com/drive/folders/1ZWVbj8hFP0eyX6dW2z2xexwwj1inEKl0?usp=sharing)

Cu Selur