and convert it to a generic interpolation routine. Originally committed as revision 13284 to svn://svn.ffmpeg.org/ffmpeg/trunk