Constraints on density and shear velocity contrasts at the inner core