We present a microstructure-dependent anisotropic infrared-optical dielectric function model for mixed-phase polycrystalline material from which we derive the transverse and longitudinal-optical modes observable in thin films. Infrared ellipsometry over the wavelength range from 700 to 3000 cm-1 is then used to determine the phase and microstructure of polycrystalline and multilayered hexagonal and cubic boron nitride thin films deposited by magnetron sputtering onto (100) silicon. The ellipsometric data depend on the thin-film multilayer structure, the layer-phase composition, and the average orientation of the hexagonal grain c axes. In particular, we demonstrate the existence of spectral shifts of longitudinal optical phonons as a function of microstructure, i.e., the average grain crystallographic orientation within the mixed-phase material