Simplified median filter pattern