Giant pandas are endangered with a total population of 1,600 , both in captivity and in the wild .