Video.cpp: optimize some float calculations