Black Diamond STR

From MultimediaWiki
Jump to navigation Jump to search
  • Extension: STR

At least one computer/video FMV game (Psychic Detective) developed by Colossal Pictures and published by Electronic Arts uses a custom video codec stored in several huge files with extension .str

Video frames are encoded with a method strongly resembling Cinepak, while audio is encoded using the stock IMA ADPCM algorithm.

The identifier "Black Diamond" comes from a string found in the game's executable: MS-DOS Black Diamond Player V0.10.1 BETA.

Data is organised into chunks with 32-bit tag and size. 0xF7F7F8F8 is used for audio, "MRFI" is used for images.

Video frame header:

 1 byte - unknown
 1 byte - method (should be 5 or 6)
 2 bytes - number of tiles for 4x4 blocks, first part
 2 bytes - number of tiles for 4x4 blocks, second part
 2 bytes - number of tiles for 2x2 sub-blocks
 2 bytes - palette size
 2 bytes - switch line (before it tiles from the first part are used, afterwards - from the second part)
 2 bytes - always zero?
 N bytes - palette
 K*4 bytes - paletted vectors for first 4x4 part
 L*4 bytes - paletted vectors for second 4x4 part
 M*4 bytes - paletted vectors for 2x2 sub-blocks
 K*6 bytes - YUV vectors for first 4x4 part
 L*6 bytes - YUV vectors for second 4x4 part
 M*6 bytes - YUV vectors for 2x2 part

Then there is a mask telling whether block is coded using one or four vector, followed by vector indices. Decoding is the same as in Cinepak, only data ordering differs.

References