Deposition of functional thin films by plasma processes