Visual ecology and neural coding