Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
18th September 2007, 09:42 | #41 | Link | |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
In terms of the basic operation, EEDI2 and NNEDI do the same thing. They just get there in different ways... EEDI2 copies every line of the input frame to every other line of the output frame and then interpolates the missing pixels. NNEDI just starts by throwing out every other line of the input frame and interpolates the missing pixels.
Algorithmically, NNEDI is a computational intelligence approach using artifical neural networks and clustering. Whereas EEDI2 uses a vector matching method to create a direction map, does some processing of the direction map, and then does linear interpolation along the determined directions. The main advantage of NNEDI is that it isn't limited to outputting the average of two pixels (one from the line above and one from the line below) like EEDI2 is. This allows it to handle conditions that EEDI2's interpolation can't, and is also the reason it can eliminate what Revgen called "Blur Bubbles," which EEDI2 produces. Atm, there are still some things EEDI2 handles better, but I'm confident NNEDI can best it on those things as well. There is still a lot of experimenting to be done as far as NNEDI is concerned. Quote:
|
|
18th September 2007, 22:59 | #42 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
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?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. Last edited by Chainmax; 18th September 2007 at 23:01. |
19th September 2007, 09:58 | #43 | Link |
Registered User
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
|
Hi tritical!
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? Advice right way. With kind regards yup. |
19th September 2007, 23:28 | #44 | Link | ||
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
Quote:
Quote:
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) } Last edited by tritical; 21st September 2007 at 00:27. |
||
20th September 2007, 06:51 | #46 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
That's actually faster than pointresize? o.O?
Fastest of all would seem to be the way eedi2 does it internally, which is just copying every line of source into every other line of output. (With suitable simd, which eedi2 doesn't have.) I'm not actually much concerned about speed, as the overhead of making and keeping a copy of something in cache that's just going to be thrown right away. (I use it for biiiiiiiiig stuff.) I guess MakeWriteable would prevent that. |
20th September 2007, 07:35 | #47 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Yes internally doing a BitBlt(..., dest_pitch*2, ....) would be twice as fast as the weave I suggested, which does the above blit twice.
The resizer core does struggle to do a point-resize efficently, it stupidly goes through the full motion, multiplying every pixel by 1 in a loop of 1 cycle. |
20th September 2007, 07:45 | #48 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
I could add the option to make nnedi do it internally, which would be the fastest. However, it really wont make a noticeable difference since nnedi runs more than 100 times slower than pointresize. On my laptop pointresize 720x480 -> 720x960 runs ~260-280 fps. interleave()/weave() 720x480 -> 720x960 runs ~500-600 fps. nnedi on 720x960 input runs ~1.25 fps. Even on my quadcore the ratio is still > 100 times slower (6 fps vs 750 for point and 1100 for interleave/weave).
|
21st September 2007, 00:30 | #49 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
nnedi v1.3. foxyshadis's argument about the cache and ram usage in general convinced me to add an option to internally do the needed copying for doubling the height... so no need to call pointresize anymore. I was also using a separate filter to pad the frames prior to nnedi, and then invoking crop afterwards. That has been done away with as well. I also discovered a bug in the yuy2 padding code, which resulted in occasionally incorrect (+-3) interpolated chroma values at the left and right hand sides of the image.
I updated the code in the first post to use the new 'dh' option instead of pointresize. |
21st September 2007, 22:33 | #51 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Code:
field - Possible settings: ... -1 = same rate, uses avisynth's internal parity value ... Default: -1 (int) Code:
dh - ... Default: false (int) <- (bool) Code:
Y, U, V - These control whether or not the specified plane is processed. Set to true to process or false to ignore. Also are you going to discuss the nitty gritty of the algorithm or are you constrained because you are doing your thesis? |
22nd September 2007, 02:29 | #52 | Link | ||||
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
Quote:
Quote:
Quote:
Quote:
I'll try and update the readme tommorrow sometime... thanks for pointing out areas lacking complete descriptions. Also, if anyone is willing to donate cpu time again, network training for version 2 has started. Same irc channel as before (#editrain on irc.freenode.net)... files are in same directory on my website as before. Based on previous experience, I would say an x2 or core 2 duo is probably the minimum processor to complete the optimization runs in a reasonable amount of time. I'm also looking into offloading some processing onto the gpu, which should speed things up a good bit. Last edited by tritical; 22nd September 2007 at 02:31. |
||||
23rd September 2007, 13:47 | #53 | Link |
Retired AviSynth Dev ;)
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
Results are very impressive. I had a look at some of the math you link to, and it seems like another case of "Math I'll never be able to understand", just like FFT math.
Anyway, this is very interesting. I'm thinking it could be very useful for a Bayer Grid de-mosaic, which has very similar problems compared to deinterlacing. I hope the source will be available at some point. Keep up the good work!
__________________
Regards, sh0dan // VoxPod |
26th September 2007, 21:00 | #54 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
One (probably stupid) question:
When I want to use nnedi with TDeint or Yadifmod, do I have to use the same syntax as for EEDI2 Code:
AssumeTFF (or BFF) interp = separatefields().selecteven().nnedi(field=1,dh=true) yadifmod(edeint=interp) Code:
AssumeTFF (or BFF) interp = nnedi() yadifmod(edeint=interp) And one small request: While playing with different deinterlacers I found it very annoying to have two Yadif plugins with almost the same functionality, one does autoload, the other one doesn't. Is it possible to make one consolidated build of Yadif which has the "edeint" parameter, but which uses its own spatial interpolation when the edeint parameter is not specified (just like TDeint)? Cheers manolito |
27th September 2007, 06:03 | #55 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
separatefields().selecteven().nnedi(field=-1,dh=true)
and nnedi() are equivalent. The second should be faster, but the speed difference probably wouldn't be enough to notice. As far as adding internal interpolation to yadifmod, I personally think yadif's default interpolation is far too artifact prone. So I probably wouldn't add exactly the same method that Fizick's filter uses. At the very least it would include capping the prediction to the max/min +-2 of the vertical neighbors. Last edited by tritical; 27th September 2007 at 21:50. |
27th September 2007, 08:00 | #57 | Link |
Retired AviSynth Dev ;)
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
http://forum.doom9.org/showthread.ph...00#post1038500
You might also spend some time at wikipedia: http://en.wikipedia.org/wiki/Artificial_neural_network
__________________
Regards, sh0dan // VoxPod |
27th September 2007, 13:16 | #58 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Thx!
So if I guess correctly, you classify and examine a stack of images to build a tables of how "the world" works. To do the interpolation you assume the target image is a member of "the world" with every 2nd line missing. You then search your table for "a good/best match" and insert the missing lines based on that instance of experience. This should be extensible for general times N upsizing by assuming N-1 of N lines are missing and need insertion. Also I suspect with a little lateral thinking, the tables of how "the world" works, could be adapted to analyze interlaced images to classify the area that are static (good experience match) from those that have motion (bad experience match)..... |
27th September 2007, 16:02 | #59 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
@ tritical
Quote:
Cheers manolito Last edited by manolito; 27th September 2007 at 18:03. |
|
Tags |
deinterlace, nnedi |
|
|