update library, support tvdpi, fix bugs (1.22c)