Depletion layers and domain walls in semiconducting ferroelectric thin films.