First stab at Downsampling, use code from Android CTS