View Single Post
Old 31st January 2018, 06:52   #24  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 106
I like this idee, I am looking to use vaporsynth for nnedi3 but I need didee' daa3, is it possible to combine vaporsynth functions with avisynth functions ?
this is the daa3 code that I am using:
Code:
    #controllable Anti-aliasing with contra-sharpening by Didée
    FUNCTION daa3(clip c, int "nthreads", int "nsharp", int "neurons", int "q", int "size" ) {
	nthreads    = default(nthreads, 8)
	nsharp      = default(nsharp, 25)
	neurons		= default(neurons, 4)
	q			= default(q, 5)
	size		= default(size, 3)
	Assert((nthreads>=1)        	 ? true : false, chr(10) + "'nthreads' must be at least 1" + chr(10))
	Assert((nsharp>=-1&&nsharp<=25)  ? true : false, chr(10) + "'nsharp' must be between -1 and 25" + chr(10))
	Assert((q>=0&&q<=5)      	     ? true : false, chr(10) + "'q' must be between 0 and 5" + chr(10))
	Assert((neurons>=0&&neurons<=4)  ? true : false, chr(10) + "'neurons' must be between 0 and 4" + chr(10))
	Assert((size>=1&&size<=6)        ? true : false, chr(10) + "'size' must be between 1 and 6" + chr(10))
	nn = (q == 0)  ? c.nnedi3(field=-2,nsize=size,nns=neurons,qual=1,pscrn=2,fapprox=0,threads=nthreads) :
	\	(q == 1)  ? c.nnedi3(field=-2,nsize=size,nns=neurons,qual=1,pscrn=1,fapprox=0,threads=nthreads) :
	\	(q == 2)  ? c.nnedi3(field=-2,nsize=size,nns=neurons,qual=1,pscrn=0,fapprox=0,threads=nthreads) :
	\	(q == 3)  ? c.nnedi3(field=-2,nsize=size,nns=neurons,qual=2,pscrn=2,fapprox=0,threads=nthreads) :
	\	(q == 4)  ? c.nnedi3(field=-2,nsize=size,nns=neurons,qual=2,pscrn=1,fapprox=0,threads=nthreads) :
	\   c.nnedi3(field=-2,nsize=size,nns=neurons,qual=2,pscrn=0,fapprox=0,threads=nthreads)
    dbl     = mt_average(selecteven(nn),selectodd(nn),U=3,V=3)
    dblD    = mt_makediff(c,dbl,U=3,V=3)
	shrpD   = nsharp==25 ? mt_makediff(dbl,dbl,U=3,V=3) : mt_makediff(dbl,dbl.removegrain(nsharp),U=3,V=3)
    DD      = shrpD.repair(dblD,13)
    return dbl.mt_adddiff(DD,U=3,V=3) }
the goal is to run the nnedi3 portion using vaporsynth (with openCL version for speed)
while making sure the function that uses nnedi3 inside daa3 will function:
Code:
    dbl     = mt_average(selecteven(nn),selectodd(nn),U=3,V=3)
is sutch a thing is possible ?
monohouse is offline   Reply With Quote