optimized mosaic filter