DGSharpen

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
User avatar
admin
Site Admin
Posts: 4266
Joined: Thu Sep 09, 2010 3:08 pm

DGSharpen

Post by admin » Tue Mar 07, 2017 11:18 am

I made a CUDA kernel to perform limited sharpening. Call it LimitedSharpenFastest. :lol: On a 1080P stream it runs at ~309 fps (including decoding) on my GTX 1050Ti. Note that DGSharpen() is my own design and not based on any LSF code.

I'll release it hopefully later today or tomorrow. Thanks to hydra3333 for suggesting this filter.

CUDA filters are fun. :ugeek:

Code: Select all

Number of frames:                  839
Length (hh:mm:ss.ms):     00:00:00.084
Frame width:                      1920
Frame height:                     1080
Framerate:                   10000.000 (10000/1)
Colorspace:                       YV12
Audio channels:                    n/a
Audio bits/sample:                 n/a
Audio sample rate:                 n/a
Audio samples:                     n/a

Frames processed:               839 (0 - 838)
FPS (min | max | average):      67.36 | 338.5 | 308.7
Memory usage (phys | virt):     227 | 316 MiB
Thread count:                   20
CPU usage (average):            14%

GPU core clock | memory clock:  1747 | 1752
GPU usage (average):            38%
VPU usage (average):            57%
GPU memory usage:               697 MiB

Time (elapsed):                 00:00:02.718

Sharc
Distinguished Member
Distinguished Member
Posts: 204
Joined: Thu Sep 23, 2010 1:53 pm

Re: About DGSharpen

Post by Sharc » Wed Mar 08, 2017 8:24 am

Eager to try it ...... :D

User avatar
admin
Site Admin
Posts: 4266
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGSharpen

Post by admin » Wed Mar 08, 2017 8:57 am

Good morning Mr. Sharc. I have slipstreamed everything.

DGSharpen is a basic limited sharpener without all the bells and whistles of LimitedSharpenFaster(). If you think any of those bells and whistles are needed, please let me know.

Sharc
Distinguished Member
Distinguished Member
Posts: 204
Joined: Thu Sep 23, 2010 1:53 pm

Re: About DGSharpen

Post by Sharc » Wed Mar 08, 2017 9:53 am

Greetings, Don
DGSharpen() works fine here. Very effective in conjunction with DGDenoise().
And no, I am missing neither a bell nor a whistle for the time being ......

Just a note on the documentation: DGSource() still has the denoising parameters (strength,blend,chroma,searchw), but the explanation of the same has been moved to the standalone filters. I assume NLM is still integral in DGSource()?

User avatar
admin
Site Admin
Posts: 4266
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGSharpen

Post by admin » Wed Mar 08, 2017 10:30 am

The integral support was removed as I intend to have many filters and so would run out of parameters for DGSource(). In any case, the integral support just did Invoke() so it was not really different from doing:

DGSource()
DGDenoise()

If I had (say) 10 filters available and tried to have them integral, even if I had unlimited parameters, how could one control the filter ordering? It just gets silly when you have multiple filters available.

I'll correct the document. Thanks for pointing it out. And thanks for your testing. I too find the combination of DGDenoise() plus DGSharpen() to be very effective...and super fast.

The big challenge now is to make a CUDA equivalent for QTGMC. It's a big job as it will need functionality doing similar things to MaskTools and MVTools, etc. QTGMC really is the gold standard so it would be wonderful to have a fast CUDA implementation offering similar quality.

There's one little technical thing I have to do to keep JIT compile time reasonable when the number of filters gets much larger. I have to either find a way not to have to JIT compile DGFilters.ptx once for each invoked filter, or I have to split DGFilters.ptx into individual ptx files. I'll probably do the latter as it is much simpler and conceptually cleaner. I'm also looking into packaging ptx code into DGDecodeNV.dll, so users do not have to manage things.

User avatar
admin
Site Admin
Posts: 4266
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGSharpen

Post by admin » Wed Mar 08, 2017 10:33 am

Document corrected and slipstreamed.

User avatar
admin
Site Admin
Posts: 4266
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGSharpen

Post by admin » Wed Mar 08, 2017 1:54 pm

I have successfully packed the PTX code into DGDecodeNV.dll, eliminating the need for PTX files in the distribution. I'll include it in the next slipstream.

Maybe I will pack the cubin into DGIndexNV also.

User avatar
gonca
Distinguished Member
Distinguished Member
Posts: 663
Joined: Sun Apr 08, 2012 6:12 pm

Re: About DGSharpen

Post by gonca » Wed Mar 08, 2017 4:33 pm

Re: having individual filters
:agree: :bravo:
In my case, it just makes it easier for me to keep track, specially with my scripting skills

User avatar
admin
Site Admin
Posts: 4266
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGSharpen

Post by admin » Wed Mar 08, 2017 5:05 pm

Yes, gonca!

Can you imagine a DGSource() invocation with 50 parameters to set up all the filters? :wow:

The PTX file issue is irrelevant now that I packed them into the DLL. You'll never see those things. You'll just load DGDecodeNV.dll and then write your script as usual:

LoadPlugin("DGDecodeNV.dll")
DGSource()
DGDenoise()
DGSharpen()

Off to the store, I'm out of Scotch and ribeye.

User avatar
gonca
Distinguished Member
Distinguished Member
Posts: 663
Joined: Sun Apr 08, 2012 6:12 pm

Re: About DGSharpen

Post by gonca » Wed Mar 08, 2017 5:13 pm

Can you imagine a DGSource() invocation with 50 parameters to set up all the filters? :wow:
Yes I can, so once again I say :bravo: :bow: to individual filters
Also makes it more modular and manageable, easier to see what is being invoked and parameters.
Possibly easier to debug if necessary.

Post Reply