Network Q RAC Rally FMV
Jump to navigation
Jump to search
This is a video format used for the cutscenes in the game.
File header:
4 bytes - "DANI" 2 bytes - always 0x0503? 2 bytes - number of frames 2 bytes - width 2 bytes - height 4 bytes - suggested video buffer size 1 byte - bits per audio sample 1 byte - audio channels 2 bytes - sampling rate 4 bytes - always zero?
Then a palette chunk follows:
4 bytes - "CMAP" 4 bytes - palette size N bytes - palette
In case of audio being present, it is stored all in the following chunk:
4 bytes - "SNDT" 4 bytes - audio size N bytes - audio
Video data is stored in "DLTA" chunks with 32-bit chunk length. "ENDA" marker (without size) signals end of file.
Video compression
Video is split into 4x4 blocks and uses variable-length codes to signal block type. Those codes consist of the bits that are grouped into bytes and interspersed among data bytes.
The codes are:
0xxx
- pattern fill with 1-8 colours. For each pixel in the block a code is read telling which colour to pick. E.g. for 4-colour pattern it's two-bit code, for 1 colour it is no code at all, and for 7-colour code it is00 010 011 100 101 110 111
;10
- raw block110
- skip block1110
- row end marker (should appear after the last block in the row)1111
- frame end marker (should appear after the last block instead of row end marker)