Combine the window and overlap loops,
and get rid of the data swapping.

Patch by Ian Braithwaite <dk dot braithwaite at ian>

Originally committed as revision 8387 to svn://svn.ffmpeg.org/ffmpeg/trunk
