move identical code into its own function intXY_t -> int_fastXY_t
Originally committed as revision 2455 to svn://svn.ffmpeg.org/ffmpeg/trunk