Does the amount to buy out a spouse of primary residence during divorce increase the home's cost basis? What if it's transferred from a revocable trust to one of the divorcing parties?

Does the amount to buy out a spouse of primary residence during divorce increase the home's cost basis? What if it's transferred from a revocable trust to one of the divorcing parties?