The video player: Frame scheme
When doing 30 FPS, we need a new image on the screen every other frame. The scheme is set like this:
The above 4 steps/frames repeat until the video ends. With this scheme we get 4 full frames to update the hidden buffer, before we need to show it. We aim for NTSC (60 Hz ~ 59 000 cycles), so that’s about 50 000 cycles each frame – we need to set aside some cycles for the music too.Know your data
The encoder calculates how costly the update of each diff is (in MSX Z80 cycles), and fills the work into 1, 2, 3 or 4 frames according to a target cost per frame. If the work would take more than 4 frames, the fallback is to use however many frames are actually required. The result will be a longer shown frame, i.e. a brief dip in the perceived frame rate. In practice, an occasional 5-frame update in a few places in the stream goes unnoticed. Too many of them, however, and the video's duration may noticeably increase. If the video is synced to audio, this can become a problem.
< Diff based rendering | Frame scheme | Optimized VRAM writes >
Comments
Post a Comment