Defects and doping effects in TiO2 and ZnO thin films of transparent and conductive oxides