Optimize gaussian blur