View Single Post
Old 19th September 2007, 23:28   #44  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
Quote:
Originally Posted by Chainmax
tritical, I used EEDI2 mostly for antialiasing and picture improvement on blocky sources (reconnecting edges). How do you expect NNEDI to behave on such cases? Also, does pointresize have a final image quality advantage over other resizing methods when pairing it with NNEDI or is it just a processing speed choice?
I would expect nnedi to work pretty much the same as EEDI2, but there is only one way to find out. Pointresize is the only resizing method that will work because the original pixels need to be kept intact. Basically, you just need a method that will copy the existing rows of pixels to every other line (even lines if field=1 or odd lines if field=0) of the height doubled input into nnedi. The point resize method copies to both, so it works for both field=0/1.

Quote:
Originally Posted by yup
Can I use this plugin for calculation pelclip for MVAnalyse(MVTools plugin)? Where need use src_left=0.25 and src_top=0.25, in first pointresize or second?
If I understand the documentation correctly, mvtools actually wants a shifted clip (left/up). So you can use the code from the first post, but with field set so that the image always ends up shifted left and up:

Code:
function nnediresize2x(clip c, bool pY, bool pU, bool pV)
{
	v = c.nnedi(dh=true,Y=pY,U=pU,V=pV,field=1).turnleft()
	v = v.nnedi(dh=true,Y=pY,U=pU,V=pV,field=0).turnright()
	return v
}

function nnediresize_YUY2(clip c)
{
	cy = c
	cu = c.utoy()
	cv = c.vtoy()
	cy = nnediresize2x(cy,true,false,false)
	cu = nnediresize2x(cu,true,false,false)
	cv = nnediresize2x(cv,true,false,false)
	return ytouv(cu,cv,cy)
}

function nnediresize_YV12(clip c)
{
	return nnediresize2x(c,true,true,true)
}
Call either nnediresize_YUY2 or nnediresize_YV12 depending on the colorspace, or you could make a wrapper function which checks the colorspace and chooses the right one automatically.

Last edited by tritical; 21st September 2007 at 00:27.
tritical is offline   Reply With Quote