Studies of nuclear polarization of hydrogen atoms embedded in solid molecular hydrogen and hydrogen deuteride films