Ferroelectric phase transition in BaTiO3 films