- fix the bug where dropped frames would jump back in time
- abstract some direct3d9 code for colour space conversion