Fox Magic Screen Capture Codec

From MultimediaWiki
Jump to navigation Jump to search

The Fox Magic Screen Capture Codec is used in screen capture applications from Fox Magic.

It codes frame in two ways: keyframes are compressed with one of two different LZ77-based schemes, interframes are split into tiles (112x84 or doubled for larger frame dimensions) and each tiled is coded as compressed XORed residue from the reference tile.

Frame format (all variables are little-endian):

 2 bytes - unknown
 2 bytes - keyframe flags
 intra frame:
   2 bytes - compression type
   2 bytes - compressed size
   N bytes - compressed data
 inter frame:
   2 bytes - number of coded tiles
   2 bytes - compression type
   for each tile {
     2 bytes - reference tile number
     2 bytes - compressed data size
     N bytes - compressed data
   }

There are two compression types known, type 1 and type 2, both are based on LZ77 scheme.