ICOM video

From MultimediaWiki
Jump to navigation Jump to search
  • Company: ICOM Simulations Inc.
  • Extension: imv

This is a format used in the original version of Sherlock Holmes: Consulting Detective series. The files consists of blocks forming logical groups with video for one scene.

Blocks start with 32-bit size, 32-bit previous block size (useful for seeking backwards), and 16-bit block type. Known block types are:

  • 0x01 - global header (first 6 bytes meaning is unknown then there are 2-byte width, height and fps)
  • 0x02 - logical group (scene) start, it contains total group size in multiple of CD sectors
  • 0x04 - audio plus delta frame. First 4-byte value is block number, followed by 2-byte audio data size, followed by audio and video data
  • 0x08 - audio plus raw frame (with the same header)
  • 0x20 - audio plus raw frame plus palette update. First 4-byte value is block number, followed by 2-byte audio data size and video data size, followed by audio and video data, ending with palette update. Palette update starts with 2-byte values for start colour index and number of colours followed by partial VGA palette
  • 0x40 - palette update

Delta frames are coded as a mix of update mask bytes followed by pixel values. E.g. 0x7A 0x01 0x02 0x03 0x04 0x05 means skipping one pixel, setting next four pixels to 0x01 0x02 0x03 0x04, skipping one pixel, setting next pixel to 0x05 and skipping last pixel. Mask value 0x05 is used as an escape value: if it is followed by 0x02 then 16-bit number of 8-pixel groups to skip follows, otherwise just ignore that following byte.