gdal_proximity fails if output band is Byte
The gdal_proximity algorithm fails to produce the right results if the output proximity file has a Byte data type (or likely any unsigned type) for the output band. In particular, the second pass from bottom to top seems to have no effect and proximity to things below is lost (or always set to zero?).
gdal_proximity.py small.tif out.tif -ot Byte
Note that the out.tif is all zeros but it should have increasing proximities from the middle up as the bottom of the source image is non-zero.