Reference implementation by Loren Merritt et. al.
http://akuvian.org/src/x264/nnedi.tar.bz2