Log in

View Full Version : AMD's Contrast Adaptive Sharpening as filter for AviSynth?


Atak_Snajpera
7th August 2019, 14:23
Do we have a filter for AviSynth which works in similar way?
If not would it be hard to port this to AviSynth?

Some sources for ReShade
https://gist.github.com/SLSNe/bbaf2d77db0b2a2a0755df581b3cf00c

https://pastebin.com/iUmDXTVP

Without CAS
https://gpuopen.com/wp-content/uploads/2019/06/cas-img3.png

With CAS
https://gpuopen.com/wp-content/uploads/2019/06/cas-img4.png

videoh
7th August 2019, 16:51
[deleted]

real.finder
7th August 2019, 17:49
Here is a link to a description of the algorithm:

https://gpuopen.com/wp-content/uploads/2019/07/FidelityFX-CAS.pptx

Looks interesting. It's sort of a "limited sharpen" type algorithm. I'll try making an Avisynth/Vapoursynth version supporting CUDA and CPU.

is it hard to make opencl support?

Atak_Snajpera
7th August 2019, 18:21
is it hard to make opencl support?

VideoH is not an OpenCL guy. He always prefers closed standards made by nVidia.

videoh
7th August 2019, 20:10
Would have considered it favorably but Atak wants to be superior and answer for me. So, go for it Atak, the algorithm is surely simple enough for you, no need to beg others. Well within the capabilities of the great Ripbot author!

Atak_Snajpera
7th August 2019, 20:36
Would have considered it favorably but Atak wants to be superior and answer for me. So, go for it Atak, the algorithm is surely simple enough for you, no need to beg others. Well within the capabilities of the great Ripbot author!

Unfortunately day has only 24hours for me...

videoh
7th August 2019, 21:25
A simple 3x3 spatial filter. Why should it take more than a few hours? And you have 365 days in a year just like the rest of us.

StainlessS
7th August 2019, 23:07
It makes the ripples on the water look well weird.

BetA13
7th August 2019, 23:27
jup, looks way too stronk :)
kinda looks like an oil paint filter on top of it..

But i think thats because the ReShade version CAS.fx doesnt have a "0" (off) position..
How do i say? ummmm, when enabled in Reshade and set to "0" (negative isnt possible) its allready enabled and can be too strong for some stuff allready..

i still use it in some games, its a really nice "Sharpener". i just wish i could go negative a bit, so it can be more subtile..

anyway, it shoudnt be hard to make an avisynth script out of it..
Im trying to get this thing converted to HLSL, so i can use it in Movies.. But, as i am a noob, and have to test step by step, its gonna take a loooooooooong time..
Maybe i get some help at the ReSHade forum..

cheers

EDIT:

some more comparsions of all sharpening filter/shader, CAS, SuperSample, Adapt. sharpen, Lumasharpen, Filmic sharpen, etc.... (not by me)

https://misie.ga/sharp/

videoh
8th August 2019, 02:47
jup, looks way too stronk :)
There is a strength parameter. Possibly they have cranked it high for extra "wow" factor. Anyway, I'm not convinced it is doing anything that much greater than the already available limited sharpeners.

Didée
11th August 2019, 21:48
FineSharp should be somewhat close to what we see here.
Also, consider some clutch-up like this (http://forum.doom9.org/showthread.php?p=1595531#post1595531).

The herolds of past Avisynth times have done it all, long time before. Dig the chronicles. ;)

johnmeyer
11th August 2019, 22:10
Didée,

It is great to hear from you again, after all these years. I learned more from the amazingly clever code you posted in your 5,000+ posts than you can possibly imagine.

I hope you are doing well.

Natty
11th August 2019, 23:27
Didée

thanks for everything. learned a lot from you. :thanks:

vcmohan
14th August 2019, 13:55
In the first o=post of this thread, the example images given differ in width by 1. Is this intended?

hydra3333
11th April 2020, 06:08
Would have considered it favorably

I know it's late in the day, however may one still venture to encourage favourable consideration ?