add downsampling for realtime O1 bilateral filter