Start64!This small section of the tute contains a description and illustration of a very fast box blur algorithm. We want to select the fastest known algorithm for our own implementation, and the sliding window version I was thinking of implementing is nowhere near as fast as this one.

The technique is to perform two passes of the image. During the first pass we perform a horizontal motion blur. During the second pass, we calculate a vertical motion blur on the output from the horizontal blur. The end result is the box blur but we've saved a massive amount of calculation. We no longer need to repeatedly sum the pixels in a small box over and over, instead, we can very quickly pass through the whole image calculating the much simpler horizontal and vertical motion blurs.

x64 Assembly and C++ Tutorial 63 A: Double Pass Box Blur Description - YouTube