Browser
AVClub Fanatic
- 17 June 2006
- 10,575
http://forum.doom9.org/showthread.php?p=1663611#post1663611
So let's discuss NNEDI3:
(1) NNEDI3 is a resolution doubler. It can double resolution in either X or Y direction. Of course you can run it multiple times, so you can double both X and Y resolution, once, twice, thrice, whatever. Of course you can also double X twice and not double Y at all. Whatever you like. NNEDI3 cannot do anything else except exact 2x resolution doubling.
(2) NNEDI3 has a number of very nice advantages: It is quite sharp, has very low aliasing levels, produces almost no ringing or similar artifacts and has a very clean look to it. Due to the lack of artifacts you can also apply it multiple times to e.g. quadruple image resolution without any problems, or you can followup NNEDI3 upscaling with a different up- or downscaling algorithm.
(3) NNEDI3 unfortunately also has disadvantages: It is relatively slow. It can't do anything other than 2x resolution doubling. It shifts the image by half a pixel (compared to other upscaling algorithms). And it can sometimes introduce weird artifacts that are unknown from linear resamplers like Lanczos or Jinc.
Let's look at a first test image (Monsters Inc. Blu-Ray, run time 0:13:45), upscaled from 1080p to UHD:
Looking at this image, NNEDI3 seems to combine the positive attributes of Lanczos and Jinc upscaling: It's even sharper than Lanczos, has even lower aliasing levels than Jinc and has the lowest levels of artifacts. With this image I'd say it beats the hell out of Lanczos and Jinc. However, it's not perfect. There are a couple image areas which are still aliased. But I guess with this specific source (which is quite heavily aliased to start with) that's really the max we can possibly expect. But now let's look at a different test image:
First let's look at the positive aspects of the NNEDI3 upscaling here:
(1) NNEDI3 renders all 3 roofs cleaner and sharper than Lanczos does. The handrail on the lighthouse top outer floor makes this especially obvious.
(2) The whole NNEDI3 image has a clean and sharp look to it. It almost doesn't look like it's upscaled. In contrast to that the Lanczos image has a lot of aliasing, ringing and overall a somewhat coarse look to it. It's pretty obvious that the Lanczos image was upscaled.
But this test image also brutally showcases some of the NNEDI3 weaknesses:
(1) Look at the fence pickets directly at the bottom right of the lighthouse. Lanczos manages to keep the picket sizes nicely equal. NNEDI3 reproduces the pickets at unequal sizes, similar to what Bilinear does. This is one case where the natural ringing in the Lanczos algorithm is actually beneficial. Yes, ringing can sometimes help reproducing images better.
(2) Look at the grass at the bottom part 1/4 of the image. It looks quite weird in the NNEDI3 image, almost like a fractal. This is what bothers me most about NNEDI3. But it seems that all "intelligent" algorithms have this kind of artifact. With grass/trees/nature they often see lines/geometrical figures to connect which don't belong together. No such problem with Lanczos/Jinc.
So there you have, all the good and bad things about NNEDI3. Pick your own poison! At least you have all the options now. If you like NNEDI3, you can also say "thanks" to SEt for providing the OpenCL kernel in this thread:
http://forum.doom9.org/showthread.php?t=169766
Now let's talk performance a bit: Since NNEDI3 is a rather slow algorithm, I've added the option to convert the image to YUV and to only upscale the Y channel with NNEDI3, while using a different algorithm for the chroma channels. Using NNEDI3 on the chroma channels is IMHO slightly wasted. The benefit for the Luma channel is much bigger. Of course you can use NNEDI3 for the chroma channels, too, if you have the GPU juice for that. You can even use it for chroma upsampling, if you prefer. My recommendation is to use NNEDI3 only for the Luma channel and to use a cheap algorithm in the "image upscaling" section, which will then be used to upscale the chroma channels, e.g. Lanczos3 AR or even Bicubic AR.
NNEDI3 doesn't have "taps", instead it has "neurons". The lowest quality level of 16 neurons performs a little bit slower than Jinc3 AR on my PC, when using it only on the Luma channel and when doing an exact 2x size improvement. Every higher quality step almost doubles rendering times. So 32 neurons almost cut performance in half. Using 64 neurons in quarter etc. For Luma upscaling I recommend to use at least 32 neurons. The lowest quality setting of 16 neurons leaves a bit too many artifacts in the image, IMHO. It could still be useful for chroma upscaling, though, if you insist on using NNEDI3 for chroma.
So let's discuss NNEDI3:
(1) NNEDI3 is a resolution doubler. It can double resolution in either X or Y direction. Of course you can run it multiple times, so you can double both X and Y resolution, once, twice, thrice, whatever. Of course you can also double X twice and not double Y at all. Whatever you like. NNEDI3 cannot do anything else except exact 2x resolution doubling.
(2) NNEDI3 has a number of very nice advantages: It is quite sharp, has very low aliasing levels, produces almost no ringing or similar artifacts and has a very clean look to it. Due to the lack of artifacts you can also apply it multiple times to e.g. quadruple image resolution without any problems, or you can followup NNEDI3 upscaling with a different up- or downscaling algorithm.
(3) NNEDI3 unfortunately also has disadvantages: It is relatively slow. It can't do anything other than 2x resolution doubling. It shifts the image by half a pixel (compared to other upscaling algorithms). And it can sometimes introduce weird artifacts that are unknown from linear resamplers like Lanczos or Jinc.
Let's look at a first test image (Monsters Inc. Blu-Ray, run time 0:13:45), upscaled from 1080p to UHD:
Looking at this image, NNEDI3 seems to combine the positive attributes of Lanczos and Jinc upscaling: It's even sharper than Lanczos, has even lower aliasing levels than Jinc and has the lowest levels of artifacts. With this image I'd say it beats the hell out of Lanczos and Jinc. However, it's not perfect. There are a couple image areas which are still aliased. But I guess with this specific source (which is quite heavily aliased to start with) that's really the max we can possibly expect. But now let's look at a different test image:
First let's look at the positive aspects of the NNEDI3 upscaling here:
(1) NNEDI3 renders all 3 roofs cleaner and sharper than Lanczos does. The handrail on the lighthouse top outer floor makes this especially obvious.
(2) The whole NNEDI3 image has a clean and sharp look to it. It almost doesn't look like it's upscaled. In contrast to that the Lanczos image has a lot of aliasing, ringing and overall a somewhat coarse look to it. It's pretty obvious that the Lanczos image was upscaled.
But this test image also brutally showcases some of the NNEDI3 weaknesses:
(1) Look at the fence pickets directly at the bottom right of the lighthouse. Lanczos manages to keep the picket sizes nicely equal. NNEDI3 reproduces the pickets at unequal sizes, similar to what Bilinear does. This is one case where the natural ringing in the Lanczos algorithm is actually beneficial. Yes, ringing can sometimes help reproducing images better.
(2) Look at the grass at the bottom part 1/4 of the image. It looks quite weird in the NNEDI3 image, almost like a fractal. This is what bothers me most about NNEDI3. But it seems that all "intelligent" algorithms have this kind of artifact. With grass/trees/nature they often see lines/geometrical figures to connect which don't belong together. No such problem with Lanczos/Jinc.
So there you have, all the good and bad things about NNEDI3. Pick your own poison! At least you have all the options now. If you like NNEDI3, you can also say "thanks" to SEt for providing the OpenCL kernel in this thread:
http://forum.doom9.org/showthread.php?t=169766
Now let's talk performance a bit: Since NNEDI3 is a rather slow algorithm, I've added the option to convert the image to YUV and to only upscale the Y channel with NNEDI3, while using a different algorithm for the chroma channels. Using NNEDI3 on the chroma channels is IMHO slightly wasted. The benefit for the Luma channel is much bigger. Of course you can use NNEDI3 for the chroma channels, too, if you have the GPU juice for that. You can even use it for chroma upsampling, if you prefer. My recommendation is to use NNEDI3 only for the Luma channel and to use a cheap algorithm in the "image upscaling" section, which will then be used to upscale the chroma channels, e.g. Lanczos3 AR or even Bicubic AR.
NNEDI3 doesn't have "taps", instead it has "neurons". The lowest quality level of 16 neurons performs a little bit slower than Jinc3 AR on my PC, when using it only on the Luma channel and when doing an exact 2x size improvement. Every higher quality step almost doubles rendering times. So 32 neurons almost cut performance in half. Using 64 neurons in quarter etc. For Luma upscaling I recommend to use at least 32 neurons. The lowest quality setting of 16 neurons leaves a bit too many artifacts in the image, IMHO. It could still be useful for chroma upscaling, though, if you insist on using NNEDI3 for chroma.