Deductions & credits

The mortgage has nothing to do with it at all.  Generally, property received as a gift are calculated with respect to the original owner's cost basis in the property. In other words, when property is given, the recipient receives both the property and the property's cost basis.