Tuesday, March 15, 2011
Getting VBI data down to the controller
I spent a decent amount of effort recently coding up a solution to get VBI data down to the AVR (aka the "controller"). The problem is that VBI data uses 3 bytes per line and 3 lines per field. And if your laserdisc has 2 fields per frame and 60,000 frames, then that is 60,000 * 2 * 3 * 3 bytes, so over a megabyte of data. The AVR I am targetting has 2k of RAM so it definitely cannot hold a megabyte. Fortunately, the VBI data usually follows a predictable pattern which can be described in much less space (for example, 36 bytes would be the minimum for an entire disc if the whole disc follows the same pattern). The trick is writing algorithms to find and recognize these patterns from the raw VBI data and compact them down.