CUDASynth

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

We talked about that last month, although I was calling it a config file. Still haven't decided what to do yet. All options are on the table.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Rocky wrote:
Mon Feb 05, 2024 4:00 am
But rather than an INI file, maybe leverage the existing script template generation.
I dismissed the config file idea. And obviously template generation is in DGIndexNV.

Are we all good now?
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Update on status. I got the denoising running in HBD mode, so I was able to test running HDRtoSDR together with denoising. Here are results with UHD (3840 x 2160):

low quality: 159 fps
medium quality: 53 fps
high quality: 35 fps

All greater than real-time. Remember that low quality here is twice as good as the old low quality (searchw=5). Perceptibly, even low quality looks just fine. I don't see any need for an ultra quality as it is indistinguishable from high quality. I might rename the levels to good, better, and best. Or maybe awesome, kick-ass, and unreal. ;)

The framework saves 4 UHD frame copies over PCIe for this script.

Script:

dgsource("...\LG Chess 4K Demo.mp4",dn_enable=1,dn_quality="high",h2s_enable=1,h2s_white=2000)

Might be faster with TS/ES as MP4 has some additional overhead. This would be the worst case.

Are you not entertained?
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Getting close to release of a test version. Just doing final testing and code review.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

DGSource() + DGHDRtoSDR() + DGDenoiseSpatial() + DGDenoiseTemporal() for a UHD HDR clip:

107 fps

Hope to have a test release soon.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

:bravo: :D
I really do like it here.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Thanks, m8! Just writing up the help manual and then I'll give a test version. There's still some work to do for Vapoursynth but I want to get some testing under our belts.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Here it is boys and girls. Knock yourselves out.

https://rationalqm.us/misc/DGDecodeNV_test3.zip

Use the correct DLL based on your CPU capabilities.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Guys, please holler if you get an illegal instruction pop-up. Gotta make sure that we support all the CPUs correctly, even for luddites still running on a Pentium 3. :roll:
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

The fun is going on in the doom9 KNLMeansCL thread. Curly is running interference.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Goodness me. I wandered over there a few days ago, and now it's split off into a new thread and is 3 pages long. I must take time to peruse it.

Ah, Notes says
Vapoursynth support is not yet complete.
so I guess I'll have to wait for that.
I really do like it here.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

It's no longer fun there so discussion and support will continue here.

Vapoursynth is missing only the temporal denoising, everything else works. But anyway I am replacing the temporal denoising with a better one running on CUDA so no specific changes will be needed for Vapoursynth.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Fig me sideways, I was just reading the new thread over there with the thoughts and contributions ... and as I reached the end it disappeared. Oh well.

I was going to do a silly thing and post there, having just watched an interesting youtube clip on game theory
https://www.youtube.com/watch?v=mScpHTIi-kM
for lay person dummies; at the end it was demonstrated that the strategy of tit-for-tat with also being a tad more "forgiving" led to the best individual outcomes. Oh well, perhaps the thread removal saved me from getting some stick there I suppose.

Cool.

Just wondering, the order of filters based on the commandline, it'd be silly to think it could be done by the left-to-right order of enable/disable parameters, wouldn't it :)
I really do like it here.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Rocky wrote:
Mon Feb 12, 2024 6:24 am
I am replacing the temporal denoising with a better one running on CUDA so no specific changes will be needed for Vapoursynth.
Nice ! Thank you.
I really do like it here.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

"Fig me sideways." That's a new one for me. I'll be using it.

https://www.reddit.com/r/BackyardOrchar ... ig_up_and/

I have the thread downloaded so if you really need it, let me know.

Yes, the ordering idea is not yet implemented and the fixed ordering for now is reasonable. It will change as needed.

Your game theory link is interesting, thank you.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

I've modified things so that the previous two frames are saved on the GPU. Of course using pointer shifting, not frame copying. So now I am set to implement temporal smoothing on the GPU. It's going to be a (possibly weighted) average with scene change detection based on what's going on in the pixel's neighborhood. So it is based on "motion" but is not your standard block-based motion compensation.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

I got the temporal kernel implemented and now I am experimenting with how to best use the previous frames and the neighborhood pixels. This will eliminate the need for the previous SIMD implementation and simplify lots of things. Should be better than the quick-and-dirty temporal median filter.
User avatar
Curly
Posts: 716
Joined: Sun Mar 15, 2020 11:05 am

CUDASynth

Post by Curly »

la de da, la de dum
stick yer finger in a plum
Curly Howard
Director of EAC3TO Development
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Enjoy your extended sabbatical in Vegas. Take that kick-ass laptop because you can't avoid fixing some eac3to stuff while sitting around the pool.
User avatar
Baltasar
Posts: 60
Joined: Tue Nov 02, 2021 9:51 am

CUDASynth

Post by Baltasar »

As Curly would say: oil's well that ends well
User avatar
DG
Posts: 88
Joined: Thu Dec 31, 2020 9:55 am

CUDASynth

Post by DG »

User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Rocky wrote:
Mon Feb 12, 2024 10:17 am
now I am set to implement temporal smoothing on the GPU. It's going to be a (possibly weighted) average with scene change detection based on what's going on in the pixel's neighborhood. So it is based on "motion" but is not your standard block-based motion compensation.
Rocky wrote:
Mon Feb 12, 2024 5:26 pm
I got the temporal kernel implemented and now I am experimenting with how to best use the previous frames and the neighborhood pixels.
I am excited now.

It will be really interesting to see how you rate the results vs the old mv motion compensated approach (if you choose to do that comparison).

Just a query on the DGSource documentation, IIRC did someone mention DGSource could accept the filename of a media file directly as a parameter without the need for DGIndex and it would auto-index ? I checked DGDecodeNVManual.html from the latest binary and didn't readily spot it, although I could be wrong.
I really do like it here.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Yes, the documents are sorely out of date. It will be a large task to update them, so in lieu of doing that immediately I'll make a supplement text document covering the most important changes.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Rocky wrote:
Tue Feb 13, 2024 5:43 am
I'll make a supplement text document covering the most important changes.
Beaut, thanks.
I really do like it here.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Rocky wrote:
Mon Feb 12, 2024 7:49 am
"Fig me sideways." That's a new one for me. I'll be using it.
Oh. Ok. :oops:
Terminology in common use in Oz vernacular mostly when expressing any or all of surprise, disappointment, outrage, or commentary around perceptions of events; for example usually also used as
"Fig me dead, what a ..."
leading into a rather profound description of a someone's personal attributes.
Hence please consider reserving for interesting situations where you may enjoy a bit of biffo.

Whatever you do ... please choose not to google "Figging wiki" if you haven't already ;)
I really do like it here.
Post Reply