Log in

View Full Version : [REQ] SmoothD2 for VapourSynth


Boulder
9th September 2016, 16:55
Jim Conklin's nice deblocking filter for Avisynth cannot be used with the x64 version of VapourSynth as it's compiled with Avisynth 2.5 headers. If there's someone bored out of his/her mind, I'd be grateful if the filter was ported to VapourSynth :)

https://sites.google.com/site/jconklin754smoothd2/download

Myrsloik
9th September 2016, 18:09
You forgot to mention that there isn't an x64 Avisynth version. And the reason for that is piles and piles of inline asm. Also piles of dead code in this. And of course it uses a custom memcpy.

A+++++

Would Avisynth filter again

I find it very hard to motivate myself to clean up this kind of mess. Porting is easy, messes are hard.

feisty2
9th September 2016, 18:13
why not just go Deblock_QED (performance-wise) or Oyster.Deblocking(quality-wise)

Boulder
9th September 2016, 18:14
I totally forgot that the original site doesn't have an x64 version, but the Avisynth+ wiki page links to it:

http://www.dropbox.com/s/ui8chlbzopuqs5a/SmoothD2-a3_x64.zip?dl=1

Don't know how messy it is though :)

Myrsloik
9th September 2016, 18:26
I totally forgot that the original site doesn't have an x64 version, but the Avisynth+ wiki page links to it:

http://www.dropbox.com/s/ui8chlbzopuqs5a/SmoothD2-a3_x64.zip?dl=1

Don't know how messy it is though :)

That is depressing. Still has inline asm and can only ever be compiled with intel's compiler. And to think this was something produced in modern times...

Boulder
9th September 2016, 18:42
Off to check out Oyster then :D

Boulder
10th September 2016, 10:10
OK - is there an intermediate choice between Deblock_QED and Oyster? :)

feisty2
10th September 2016, 11:34
I could make one if you do want that

Boulder
10th September 2016, 12:12
Don't know if you should bother, my needs are only to use a deblocker for those rare TV series that I have only on DVD (Community, MacGyver etc.) Oyster is a bit too much placebo for that usage.

feisty2
10th September 2016, 12:24
Guess I'll just give it a shot, I like Community, and it's not that "rare", maybe?

Boulder
10th September 2016, 16:40
Thanks, I'd appreciate any effort. If you need any sample material, just let me know.

I feel that TV shows on DVD only are quite rare these days as new series are already in HD when broadcast. The old series need more work though, and they can be quite messy to clean up unless you want to remove all the few details they may still have.

hydra3333
11th September 2016, 00:41
I, also, would be economically appreciative. Do you have a paypal donations page of some kind ?

feisty2
11th September 2016, 15:54
def fast_deblock(src, radius=6, h=3.2, lowpass="0.0:0.0 0.12:1024.0 1.0:1024.0"):
core = vs.get_core()
MakeDiff = core.std.MakeDiff
MergeDiff = core.std.MergeDiff
MaskedMerge = core.std.MaskedMerge
ShufflePlanes = core.std.ShufflePlanes
colorspace = src.format.color_family
if colorspace != vs.GRAY:
src_color = src
src = ShufflePlanes(src, 0, vs.GRAY)
ref = Oyster.Basic(src, None, radius)
mask = Oyster.helpers.genblockmask(src)
cleansed = Oyster.helpers.nlmeans(ref, 0, 8, 4, h, ref, False)
ref = Oyster.helpers.freq_merge(cleansed, ref, 9, lowpass)
src = Oyster.helpers.freq_merge(cleansed, src, 9, lowpass)
clip = MaskedMerge(src, ref, mask, first_plane=True)
if colorspace != vs.GRAY:
clip = ShufflePlanes([clip, src_color], [0, 1, 2], vs.YUV)
return clip


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

clip = fast_deblock(clip)

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

basically a low precision lite version of Oyster.Deblocking, lower quality but like a million times faster
note that chroma will not be processed

Boulder
11th September 2016, 16:51
Thanks, I'll give it a go as soon as my time allows. Is it possible to use the standard MVTools package in 16-bit depth? I think that 32-bit floating point stuff is also quite placebo for my sources and will only slow things down. I know that you like to be mathematically accurate, there's nothing wrong with that :)

feisty2
11th September 2016, 17:13
not possible, there's no MDegrainN in jackoneill's version