<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multimedia.cx/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kostya</id>
	<title>MultimediaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multimedia.cx/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kostya"/>
	<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php/Special:Contributions/Kostya"/>
	<updated>2026-04-08T09:16:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=DMV&amp;diff=16121</id>
		<title>DMV</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=DMV&amp;diff=16121"/>
		<updated>2026-01-24T10:45:33Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Brainstorm Technology&lt;br /&gt;
* Extensions: dmv, mov&lt;br /&gt;
&lt;br /&gt;
This is a video format that is remarkable for coding data for two video frames at one. It has no specific header and frames are always stored in blocks of size 0xAB15 bytes even if data may not make full use of it.&lt;br /&gt;
&lt;br /&gt;
Block starts with 16-bit size of pixel data, 16-bit size of packed tile indices, 253-colour VGA palette (first three colours are unused), pixel data, and LZ77-compressed tile indices. Audio part always starts at offset 0x9D4D.&lt;br /&gt;
&lt;br /&gt;
Frames are coded by splitting a pair of frames into 2x2x2 blocks and painting them with 1-8 colours (from pixel data) using one of 154 pre-defined patterns.&lt;br /&gt;
&lt;br /&gt;
LZ77 compression scheme opcodes (in binary):&lt;br /&gt;
* &amp;lt;code&amp;gt;000xxxxx&amp;lt;/code&amp;gt; -- copy &amp;lt;code&amp;gt;xxxxx&amp;lt;/code&amp;gt;+1 bytes from input&lt;br /&gt;
* &amp;lt;code&amp;gt;001xxxxx yyyyyyyy&amp;lt;/code&amp;gt; -- copy &amp;lt;code&amp;gt;yyyyyyyyxxxxx&amp;lt;/code&amp;gt;+1 bytes from input&lt;br /&gt;
* &amp;lt;code&amp;gt;010xxxxx yyyyyyyy&amp;lt;/code&amp;gt; -- copy &amp;lt;code&amp;gt;xxxxx&amp;lt;/code&amp;gt;+1 bytes from already decoded output using offset &amp;lt;code&amp;gt;yyyyyyyy&amp;lt;/code&amp;gt;+4&lt;br /&gt;
* &amp;lt;code&amp;gt;011xxxxx yyyyyyyy zzzzzzzzz&amp;lt;/code&amp;gt; -- copy &amp;lt;code&amp;gt;yyyyyyyyxxxxx&amp;lt;/code&amp;gt;+1 bytes from already decoded output using offset &amp;lt;code&amp;gt;yyyyyyyy&amp;lt;/code&amp;gt;+4&lt;br /&gt;
* &amp;lt;code&amp;gt;100xxxxx yyyyyyyy zzzzzzzzz&amp;lt;/code&amp;gt; -- copy &amp;lt;code&amp;gt;xxxxx&amp;lt;/code&amp;gt;+1 bytes from already decoded output using offset &amp;lt;code&amp;gt;zzzzzzzzyyyyyyyy&amp;lt;/code&amp;gt;+4&lt;br /&gt;
* &amp;lt;code&amp;gt;101xxxxx wwwwwwww yyyyyyyy zzzzzzzzz&amp;lt;/code&amp;gt; -- copy &amp;lt;code&amp;gt;wwwwwwwwxxxxx&amp;lt;/code&amp;gt;+1 bytes from already decoded output using offset &amp;lt;code&amp;gt;zzzzzzzzyyyyyyyy&amp;lt;/code&amp;gt;+4&lt;br /&gt;
&lt;br /&gt;
== Games using DMV ==&lt;br /&gt;
* [https://www.mobygames.com/game/15510/f1-manager/ F1 Manager (1996)]&lt;br /&gt;
* [https://archive.org/details/msdos_Mystery_of_Plastic_City_Part_II_The_1996 Mystery of Plastic City Part II]&lt;br /&gt;
* some other games by [https://www.mobygames.com/company/565/software-2000/ Software 2000]&lt;br /&gt;
* various trailers and even interactive movie CDs&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Sesame_Street_STR&amp;diff=16120</id>
		<title>Sesame Street STR</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Sesame_Street_STR&amp;diff=16120"/>
		<updated>2026-01-24T10:10:22Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a simple video format used in some &amp;lt;em&amp;gt;Sesame Street&amp;lt;/em&amp;gt; related games.&lt;br /&gt;
&lt;br /&gt;
File header:&lt;br /&gt;
  4 bytes - &amp;quot;STHD&amp;quot;&lt;br /&gt;
  4 bytes - version (should be 0x100)&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - unknown, usually zero&lt;br /&gt;
  4 bytes - audio sample rate&lt;br /&gt;
  2 bytes - bits per audio sample&lt;br /&gt;
  2 bytes - padding?&lt;br /&gt;
&lt;br /&gt;
Data is organised into chunks, &amp;lt;code&amp;gt;&amp;quot;GRPH&amp;quot;&amp;lt;/code&amp;gt; for images and palettes, &amp;lt;code&amp;gt;&amp;quot;SND &amp;quot;&amp;lt;/code&amp;gt; for audio. Each chunk beside 32-bit usually has one nested subchunk telling what kind of data it is: for video it is either &amp;lt;code&amp;gt;&amp;quot;PAL &amp;quot;&amp;lt;/code&amp;gt; for palette or &amp;lt;code&amp;gt;&amp;quot;PIXX&amp;quot;&amp;lt;/code&amp;gt; for image; for audio it is &amp;lt;code&amp;gt;&amp;quot;SSMP&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Image (sub)chunk has dimensions in its header and stores raw data in permuted form: by VGA bank (i.e. every fourth column) where data is also 4-way interleaved.&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Celestial_Impact_DXV&amp;diff=16119</id>
		<title>Celestial Impact DXV</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Celestial_Impact_DXV&amp;diff=16119"/>
		<updated>2026-01-24T10:00:18Z</updated>

		<summary type="html">&lt;p&gt;Kostya: Created page with &amp;quot;This is a simple RLE-based format used in &amp;lt;em&amp;gt;Celestial Impact&amp;lt;/em&amp;gt; intro file.  First 32-bit value in the file is the number of frames, then frames follow (each prefixed with 32-bit size). Frame data is 141172 bytes of data compressed with RLE; this data includes 400x300 image, 768 bytes of palette, and seemingly unused data. RLE compression is simple: top bit of the opcode tells whether it is a run or copy, bottom 7 bits tell run/copy length.  Category: Game Formats&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a simple RLE-based format used in &amp;lt;em&amp;gt;Celestial Impact&amp;lt;/em&amp;gt; intro file.&lt;br /&gt;
&lt;br /&gt;
First 32-bit value in the file is the number of frames, then frames follow (each prefixed with 32-bit size). Frame data is 141172 bytes of data compressed with RLE; this data includes 400x300 image, 768 bytes of palette, and seemingly unused data. RLE compression is simple: top bit of the opcode tells whether it is a run or copy, bottom 7 bits tell run/copy length.&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=NAF&amp;diff=16118</id>
		<title>NAF</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=NAF&amp;diff=16118"/>
		<updated>2026-01-24T09:55:27Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Ninell&lt;br /&gt;
* Extension: naf, ngf (for images)&lt;br /&gt;
&lt;br /&gt;
This is a simple raw container format that is usually compressed with &amp;lt;code&amp;gt;GZip&amp;lt;/code&amp;gt; first. It seems to be employed on some companion disks to certain Central European game magazines like &amp;lt;em&amp;gt;Secret Service&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Score&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
File header:&lt;br /&gt;
  3 bytes - &amp;quot;NAF&amp;quot; (animation) or &amp;quot;NGF&amp;quot; (image)&lt;br /&gt;
  1 bytes - major version? (always 1)&lt;br /&gt;
  1 bytes - minor version? (always 0)&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  768 bytes - VGA palette for videos or full-range palette for images&lt;br /&gt;
&lt;br /&gt;
Picture or animation frames are just raw data without any additional compression or reordering.&lt;br /&gt;
&lt;br /&gt;
[[Category:Container Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=MGIF&amp;diff=16117</id>
		<title>MGIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=MGIF&amp;diff=16117"/>
		<updated>2026-01-24T09:44:36Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Napoleon Games s.r.o.&lt;br /&gt;
* Extension: mgf&lt;br /&gt;
* Game: [https://www.mobygames.com/game/55639/gates-of-skeldal/ Gates of Skeldal]&lt;br /&gt;
&lt;br /&gt;
This is a video format employing LZW compression (hence the name). Beside that it does not seem to have anything common with GIF.&lt;br /&gt;
&lt;br /&gt;
Video is organised into frame blocks that may contain several chunks with e.g. video or audio data with video data employing LZW compression. One remarkable thing about LZW compression scheme employed here is that it uses delta compression: actual bytes are coded as a difference to the previously decoded value (or 0 after each LZW restart). Images are always 320x180.&lt;br /&gt;
&lt;br /&gt;
File header:&lt;br /&gt;
  6 bytes - &amp;quot;MGIF97&amp;quot;&lt;br /&gt;
  3 bytes - unknown&lt;br /&gt;
  4 bytes - number of blocks&lt;br /&gt;
  582 bytes - unknown/ignored (data starts at offset 0x253)&lt;br /&gt;
&lt;br /&gt;
Each block starts with a byte telling number of chunks in it and 24-bit size. Each chunk also starts with 8-bit type and 24-bit size. Known chunk types are:&lt;br /&gt;
* 1 -- intra frame (LZW-compressed image)&lt;br /&gt;
* 2 -- inter frame (LZW-compressed delta data)&lt;br /&gt;
* 3 -- RGB555 palette&lt;br /&gt;
* 4 -- audio&lt;br /&gt;
&lt;br /&gt;
Inter frames data is organised (after LZW) into two parts (opcodes and pixel data) with 32-bit value in the very beginning being the pixel data offset. Decoding is rather simple: if top two bits of the opcode are set, end this line and skip following number of lines as defined in low 6 bits of the opcode; otherwise opcode is a number of pixel pairs to copy.&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Dark_Moon_UM&amp;diff=16116</id>
		<title>Dark Moon UM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Dark_Moon_UM&amp;diff=16116"/>
		<updated>2026-01-24T09:29:17Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Crossroads&lt;br /&gt;
* Extension: um&lt;br /&gt;
* Game: [https://www.mobygames.com/game/25567/dark-moon/ Dark Moon]&lt;br /&gt;
&lt;br /&gt;
This is a raw video stream without any header. Frames are 256x128 pixels large stored in VGA banks order (i.e. every fourth pixels on a line) followed by VGA palette.&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=GRN&amp;diff=16115</id>
		<title>GRN</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=GRN&amp;diff=16115"/>
		<updated>2026-01-23T10:26:44Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Microids&lt;br /&gt;
* Extensions: grn, anm&lt;br /&gt;
* Game: [https://www.mobygames.com/game/11809/ultimate-domain/ Ultimate Domain (aka Genesia)]&lt;br /&gt;
&lt;br /&gt;
This is a video format that has chunked video stream interleaved with audio data if present. If file header indicates audio, then it gets padded to 2kB, followed by the signalled number of 2kB sectors of initial audio data and then it is 8kB of video stream followed by 2kB of audio followed by 8kB of video stream... Without audio there is no header padding or audio sectors present. Video data may employ RLE and/or LZSS for compression.&lt;br /&gt;
&lt;br /&gt;
Header format:&lt;br /&gt;
  4 bytes - &amp;quot;ANIM&amp;quot;&lt;br /&gt;
  4 bytes - data offset&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  2 bytes - depth (8 bits per pixel)&lt;br /&gt;
  2 bytes - number of video chunks minus one&lt;br /&gt;
  4 bytes - delay in milliseconds between frames&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  2 bytes - unknown&lt;br /&gt;
  2 bytes - unknown&lt;br /&gt;
  4 bytes - number of 2kB initial audio sectors&lt;br /&gt;
  N*2 bytes - video chunk sizes&lt;br /&gt;
&lt;br /&gt;
Known chunks are:&lt;br /&gt;
* &amp;quot;PAL\x00&amp;quot; -- palette data&lt;br /&gt;
* &amp;quot;IMAGE&amp;quot; -- uncompressed image&lt;br /&gt;
* &amp;quot;LZIM&amp;quot; -- LZSS-compressed image&lt;br /&gt;
* &amp;quot;FRM2&amp;quot; -- RLE-compressed image&lt;br /&gt;
* &amp;quot;LZF2&amp;quot; -- LZSS compressed data for RLE-compressed image &lt;br /&gt;
&lt;br /&gt;
RLE compression resembles FLI but it operates on pairs of pixels. First two 16-bit values define from which line to start decoding and how many lines to process. For each line there's a byte telling how many skip/paint operations are there (1 - skip, 2 - skip, paint, 3 - skip, paint, skip etc), skip operation is one byte telling how many pairs of pixels to skip, paint operation is a signed byte value, non-negative values telling how many bytes to copy from input, negative values telling how many times to repeat the pixel pair from input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=AMF&amp;diff=16114</id>
		<title>AMF</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=AMF&amp;diff=16114"/>
		<updated>2026-01-23T10:10:41Z</updated>

		<summary type="html">&lt;p&gt;Kostya: update information for CITY 2000 flavour&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: amf&lt;br /&gt;
* Samples: [http://samples.mplayerhq.hu/game-formats/amf/ http://samples.mplayerhq.hu/game-formats/amf/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Not to be confused with [[Asylum Music Format]]''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
AMF is a very simple video file format used in the game [http://www.mobygames.com/game/dos/manic-karts Manic Karts] and [https://www.mobygames.com/game/21988/city-2000/ C.I.T.Y. 2000].&lt;br /&gt;
Contains [[RLE]]-encoded palettized video and optionally audio (in &amp;lt;em&amp;gt;C.I.T.Y. 2000&amp;lt;/em&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== File Format ==&lt;br /&gt;
&lt;br /&gt;
All numbers are little-endian. File begins with an 8-byte header:&lt;br /&gt;
&lt;br /&gt;
 u16  numframes    -- number of frames&lt;br /&gt;
 u16  width        -- frame width&lt;br /&gt;
 u16  height       -- frame height&lt;br /&gt;
 u16  unknown      -- unknown/unused, always 2&lt;br /&gt;
&lt;br /&gt;
and is followed by at least numframes + 1 frame chunks. Each frame chunk begins with a short header:&lt;br /&gt;
&lt;br /&gt;
 u8   type         -- chunk type&lt;br /&gt;
 u16  size         -- chunk payload size (w/o this header)&lt;br /&gt;
&lt;br /&gt;
and then followed by a chunk payload.&lt;br /&gt;
&lt;br /&gt;
Observed chunk types:&lt;br /&gt;
* 0x3D - audio data (6-byte header followed by 11kHz 8-bit mono PCM)&lt;br /&gt;
* 0x3E - palette chunk (always first chunk in file) Payload format:&lt;br /&gt;
 u8  firstcolor                -- first color of palette to update (always 64)&lt;br /&gt;
 RGB palette[256-firstcolor]   -- new palette entries (always 256-64 = 192 triplets), 6-bits [[DAC]] values&lt;br /&gt;
* 0x3F - video frame chunk (a video file has total numframes chunks of this type) Contains compressed video data&lt;br /&gt;
* all other chunk types are ignored/skipped.&lt;br /&gt;
&lt;br /&gt;
Note: palette can not be changed during playback. Playback rate is about 10 fps.&lt;br /&gt;
&lt;br /&gt;
== Video Decompression ==&lt;br /&gt;
&lt;br /&gt;
 while input buffer is not exhausted&lt;br /&gt;
   tag = next byte of input&lt;br /&gt;
   tag is:&lt;br /&gt;
     &amp;lt;  0x20 : skip (tag) pixels&lt;br /&gt;
     == 0x20 : skip (DecodeLength) pixels&lt;br /&gt;
     &amp;lt;  0x3F : fill (tag - 0x21 + 2) pixels with the next byte of input&lt;br /&gt;
     == 0x3F : fill (DecodeLength) pixels with the next byte of input&lt;br /&gt;
     &amp;gt;= 0x40 : draw (tag)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DecodeLength loads variable-sized length value:&lt;br /&gt;
&lt;br /&gt;
  length = 32&lt;br /&gt;
  repeat&lt;br /&gt;
    delta = next byte of input&lt;br /&gt;
    length += delta&lt;br /&gt;
  until delta != 0xFF&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
&lt;br /&gt;
The MANIC.AMF file has several [[BMP]] files attached at the end.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;br /&gt;
[[Category:Formats missing in FFmpeg]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Arc_Developments_HUF&amp;diff=16113</id>
		<title>Arc Developments HUF</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Arc_Developments_HUF&amp;diff=16113"/>
		<updated>2026-01-23T10:06:56Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Arc Developments Limited&lt;br /&gt;
* Extension: huf&lt;br /&gt;
* Game: [https://www.mobygames.com/game/31064/johnny-bazookatone/ Johnny Bazookatone]&lt;br /&gt;
&lt;br /&gt;
This is a video format employing RLE and static Huffman compression (symbol weights for which are transmitted in the header). Audio format is 8-bit mono 22kHz PCM.&lt;br /&gt;
&lt;br /&gt;
File header:&lt;br /&gt;
  8 bytes - &amp;quot;[AVF-95]&amp;quot;&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  4 bytes - number of frames&lt;br /&gt;
  9 bytes - unknown&lt;br /&gt;
  256 bytes - weights&lt;br /&gt;
  132300 bytes - initial audio data&lt;br /&gt;
&lt;br /&gt;
Frames start with 32-bit size and 8-bit type (0 - intra, 1 - inter) followed by VGA palette for 128 colours and Huffman-compressed data. Last 1470 bytes of the frame are audio data.&lt;br /&gt;
&lt;br /&gt;
After decompressing video data, intra or inter RLE should be applied. Intra RLE is trivial (top bit of the opcode is run flag, bottom 7 bits are pixel value; when run flag is set, next byte tells how many times to repeat the pixel instead of just once with zero value coding end of frame). Inter RLE uses the following opcodes (the number of those opcodes is the first 16 bits of video data): &amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt; -- read 16-bit value and skip that amount of pixels, &amp;lt;code&amp;gt;0x01..0x7F&amp;lt;/code&amp;gt; -- read byte value and skip that many pixels, then read 1..127 pixels, &amp;lt;code&amp;gt;0x80..0xFF&amp;lt;/code&amp;gt; -- read byte value and skip that many pixels, then read colour value and repeat it 128..1 times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Interactive_Pictures_VID&amp;diff=16112</id>
		<title>Interactive Pictures VID</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Interactive_Pictures_VID&amp;diff=16112"/>
		<updated>2026-01-23T09:53:26Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: [https://www.mobygames.com/company/14057/interactive-pictures/ Interactive Pictures]&lt;br /&gt;
* Extensions: evd, fvd, gvd&lt;br /&gt;
&lt;br /&gt;
This is a format used in at least DOS version of a poker game by the company. &lt;br /&gt;
&lt;br /&gt;
File header:&lt;br /&gt;
  4 bytes - &amp;quot;VID\x01&amp;quot;&lt;br /&gt;
  4 bytes - number of frames&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  1 byte  - unknown, tile size?&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  1 byte  - unknown&lt;br /&gt;
  1 byte  - frames per second&lt;br /&gt;
  2 bytes - number of colours&lt;br /&gt;
  4 bytes - sample rate&lt;br /&gt;
  231 bytes - padding to 256 bytes&lt;br /&gt;
  C*3 bytes - VGA palette&lt;br /&gt;
&lt;br /&gt;
Frame data starts with 16-bit sizes for audio, palette update and video parts. Palette updates are put at the end of palette (i.e. usually low 128 colours are transmitted in the header and top 128 colours are transmitted and updated by the frame data).&lt;br /&gt;
&lt;br /&gt;
Video is coded in 8x8 tiles using following opcodes:&lt;br /&gt;
* &amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt; -- raw tile&lt;br /&gt;
* &amp;lt;code&amp;gt;0x01..0x10&amp;lt;/code&amp;gt; -- 2D RLE: read 64 bits telling where new colour value should be used and fill tile using one of 16 pre-defined scan orders&lt;br /&gt;
* &amp;lt;code&amp;gt;0x80&amp;lt;/code&amp;gt; -- read 64-bit mask and colour value, update tile with this new value in the positions where mask is set&lt;br /&gt;
* &amp;lt;code&amp;gt;0x81&amp;lt;/code&amp;gt; -- read 64-bit mask and colour pair, paint tile using mask to select one of those colours&lt;br /&gt;
* &amp;lt;code&amp;gt;0xFB&amp;lt;/code&amp;gt; -- read 4 colours and 64x2-bit index array, paint tile using appropriate colours&lt;br /&gt;
* &amp;lt;code&amp;gt;0xFD&amp;lt;/code&amp;gt; -- read 16 colours and 64x4-bit index array, paint tile using appropriate colours&lt;br /&gt;
* &amp;lt;code&amp;gt;0xFF&amp;lt;/code&amp;gt; -- read colour value, fill tile with it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Archimedean_Dynasty_MVI&amp;diff=16111</id>
		<title>Archimedean Dynasty MVI</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Archimedean_Dynasty_MVI&amp;diff=16111"/>
		<updated>2026-01-23T09:36:49Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: mvi&lt;br /&gt;
* Company Massive Development GmbH&lt;br /&gt;
&lt;br /&gt;
This is a video format used in [https://www.mobygames.com/game/2881/archimedean-dynasty/ Schleichfahrt] game that employs LZW compression.&lt;br /&gt;
&lt;br /&gt;
File header:&lt;br /&gt;
  4 bytes - 1 (version?)&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - width&lt;br /&gt;
  4 bytes - height&lt;br /&gt;
  4 bytes - number of frames&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - unknown (always 61?)&lt;br /&gt;
  4 bytes - frames per second&lt;br /&gt;
  4 bytes - audio present&lt;br /&gt;
  4 bytes - number of channels&lt;br /&gt;
  4 bytes - sample rate&lt;br /&gt;
  4 bytes - bits per audio sample&lt;br /&gt;
  N bytes - frame table&lt;br /&gt;
&lt;br /&gt;
Frame table consists of the following records:&lt;br /&gt;
  4 bytes - frame type&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - frame size&lt;br /&gt;
  4 bytes - offset&lt;br /&gt;
&lt;br /&gt;
Frame types are:&lt;br /&gt;
* 1 -- intra frame&lt;br /&gt;
* 2 -- inter frame&lt;br /&gt;
* 3 -- monaural audio&lt;br /&gt;
* 4 -- stereo audio&lt;br /&gt;
* 5 -- palette (sometimes followed by some table)&lt;br /&gt;
&lt;br /&gt;
Intra frames start with 32-bit packed and unpacked sizes for the frame pixels followed by LZW-compressed data if packed size is smaller (and theoretically raw data otherwise). LZW compression is remarkable for mapping 0 to explicit dictionary size bumping, 1 to dictionary reset, 2 to data end and 3..258 to actual symbols.&lt;br /&gt;
&lt;br /&gt;
Inter frames consist of two parts, pixel data and mask data telling where to put those pixels at. Packed and unpacked sizes for both parts are transmitted before actual data. If packed and unpacked sizes are the same, data is unpacked; otherwise LZW compression is used.&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=FLK&amp;diff=16110</id>
		<title>FLK</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=FLK&amp;diff=16110"/>
		<updated>2026-01-21T04:56:45Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an LZW-based format used in some Italian adult game called &amp;lt;em&amp;gt;Selen&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Video consists of one or more blocks of frames with the same palette.&lt;br /&gt;
&lt;br /&gt;
Block header:&lt;br /&gt;
  4 bytes - number of frames&lt;br /&gt;
  4 bytes - video size&lt;br /&gt;
  4 bytes - width&lt;br /&gt;
  4 bytes - height&lt;br /&gt;
  4 bytes - frame table size (should be 64*nframes)&lt;br /&gt;
  12 bytes - unknown&lt;br /&gt;
  4 bytes - suggested unpacked data buffer size&lt;br /&gt;
  16 bytes - unknown&lt;br /&gt;
  N bytes - frame table&lt;br /&gt;
  512 bytes - RGB555 palette&lt;br /&gt;
&lt;br /&gt;
Frame table record:&lt;br /&gt;
  8 bytes - unknown&lt;br /&gt;
  4 bytes - offset to opcodes&lt;br /&gt;
  4 bytes - opcodes size&lt;br /&gt;
  8 bytes - unknown&lt;br /&gt;
  4 bytes - offset to pixel data&lt;br /&gt;
  4 bytes - pixel data size&lt;br /&gt;
  4 bytes - offset to audio data&lt;br /&gt;
  4 bytes - audio data size&lt;br /&gt;
  4 bytes - frame data end?&lt;br /&gt;
  4x2 bytes - bounding rectangle for changed area&lt;br /&gt;
  12 bytes - unknown &lt;br /&gt;
&lt;br /&gt;
Frame data consists of opcodes and LZW-compressed pixel data. If opcodes are not present, pixel data constitutes raw frame.&lt;br /&gt;
&lt;br /&gt;
Opcodes (in binary):&lt;br /&gt;
* &amp;lt;code&amp;gt;000nnnnn&amp;lt;/code&amp;gt; -- output 0..31 pixels&lt;br /&gt;
* &amp;lt;code&amp;gt;001nnnnn nnnnnnnn&amp;lt;/code&amp;gt; -- output 0..8191 pixels&lt;br /&gt;
* &amp;lt;code&amp;gt;010nnnnn&amp;lt;/code&amp;gt; -- run of 0..31 pixels&lt;br /&gt;
* &amp;lt;code&amp;gt;011nnnnn nnnnnnnn&amp;lt;/code&amp;gt; -- run of 0..8191 pixels&lt;br /&gt;
* &amp;lt;code&amp;gt;100nnnnn&amp;lt;/code&amp;gt; -- restore 0..31 pixels of the initial background&lt;br /&gt;
* &amp;lt;code&amp;gt;101nnnnn nnnnnnnn&amp;lt;/code&amp;gt; -- restore 0..8191 pixels of the initial background&lt;br /&gt;
* &amp;lt;code&amp;gt;11000000 00000000&amp;lt;/code&amp;gt; -- end of current line&lt;br /&gt;
* &amp;lt;code&amp;gt;11000000 11111111&amp;lt;/code&amp;gt; -- end of frame&lt;br /&gt;
* &amp;lt;code&amp;gt;11000000 nnnnnnnn&amp;lt;/code&amp;gt; -- skip 1..255 lines&lt;br /&gt;
* &amp;lt;code&amp;gt;110nnnnn&amp;lt;/code&amp;gt; -- skip 0..31 pixels&lt;br /&gt;
* &amp;lt;code&amp;gt;111nnnnn nnnnnnnn&amp;lt;/code&amp;gt; -- skip 0..8191 pixels&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Ikarion_MVI&amp;diff=16109</id>
		<title>Ikarion MVI</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Ikarion_MVI&amp;diff=16109"/>
		<updated>2026-01-21T04:31:22Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Ikarion Software GmbH&lt;br /&gt;
* Extension: mvi&lt;br /&gt;
* Game: [https://www.mobygames.com/game/5821/battle-race/ Battle Race] (both MVI versions are used in it)&lt;br /&gt;
&lt;br /&gt;
There are two distinct MVI formats (even if they are used in the same game): MVI1 employs LZ77 compression on paletted images, MVI2 uses vector quantisation over YUV tiles.&lt;br /&gt;
&lt;br /&gt;
=== MVI1 ===&lt;br /&gt;
&lt;br /&gt;
File starts with &amp;quot;VR6MVI&amp;quot; tag and 16-bit version (either 0x302 or 0x310) followed by blocks of audio and video data.&lt;br /&gt;
&lt;br /&gt;
Version 0x302 blocks contain interleaved audio and video data, version 0x310 blocks start with pre-buffered audio data and have individual audio frames grouped so there may be several video frames between two audio frame groups. &lt;br /&gt;
&lt;br /&gt;
Block header format:&lt;br /&gt;
  2 bytes - number of frames&lt;br /&gt;
  2 bytes - number of 400-byte buffers per audio frame&lt;br /&gt;
  1 byte (version 0x310 only) - number of audio frames in group&lt;br /&gt;
  1 byte (version 0x310 only) - number of audio frames to pre-buffer&lt;br /&gt;
  2 bytes - frame sizes size&lt;br /&gt;
  N bytes - packed frame sizes&lt;br /&gt;
&lt;br /&gt;
Frame sizes are stored as variable-length integers in radix-7 form: each byte has top bit signalling whether the next byte is also a part of this integer and low 7 bits containing part of the integer (LSB first). E.g. &amp;lt;code&amp;gt;0x2A&amp;lt;/code&amp;gt; is coded as &amp;lt;code&amp;gt;0x2A&amp;lt;/code&amp;gt; while &amp;lt;code&amp;gt;0x100&amp;lt;/code&amp;gt; is coded as &amp;lt;code&amp;gt;0x80 0x02&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each frame starts with 8-bit flags:&lt;br /&gt;
* bit 0 - audio present&lt;br /&gt;
* bit 1 - special tile-based motion compensation scheme with RLE compression (not present in known samples)&lt;br /&gt;
* bit 2 - frame data is LZ77-compressed&lt;br /&gt;
* bit 3 - LZ77-compressed palette data is present&lt;br /&gt;
&lt;br /&gt;
LZ77 compression opcodes:&lt;br /&gt;
* &amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt; -- leave next 16-bit amount of output unchanged&lt;br /&gt;
* &amp;lt;code&amp;gt;0x01..0x7F&amp;lt;/code&amp;gt; -- leave next 1..127 bytes of output unchanged&lt;br /&gt;
* &amp;lt;code&amp;gt;0x80..0x9F&amp;lt;/code&amp;gt; -- copy next 1..32 bytes&lt;br /&gt;
* &amp;lt;code&amp;gt;0xA0..0xBF&amp;lt;/code&amp;gt; -- repeat next value 2..33 times&lt;br /&gt;
* &amp;lt;code&amp;gt;0xC0..0xFF&amp;lt;/code&amp;gt; -- read 1-2 byte offset (in the same way as frame size above), copy 2..65 bytes using that offset (relative to the current position e.g. offset 1 means repeating last byte)&lt;br /&gt;
&lt;br /&gt;
=== MVI2 ===&lt;br /&gt;
&lt;br /&gt;
File header:&lt;br /&gt;
  4 bytes - &amp;quot;MVI2&amp;quot;&lt;br /&gt;
  2 bytes - version (should be 0x101)&lt;br /&gt;
  2 bytes - number of frames&lt;br /&gt;
  2 bytes - delay in milliseconds between frames&lt;br /&gt;
  1 byte  - width in tiles&lt;br /&gt;
  1 byte  - height in tiles&lt;br /&gt;
  1 byte  - Y depth (should be 5)&lt;br /&gt;
  1 byte  - U depth (should be 5)&lt;br /&gt;
  1 byte  - V depth (should be 5)&lt;br /&gt;
  1 byte  - index entry bits (should be 12)&lt;br /&gt;
  1 byte  - tile width exponent (should be 2, for 4x4 tiles)&lt;br /&gt;
  1 byte  - tile height exponent (should be 2, for 4x4 tiles)&lt;br /&gt;
  4*N bytes - frame sizes&lt;br /&gt;
&lt;br /&gt;
Frame starts with 8-bit flags, IMA ADPCM compressed audio data, tile data update (prefixed by 16-bit number of tiles to update) and tile indices.&lt;br /&gt;
&lt;br /&gt;
Tile data is stored as 5-bit values packed LSB first into 10 bytes for 4x4 tile. Tiles are stored in the circular buffer of 4096 tiles, so e.g. if you have first updated 4000 tiles and then 100 tiles then the second update will overwrite 4 first tiles and next update will touch fifth tile and so on.&lt;br /&gt;
&lt;br /&gt;
Frame is split into 64x64 macro tiles that consist of 16x16 Y tiles of size 4x4, 8x8 U tiles and 8x8 V tiles. All tiles are coded as 12-bit indices in the common tile buffer. So e.g. for 128x64 frame first you read 256 Y tile indices for the first macro tile, then 64 U and 64 V indices for the same, and then repeat it for the second macro tile.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=GTE_Vantage_animation&amp;diff=16108</id>
		<title>GTE Vantage animation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=GTE_Vantage_animation&amp;diff=16108"/>
		<updated>2026-01-21T03:39:31Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: GTE Vantage Inc.&lt;br /&gt;
* Extension: gav&lt;br /&gt;
* Game: [https://www.mobygames.com/game/4796/ncaa-championship-basketball/ NCAA Championship Basketball] (at least game demo)&lt;br /&gt;
&lt;br /&gt;
This is a simple format with independently RLE-compressed frames (animations are even accompanied by auxiliary index files with frame positions to enable easy seeking).&lt;br /&gt;
&lt;br /&gt;
Header:&lt;br /&gt;
  4 bytes - &amp;quot;GAV &amp;quot;&lt;br /&gt;
  4 bytes - number of frames&lt;br /&gt;
  2 bytes - frames per second&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  1 byte  - local palette is in use&lt;br /&gt;
  1 byte  - padding&lt;br /&gt;
  768 bytes - VGA palette&lt;br /&gt;
&lt;br /&gt;
Frames start with 32-bit size, 768-byte VGA palette (unless the header signals global palette use only) and RLE data.&lt;br /&gt;
&lt;br /&gt;
RLE scheme is simple: opcode &amp;lt;code&amp;gt;00&amp;lt;/code&amp;gt; means end of stream, &amp;lt;code&amp;gt;01..7F&amp;lt;/code&amp;gt; means copying next 1..127 bytes, &amp;lt;code&amp;gt;80..FF&amp;lt;/code&amp;gt; means repeat the following byte 0-127 times.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=MP_Entertainment_animation&amp;diff=16107</id>
		<title>MP Entertainment animation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=MP_Entertainment_animation&amp;diff=16107"/>
		<updated>2026-01-21T03:28:54Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: MP Entertainment&lt;br /&gt;
* Extensions: anm, seq&lt;br /&gt;
* Game: [https://www.mobygames.com/game/3994/hopkins-fbi/ Hopkins FBI]&lt;br /&gt;
&lt;br /&gt;
This is a simple chunk-based format employing RLE compression.&lt;br /&gt;
&lt;br /&gt;
File starts with &amp;quot;MPANIM&amp;quot; tag followed by 768-byte palette. First chunk should be &amp;quot;NORM&amp;quot; which contains 32-bit size, 14 bytes of data, and uncompressed frame (640x480).&lt;br /&gt;
Other chunks start with &amp;quot;IMAGE=&amp;quot; tag, 32-bit size, 32-bit unknown value, and the rest is RLE data.&lt;br /&gt;
&lt;br /&gt;
RLE opcodes:&lt;br /&gt;
* &amp;lt;code&amp;gt;D3&amp;lt;/code&amp;gt; (ANM only) -- long run (1 byte run length and 1 byte run value)&lt;br /&gt;
* &amp;lt;code&amp;gt;D4..DD&amp;lt;/code&amp;gt; (ANM only) -- repeat next byte 1..10 times&lt;br /&gt;
* &amp;lt;code&amp;gt;DE..FA&amp;lt;/code&amp;gt; (ANM only) -- skip 1..27 pixels&lt;br /&gt;
* &amp;lt;code&amp;gt;FB&amp;lt;/code&amp;gt; -- not encountered&lt;br /&gt;
* &amp;lt;code&amp;gt;FC&amp;lt;/code&amp;gt; -- end of stream&lt;br /&gt;
* &amp;lt;code&amp;gt;FD&amp;lt;/code&amp;gt; -- next byte tells how many pixels to skip&lt;br /&gt;
* &amp;lt;code&amp;gt;FE&amp;lt;/code&amp;gt; -- next 16-bit value tells how many pixels to skip&lt;br /&gt;
* &amp;lt;code&amp;gt;FF&amp;lt;/code&amp;gt; -- next 32-bit value tells how many pixels to skip&lt;br /&gt;
* all other opcodes are treated as pixel values&lt;br /&gt;
&lt;br /&gt;
As you can see, the difference between ANM and SEQ is that the latter has only skip codes and &amp;lt;code&amp;gt;D3..FA&amp;lt;/code&amp;gt; values are treated as normal pixels.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=TMM-Frac&amp;diff=16091</id>
		<title>TMM-Frac</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=TMM-Frac&amp;diff=16091"/>
		<updated>2025-11-10T14:08:18Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Total Multimedia&lt;br /&gt;
&lt;br /&gt;
This is a format that employs licensed [[Iterated Systems Fractal Codec]] and was used for some interactive video discs in DOS era.&lt;br /&gt;
&lt;br /&gt;
Multimedia data is stored in blocks of 0xF800 bytes long that comprise several frames with audio and video data.&lt;br /&gt;
&lt;br /&gt;
Block header format:&lt;br /&gt;
  32 bits -- 0x007C0EBF&lt;br /&gt;
  16 bits -- 0x007C (normal block) or 0x0000 (last block)&lt;br /&gt;
  16 bits -- number of frames in block&lt;br /&gt;
&lt;br /&gt;
Frames start with a header:&lt;br /&gt;
  16 bits -- video frame flags (or some unused value for audio)&lt;br /&gt;
  16 bits -- frame type (0x000C - video, 0x0700 - audio)&lt;br /&gt;
  16 bits -- audio frame size (or some unused value for video)&lt;br /&gt;
  16 bits -- video frame size&lt;br /&gt;
&lt;br /&gt;
Audio is stored as 8-bit 22kHz mono PCM, for video the part starting with motion offsets count is transmitted.&lt;br /&gt;
&lt;br /&gt;
First block starts with a header, at offset &amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt; there's an absolute offset to the palette data and frame data usually starts at offset &amp;lt;code&amp;gt;0xb3&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=FVF&amp;diff=16090</id>
		<title>FVF</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=FVF&amp;diff=16090"/>
		<updated>2025-11-10T13:44:57Z</updated>

		<summary type="html">&lt;p&gt;Kostya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FVF is a format used for cutscenes in [https://www.mobygames.com/game/957/star-trek-the-next-generation-a-final-unity/ Star Trek: The Next Generation - &amp;quot;A Final Unity&amp;quot;] game.&lt;br /&gt;
&lt;br /&gt;
== File structure ==&lt;br /&gt;
All data is little-endian. Data is grouped into frames that are grouped into blocks aligned to at least 2048 bytes. Audio is stored as unpacked PCM, video is compressed with the licensed [[Iterated Systems Fractal Codec]].&lt;br /&gt;
&lt;br /&gt;
Header:&lt;br /&gt;
  4 bytes - &amp;quot;FVF &amp;quot;&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - first block offset&lt;br /&gt;
  4 bytes - last block offset&lt;br /&gt;
  4 bytes - image header (should be 0x60)&lt;br /&gt;
  4 bytes - audio header (usually 0xB5)&lt;br /&gt;
  64 bytes - unknown&lt;br /&gt;
&lt;br /&gt;
Image header:&lt;br /&gt;
  2 bytes - header size? (usually 40)&lt;br /&gt;
  2 bytes - always 1?&lt;br /&gt;
  2 bytes - always 16?&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  4 bytes - delay in milliseconds&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - number of frames&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  2 bytes - unknown&lt;br /&gt;
  1 byte  - palette something&lt;br /&gt;
  1 byte  - number of palette entries (usually 15)&lt;br /&gt;
  4 bytes - palette offset (usually 0x88)&lt;br /&gt;
  6 bytes - unknown&lt;br /&gt;
&lt;br /&gt;
Audio header:&lt;br /&gt;
  2 bytes - compression? (usually it's 1 and raw PCM)&lt;br /&gt;
  2 bytes - number of channels?&lt;br /&gt;
  2 bytes - bits per sample (usually 8)&lt;br /&gt;
  2 bytes - sampling rate&lt;br /&gt;
  8 bytes - unknown&lt;br /&gt;
&lt;br /&gt;
Block header:&lt;br /&gt;
  2 bytes - header size (should be 16)&lt;br /&gt;
  2 bytes - flags&lt;br /&gt;
  4 bytes - previous block size&lt;br /&gt;
  4 bytes - current block size&lt;br /&gt;
  4 bytes - next block size&lt;br /&gt;
&lt;br /&gt;
Frame header:&lt;br /&gt;
  2 bytes - header size (should be 24)&lt;br /&gt;
  4 bytes - full size&lt;br /&gt;
  4 bytes - always 24?&lt;br /&gt;
  4 bytes - video part size&lt;br /&gt;
  4 bytes - audio part size&lt;br /&gt;
  6 bytes - unknown&lt;br /&gt;
&lt;br /&gt;
Video frame data is in the same format as VfW variant of the codec, audio part starts with 32-bit size followed by PCM data.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=FVF&amp;diff=16089</id>
		<title>FVF</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=FVF&amp;diff=16089"/>
		<updated>2025-11-10T13:43:55Z</updated>

		<summary type="html">&lt;p&gt;Kostya: Update information about the video codec&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FVF is a format used for cutscenes in [https://www.mobygames.com/game/957/star-trek-the-next-generation-a-final-unity/ Star Trek: The Next Generation - &amp;quot;A Final Unity&amp;quot;] game.&lt;br /&gt;
&lt;br /&gt;
== File structure ==&lt;br /&gt;
All data is little-endian. Data is grouped into frames that are grouped into blocks aligned to at least 2048 bytes. Audio is stored as unpacked PCM, video is compressed with the licensed [[Iterated System Fractal Codec]].&lt;br /&gt;
&lt;br /&gt;
Header:&lt;br /&gt;
  4 bytes - &amp;quot;FVF &amp;quot;&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - first block offset&lt;br /&gt;
  4 bytes - last block offset&lt;br /&gt;
  4 bytes - image header (should be 0x60)&lt;br /&gt;
  4 bytes - audio header (usually 0xB5)&lt;br /&gt;
  64 bytes - unknown&lt;br /&gt;
&lt;br /&gt;
Image header:&lt;br /&gt;
  2 bytes - header size? (usually 40)&lt;br /&gt;
  2 bytes - always 1?&lt;br /&gt;
  2 bytes - always 16?&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  4 bytes - delay in milliseconds&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - number of frames&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  2 bytes - unknown&lt;br /&gt;
  1 byte  - palette something&lt;br /&gt;
  1 byte  - number of palette entries (usually 15)&lt;br /&gt;
  4 bytes - palette offset (usually 0x88)&lt;br /&gt;
  6 bytes - unknown&lt;br /&gt;
&lt;br /&gt;
Audio header:&lt;br /&gt;
  2 bytes - compression? (usually it's 1 and raw PCM)&lt;br /&gt;
  2 bytes - number of channels?&lt;br /&gt;
  2 bytes - bits per sample (usually 8)&lt;br /&gt;
  2 bytes - sampling rate&lt;br /&gt;
  8 bytes - unknown&lt;br /&gt;
&lt;br /&gt;
Block header:&lt;br /&gt;
  2 bytes - header size (should be 16)&lt;br /&gt;
  2 bytes - flags&lt;br /&gt;
  4 bytes - previous block size&lt;br /&gt;
  4 bytes - current block size&lt;br /&gt;
  4 bytes - next block size&lt;br /&gt;
&lt;br /&gt;
Frame header:&lt;br /&gt;
  2 bytes - header size (should be 24)&lt;br /&gt;
  4 bytes - full size&lt;br /&gt;
  4 bytes - always 24?&lt;br /&gt;
  4 bytes - video part size&lt;br /&gt;
  4 bytes - audio part size&lt;br /&gt;
  6 bytes - unknown&lt;br /&gt;
&lt;br /&gt;
Video frame data is in the same format as VfW variant of the codec, audio part starts with 32-bit size followed by PCM data.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Iterated_Systems&amp;diff=16088</id>
		<title>Iterated Systems</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Iterated_Systems&amp;diff=16088"/>
		<updated>2025-11-09T16:08:45Z</updated>

		<summary type="html">&lt;p&gt;Kostya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Website: http://www.iterated.com/ (now defunct)&lt;br /&gt;
&lt;br /&gt;
Iterated Systems developed the [[Iterated Systems Fractal Codec|Fractal]] and [[ClearVideo]] codec. They are apparently no longer in business.&lt;br /&gt;
&lt;br /&gt;
[[Category:Multimedia-related Companies]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Iterated_Systems_Fractal_Codec&amp;diff=16087</id>
		<title>Iterated Systems Fractal Codec</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Iterated_Systems_Fractal_Codec&amp;diff=16087"/>
		<updated>2025-11-09T15:57:25Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: [[Iterated Systems]]&lt;br /&gt;
* FourCCs: FVC1, FVF1&lt;br /&gt;
&lt;br /&gt;
This is the only known true fractal codec. It has been licensed to different companies and forms the base of [[FVF]] and [[TMM-Frac]]. Beside slight header variations, all of them have the same bitstream format.&lt;br /&gt;
&lt;br /&gt;
Video internally is coded as 8-bit greyscale or RGB24 but the output is delivered in either paletted or RGB16 format. Frame is split into 320x200 green plane and one plane with 160x100 red and blue planes. Each plane is split into 8x8 blocks that are further split into 4x4 blocks (in zig-zag order) and either individual 4x4 blocks or 8x8 blocks are coded.&lt;br /&gt;
&lt;br /&gt;
Most of the block coding modes are affine transform, which means taking twice as large block from the reference buffer, throw out odd columns and lines, scale pixel values by three fourths, add brightness value (seven-bit value minus 64) and optionally apply an affine transform.&lt;br /&gt;
There are eight possible affine transforms done as a combination of three base transform (if bit 0 is set then mirror block, if bit 1 is set then flip block, if bit 2 is set then transpose block).&lt;br /&gt;
&lt;br /&gt;
== Bitstream organisation ==&lt;br /&gt;
Frame data consists of three parts: 16-bit frame flags, motion offsets (16-bit count followed by 16-bit signed offsets) and block opcodes. Each opcode consists of 1-4 bytes treated as a series of bit fields (LSB first). VfW codec data starts with 32-bit offset to the palette data, other formats are documented at their own pages.&lt;br /&gt;
&lt;br /&gt;
Frame flags:&lt;br /&gt;
* 1 -- fractal frame, data should be decoded 16 times&lt;br /&gt;
* 2 -- palette data present after the frame data&lt;br /&gt;
* 4 -- swap buffers (reference and current output; for fractal frames that's done on each iteration of the decoding) and output new reference buffer&lt;br /&gt;
* 8 -- skip frame (no data is coded)&lt;br /&gt;
&lt;br /&gt;
Opcodes are:&lt;br /&gt;
* 0-3 -- affine transform for 4x4 block. Next 7 bits code brightness adjustment, 14 bits after that code source block index.&lt;br /&gt;
* 4 -- skip block run. Next 5 bits are run length minus one.&lt;br /&gt;
* 5 -- motion block(s). Next bit tells if there's more than one motion block; then 4-bit index of motion offset value from the frame header follows; then (if signalled) an additional number of motion blocks (all with the same motion offset) minus one in eight-bit field.&lt;br /&gt;
* 6 -- raw block. After the first byte sixteen bytes with new block data follow.&lt;br /&gt;
* 7 -- extended opcode is in the next four bits.&lt;br /&gt;
&lt;br /&gt;
Extended opcodes:&lt;br /&gt;
* 0-7 -- affine transform for 8x8 block. Last bit in the first byte is unused, then there's 7-bit brightness, refinement block presence flag, 14-bit source block index flag, and finally 2-bit refined subblock index. In case when refined subblock is present, it is coded as normal block except opcode 7 is not allowed and skip/motion blocks modes apply to that one block only.&lt;br /&gt;
* 12 -- long skip run. Top bit tells whether it's a long run (8-bit value plus 33) or a very long run (16-bit value plus 289).&lt;br /&gt;
* 15 -- small raw block. After the first byte there's 16-bit absolute offset and 4 bytes of block data. This mode does not seem to be used.&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Pixar_codecs&amp;diff=16082</id>
		<title>Pixar codecs</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Pixar_codecs&amp;diff=16082"/>
		<updated>2025-08-24T16:20:09Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill known information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Pixar&lt;br /&gt;
* FOURCCS: pix0, pix1, pix2, pix3, pix4, pix5, pix6, pix7, pixA&lt;br /&gt;
&lt;br /&gt;
These codecs are employed to compress paletted data in [[QuickTime_container|MOV]].&lt;br /&gt;
&lt;br /&gt;
== Pixar codecs 0 and 4 ==&lt;br /&gt;
These codecs store uncompressed image split into 4x4 tiles.&lt;br /&gt;
&lt;br /&gt;
== Pixar codecs 1 and 2 ==&lt;br /&gt;
Not much is known, but they seem to be similar to codec 3.&lt;br /&gt;
&lt;br /&gt;
== Pixar codec 3 ==&lt;br /&gt;
&lt;br /&gt;
This codec employs vector quantisation, so instead of transmitting each frame tile, only the codebook (or its update) plus tile indices are transmitted.&lt;br /&gt;
&lt;br /&gt;
Frame format:&lt;br /&gt;
* 16-bit big-endian number of tiles in codebook (update)&lt;br /&gt;
* codebook update (the number of entries is specified above):&lt;br /&gt;
** 16-bit codebook entry ID&lt;br /&gt;
** 16 bytes of tile data&lt;br /&gt;
* compressed frame description&lt;br /&gt;
&lt;br /&gt;
Frame description consists of 16-bit opcodes specifying the operation:&lt;br /&gt;
* 0-159 - leave that number of tiles unchanged from the previous frame&lt;br /&gt;
* 160-319 - restore (opcode-159) tiles from the initial background frame (note: the frame is not coded in the file but rather provided by the game engine from elsewhere)&lt;br /&gt;
* 320-65535 - paint tile (opcode-320) from the codebook&lt;br /&gt;
&lt;br /&gt;
== Pixar codec 5 ==&lt;br /&gt;
&lt;br /&gt;
This is an extension of codec 3. Now frame data starts with 16-bit big-endian frame number and probably the total number of tiles. If that value is not zero or 0xFFFF, two additional 16-bit values should be read. The rest is the same as in codec 3.&lt;br /&gt;
&lt;br /&gt;
== Pixar codec 6 ==&lt;br /&gt;
Probably similar to codec 5.&lt;br /&gt;
&lt;br /&gt;
== Pixar codec 7 ==&lt;br /&gt;
Unknown, but it seems to employ Huffman compression.&lt;br /&gt;
&lt;br /&gt;
== Pixar codec A ==&lt;br /&gt;
Unknown, but it seems to be not tile-based on the first glance.&lt;br /&gt;
&lt;br /&gt;
== Games using these codecs ==&lt;br /&gt;
&lt;br /&gt;
[https://www.mobygames.com/game/119619/disneys-toy-story-activity-center/ Toy Story Activity Center]&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Game Formats]]&lt;br /&gt;
[[Category:Incomplete Video Codecs]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Motion_Pixels&amp;diff=16081</id>
		<title>Motion Pixels</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Motion_Pixels&amp;diff=16081"/>
		<updated>2025-08-16T09:43:09Z</updated>

		<summary type="html">&lt;p&gt;Kostya: /* Common things and differences */ add forgotten pixel 0 mention&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FOURCCs: MVI1, MVI2&lt;br /&gt;
* Company: [[Sirius Publishing]]&lt;br /&gt;
* Samples:&lt;br /&gt;
** MVI1: [http://samples.mplayerhq.hu/game-formats/mvi1-avi/ http://samples.mplayerhq.hu/game-formats/mvi1-avi/]&lt;br /&gt;
** MVI2: [http://samples.mplayerhq.hu/V-codecs/MVI2/ http://samples.mplayerhq.hu/V-codecs/MVI2/]&lt;br /&gt;
** Movie CD: [http://samples.mplayerhq.hu/drivers32/motionpixelsmoviecd/ http://samples.mplayerhq.hu/drivers32/motionpixelsmoviecd/]&lt;br /&gt;
** Movie CD Win32 Codecs: [http://samples.mplayerhq.hu/drivers32/motionpixels/ http://samples.mplayerhq.hu/drivers32/motionpixels/]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Motion Pixels is a family of codecs that started with its custom [[MVI Container]] format (with MVI extension as well) and later developed into VfW codecs MVI1 and MVI2.&lt;br /&gt;
&lt;br /&gt;
Motion Pixels version 1 (MVI1) was used in a few video games while version 2 (MVI2) was used in a number of Movie CDs. All of these items were published by Sirius Publishing and the Motion Pixels codec is believed to still be owned by the company's CEO, Richard Gnant.&lt;br /&gt;
&lt;br /&gt;
MVI belongs to the &amp;quot;old-school&amp;quot; family of video codecs and relies on interframe differences and adaptive delta-coding for horizontal lines of the picture. Delta coefficients are additionally [[Huffman|Huffman-packed]]. For better compression at the cost of picture quality additional colorspace downsampling may be used. MVI2 adds smoother delta-coding and the ability to dynamically change downsampling for each frame.&lt;br /&gt;
&lt;br /&gt;
== MVI Codec ==&lt;br /&gt;
&lt;br /&gt;
=== Common things and differences ===&lt;br /&gt;
&lt;br /&gt;
Essentially there are four (or even five) flavours of the codec:&lt;br /&gt;
* DOS version in [[MVI Container]]. Format is set in the header flags. Frames are treated either as intra or inter (depending on the flag set).&lt;br /&gt;
* MVI1 codec. Format is set in the flags. The only known flags include flipped frames, single-field coding, and golden frame.&lt;br /&gt;
* MVI2.0 codec. Format is set in the flags. In addition to MVI1 flags it also supports low-resolution mode and frame cropping.&lt;br /&gt;
* MVI2.1 codec. This one is signalled by a certain flag, actual coding format is set in intra frame header. Compared to MVI2.0 it also enables smooth delta coding mode.&lt;br /&gt;
* MVI2.2 codec. This one is signalled by a different flag but the behaviour seems to be identical to MVI2.1&lt;br /&gt;
&lt;br /&gt;
All variations of MVI use the same coding principle: first special rectangular areas are marked on the frame that require special handling; they are processed and the rest of pixels are decoded using Huffman-compressed deltas. For better compression data in most cases is represented in YUV colourspace with some subsampling. See Appendix A for the code to convert between 15-bit RGB and YUV.&lt;br /&gt;
&lt;br /&gt;
Supported colourspace formats are:&lt;br /&gt;
* 0 - RGB&lt;br /&gt;
* 1 - YUV with one chroma pair per 2x1 block&lt;br /&gt;
* 2 - YUV with one chroma pair per 2x2 block&lt;br /&gt;
* 3 - YUV with one chroma pair per 4x2 block&lt;br /&gt;
* 4 - YUV with one chroma pair per 4x4 block&lt;br /&gt;
&lt;br /&gt;
Overall bitstream format looks like this:&lt;br /&gt;
* intra frame flag (not present in DOS version)&lt;br /&gt;
* coding parameters like colourspace, lowres mode and smooth delta coding (only in intra frames and only in MVI2.1/MVI2.2)&lt;br /&gt;
* skip map (not for intra frames)&lt;br /&gt;
* golden frame map (only when the feature is enabled)&lt;br /&gt;
* fill map&lt;br /&gt;
* low-resolution areas map (only when the feature is enabled)&lt;br /&gt;
* Huffman codes description for deltas&lt;br /&gt;
* top left pixel RGB value (in there are delta codes and top left pixel is marked for normal delta decoding)&lt;br /&gt;
* number of delta codes for vertical prediction and first field (if there are delta codes)&lt;br /&gt;
* number of delta codes for the second field (ditto)&lt;br /&gt;
* Huffman-coded deltas&lt;br /&gt;
&lt;br /&gt;
Bit reading is done MSB first using 32-bit little-endian words (e.g. &amp;lt;code&amp;gt;00 00 10 80&amp;lt;/code&amp;gt; is represented as &amp;lt;code&amp;gt;0x80100000&amp;lt;/code&amp;gt; and first read bit will be 1).&lt;br /&gt;
&lt;br /&gt;
=== Compression Flags ===&lt;br /&gt;
&lt;br /&gt;
When video is packaged inside [[AVI]] files, all vital codec's parameters carried in [[BITMAPINFOHEADER]]'s '''biCompression''' field of the video stream. Actual codec type should be retrieved from &amp;lt;code&amp;gt;fccHandler&amp;lt;/code&amp;gt; of AVI stream header. First two bytes of '''biCompression''' for 16-bit little-endian flags value, last two bytes should be &amp;quot;i1&amp;quot; for MVI1 and &amp;quot;i2&amp;quot; for MVI2 correspondingly.&lt;br /&gt;
&lt;br /&gt;
Flag bits meaning:&lt;br /&gt;
&lt;br /&gt;
* 0..3  (0x000F) - colourspace Format (see below)&lt;br /&gt;
* 4 (0x0010) - seems to be recognised but not used by the decoder (MVI2.2 only)&lt;br /&gt;
* 5 (0x0020) - alternative output mode (MVI2.2 only)&lt;br /&gt;
* 6 (0x0040) - seems to be intra-only mode where only intra frames are decoded and inter frames merely repeat them (MVI2.2 only)&lt;br /&gt;
* 7 (0x0080) - MVI2.2 mode&lt;br /&gt;
* 8 (0x0100) - still-frame (or golden frame) mode for MVI2.2&lt;br /&gt;
* 9 (0x0200) - MVI2.1 mode&lt;br /&gt;
* 10 (0x0400) - frame cropping enabled (MVI2 only)&lt;br /&gt;
* 11 (0x0800) - low-resolution mode (MVI2 only)&lt;br /&gt;
* 12 (0x1000) - still-frame (or golden frame) mode&lt;br /&gt;
* 13 (0x2000) - frames are coded upside-down (instead of bottoms-up by default)&lt;br /&gt;
* 14 (0x4000) - video was encoded using trial version of the codec (this flag tells original decoder to put watermark to the frame)&lt;br /&gt;
* 15 (0x8000) - image is single-field, only odd lines are carried&lt;br /&gt;
&lt;br /&gt;
=== Golden frame mode ===&lt;br /&gt;
&lt;br /&gt;
When videos with small amount of changes encoded (ex, 'talking heads' or some static scenery) special trick may be performed. Very first frame contains all the scenery, while all successive frames take this first frame as a base and add necessary changes to it. The tricky part is, that first frame contains such a 'change-frame' as well, so you have two logical frames in one physical. Offset to the base frame is located at ('''biSizeImage''' - 4) in the encoded data buffer. Change-frame located at it's start.&lt;br /&gt;
&lt;br /&gt;
Please note that both of the parts in the first frame still contain the golden frame map.&lt;br /&gt;
&lt;br /&gt;
=== Delta decoding modes ===&lt;br /&gt;
&lt;br /&gt;
Deltas are coded as values in the range -7..7. Since sometimes larger values are needed, there are two ways to deal with it. Motion Pixels before 2.1 used a rule that if delta value is -7 or 7 then next delta value should be doubled before use (and if its original value is -7 or 7 then the next delta value as well etc etc). Smooth delta mode operates differently: if delta value is -7 or 7 then add doubled next delta value to the result (and keep doing it while additional delta values are -7 or 7). &lt;br /&gt;
&lt;br /&gt;
=== Low-resolution mode ===&lt;br /&gt;
&lt;br /&gt;
In this mode half of the pixels are coded using interpolation i.e. when only luma changes are coded then first (interpolated pixel) uses half of that delta value added to the previous pixel and second pixel uses full delta. If exactly one pixel is left between low-res and skip areas, it is interpolated in the same way (luma delta is calculated and half of it is added to the predictor value). If exactly one pixel is left between low-res and and normal area, it uses half of the first delta from the first pixel of that area.&lt;br /&gt;
&lt;br /&gt;
Depending on coding mode and line number full and pixel position may be swapped (e.g. for even lines it may be &amp;quot;interpolated full interpolated full&amp;quot; while for odd lines it is &amp;quot;full interpolated full interpolated&amp;quot;). Additionally in smooth deltas mode luma deltas use limited range unless the very first pixel is full one.&lt;br /&gt;
&lt;br /&gt;
Please note that during vertical prediction stage low-resolution mode pixels are treated as skip pixels.&lt;br /&gt;
&lt;br /&gt;
=== Decompression ===&lt;br /&gt;
&lt;br /&gt;
==== Frame Flags ====&lt;br /&gt;
Each frame begins with sequence of local flag bits. These bits are:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; style=&amp;quot;border-collapse: collapse; border-style: dashed; border-color: #2f6fab;&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#f0f0f0&amp;quot; |&lt;br /&gt;
! # of bits !! Present if !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || always || KeyframeFlag || non-zero if this frame is a key frame&lt;br /&gt;
|-&lt;br /&gt;
| 3 || flags bit 9 || ColorSpace || colorspace Format for this group of frames&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || LowRes || low-resolution coding is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || SmoothDeltas || use smooth delta-coding&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || HaveSerial || (see next field)&lt;br /&gt;
|-&lt;br /&gt;
| 20 || flags bit 9 + HaveSerial || SerialNumber || Encoder's serial number&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || Cropping || frame cropping is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 8 || flags bit 10 or Cropping || CropX || x offset of the frame start&lt;br /&gt;
|-&lt;br /&gt;
| 8 || flags bit 10 or Cropping || CropY || y offset of the frame start&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Maps ====&lt;br /&gt;
Map blocks contain rectangles which should be marked as special on the frame. All versions prior to MVI2.1 use the same format:&lt;br /&gt;
* 12 bits   number of large rectangles&lt;br /&gt;
* 12 bits   number of small rectangles&lt;br /&gt;
* large rectangles&lt;br /&gt;
* small rectangles&lt;br /&gt;
&lt;br /&gt;
Rectangles are stored as &amp;lt;code&amp;gt;&amp;amp;lt;offset, width-1, height-1&amp;amp;gt;&amp;lt;/code&amp;gt; with offset taking &amp;lt;code&amp;gt;ceil(log2(frame width * frame height))&amp;lt;/code&amp;gt; bits and width and height using 8 or 4 bits depending on rectangle size. Rectangles for fill map additionally contain RGB555 fill value.&lt;br /&gt;
&lt;br /&gt;
MVI2.1/MVI2.2 use a different format, they split image into chunks of 8192 bytes and for each of them use 8-bit number of large/small rectangles as well as 13-bit offsets relative to the start of that piece.&lt;br /&gt;
&lt;br /&gt;
==== Deltas Bundle ====&lt;br /&gt;
&lt;br /&gt;
Deltas start with 4-bit code telling how many unique delta values are being coded. Zero means no deltas are present at all, one value means next four bit contain delta value plus seven and all deltas in the frame are the same. Otherwise there's 4-bit value telling the suggested number of bits to look up during Huffman decoding followed by symbol values (delta value plus seven) and bit-coded Huffman tree shape (0 - this is a leaf; 1 - node has children, read description for it).&lt;br /&gt;
&lt;br /&gt;
Then there are two numbers of deltas per field, using 18 or 19 bits (depending on whether image is larger than 320*240 or not) and the actual delta values (when there are two or more unique delta values).&lt;br /&gt;
&lt;br /&gt;
==== Assembling the Frame ====&lt;br /&gt;
* leave areas marked as &amp;quot;skip&amp;quot; (but not &amp;quot;lowres&amp;quot;) unchanged&lt;br /&gt;
* copy image data from the golden frame to the areas marked as such (there is no motion displacement)&lt;br /&gt;
* fill areas marked as &amp;quot;fill&amp;quot; with the provided colour&lt;br /&gt;
* perform vertical prediction for the first column (skip if there are no deltas)&lt;br /&gt;
* perform prediction for odd lines using the rest of deltas from the first part (skip if there are no deltas)&lt;br /&gt;
* perform prediction for even lines using deltas from the second part (skip if there are no deltas)&lt;br /&gt;
&lt;br /&gt;
Please note that while old DOS format used sequential line numbers so field 0 consisted of lines 0,2,4,... newer formats decode lines in permuted order. So for most formats field 0 is lines 1,3,5,... and for 4x4 mode lines for field 0 are decoded in this order: 3,1,7,5,11,9,...&lt;br /&gt;
&lt;br /&gt;
Delta prediction is simple: for the line (or column) skip not predicted pixels, taking last of them as a new predictor, convert it from RGB to YUV, add delta for Y and optionally U and V components, put pixel converted to RGB on frame. Pixels in the same block use the same chroma values. The rules for which pixel is supposed to have U and V deltas depend on pixel position, subsampling mode, low-res mode being employed or not, and codec version. &lt;br /&gt;
&lt;br /&gt;
== Games Using Motion Pixels ==&lt;br /&gt;
* [https://www.mobygames.com/game/windows/treasure-quest Treasure Quest]&lt;br /&gt;
* [https://www.mobygames.com/game/25426/apollo-18-the-moon-missions/ Apollo 18: The Moon Missions]&lt;br /&gt;
&lt;br /&gt;
== Appendix A ==&lt;br /&gt;
&lt;br /&gt;
Code for generating RGB to YUV table (it is done with YUV to RGB conversion, which is used during decoding as well):&lt;br /&gt;
&lt;br /&gt;
   for (y = 0; y &amp;lt;= 31; y++) {&lt;br /&gt;
        for (v = -31; v &amp;lt;= 31; v++) {&lt;br /&gt;
            for (u = -31; u &amp;lt;= 31; u++) {&lt;br /&gt;
                r = (y * 1000 + v * 701) / 1000;&lt;br /&gt;
                g = (y * 1000 - 357 * v - 172 * u) / 1000;&lt;br /&gt;
                b = (y * 1000 + 886 * u) / 1000;&lt;br /&gt;
                if (r &amp;gt;= 0 &amp;amp;&amp;amp; r &amp;lt; 32 &amp;amp;&amp;amp; g &amp;gt;= 0 &amp;amp;&amp;amp; g &amp;lt; 32 &amp;amp;&amp;amp; b &amp;gt;= 0 &amp;amp;&amp;amp; b &amp;lt; 32) {&lt;br /&gt;
                    pix = (r &amp;lt;&amp;lt; 10) | (g &amp;lt;&amp;lt; 5) | b;&lt;br /&gt;
                    if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                        rgb2yuv[pix][0] = y;&lt;br /&gt;
                        rgb2yuv[pix][1] = u;&lt;br /&gt;
                        rgb2yuv[pix][2] = v;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    for (i = 0; i &amp;lt; 32768; i+= 32) {&lt;br /&gt;
        for (j = 0; j &amp;lt; 31; j++) {&lt;br /&gt;
            for (k = 31; k &amp;gt; j; k--) {&lt;br /&gt;
                pix = i + k;&lt;br /&gt;
                if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                    rgb2yuv[pix][0] = rgb2yuv[pix - 1][0];&lt;br /&gt;
                    rgb2yuv[pix][1] = rgb2yuv[pix - 1][1];&lt;br /&gt;
                    rgb2yuv[pix][2] = rgb2yuv[pix - 1][2];&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            for (k = 0; k &amp;lt; 31 - j; k++) {&lt;br /&gt;
                pix = i + k;&lt;br /&gt;
                if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                    rgb2yuv[pix][0] = rgb2yuv[pix + 1][0];&lt;br /&gt;
                    rgb2yuv[pix][1] = rgb2yuv[pix + 1][1];&lt;br /&gt;
                    rgb2yuv[pix][2] = rgb2yuv[pix + 1][2];&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Game Formats]]&lt;br /&gt;
[[Category:Formats missing in MPlayer]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Motion_Pixels&amp;diff=16080</id>
		<title>Motion Pixels</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Motion_Pixels&amp;diff=16080"/>
		<updated>2025-08-15T13:12:10Z</updated>

		<summary type="html">&lt;p&gt;Kostya: clarify some flags and be done with it&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FOURCCs: MVI1, MVI2&lt;br /&gt;
* Company: [[Sirius Publishing]]&lt;br /&gt;
* Samples:&lt;br /&gt;
** MVI1: [http://samples.mplayerhq.hu/game-formats/mvi1-avi/ http://samples.mplayerhq.hu/game-formats/mvi1-avi/]&lt;br /&gt;
** MVI2: [http://samples.mplayerhq.hu/V-codecs/MVI2/ http://samples.mplayerhq.hu/V-codecs/MVI2/]&lt;br /&gt;
** Movie CD: [http://samples.mplayerhq.hu/drivers32/motionpixelsmoviecd/ http://samples.mplayerhq.hu/drivers32/motionpixelsmoviecd/]&lt;br /&gt;
** Movie CD Win32 Codecs: [http://samples.mplayerhq.hu/drivers32/motionpixels/ http://samples.mplayerhq.hu/drivers32/motionpixels/]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Motion Pixels is a family of codecs that started with its custom [[MVI Container]] format (with MVI extension as well) and later developed into VfW codecs MVI1 and MVI2.&lt;br /&gt;
&lt;br /&gt;
Motion Pixels version 1 (MVI1) was used in a few video games while version 2 (MVI2) was used in a number of Movie CDs. All of these items were published by Sirius Publishing and the Motion Pixels codec is believed to still be owned by the company's CEO, Richard Gnant.&lt;br /&gt;
&lt;br /&gt;
MVI belongs to the &amp;quot;old-school&amp;quot; family of video codecs and relies on interframe differences and adaptive delta-coding for horizontal lines of the picture. Delta coefficients are additionally [[Huffman|Huffman-packed]]. For better compression at the cost of picture quality additional colorspace downsampling may be used. MVI2 adds smoother delta-coding and the ability to dynamically change downsampling for each frame.&lt;br /&gt;
&lt;br /&gt;
== MVI Codec ==&lt;br /&gt;
&lt;br /&gt;
=== Common things and differences ===&lt;br /&gt;
&lt;br /&gt;
Essentially there are four (or even five) flavours of the codec:&lt;br /&gt;
* DOS version in [[MVI Container]]. Format is set in the header flags. Frames are treated either as intra or inter (depending on the flag set).&lt;br /&gt;
* MVI1 codec. Format is set in the flags. The only known flags include flipped frames, single-field coding, and golden frame.&lt;br /&gt;
* MVI2.0 codec. Format is set in the flags. In addition to MVI1 flags it also supports low-resolution mode and frame cropping.&lt;br /&gt;
* MVI2.1 codec. This one is signalled by a certain flag, actual coding format is set in intra frame header. Compared to MVI2.0 it also enables smooth delta coding mode.&lt;br /&gt;
* MVI2.2 codec. This one is signalled by a different flag but the behaviour seems to be identical to MVI2.1&lt;br /&gt;
&lt;br /&gt;
All variations of MVI use the same coding principle: first special rectangular areas are marked on the frame that require special handling; they are processed and the rest of pixels are decoded using Huffman-compressed deltas. For better compression data in most cases is represented in YUV colourspace with some subsampling. See Appendix A for the code to convert between 15-bit RGB and YUV.&lt;br /&gt;
&lt;br /&gt;
Supported colourspace formats are:&lt;br /&gt;
* 0 - RGB&lt;br /&gt;
* 1 - YUV with one chroma pair per 2x1 block&lt;br /&gt;
* 2 - YUV with one chroma pair per 2x2 block&lt;br /&gt;
* 3 - YUV with one chroma pair per 4x2 block&lt;br /&gt;
* 4 - YUV with one chroma pair per 4x4 block&lt;br /&gt;
&lt;br /&gt;
Overall bitstream format looks like this:&lt;br /&gt;
* intra frame flag (not present in DOS version)&lt;br /&gt;
* coding parameters like colourspace, lowres mode and smooth delta coding (only in intra frames and only in MVI2.1/MVI2.2)&lt;br /&gt;
* skip map (not for intra frames)&lt;br /&gt;
* golden frame map (only when the feature is enabled)&lt;br /&gt;
* fill map&lt;br /&gt;
* low-resolution areas map (only when the feature is enabled)&lt;br /&gt;
* Huffman codes description for deltas&lt;br /&gt;
* number of delta codes for vertical prediction and first field (if there are delta codes)&lt;br /&gt;
* number of delta codes for the second field (ditto)&lt;br /&gt;
* Huffman-coded deltas&lt;br /&gt;
&lt;br /&gt;
Bit reading is done MSB first using 32-bit little-endian words (e.g. &amp;lt;code&amp;gt;00 00 10 80&amp;lt;/code&amp;gt; is represented as &amp;lt;code&amp;gt;0x80100000&amp;lt;/code&amp;gt; and first read bit will be 1).&lt;br /&gt;
&lt;br /&gt;
=== Compression Flags ===&lt;br /&gt;
&lt;br /&gt;
When video is packaged inside [[AVI]] files, all vital codec's parameters carried in [[BITMAPINFOHEADER]]'s '''biCompression''' field of the video stream. Actual codec type should be retrieved from &amp;lt;code&amp;gt;fccHandler&amp;lt;/code&amp;gt; of AVI stream header. First two bytes of '''biCompression''' for 16-bit little-endian flags value, last two bytes should be &amp;quot;i1&amp;quot; for MVI1 and &amp;quot;i2&amp;quot; for MVI2 correspondingly.&lt;br /&gt;
&lt;br /&gt;
Flag bits meaning:&lt;br /&gt;
&lt;br /&gt;
* 0..3  (0x000F) - colourspace Format (see below)&lt;br /&gt;
* 4 (0x0010) - seems to be recognised but not used by the decoder (MVI2.2 only)&lt;br /&gt;
* 5 (0x0020) - alternative output mode (MVI2.2 only)&lt;br /&gt;
* 6 (0x0040) - seems to be intra-only mode where only intra frames are decoded and inter frames merely repeat them (MVI2.2 only)&lt;br /&gt;
* 7 (0x0080) - MVI2.2 mode&lt;br /&gt;
* 8 (0x0100) - still-frame (or golden frame) mode for MVI2.2&lt;br /&gt;
* 9 (0x0200) - MVI2.1 mode&lt;br /&gt;
* 10 (0x0400) - frame cropping enabled (MVI2 only)&lt;br /&gt;
* 11 (0x0800) - low-resolution mode (MVI2 only)&lt;br /&gt;
* 12 (0x1000) - still-frame (or golden frame) mode&lt;br /&gt;
* 13 (0x2000) - frames are coded upside-down (instead of bottoms-up by default)&lt;br /&gt;
* 14 (0x4000) - video was encoded using trial version of the codec (this flag tells original decoder to put watermark to the frame)&lt;br /&gt;
* 15 (0x8000) - image is single-field, only odd lines are carried&lt;br /&gt;
&lt;br /&gt;
=== Golden frame mode ===&lt;br /&gt;
&lt;br /&gt;
When videos with small amount of changes encoded (ex, 'talking heads' or some static scenery) special trick may be performed. Very first frame contains all the scenery, while all successive frames take this first frame as a base and add necessary changes to it. The tricky part is, that first frame contains such a 'change-frame' as well, so you have two logical frames in one physical. Offset to the base frame is located at ('''biSizeImage''' - 4) in the encoded data buffer. Change-frame located at it's start.&lt;br /&gt;
&lt;br /&gt;
Please note that both of the parts in the first frame still contain the golden frame map.&lt;br /&gt;
&lt;br /&gt;
=== Delta decoding modes ===&lt;br /&gt;
&lt;br /&gt;
Deltas are coded as values in the range -7..7. Since sometimes larger values are needed, there are two ways to deal with it. Motion Pixels before 2.1 used a rule that if delta value is -7 or 7 then next delta value should be doubled before use (and if its original value is -7 or 7 then the next delta value as well etc etc). Smooth delta mode operates differently: if delta value is -7 or 7 then add doubled next delta value to the result (and keep doing it while additional delta values are -7 or 7). &lt;br /&gt;
&lt;br /&gt;
=== Low-resolution mode ===&lt;br /&gt;
&lt;br /&gt;
In this mode half of the pixels are coded using interpolation i.e. when only luma changes are coded then first (interpolated pixel) uses half of that delta value added to the previous pixel and second pixel uses full delta. If exactly one pixel is left between low-res and skip areas, it is interpolated in the same way (luma delta is calculated and half of it is added to the predictor value). If exactly one pixel is left between low-res and and normal area, it uses half of the first delta from the first pixel of that area.&lt;br /&gt;
&lt;br /&gt;
Depending on coding mode and line number full and pixel position may be swapped (e.g. for even lines it may be &amp;quot;interpolated full interpolated full&amp;quot; while for odd lines it is &amp;quot;full interpolated full interpolated&amp;quot;). Additionally in smooth deltas mode luma deltas use limited range unless the very first pixel is full one.&lt;br /&gt;
&lt;br /&gt;
Please note that during vertical prediction stage low-resolution mode pixels are treated as skip pixels.&lt;br /&gt;
&lt;br /&gt;
=== Decompression ===&lt;br /&gt;
&lt;br /&gt;
==== Frame Flags ====&lt;br /&gt;
Each frame begins with sequence of local flag bits. These bits are:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; style=&amp;quot;border-collapse: collapse; border-style: dashed; border-color: #2f6fab;&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#f0f0f0&amp;quot; |&lt;br /&gt;
! # of bits !! Present if !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || always || KeyframeFlag || non-zero if this frame is a key frame&lt;br /&gt;
|-&lt;br /&gt;
| 3 || flags bit 9 || ColorSpace || colorspace Format for this group of frames&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || LowRes || low-resolution coding is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || SmoothDeltas || use smooth delta-coding&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || HaveSerial || (see next field)&lt;br /&gt;
|-&lt;br /&gt;
| 20 || flags bit 9 + HaveSerial || SerialNumber || Encoder's serial number&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || Cropping || frame cropping is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 8 || flags bit 10 or Cropping || CropX || x offset of the frame start&lt;br /&gt;
|-&lt;br /&gt;
| 8 || flags bit 10 or Cropping || CropY || y offset of the frame start&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Maps ====&lt;br /&gt;
Map blocks contain rectangles which should be marked as special on the frame. All versions prior to MVI2.1 use the same format:&lt;br /&gt;
* 12 bits   number of large rectangles&lt;br /&gt;
* 12 bits   number of small rectangles&lt;br /&gt;
* large rectangles&lt;br /&gt;
* small rectangles&lt;br /&gt;
&lt;br /&gt;
Rectangles are stored as &amp;lt;code&amp;gt;&amp;amp;lt;offset, width-1, height-1&amp;amp;gt;&amp;lt;/code&amp;gt; with offset taking &amp;lt;code&amp;gt;ceil(log2(frame width * frame height))&amp;lt;/code&amp;gt; bits and width and height using 8 or 4 bits depending on rectangle size. Rectangles for fill map additionally contain RGB555 fill value.&lt;br /&gt;
&lt;br /&gt;
MVI2.1/MVI2.2 use a different format, they split image into chunks of 8192 bytes and for each of them use 8-bit number of large/small rectangles as well as 13-bit offsets relative to the start of that piece.&lt;br /&gt;
&lt;br /&gt;
==== Deltas Bundle ====&lt;br /&gt;
&lt;br /&gt;
Deltas start with 4-bit code telling how many unique delta values are being coded. Zero means no deltas are present at all, one value means next four bit contain delta value plus seven and all deltas in the frame are the same. Otherwise there's 4-bit value telling the suggested number of bits to look up during Huffman decoding followed by symbol values (delta value plus seven) and bit-coded Huffman tree shape (0 - this is a leaf; 1 - node has children, read description for it).&lt;br /&gt;
&lt;br /&gt;
Then there are two numbers of deltas per field, using 18 or 19 bits (depending on whether image is larger than 320*240 or not) and the actual delta values (when there are two or more unique delta values).&lt;br /&gt;
&lt;br /&gt;
==== Assembling the Frame ====&lt;br /&gt;
* leave areas marked as &amp;quot;skip&amp;quot; (but not &amp;quot;lowres&amp;quot;) unchanged&lt;br /&gt;
* copy image data from the golden frame to the areas marked as such (there is no motion displacement)&lt;br /&gt;
* fill areas marked as &amp;quot;fill&amp;quot; with the provided colour&lt;br /&gt;
* perform vertical prediction for the first column (skip if there are no deltas)&lt;br /&gt;
* perform prediction for odd lines using the rest of deltas from the first part (skip if there are no deltas)&lt;br /&gt;
* perform prediction for even lines using deltas from the second part (skip if there are no deltas)&lt;br /&gt;
&lt;br /&gt;
Please note that while old DOS format used sequential line numbers so field 0 consisted of lines 0,2,4,... newer formats decode lines in permuted order. So for most formats field 0 is lines 1,3,5,... and for 4x4 mode lines for field 0 are decoded in this order: 3,1,7,5,11,9,...&lt;br /&gt;
&lt;br /&gt;
Delta prediction is simple: for the line (or column) skip not predicted pixels, taking last of them as a new predictor, convert it from RGB to YUV, add delta for Y and optionally U and V components, put pixel converted to RGB on frame. Pixels in the same block use the same chroma values. The rules for which pixel is supposed to have U and V deltas depend on pixel position, subsampling mode, low-res mode being employed or not, and codec version. &lt;br /&gt;
&lt;br /&gt;
== Games Using Motion Pixels ==&lt;br /&gt;
* [https://www.mobygames.com/game/windows/treasure-quest Treasure Quest]&lt;br /&gt;
* [https://www.mobygames.com/game/25426/apollo-18-the-moon-missions/ Apollo 18: The Moon Missions]&lt;br /&gt;
&lt;br /&gt;
== Appendix A ==&lt;br /&gt;
&lt;br /&gt;
Code for generating RGB to YUV table (it is done with YUV to RGB conversion, which is used during decoding as well):&lt;br /&gt;
&lt;br /&gt;
   for (y = 0; y &amp;lt;= 31; y++) {&lt;br /&gt;
        for (v = -31; v &amp;lt;= 31; v++) {&lt;br /&gt;
            for (u = -31; u &amp;lt;= 31; u++) {&lt;br /&gt;
                r = (y * 1000 + v * 701) / 1000;&lt;br /&gt;
                g = (y * 1000 - 357 * v - 172 * u) / 1000;&lt;br /&gt;
                b = (y * 1000 + 886 * u) / 1000;&lt;br /&gt;
                if (r &amp;gt;= 0 &amp;amp;&amp;amp; r &amp;lt; 32 &amp;amp;&amp;amp; g &amp;gt;= 0 &amp;amp;&amp;amp; g &amp;lt; 32 &amp;amp;&amp;amp; b &amp;gt;= 0 &amp;amp;&amp;amp; b &amp;lt; 32) {&lt;br /&gt;
                    pix = (r &amp;lt;&amp;lt; 10) | (g &amp;lt;&amp;lt; 5) | b;&lt;br /&gt;
                    if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                        rgb2yuv[pix][0] = y;&lt;br /&gt;
                        rgb2yuv[pix][1] = u;&lt;br /&gt;
                        rgb2yuv[pix][2] = v;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    for (i = 0; i &amp;lt; 32768; i+= 32) {&lt;br /&gt;
        for (j = 0; j &amp;lt; 31; j++) {&lt;br /&gt;
            for (k = 31; k &amp;gt; j; k--) {&lt;br /&gt;
                pix = i + k;&lt;br /&gt;
                if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                    rgb2yuv[pix][0] = rgb2yuv[pix - 1][0];&lt;br /&gt;
                    rgb2yuv[pix][1] = rgb2yuv[pix - 1][1];&lt;br /&gt;
                    rgb2yuv[pix][2] = rgb2yuv[pix - 1][2];&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            for (k = 0; k &amp;lt; 31 - j; k++) {&lt;br /&gt;
                pix = i + k;&lt;br /&gt;
                if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                    rgb2yuv[pix][0] = rgb2yuv[pix + 1][0];&lt;br /&gt;
                    rgb2yuv[pix][1] = rgb2yuv[pix + 1][1];&lt;br /&gt;
                    rgb2yuv[pix][2] = rgb2yuv[pix + 1][2];&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Game Formats]]&lt;br /&gt;
[[Category:Formats missing in MPlayer]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Motion_Pixels&amp;diff=16079</id>
		<title>Motion Pixels</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Motion_Pixels&amp;diff=16079"/>
		<updated>2025-08-15T12:53:25Z</updated>

		<summary type="html">&lt;p&gt;Kostya: more about deltas&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FOURCCs: MVI1, MVI2&lt;br /&gt;
* Company: [[Sirius Publishing]]&lt;br /&gt;
* Samples:&lt;br /&gt;
** MVI1: [http://samples.mplayerhq.hu/game-formats/mvi1-avi/ http://samples.mplayerhq.hu/game-formats/mvi1-avi/]&lt;br /&gt;
** MVI2: [http://samples.mplayerhq.hu/V-codecs/MVI2/ http://samples.mplayerhq.hu/V-codecs/MVI2/]&lt;br /&gt;
** Movie CD: [http://samples.mplayerhq.hu/drivers32/motionpixelsmoviecd/ http://samples.mplayerhq.hu/drivers32/motionpixelsmoviecd/]&lt;br /&gt;
** Movie CD Win32 Codecs: [http://samples.mplayerhq.hu/drivers32/motionpixels/ http://samples.mplayerhq.hu/drivers32/motionpixels/]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Motion Pixels is a family of codecs that started with its custom [[MVI Container]] format (with MVI extension as well) and later developed into VfW codecs MVI1 and MVI2.&lt;br /&gt;
&lt;br /&gt;
Motion Pixels version 1 (MVI1) was used in a few video games while version 2 (MVI2) was used in a number of Movie CDs. All of these items were published by Sirius Publishing and the Motion Pixels codec is believed to still be owned by the company's CEO, Richard Gnant.&lt;br /&gt;
&lt;br /&gt;
MVI belongs to the &amp;quot;old-school&amp;quot; family of video codecs and relies on interframe differences and adaptive delta-coding for horizontal lines of the picture. Delta coefficients are additionally [[Huffman|Huffman-packed]]. For better compression at the cost of picture quality additional colorspace downsampling may be used. MVI2 adds smoother delta-coding and the ability to dynamically change downsampling for each frame.&lt;br /&gt;
&lt;br /&gt;
== MVI Codec ==&lt;br /&gt;
&lt;br /&gt;
=== Common things and differences ===&lt;br /&gt;
&lt;br /&gt;
Essentially there are four (or even five) flavours of the codec:&lt;br /&gt;
* DOS version in [[MVI Container]]. Format is set in the header flags. Frames are treated either as intra or inter (depending on the flag set).&lt;br /&gt;
* MVI1 codec. Format is set in the flags. The only known flags include flipped frames, single-field coding, and golden frame.&lt;br /&gt;
* MVI2.0 codec. Format is set in the flags. In addition to MVI1 flags it also supports low-resolution mode and frame cropping.&lt;br /&gt;
* MVI2.1 codec. This one is signalled by a certain flag, actual coding format is set in intra frame header. Compared to MVI2.0 it also enables smooth delta coding mode.&lt;br /&gt;
* MVI2.2 codec. This one is signalled by a different flag but the behaviour seems to be identical to MVI2.1&lt;br /&gt;
&lt;br /&gt;
All variations of MVI use the same coding principle: first special rectangular areas are marked on the frame that require special handling; they are processed and the rest of pixels are decoded using Huffman-compressed deltas. For better compression data in most cases is represented in YUV colourspace with some subsampling. See Appendix A for the code to convert between 15-bit RGB and YUV.&lt;br /&gt;
&lt;br /&gt;
Supported colourspace formats are:&lt;br /&gt;
* 0 - RGB&lt;br /&gt;
* 1 - YUV with one chroma pair per 2x1 block&lt;br /&gt;
* 2 - YUV with one chroma pair per 2x2 block&lt;br /&gt;
* 3 - YUV with one chroma pair per 4x2 block&lt;br /&gt;
* 4 - YUV with one chroma pair per 4x4 block&lt;br /&gt;
&lt;br /&gt;
Overall bitstream format looks like this:&lt;br /&gt;
* intra frame flag (not present in DOS version)&lt;br /&gt;
* coding parameters like colourspace, lowres mode and smooth delta coding (only in intra frames and only in MVI2.1/MVI2.2)&lt;br /&gt;
* skip map (not for intra frames)&lt;br /&gt;
* golden frame map (only when the feature is enabled)&lt;br /&gt;
* fill map&lt;br /&gt;
* low-resolution areas map (only when the feature is enabled)&lt;br /&gt;
* Huffman codes description for deltas&lt;br /&gt;
* number of delta codes for vertical prediction and first field (if there are delta codes)&lt;br /&gt;
* number of delta codes for the second field (ditto)&lt;br /&gt;
* Huffman-coded deltas&lt;br /&gt;
&lt;br /&gt;
Bit reading is done MSB first using 32-bit little-endian words (e.g. &amp;lt;code&amp;gt;00 00 10 80&amp;lt;/code&amp;gt; is represented as &amp;lt;code&amp;gt;0x80100000&amp;lt;/code&amp;gt; and first read bit will be 1).&lt;br /&gt;
&lt;br /&gt;
=== Compression Flags ===&lt;br /&gt;
&lt;br /&gt;
When video is packaged inside [[AVI]] files, all vital codec's parameters carried in [[BITMAPINFOHEADER]]'s '''biCompression''' field of the video stream. Actual codec type should be retrieved from &amp;lt;code&amp;gt;fccHandler&amp;lt;/code&amp;gt; of AVI stream header. First two bytes of '''biCompression''' for 16-bit little-endian flags value, last two bytes should be &amp;quot;i1&amp;quot; for MVI1 and &amp;quot;i2&amp;quot; for MVI2 correspondingly.&lt;br /&gt;
&lt;br /&gt;
Flag bits meaning:&lt;br /&gt;
&lt;br /&gt;
* 0..3  (0x000F) - colourspace Format (see below)&lt;br /&gt;
* 4 (0x0010) - MVI2.2 only&lt;br /&gt;
* 5 (0x0020) - MVI2.2 only&lt;br /&gt;
* 6 (0x0040) - MVI2.2 only&lt;br /&gt;
* 7 (0x0080) - MVI2.2 only&lt;br /&gt;
* 8 (0x0100) - MVI2.2 only&lt;br /&gt;
* 9 (0x0200) - MVI2.1 mode&lt;br /&gt;
* 10 (0x0400) - frame cropping enabled (MVI2 only)&lt;br /&gt;
* 11 (0x0800) - low-resolution mode (MVI2 only)&lt;br /&gt;
* 12 (0x1000) - still-frame (or golden frame) mode&lt;br /&gt;
* 13 (0x2000) - frames are coded upside-down (instead of bottoms-up by default)&lt;br /&gt;
* 14 (0x4000) - video was encoded using trial version of the codec (this flag tells original decoder to put watermark to the frame)&lt;br /&gt;
* 15 (0x8000) - image is single-field, only odd lines are carried&lt;br /&gt;
&lt;br /&gt;
=== Golden frame mode ===&lt;br /&gt;
&lt;br /&gt;
When videos with small amount of changes encoded (ex, 'talking heads' or some static scenery) special trick may be performed. Very first frame contains all the scenery, while all successive frames take this first frame as a base and add necessary changes to it. The tricky part is, that first frame contains such a 'change-frame' as well, so you have two logical frames in one physical. Offset to the base frame is located at ('''biSizeImage''' - 4) in the encoded data buffer. Change-frame located at it's start.&lt;br /&gt;
&lt;br /&gt;
Please note that both of the parts in the first frame still contain the golden frame map.&lt;br /&gt;
&lt;br /&gt;
=== Delta decoding modes ===&lt;br /&gt;
&lt;br /&gt;
Deltas are coded as values in the range -7..7. Since sometimes larger values are needed, there are two ways to deal with it. Motion Pixels before 2.1 used a rule that if delta value is -7 or 7 then next delta value should be doubled before use (and if its original value is -7 or 7 then the next delta value as well etc etc). Smooth delta mode operates differently: if delta value is -7 or 7 then add doubled next delta value to the result (and keep doing it while additional delta values are -7 or 7). &lt;br /&gt;
&lt;br /&gt;
=== Low-resolution mode ===&lt;br /&gt;
&lt;br /&gt;
In this mode half of the pixels are coded using interpolation i.e. when only luma changes are coded then first (interpolated pixel) uses half of that delta value added to the previous pixel and second pixel uses full delta. If exactly one pixel is left between low-res and skip areas, it is interpolated in the same way (luma delta is calculated and half of it is added to the predictor value). If exactly one pixel is left between low-res and and normal area, it uses half of the first delta from the first pixel of that area.&lt;br /&gt;
&lt;br /&gt;
Depending on coding mode and line number full and pixel position may be swapped (e.g. for even lines it may be &amp;quot;interpolated full interpolated full&amp;quot; while for odd lines it is &amp;quot;full interpolated full interpolated&amp;quot;). Additionally in smooth deltas mode luma deltas use limited range unless the very first pixel is full one.&lt;br /&gt;
&lt;br /&gt;
Please note that during vertical prediction stage low-resolution mode pixels are treated as skip pixels.&lt;br /&gt;
&lt;br /&gt;
=== Decompression ===&lt;br /&gt;
&lt;br /&gt;
==== Frame Flags ====&lt;br /&gt;
Each frame begins with sequence of local flag bits. These bits are:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; style=&amp;quot;border-collapse: collapse; border-style: dashed; border-color: #2f6fab;&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#f0f0f0&amp;quot; |&lt;br /&gt;
! # of bits !! Present if !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || always || KeyframeFlag || non-zero if this frame is a key frame&lt;br /&gt;
|-&lt;br /&gt;
| 3 || flags bit 9 || ColorSpace || colorspace Format for this group of frames&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || LowRes || low-resolution coding is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || SmoothDeltas || use smooth delta-coding&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || HaveSerial || (see next field)&lt;br /&gt;
|-&lt;br /&gt;
| 20 || flags bit 9 + HaveSerial || SerialNumber || Encoder's serial number&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || Cropping || frame cropping is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 8 || flags bit 10 or Cropping || CropX || x offset of the frame start&lt;br /&gt;
|-&lt;br /&gt;
| 8 || flags bit 10 or Cropping || CropY || y offset of the frame start&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Maps ====&lt;br /&gt;
Map blocks contain rectangles which should be marked as special on the frame. All versions prior to MVI2.1 use the same format:&lt;br /&gt;
* 12 bits   number of large rectangles&lt;br /&gt;
* 12 bits   number of small rectangles&lt;br /&gt;
* large rectangles&lt;br /&gt;
* small rectangles&lt;br /&gt;
&lt;br /&gt;
Rectangles are stored as &amp;lt;code&amp;gt;&amp;amp;lt;offset, width-1, height-1&amp;amp;gt;&amp;lt;/code&amp;gt; with offset taking &amp;lt;code&amp;gt;ceil(log2(frame width * frame height))&amp;lt;/code&amp;gt; bits and width and height using 8 or 4 bits depending on rectangle size. Rectangles for fill map additionally contain RGB555 fill value.&lt;br /&gt;
&lt;br /&gt;
MVI2.1/MVI2.2 use a different format, they split image into chunks of 8192 bytes and for each of them use 8-bit number of large/small rectangles as well as 13-bit offsets relative to the start of that piece.&lt;br /&gt;
&lt;br /&gt;
==== Deltas Bundle ====&lt;br /&gt;
&lt;br /&gt;
Deltas start with 4-bit code telling how many unique delta values are being coded. Zero means no deltas are present at all, one value means next four bit contain delta value plus seven and all deltas in the frame are the same. Otherwise there's 4-bit value telling the suggested number of bits to look up during Huffman decoding followed by symbol values (delta value plus seven) and bit-coded Huffman tree shape (0 - this is a leaf; 1 - node has children, read description for it).&lt;br /&gt;
&lt;br /&gt;
Then there are two numbers of deltas per field, using 18 or 19 bits (depending on whether image is larger than 320*240 or not) and the actual delta values (when there are two or more unique delta values).&lt;br /&gt;
&lt;br /&gt;
==== Assembling the Frame ====&lt;br /&gt;
* leave areas marked as &amp;quot;skip&amp;quot; (but not &amp;quot;lowres&amp;quot;) unchanged&lt;br /&gt;
* copy image data from the golden frame to the areas marked as such (there is no motion displacement)&lt;br /&gt;
* fill areas marked as &amp;quot;fill&amp;quot; with the provided colour&lt;br /&gt;
* perform vertical prediction for the first column (skip if there are no deltas)&lt;br /&gt;
* perform prediction for odd lines using the rest of deltas from the first part (skip if there are no deltas)&lt;br /&gt;
* perform prediction for even lines using deltas from the second part (skip if there are no deltas)&lt;br /&gt;
&lt;br /&gt;
Please note that while old DOS format used sequential line numbers so field 0 consisted of lines 0,2,4,... newer formats decode lines in permuted order. So for most formats field 0 is lines 1,3,5,... and for 4x4 mode lines for field 0 are decoded in this order: 3,1,7,5,11,9,...&lt;br /&gt;
&lt;br /&gt;
Delta prediction is simple: for the line (or column) skip not predicted pixels, taking last of them as a new predictor, convert it from RGB to YUV, add delta for Y and optionally U and V components, put pixel converted to RGB on frame. Pixels in the same block use the same chroma values. The rules for which pixel is supposed to have U and V deltas depend on pixel position, subsampling mode, low-res mode being employed or not, and codec version. &lt;br /&gt;
&lt;br /&gt;
== Games Using Motion Pixels ==&lt;br /&gt;
* [https://www.mobygames.com/game/windows/treasure-quest Treasure Quest]&lt;br /&gt;
* [https://www.mobygames.com/game/25426/apollo-18-the-moon-missions/ Apollo 18: The Moon Missions]&lt;br /&gt;
&lt;br /&gt;
== Appendix A ==&lt;br /&gt;
&lt;br /&gt;
Code for generating RGB to YUV table (it is done with YUV to RGB conversion, which is used during decoding as well):&lt;br /&gt;
&lt;br /&gt;
   for (y = 0; y &amp;lt;= 31; y++) {&lt;br /&gt;
        for (v = -31; v &amp;lt;= 31; v++) {&lt;br /&gt;
            for (u = -31; u &amp;lt;= 31; u++) {&lt;br /&gt;
                r = (y * 1000 + v * 701) / 1000;&lt;br /&gt;
                g = (y * 1000 - 357 * v - 172 * u) / 1000;&lt;br /&gt;
                b = (y * 1000 + 886 * u) / 1000;&lt;br /&gt;
                if (r &amp;gt;= 0 &amp;amp;&amp;amp; r &amp;lt; 32 &amp;amp;&amp;amp; g &amp;gt;= 0 &amp;amp;&amp;amp; g &amp;lt; 32 &amp;amp;&amp;amp; b &amp;gt;= 0 &amp;amp;&amp;amp; b &amp;lt; 32) {&lt;br /&gt;
                    pix = (r &amp;lt;&amp;lt; 10) | (g &amp;lt;&amp;lt; 5) | b;&lt;br /&gt;
                    if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                        rgb2yuv[pix][0] = y;&lt;br /&gt;
                        rgb2yuv[pix][1] = u;&lt;br /&gt;
                        rgb2yuv[pix][2] = v;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    for (i = 0; i &amp;lt; 32768; i+= 32) {&lt;br /&gt;
        for (j = 0; j &amp;lt; 31; j++) {&lt;br /&gt;
            for (k = 31; k &amp;gt; j; k--) {&lt;br /&gt;
                pix = i + k;&lt;br /&gt;
                if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                    rgb2yuv[pix][0] = rgb2yuv[pix - 1][0];&lt;br /&gt;
                    rgb2yuv[pix][1] = rgb2yuv[pix - 1][1];&lt;br /&gt;
                    rgb2yuv[pix][2] = rgb2yuv[pix - 1][2];&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            for (k = 0; k &amp;lt; 31 - j; k++) {&lt;br /&gt;
                pix = i + k;&lt;br /&gt;
                if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                    rgb2yuv[pix][0] = rgb2yuv[pix + 1][0];&lt;br /&gt;
                    rgb2yuv[pix][1] = rgb2yuv[pix + 1][1];&lt;br /&gt;
                    rgb2yuv[pix][2] = rgb2yuv[pix + 1][2];&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Undiscovered Video Codecs]]&lt;br /&gt;
[[Category:Undiscovered Game Formats]]&lt;br /&gt;
[[Category:Game Formats]]&lt;br /&gt;
[[Category:Formats missing in MPlayer]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Motion_Pixels&amp;diff=16078</id>
		<title>Motion Pixels</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Motion_Pixels&amp;diff=16078"/>
		<updated>2025-08-15T10:47:40Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill some information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FOURCCs: MVI1, MVI2&lt;br /&gt;
* Company: [[Sirius Publishing]]&lt;br /&gt;
* Samples:&lt;br /&gt;
** MVI1: [http://samples.mplayerhq.hu/game-formats/mvi1-avi/ http://samples.mplayerhq.hu/game-formats/mvi1-avi/]&lt;br /&gt;
** MVI2: [http://samples.mplayerhq.hu/V-codecs/MVI2/ http://samples.mplayerhq.hu/V-codecs/MVI2/]&lt;br /&gt;
** Movie CD: [http://samples.mplayerhq.hu/drivers32/motionpixelsmoviecd/ http://samples.mplayerhq.hu/drivers32/motionpixelsmoviecd/]&lt;br /&gt;
** Movie CD Win32 Codecs: [http://samples.mplayerhq.hu/drivers32/motionpixels/ http://samples.mplayerhq.hu/drivers32/motionpixels/]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Motion Pixels is a family of codecs that started with its custom [[MVI Container]] format (with MVI extension as well) and later developed into VfW codecs MVI1 and MVI2.&lt;br /&gt;
&lt;br /&gt;
Motion Pixels version 1 (MVI1) was used in a few video games while version 2 (MVI2) was used in a number of Movie CDs. All of these items were published by Sirius Publishing and the Motion Pixels codec is believed to still be owned by the company's CEO, Richard Gnant.&lt;br /&gt;
&lt;br /&gt;
MVI belongs to the &amp;quot;old-school&amp;quot; family of video codecs and relies on interframe differences and adaptive delta-coding for horizontal lines of the picture. Delta coefficients are additionally [[Huffman|Huffman-packed]]. For better compression at the cost of picture quality additional colorspace downsampling may be used. MVI2 adds smoother delta-coding and the ability to dynamically change downsampling for each frame.&lt;br /&gt;
&lt;br /&gt;
== MVI Codec ==&lt;br /&gt;
&lt;br /&gt;
=== Common things and differences ===&lt;br /&gt;
&lt;br /&gt;
Essentially there are four (or even five) flavours of the codec:&lt;br /&gt;
* DOS version in [[MVI Container]]. Format is set in the header flags. Frames are treated either as intra or inter (depending on the flag set).&lt;br /&gt;
* MVI1 codec. Format is set in the flags. The only known flags include flipped frames, single-field coding, and golden frame.&lt;br /&gt;
* MVI2.0 codec. Format is set in the flags. In addition to MVI1 flags it also supports low-resolution mode and frame cropping.&lt;br /&gt;
* MVI2.1 codec. This one is signalled by a certain flag, actual coding format is set in intra frame header. Compared to MVI2.0 it also enables smooth delta coding mode.&lt;br /&gt;
* MVI2.2 codec. This one is signalled by a different flag but the behaviour seems to be identical to MVI2.1&lt;br /&gt;
&lt;br /&gt;
All variations of MVI use the same coding principle: first special rectangular areas are marked on the frame that require special handling; they are processed and the rest of pixels are decoded using Huffman-compressed deltas. For better compression data in most cases is represented in YUV colourspace with some subsampling. See Appendix A for the code to convert between 15-bit RGB and YUV.&lt;br /&gt;
&lt;br /&gt;
Supported colourspace formats are:&lt;br /&gt;
* 0 - RGB&lt;br /&gt;
* 1 - YUV with one chroma pair per 2x1 block&lt;br /&gt;
* 2 - YUV with one chroma pair per 2x2 block&lt;br /&gt;
* 3 - YUV with one chroma pair per 4x2 block&lt;br /&gt;
* 4 - YUV with one chroma pair per 4x4 block&lt;br /&gt;
&lt;br /&gt;
Overall bitstream format looks like this:&lt;br /&gt;
* intra frame flag (not present in DOS version)&lt;br /&gt;
* coding parameters like colourspace, lowres mode and smooth delta coding (only in intra frames and only in MVI2.1/MVI2.2)&lt;br /&gt;
* skip map (not for intra frames)&lt;br /&gt;
* golden frame map (only when the feature is enabled)&lt;br /&gt;
* fill map&lt;br /&gt;
* low-resolution areas map (only when the feature is enabled)&lt;br /&gt;
* Huffman codes description for deltas&lt;br /&gt;
* number of delta codes for vertical prediction and first field (if there are delta codes)&lt;br /&gt;
* number of delta codes for the second field (ditto)&lt;br /&gt;
* Huffman-coded deltas&lt;br /&gt;
&lt;br /&gt;
Bit reading is done MSB first using 32-bit little-endian words (e.g. &amp;lt;code&amp;gt;00 00 10 80&amp;lt;/code&amp;gt; is represented as &amp;lt;code&amp;gt;0x80100000&amp;lt;/code&amp;gt; and first read bit will be 1).&lt;br /&gt;
&lt;br /&gt;
=== Compression Flags ===&lt;br /&gt;
&lt;br /&gt;
When video is packaged inside [[AVI]] files, all vital codec's parameters carried in [[BITMAPINFOHEADER]]'s '''biCompression''' field of the video stream. Actual codec type should be retrieved from &amp;lt;code&amp;gt;fccHandler&amp;lt;/code&amp;gt; of AVI stream header. First two bytes of '''biCompression''' for 16-bit little-endian flags value, last two bytes should be &amp;quot;i1&amp;quot; for MVI1 and &amp;quot;i2&amp;quot; for MVI2 correspondingly.&lt;br /&gt;
&lt;br /&gt;
Flag bits meaning:&lt;br /&gt;
&lt;br /&gt;
* 0..3  (0x000F) - colourspace Format (see below)&lt;br /&gt;
* 4 (0x0010) - MVI2.2 only&lt;br /&gt;
* 5 (0x0020) - MVI2.2 only&lt;br /&gt;
* 6 (0x0040) - MVI2.2 only&lt;br /&gt;
* 7 (0x0080) - MVI2.2 only&lt;br /&gt;
* 8 (0x0100) - MVI2.2 only&lt;br /&gt;
* 9 (0x0200) - MVI2.1 mode&lt;br /&gt;
* 10 (0x0400) - frame cropping enabled (MVI2 only)&lt;br /&gt;
* 11 (0x0800) - low-resolution mode (MVI2 only)&lt;br /&gt;
* 12 (0x1000) - still-frame (or golden frame) mode&lt;br /&gt;
* 13 (0x2000) - frames are coded upside-down (instead of bottoms-up by default)&lt;br /&gt;
* 14 (0x4000) - video was encoded using trial version of the codec (this flag tells original decoder to put watermark to the frame)&lt;br /&gt;
* 15 (0x8000) - image is single-field, only odd lines are carried&lt;br /&gt;
&lt;br /&gt;
=== Golden frame mode ===&lt;br /&gt;
&lt;br /&gt;
When videos with small amount of changes encoded (ex, 'talking heads' or some static scenery) special trick may be performed. Very first frame contains all the scenery, while all successive frames take this first frame as a base and add necessary changes to it. The tricky part is, that first frame contains such a 'change-frame' as well, so you have two logical frames in one physical. Offset to the base frame is located at ('''biSizeImage''' - 4) in the encoded data buffer. Change-frame located at it's start.&lt;br /&gt;
&lt;br /&gt;
Please note that both of the parts in the first frame still contain the golden frame map.&lt;br /&gt;
&lt;br /&gt;
=== Low-resolution mode ===&lt;br /&gt;
&lt;br /&gt;
In this mode half of the pixels are coded using interpolation i.e. when only luma changes are coded then first (interpolated pixel) uses half of that delta value added to the previous pixel and second pixel uses full delta. If exactly one pixel is left between low-res and skip areas, it is interpolated in the same way (luma delta is calculated and half of it is added to the predictor value). If exactly one pixel is left between low-res and and normal area, it uses half of the first delta from the first pixel of that area.&lt;br /&gt;
&lt;br /&gt;
Depending on coding mode and line number full and pixel position may be swapped (e.g. for even lines it may be &amp;quot;interpolated full interpolated full&amp;quot; while for odd lines it is &amp;quot;full interpolated full interpolated&amp;quot;). Additionally in smooth deltas mode luma deltas use limited range unless the very first pixel is full one.&lt;br /&gt;
&lt;br /&gt;
Please note that during vertical prediction stage low-resolution mode pixels are treated as skip pixels.&lt;br /&gt;
&lt;br /&gt;
=== Decompression ===&lt;br /&gt;
&lt;br /&gt;
==== Frame Flags ====&lt;br /&gt;
Each frame begins with sequence of local flag bits. These bits are:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; style=&amp;quot;border-collapse: collapse; border-style: dashed; border-color: #2f6fab;&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#f0f0f0&amp;quot; |&lt;br /&gt;
! # of bits !! Present if !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || always || KeyframeFlag || non-zero if this frame is a key frame&lt;br /&gt;
|-&lt;br /&gt;
| 3 || flags bit 9 || ColorSpace || colorspace Format for this group of frames&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || LowRes || low-resolution coding is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || SmoothDeltas || use smooth delta-coding&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || HaveSerial || (see next field)&lt;br /&gt;
|-&lt;br /&gt;
| 20 || flags bit 9 + HaveSerial || SerialNumber || Encoder's serial number&lt;br /&gt;
|-&lt;br /&gt;
| 1 || flags bit 9 || Cropping || frame cropping is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 8 || flags bit 10 or Cropping || CropX || x offset of the frame start&lt;br /&gt;
|-&lt;br /&gt;
| 8 || flags bit 10 or Cropping || CropY || y offset of the frame start&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Maps ====&lt;br /&gt;
Map blocks contain rectangles which should be marked as special on the frame. All versions prior to MVI2.1 use the same format:&lt;br /&gt;
* 12 bits   number of large rectangles&lt;br /&gt;
* 12 bits   number of small rectangles&lt;br /&gt;
* large rectangles&lt;br /&gt;
* small rectangles&lt;br /&gt;
&lt;br /&gt;
Rectangles are stored as &amp;lt;code&amp;gt;&amp;amp;lt;offset, width-1, height-1&amp;amp;gt;&amp;lt;/code&amp;gt; with offset taking &amp;lt;code&amp;gt;ceil(log2(frame width * frame height))&amp;lt;/code&amp;gt; bits and width and height using 8 or 4 bits depending on rectangle size. Rectangles for fill map additionally contain RGB555 fill value.&lt;br /&gt;
&lt;br /&gt;
MVI2.1/MVI2.2 use a different format, they split image into chunks of 8192 bytes and for each of them use 8-bit number of large/small rectangles as well as 13-bit offsets relative to the start of that piece.&lt;br /&gt;
&lt;br /&gt;
==== Deltas Bundle ====&lt;br /&gt;
&lt;br /&gt;
'''TODO'''&lt;br /&gt;
&lt;br /&gt;
==== Assembling the Frame ====&lt;br /&gt;
* leave areas marked as &amp;quot;skip&amp;quot; (but not &amp;quot;lowres&amp;quot;) unchanged&lt;br /&gt;
* copy image data from the golden frame to the areas marked as such (there is no motion displacement)&lt;br /&gt;
* fill areas marked as &amp;quot;fill&amp;quot; with the provided colour&lt;br /&gt;
* perform vertical prediction for the first column (skip if there are no deltas)&lt;br /&gt;
* perform prediction for odd lines using the rest of deltas from the first part (skip if there are no deltas)&lt;br /&gt;
* perform prediction for even lines using deltas from the second part (skip if there are no deltas)&lt;br /&gt;
&lt;br /&gt;
'''TODO'''&lt;br /&gt;
&lt;br /&gt;
== Games Using Motion Pixels ==&lt;br /&gt;
* [https://www.mobygames.com/game/windows/treasure-quest Treasure Quest]&lt;br /&gt;
* [https://www.mobygames.com/game/25426/apollo-18-the-moon-missions/ Apollo 18: The Moon Missions]&lt;br /&gt;
&lt;br /&gt;
== Appendix A ==&lt;br /&gt;
&lt;br /&gt;
Code for generating RGB to YUV table (it is done with YUV to RGB conversion, which is used during decoding as well):&lt;br /&gt;
&lt;br /&gt;
   for (y = 0; y &amp;lt;= 31; y++) {&lt;br /&gt;
        for (v = -31; v &amp;lt;= 31; v++) {&lt;br /&gt;
            for (u = -31; u &amp;lt;= 31; u++) {&lt;br /&gt;
                r = (y * 1000 + v * 701) / 1000;&lt;br /&gt;
                g = (y * 1000 - 357 * v - 172 * u) / 1000;&lt;br /&gt;
                b = (y * 1000 + 886 * u) / 1000;&lt;br /&gt;
                if (r &amp;gt;= 0 &amp;amp;&amp;amp; r &amp;lt; 32 &amp;amp;&amp;amp; g &amp;gt;= 0 &amp;amp;&amp;amp; g &amp;lt; 32 &amp;amp;&amp;amp; b &amp;gt;= 0 &amp;amp;&amp;amp; b &amp;lt; 32) {&lt;br /&gt;
                    pix = (r &amp;lt;&amp;lt; 10) | (g &amp;lt;&amp;lt; 5) | b;&lt;br /&gt;
                    if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                        rgb2yuv[pix][0] = y;&lt;br /&gt;
                        rgb2yuv[pix][1] = u;&lt;br /&gt;
                        rgb2yuv[pix][2] = v;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    for (i = 0; i &amp;lt; 32768; i+= 32) {&lt;br /&gt;
        for (j = 0; j &amp;lt; 31; j++) {&lt;br /&gt;
            for (k = 31; k &amp;gt; j; k--) {&lt;br /&gt;
                pix = i + k;&lt;br /&gt;
                if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                    rgb2yuv[pix][0] = rgb2yuv[pix - 1][0];&lt;br /&gt;
                    rgb2yuv[pix][1] = rgb2yuv[pix - 1][1];&lt;br /&gt;
                    rgb2yuv[pix][2] = rgb2yuv[pix - 1][2];&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            for (k = 0; k &amp;lt; 31 - j; k++) {&lt;br /&gt;
                pix = i + k;&lt;br /&gt;
                if (!rgb2yuv[pix][0] &amp;amp;&amp;amp; !rgb2yuv[pix][1] &amp;amp;&amp;amp; !rgb2yuv[pix][2]) {&lt;br /&gt;
                    rgb2yuv[pix][0] = rgb2yuv[pix + 1][0];&lt;br /&gt;
                    rgb2yuv[pix][1] = rgb2yuv[pix + 1][1];&lt;br /&gt;
                    rgb2yuv[pix][2] = rgb2yuv[pix + 1][2];&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Undiscovered Video Codecs]]&lt;br /&gt;
[[Category:Undiscovered Game Formats]]&lt;br /&gt;
[[Category:Game Formats]]&lt;br /&gt;
[[Category:Formats missing in MPlayer]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=LMS&amp;diff=16063</id>
		<title>LMS</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=LMS&amp;diff=16063"/>
		<updated>2025-06-17T10:40:09Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: lms&lt;br /&gt;
* Samples: [http://samples.mplayerhq.hu/game-formats/segacd/ecco-lms/ http://samples.mplayerhq.hu/game-formats/segacd/ecco-lms/]&lt;br /&gt;
&lt;br /&gt;
LMS is a multimedia format used on the [[Sega CD]] game [http://www.mobygames.com/game/sega-cd/ecco-the-dolphin Ecco The Dolphin]. It is a raw grayscale video  plus audio format. Frames are grouped into larger blocks in the following format:&lt;br /&gt;
  2048 bytes - unused?&lt;br /&gt;
  8820 bytes - left channel PCM&lt;br /&gt;
  1420 bytes - padding&lt;br /&gt;
  2048 bytes - unused?&lt;br /&gt;
  8820 bytes - right channel PCM&lt;br /&gt;
  1420 bytes - padding&lt;br /&gt;
  12x8192 bytes - twelve video frames&lt;br /&gt;
&lt;br /&gt;
Video frames are stored in the console format (two 4-bit palette indices in one byte, 32 bytes per one 8x8 tile) except that tiles are arranged in a special order: first frame is divided into strips 4 tiles high and strips are filled column by column. Palette indices seem to correspond to grayscale shades, palettes do not seem to be stored anywhere.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=YQS&amp;diff=16062</id>
		<title>YQS</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=YQS&amp;diff=16062"/>
		<updated>2025-06-17T10:22:22Z</updated>

		<summary type="html">&lt;p&gt;Kostya: create an alias for YQS to make it easier to find&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[EGG]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=ICOM_video&amp;diff=16061</id>
		<title>ICOM video</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=ICOM_video&amp;diff=16061"/>
		<updated>2025-06-17T10:12:32Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: ICOM Simulations Inc.&lt;br /&gt;
* Extension: imv&lt;br /&gt;
&lt;br /&gt;
This is a format used in the original version of [https://www.mobygames.com/group/10092/sherlock-holmes-consulting-detective-series/ Sherlock Holmes: Consulting Detective] series. The files consists of blocks forming logical groups with video for one scene.&lt;br /&gt;
&lt;br /&gt;
Blocks start with 32-bit size, 32-bit previous block size (useful for seeking backwards), and 16-bit block type. Known block types are:&lt;br /&gt;
* 0x01 - global header (first 6 bytes meaning is unknown then there are 2-byte width, height and fps)&lt;br /&gt;
* 0x02 - logical group (scene) start, it contains total group size in multiple of CD sectors&lt;br /&gt;
* 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&lt;br /&gt;
* 0x08 - audio plus raw frame (with the same header)&lt;br /&gt;
* 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&lt;br /&gt;
* 0x40 - palette update&lt;br /&gt;
&lt;br /&gt;
Delta frames are coded as a mix of update mask bytes followed by pixel values. E.g. &amp;lt;code&amp;gt;0x7A 0x01 0x02 0x03 0x04 0x05&amp;lt;/code&amp;gt; means skipping one pixel, setting next four pixels to &amp;lt;code&amp;gt;0x01 0x02 0x03 0x04&amp;lt;/code&amp;gt;, skipping one pixel, setting next pixel to &amp;lt;code&amp;gt;0x05&amp;lt;/code&amp;gt; and skipping last pixel. Mask value &amp;lt;code&amp;gt;0x05&amp;lt;/code&amp;gt; is used as an escape value: if it is followed by &amp;lt;code&amp;gt;0x02&amp;lt;/code&amp;gt; then 16-bit number of 8-pixel groups to skip follows, otherwise just ignore that following byte.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Klondike_Moon_FMV&amp;diff=16060</id>
		<title>Klondike Moon FMV</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Klondike_Moon_FMV&amp;diff=16060"/>
		<updated>2025-06-16T15:01:02Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: SEQ, SFX, VID&lt;br /&gt;
* Samples: http://samples.mplayerhq.hu/game-formats/klondike-moon-fmv/&lt;br /&gt;
&lt;br /&gt;
The DOS game Klondike Moon contains a VIDEOS/ directory that has triplets of files that likely correspond to full motion video files. The SFX files apparently contain unsigned 8-bit PCM. The SEQ files likely contain header/control information to indicate how to play the files.&lt;br /&gt;
&lt;br /&gt;
VID files start with VGA palette and uncompressed 320x200 image followed by non-delimited RLE-coded delta frames.&lt;br /&gt;
&lt;br /&gt;
Those frames actually consist of update chunks starting with 16-bit absolute image offset followed by RLE opcodes:&lt;br /&gt;
* 0xFF 0xFF -- end&lt;br /&gt;
* 0xFF nn ll -- run of pixel &amp;lt;code&amp;gt;nn&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;ll&amp;lt;/code&amp;gt; times&lt;br /&gt;
* nn -- single pixel value&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Maelstrom_ANM&amp;diff=16059</id>
		<title>Maelstrom ANM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Maelstrom_ANM&amp;diff=16059"/>
		<updated>2025-06-16T14:55:17Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: anm&lt;br /&gt;
* Samples: [http://samples.mplayerhq.hu/game-formats/anm-maeldemo/ http://samples.mplayerhq.hu/game-formats/anm-maeldemo/]&lt;br /&gt;
* Samples: {{DexvertSamples|video/maelstromANM}}&lt;br /&gt;
* Game: [https://www.mobygames.com/game/1864/maelstrom/ Maelstrom]&lt;br /&gt;
&lt;br /&gt;
This is an animation format used in the strategy game from early 1990s. It employs chunked format with &amp;lt;code&amp;gt;ANIM&amp;lt;/code&amp;gt; being the root chunk, &amp;lt;code&amp;gt;BPIC&amp;lt;/code&amp;gt; used for the first (intra) frame and &amp;lt;code&amp;gt;DFRM&amp;lt;/code&amp;gt; used for the delta frames.&lt;br /&gt;
&lt;br /&gt;
Intra frame has the following header:&lt;br /&gt;
  1 byte  - unknown&lt;br /&gt;
  1 byte  - mode (0 - raw, 1 - RLE)&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  1 byte  - depth (should be 8)&lt;br /&gt;
  1 byte  - number of palette colours&lt;br /&gt;
  N*3 bytes - palette&lt;br /&gt;
&lt;br /&gt;
RLE opcodes are trivial: 0-127 means read 1-128 pixels, 128-255 means run of 129-2 pixels.&lt;br /&gt;
&lt;br /&gt;
Delta frames use RLE compression which is employed per column. For each column there's a byte telling the number of RLE opcodes followed by those opcodes and data:&lt;br /&gt;
* 0 - run, read byte for run length and byte for colour value&lt;br /&gt;
* 1-127 - skip 1-127 lines&lt;br /&gt;
* 128-255 - read 128-1 pixels&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=EGG&amp;diff=16058</id>
		<title>EGG</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=EGG&amp;diff=16058"/>
		<updated>2025-06-16T14:40:04Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fix inaccuracies from confusion with YQS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: egg ([[Sega Saturn]] port), yqs (PC port)&lt;br /&gt;
* Samples: [http://samples.mplayerhq.hu/game-formats/egg/ http://samples.mplayerhq.hu/game-formats/egg/]&lt;br /&gt;
* Game: [http://www.mobygames.com/game/saturn/independence-day Independence Day]&lt;br /&gt;
&lt;br /&gt;
The format employs YUV frames coded per-plane and [[IMA ADPCM]]-encoded audio. Data is aligned to CD sector size (2048 bytes)&lt;br /&gt;
&lt;br /&gt;
Egg does not have audio stream and has slightly different coding but the differences are minimal.&lt;br /&gt;
&lt;br /&gt;
EGG header:&lt;br /&gt;
  4 bytes - &amp;quot;EGG\0&amp;quot;&lt;br /&gt;
  4 bytes - always 0x350?&lt;br /&gt;
  4 bytes - number of frames&lt;br /&gt;
  2036 bytes - padding&lt;br /&gt;
&lt;br /&gt;
EGG frame header:&lt;br /&gt;
  4x2x3 bytes - offsets to each plane pixel and mode data&lt;br /&gt;
&lt;br /&gt;
EGG frames are always 20kB long.&lt;br /&gt;
&lt;br /&gt;
YQS header:&lt;br /&gt;
  2 bytes - number of frames&lt;br /&gt;
  4 bytes - audio sample rate&lt;br /&gt;
  2042 bytes - padding&lt;br /&gt;
&lt;br /&gt;
YQS frame header:&lt;br /&gt;
  4 bytes - size&lt;br /&gt;
  4x2x3 bytes - offsets to each plane pixel and mode data&lt;br /&gt;
  4 bytes - audio data offset&lt;br /&gt;
  4 bytes - audio data size&lt;br /&gt;
&lt;br /&gt;
Video coding employs quadtree coding and vector quantisation: before actual image data there's an array of possible 2x2 block values which may be used during luma decoding.&lt;br /&gt;
&lt;br /&gt;
Luma plane is coded as 8x8 blocks with mode flags telling how to decode them (fill/skip/split). Chroma plane is coded in similar manner using 4x4 blocks.&lt;br /&gt;
&lt;br /&gt;
Luma coding:&lt;br /&gt;
  if (get_bit() == 0) {&lt;br /&gt;
    raw block - read 64 pixels from pixel data to fill it&lt;br /&gt;
  } else {&lt;br /&gt;
    //split block&lt;br /&gt;
    for (blk_no = 0; blk_no &amp;lt; 4; blk_no++) {&lt;br /&gt;
      if (get_bit() == 1)&lt;br /&gt;
        decode_luma_4x4_block();&lt;br /&gt;
      // otherwise leave it unchanged&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
4x4 luma blocks are coded in the same manner, 2x2 blocks depend on the format.&lt;br /&gt;
&lt;br /&gt;
EGG uses bit pattern (highest bit is the one read first) to determine coding mode:&lt;br /&gt;
* 00 - skip&lt;br /&gt;
* 01 - fill&lt;br /&gt;
* 10 - raw&lt;br /&gt;
* 11xx - VQ with possible transformation (00 - as is, 01 - flip horizontally, 10 - flip vertically, 11 - flip in both directions)&lt;br /&gt;
&lt;br /&gt;
YQS simply uses 2-bit mode for that:&lt;br /&gt;
* 0 - fill&lt;br /&gt;
* 1 - raw&lt;br /&gt;
* 2 - VQ (followed by index in the header table of 2x2 blocks)&lt;br /&gt;
* 3 - VQ flipped vertically&lt;br /&gt;
&lt;br /&gt;
Chroma coding:&lt;br /&gt;
  if (get_bit() == 1) { // otherwise skip&lt;br /&gt;
    if (get_bit() == 0) {&lt;br /&gt;
      fill 4x4 block with single colour&lt;br /&gt;
    } else {&lt;br /&gt;
      for (blk_no = 0; blk_no &amp;lt; 4; blk_no++) {&lt;br /&gt;
        if (get_bit() == 1) {&lt;br /&gt;
          // decode 2x2 chroma block&lt;br /&gt;
          if (get_bit() == 0)&lt;br /&gt;
            fill 2x2 block&lt;br /&gt;
          else&lt;br /&gt;
            raw 2x2 block&lt;br /&gt;
        }&lt;br /&gt;
        // otherwise leave it unchanged&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=EGG&amp;diff=16057</id>
		<title>EGG</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=EGG&amp;diff=16057"/>
		<updated>2025-06-16T14:18:05Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: egg&lt;br /&gt;
* Samples: [http://samples.mplayerhq.hu/game-formats/egg/ http://samples.mplayerhq.hu/game-formats/egg/]&lt;br /&gt;
* Game: [http://www.mobygames.com/game/saturn/independence-day Independence Day] ([[Sega Saturn]] port)&lt;br /&gt;
&lt;br /&gt;
The format employs YUV frames coded per-plane and [[IMA ADPCM]]-encoded audio. Data is aligned to CD sector size (2048 bytes)&lt;br /&gt;
&lt;br /&gt;
Header:&lt;br /&gt;
  2 bytes - number of frames&lt;br /&gt;
  4 bytes - audio sample rate&lt;br /&gt;
  2042 bytes - padding&lt;br /&gt;
&lt;br /&gt;
Frame header:&lt;br /&gt;
  4 bytes - size&lt;br /&gt;
  4x2x3 bytes - offsets to each plane pixel and mode data&lt;br /&gt;
  4 bytes - audio data offset&lt;br /&gt;
  4 bytes - audio data size&lt;br /&gt;
&lt;br /&gt;
Video coding employs quadtree coding and vector quantisation: before actual image data there's an array of possible 2x2 block values which may be used during decoding.&lt;br /&gt;
&lt;br /&gt;
Luma plane is coded as 8x8 blocks with mode flags telling how to decode them:&lt;br /&gt;
  if (get_bit() == 0) {&lt;br /&gt;
    raw block - read 64 pixels from pixel data to fill it&lt;br /&gt;
  } else {&lt;br /&gt;
    //split block&lt;br /&gt;
    for (blk_no = 0; blk_no &amp;lt; 4; blk_no++) {&lt;br /&gt;
      if (get_bit() == 1)&lt;br /&gt;
        decode_luma_4x4_block();&lt;br /&gt;
      // otherwise leave it unchanged&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
4x4 luma blocks are coded in the same manner, 2x2 blocks though use 2-bit mode to determine fill pattern:&lt;br /&gt;
* 0 - fill&lt;br /&gt;
* 1 - raw&lt;br /&gt;
* 2 - VQ index for the blocks from the header&lt;br /&gt;
* 3 - same but flipped vertically&lt;br /&gt;
&lt;br /&gt;
Chroma coding is similar:&lt;br /&gt;
  if (get_bit() == 1) { // otherwise skip&lt;br /&gt;
    if (get_bit() == 0) {&lt;br /&gt;
      fill 4x4 block with single colour&lt;br /&gt;
    } else {&lt;br /&gt;
      for (blk_no = 0; blk_no &amp;lt; 4; blk_no++) {&lt;br /&gt;
        if (get_bit() == 1) {&lt;br /&gt;
          // decode 2x2 chroma block&lt;br /&gt;
          if (get_bit() == 0)&lt;br /&gt;
            fill 2x2 block&lt;br /&gt;
          else&lt;br /&gt;
            raw 2x2 block&lt;br /&gt;
        }&lt;br /&gt;
        // otherwise leave it unchanged&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Savage_Warriors_ANM&amp;diff=16056</id>
		<title>Savage Warriors ANM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Savage_Warriors_ANM&amp;diff=16056"/>
		<updated>2025-06-16T14:01:28Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: anm&lt;br /&gt;
* Samples: [http://samples.mplayerhq.hu/game-formats/anm-savagewarriors/ http://samples.mplayerhq.hu/game-formats/anm-savagewarriors/]&lt;br /&gt;
* Game: [http://www.mobygames.com/game/dos/savage-warriors Savage Warriors]&lt;br /&gt;
&lt;br /&gt;
This is a format that employs LZ77 compression from Diet (Japanese executable compressor). Additionally there are two flavours of the format, the version used in demo version of the game and lacks &amp;quot;CHCK&amp;quot; header, and the one used in the full version (with the header and 32-bit checksum inserted after every 4kB of the file data).&lt;br /&gt;
&lt;br /&gt;
Beside the 4-byte header the rest are video frame chunks:&lt;br /&gt;
&lt;br /&gt;
  1 byte  - mode (0 - Diet packed image data, 1 - RLE, 0xFF - end of file)&lt;br /&gt;
  1 byte  - palette present&lt;br /&gt;
  2 bytes - unknown&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  2 bytes - X offset&lt;br /&gt;
  2 bytes - Y offset&lt;br /&gt;
  4 bytes - frame size&lt;br /&gt;
  (if palette is present) 768 bytes - palette&lt;br /&gt;
  N bytes - frame size&lt;br /&gt;
&lt;br /&gt;
RLE compression codes segments in form of &amp;lt;code&amp;gt;(skip, opcode, data)&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;skip&amp;lt;/code&amp;gt; is the number of pixels to skip, &amp;lt;code&amp;gt;opcode&amp;lt;/code&amp;gt; tells what operations to perform (skip=opcode=0 means image end, 1-127 means copying 1-127 pixels from the stream, 128-255 means run of 128-1 pixels).&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Castles_II_video&amp;diff=16055</id>
		<title>Castles II video</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Castles_II_video&amp;diff=16055"/>
		<updated>2025-06-16T13:39:53Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Game: [https://www.mobygames.com/game/1874/castles-ii-siege-conquest/ Castles II]&lt;br /&gt;
* Extension: .M&lt;br /&gt;
&lt;br /&gt;
This is a simple animation format presumably created by [https://www.mobygames.com/person/7626/byon-garrabrant/ Byon Garrabrant] and used in game to show a grayscale film footage (for other animations [[Interplay MVE]] is used).&lt;br /&gt;
&lt;br /&gt;
Header:&lt;br /&gt;
  10 bytes - &amp;quot;BYON PIZZA&amp;quot;&lt;br /&gt;
  2  bytes - height&lt;br /&gt;
  2  bytes - width&lt;br /&gt;
  2  bytes - unknown&lt;br /&gt;
&lt;br /&gt;
Then video frames follow, each starting with 16-bit size.&lt;br /&gt;
&lt;br /&gt;
Frames are split into 2x2 tiles and use the following opcodes to decode them:&lt;br /&gt;
* 0-63 -- this is the first pixel value, other three pixel value follow&lt;br /&gt;
* 64-127 -- fill tile with the value of low 6 bits of the opcode&lt;br /&gt;
* 128-255 -- skip 0-127 tiles&lt;br /&gt;
&lt;br /&gt;
Video uses 64 greyscale shades with 0 corresponding to white and 63 corresponding to black.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Shadowcaster_cutscene&amp;diff=16054</id>
		<title>Shadowcaster cutscene</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Shadowcaster_cutscene&amp;diff=16054"/>
		<updated>2025-06-16T13:29:52Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Game: [https://www.mobygames.com/game/550/shadowcaster/ Shadowcaster]&lt;br /&gt;
* Extension: DAT&lt;br /&gt;
&lt;br /&gt;
This cutscene format combines compressed video data with other commands like starting/stopping external music.&lt;br /&gt;
&lt;br /&gt;
Header:&lt;br /&gt;
  2 bytes -- 0x105&lt;br /&gt;
  2 bytes -- width&lt;br /&gt;
  2 bytes -- height&lt;br /&gt;
  2 bytes -- fps&lt;br /&gt;
  48 bytes -- unknown/unused&lt;br /&gt;
&lt;br /&gt;
The rest of file is organised into chunks with 16-bit tag, 32-bit size and payload. Known chunk types are:&lt;br /&gt;
* 1 -- intra RLE frame (negative value - copy, positive value - run)&lt;br /&gt;
* 2 -- optionally LZSS-packed inter RLE frame (each line containing start position and the number of RLE segments to update)&lt;br /&gt;
* 3 -- unpacked or LZSS-packed frame&lt;br /&gt;
* 4 -- palette update&lt;br /&gt;
* 16-21 -- unknown commands&lt;br /&gt;
* 22 -- palette selection command (one byte is palette index)&lt;br /&gt;
* 23-24 -- unknown commands&lt;br /&gt;
* 25 -- repeat frame command (one byte tells how many times)&lt;br /&gt;
* 32 -- set palette to all black&lt;br /&gt;
* 33 -- fade in command (one byte is target palette index)&lt;br /&gt;
* 34 -- fade out command &lt;br /&gt;
* 35 -- unknown&lt;br /&gt;
&lt;br /&gt;
Palette data is stored as the palette index followed by the number of palette segments and actual segments (number of colours to skip from previous segment, number of colours in the segment modulo 256, actual colour data).&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Talk:Engines/XPAT&amp;diff=15945</id>
		<title>Talk:Engines/XPAT</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Talk:Engines/XPAT&amp;diff=15945"/>
		<updated>2025-05-10T12:53:27Z</updated>

		<summary type="html">&lt;p&gt;Kostya: Created page with &amp;quot;== FLX ==  This one looks like a slightly extended Flic Video with sub-chunk 21 containing audio data and sub-chunk 22 containing some kind of back-references to that audio (and they're always 10 bytes long). --~~~~&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== FLX ==&lt;br /&gt;
&lt;br /&gt;
This one looks like a slightly extended [[Flic Video]] with sub-chunk 21 containing audio data and sub-chunk 22 containing some kind of back-references to that audio (and they're always 10 bytes long). --[[User:Kostya|Kostya]] ([[User talk:Kostya|talk]]) 05:53, 10 May 2025 (PDT)&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Microsoft_Camcorder_Video&amp;diff=15875</id>
		<title>Microsoft Camcorder Video</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Microsoft_Camcorder_Video&amp;diff=15875"/>
		<updated>2025-04-16T11:34:40Z</updated>

		<summary type="html">&lt;p&gt;Kostya: Fill the details at last.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FourCC: CGDI&lt;br /&gt;
* Company: [[Microsoft]]&lt;br /&gt;
* Samples: http://samples.mplayerhq.hu/V-codecs/CGDI/&lt;br /&gt;
* References: http://support.microsoft.com/support/office/content/office97/camcorder.asp&lt;br /&gt;
&lt;br /&gt;
According to Microsoft's documentation, Camcorder Video allows users of Microsoft Office 97 to record video of their desktop. This would make it a screen capture codec if not for the fact that it actually records GDI and WINUSER API calls so in order to reconstruct image one has to implement those GDI calls.&lt;br /&gt;
&lt;br /&gt;
Each frame consists of records containing GDI/WINUSER commands:&lt;br /&gt;
&lt;br /&gt;
  bytes 0-3   size of record including this field&lt;br /&gt;
  bytes 4-5   command code&lt;br /&gt;
  bytes 6-9   unknown&lt;br /&gt;
  bytes 10-... command arguments, usually 16-bit integers&lt;br /&gt;
&lt;br /&gt;
The internal state keeps a list of GDI objects in an internal array and references them by ID so that the command e.g. for drawing a rectangle sends as parameters rectangle coordinates (left, top, right, bottom) as well as the brush ID that will be selected before rectangle will be drawn. In general the commands that have brush, pen IDs or such send those IDs at the end of the list but before the variable-length part (e.g. points to draw polyline).&lt;br /&gt;
&lt;br /&gt;
Known opcodes are:&lt;br /&gt;
* &amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt; -- fill region using region and brush IDs&lt;br /&gt;
* &amp;lt;code&amp;gt;0x01&amp;lt;/code&amp;gt; -- draw a border around region; parameters are region/brush IDs plus stroke width/height&lt;br /&gt;
* &amp;lt;code&amp;gt;0x02&amp;lt;/code&amp;gt; -- invert region&lt;br /&gt;
* &amp;lt;code&amp;gt;0x03&amp;lt;/code&amp;gt; -- paint region using the provided region/brush IDs&lt;br /&gt;
* &amp;lt;code&amp;gt;0x04&amp;lt;/code&amp;gt; -- draw an arc using provided coordinates and brush ID&lt;br /&gt;
* &amp;lt;code&amp;gt;0x05&amp;lt;/code&amp;gt; -- draw a line to the provided point using brush ID&lt;br /&gt;
* &amp;lt;code&amp;gt;0x06&amp;lt;/code&amp;gt; -- moveto (parameters are point coordinates)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x07&amp;lt;/code&amp;gt; -- not present&lt;br /&gt;
* &amp;lt;code&amp;gt;0x08&amp;lt;/code&amp;gt; -- polyline (first parameter is number of points, second parameter is brush ID, the rest are line points)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x09&amp;lt;/code&amp;gt; -- draw a chord (same parameters as for arc)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x0A&amp;lt;/code&amp;gt; -- draw focused rectangle (parameters are rectangle coordinates)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x0B&amp;lt;/code&amp;gt; -- draw an ellipse (parameters are bounding rectangle plus pen and brush IDs)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x0C&amp;lt;/code&amp;gt; -- draw filled rectangle (WINUSER; parameters are its coordinates and brush ID)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x0D&amp;lt;/code&amp;gt; -- draw frame rectangle (same parameters)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x0E&amp;lt;/code&amp;gt; -- invert rectangle at the provided coordinates&lt;br /&gt;
* &amp;lt;code&amp;gt;0x0F&amp;lt;/code&amp;gt; -- draw a pie (parameters are coordinates passed to the GDI function plus brush and pen IDs)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt; -- draw a polygon (parameters are number of points, brush/pen IDs and vertices coordinates)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x11&amp;lt;/code&amp;gt; -- draw a series of polygons (essentially the same parameters)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x12&amp;lt;/code&amp;gt; -- draw a rectangle (GDI) using provided coordinates and brush/pen IDs&lt;br /&gt;
* &amp;lt;code&amp;gt;0x13&amp;lt;/code&amp;gt; -- draw a rounded rectangle using provided coordinates, corner radius and brush/pen IDs&lt;br /&gt;
* &amp;lt;code&amp;gt;0x14&amp;lt;/code&amp;gt; -- blit bitmap using the provided arguments to &amp;lt;code&amp;gt;BitBlt&amp;lt;/code&amp;gt; and bitmap ID&lt;br /&gt;
* &amp;lt;code&amp;gt;0x15&amp;lt;/code&amp;gt; -- blit (optionally stretched bitmap)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x16&amp;lt;/code&amp;gt; -- &amp;lt;code&amp;gt;ExtFloodFill&amp;lt;/code&amp;gt; using provided coordinates, colour, mode and brush ID&lt;br /&gt;
* &amp;lt;code&amp;gt;0x17&amp;lt;/code&amp;gt; -- &amp;lt;code&amp;gt;PatBlt&amp;lt;/code&amp;gt; using provided coordinates, mode and brush ID&lt;br /&gt;
* &amp;lt;code&amp;gt;0x18&amp;lt;/code&amp;gt; -- set pixel at the provided coordinates to the provided colour value&lt;br /&gt;
* &amp;lt;code&amp;gt;0x19&amp;lt;/code&amp;gt; -- stretched blit using provided coordinates, mode and bitmap ID&lt;br /&gt;
* &amp;lt;code&amp;gt;0x1A&amp;lt;/code&amp;gt; -- &amp;lt;code&amp;gt;SetDIBitsToDevice&amp;lt;/code&amp;gt; using provided bitmap data&lt;br /&gt;
* &amp;lt;code&amp;gt;0x1B&amp;lt;/code&amp;gt; -- &amp;lt;code&amp;gt;StretchDIBits&amp;lt;/code&amp;gt; using provided bitmap data&lt;br /&gt;
* &amp;lt;code&amp;gt;0x1C&amp;lt;/code&amp;gt; -- draw provided text using specified pen/brush IDs&lt;br /&gt;
* &amp;lt;code&amp;gt;0x1D&amp;lt;/code&amp;gt; -- same but using &amp;lt;code&amp;gt;TextOut&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;ExtTextOut&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;0x1E&amp;lt;/code&amp;gt; -- draw text with WINUSER function&lt;br /&gt;
* &amp;lt;code&amp;gt;0x1F&amp;lt;/code&amp;gt; -- WINUSER TabbedTextOut&lt;br /&gt;
* &amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt; -- draw window frame&lt;br /&gt;
* &amp;lt;code&amp;gt;0x21&amp;lt;/code&amp;gt; -- create new palette using provided data&lt;br /&gt;
* &amp;lt;code&amp;gt;0x22&amp;lt;/code&amp;gt; -- delete requested GDI object by ID&lt;br /&gt;
* &amp;lt;code&amp;gt;0x23&amp;lt;/code&amp;gt; -- unused&lt;br /&gt;
* &amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt; -- init window parameters (origin and viewport)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x25&amp;lt;/code&amp;gt; -- something similar&lt;br /&gt;
* &amp;lt;code&amp;gt;0x26&amp;lt;/code&amp;gt;-&amp;lt;code&amp;gt;0x32&amp;lt;/code&amp;gt; -- unused&lt;br /&gt;
* &amp;lt;code&amp;gt;0x33&amp;lt;/code&amp;gt; -- set mapping mode to the provided argument&lt;br /&gt;
* &amp;lt;code&amp;gt;0x34&amp;lt;/code&amp;gt; -- set window and viewport extents&lt;br /&gt;
* &amp;lt;code&amp;gt;0x35&amp;lt;/code&amp;gt; -- set viewport origin&lt;br /&gt;
* &amp;lt;code&amp;gt;0x36&amp;lt;/code&amp;gt; -- set window origin&lt;br /&gt;
* &amp;lt;code&amp;gt;0x37&amp;lt;/code&amp;gt; -- set background mix mode&lt;br /&gt;
* &amp;lt;code&amp;gt;0x38&amp;lt;/code&amp;gt; -- set background colour&lt;br /&gt;
* &amp;lt;code&amp;gt;0x39&amp;lt;/code&amp;gt; -- set foreground mix mode&lt;br /&gt;
* &amp;lt;code&amp;gt;0x3A&amp;lt;/code&amp;gt; -- set text colour&lt;br /&gt;
* &amp;lt;code&amp;gt;0x3B&amp;lt;/code&amp;gt; -- set text align mode&lt;br /&gt;
* &amp;lt;code&amp;gt;0x3C&amp;lt;/code&amp;gt; -- set text justification&lt;br /&gt;
* &amp;lt;code&amp;gt;0x3D&amp;lt;/code&amp;gt; -- set brush origin&lt;br /&gt;
* &amp;lt;code&amp;gt;0x3E&amp;lt;/code&amp;gt; -- set polygon fill mode&lt;br /&gt;
* &amp;lt;code&amp;gt;0x3F&amp;lt;/code&amp;gt; -- create new brush with the provided parameters as store it at the provided ID&lt;br /&gt;
* &amp;lt;code&amp;gt;0x40&amp;lt;/code&amp;gt; -- create new font using the provided parameters and destination ID&lt;br /&gt;
* &amp;lt;code&amp;gt;0x41&amp;lt;/code&amp;gt; -- create patterned brush&lt;br /&gt;
* &amp;lt;code&amp;gt;0x42&amp;lt;/code&amp;gt; -- create new pen&lt;br /&gt;
* &amp;lt;code&amp;gt;0x43&amp;lt;/code&amp;gt; -- create memory object (some kind of bitmap?) by copying data from the stream to the given ID object&lt;br /&gt;
* &amp;lt;code&amp;gt;0x44&amp;lt;/code&amp;gt; -- init some window parameters&lt;br /&gt;
* &amp;lt;code&amp;gt;0x45&amp;lt;/code&amp;gt; -- unused&lt;br /&gt;
* &amp;lt;code&amp;gt;0x46&amp;lt;/code&amp;gt; -- create new bitmap using data from the stream&lt;br /&gt;
* &amp;lt;code&amp;gt;0x47&amp;lt;/code&amp;gt; -- init some window parameters&lt;br /&gt;
* &amp;lt;code&amp;gt;0x48&amp;lt;/code&amp;gt; -- set default parameters to the drawing system (usually the very first opcode in the first frame)&lt;br /&gt;
* &amp;lt;code&amp;gt;0x49&amp;lt;/code&amp;gt; -- clear drawing system from used objects&lt;br /&gt;
* &amp;lt;code&amp;gt;0x4A&amp;lt;/code&amp;gt; -- set some flag, probably for custom window clipping&lt;br /&gt;
* &amp;lt;code&amp;gt;0x4B&amp;lt;/code&amp;gt; -- delete requested object&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Screen Capture Video Codecs]]&lt;br /&gt;
[[Category:Formats missing in MPlayer]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=PI-Video&amp;diff=15874</id>
		<title>PI-Video</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=PI-Video&amp;diff=15874"/>
		<updated>2025-04-05T14:20:02Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fix some details&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FOURCC: &amp;lt;code&amp;gt;PIVC&amp;lt;/code&amp;gt;&lt;br /&gt;
* Company: Nordic Company&lt;br /&gt;
&lt;br /&gt;
This is a rather simple quadtree-based paletted video codec with its name probably coming from its developer initials.&lt;br /&gt;
&lt;br /&gt;
The image is split into squares of 4&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt;x4&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; pixels large for the closest match with frame dimensions (e.g. 256x256 squares for 320x240 video) that get divided into 16 parts with a flag telling if the part is fill/skip or should be further subdivided (or coded as raw for 4x4 squares). Flags and pixel data are grouped into separate data chunks inside the frame.&lt;br /&gt;
&lt;br /&gt;
Frame consists of the following data: 32-bit frame flags, 32-bit frame size (not counting frame flags), tile flags data (starting with 32-bit size), and pixel data. There are two known frame flags: bit 0 signals inter frame coding and bit 1 signals that pixel data is LZW-compressed.&lt;br /&gt;
&lt;br /&gt;
Simplified decoding process:&lt;br /&gt;
&lt;br /&gt;
  tile_size = 0x4000;&lt;br /&gt;
  do {&lt;br /&gt;
    tile_size &amp;gt;&amp;gt;= 2;&lt;br /&gt;
  } while (tile_size &amp;gt;= max(width, height))&lt;br /&gt;
  tile_size &amp;lt;&amp;lt;= 2;&lt;br /&gt;
  &lt;br /&gt;
  cur_tile_size = tile_size;&lt;br /&gt;
  for each tile in image&lt;br /&gt;
    decode_tile(tile_pos, cur_tile_size);&lt;br /&gt;
  &lt;br /&gt;
  decode_tile(pos, cur_tile_size) {&lt;br /&gt;
    flags = get_16bit_le(flags_data);&lt;br /&gt;
    for each one of 16 subparts in tile {&lt;br /&gt;
      if part is inside the image area {&lt;br /&gt;
        if ((flag &amp;amp; 1) == 0) {&lt;br /&gt;
           pix = get_byte(pixel_data);&lt;br /&gt;
           if (intra || pix != 0) {&lt;br /&gt;
               fill subpart with pix value&lt;br /&gt;
           }&lt;br /&gt;
        } else if (cur_tile_size &amp;gt; 4) {&lt;br /&gt;
           decode_tile(subpart, cur_tile_size &amp;gt;&amp;gt; 2);&lt;br /&gt;
        } else {&lt;br /&gt;
           fill 4x4 block with 16 values read from pixel data&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      flags &amp;gt;&amp;gt;= 1;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
LZW differs from the conventional algorithm used e.g. in GIF. First, there is single escape code 256 which is followed by two-bit mode (0 - end of stream, 1 - restart, 2 - increase current index bits). Second, index bits increase is manual because inter-frames keep using previous LZW dictionary to decode pixel data, so while they start decoding with 9-bit indices, they may bump it a couple of time and start reading e.g. 11-bit indices.&lt;br /&gt;
&lt;br /&gt;
Additionally codec uses fixed palette stored in the middle of its extradata (first 32-bit word of it seems to be the header size before actual palette starts).&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=EVA&amp;diff=15873</id>
		<title>EVA</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=EVA&amp;diff=15873"/>
		<updated>2025-04-01T15:13:51Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;EVA is a family of formats created by T.Yamamoto. They employ [[RLE]] for video compression.&lt;br /&gt;
&lt;br /&gt;
=== EVA3 header format ===&lt;br /&gt;
  4 bytes  - &amp;quot;EVA3&amp;quot;&lt;br /&gt;
  1+ bytes - comment ending with 0x1A byte&lt;br /&gt;
  2 bytes  - number of frames&lt;br /&gt;
  1 byte   - frames per second&lt;br /&gt;
  1 byte   - unused&lt;br /&gt;
&lt;br /&gt;
Frames are stored as raw 2-bit 96x92 images.&lt;br /&gt;
&lt;br /&gt;
=== EVA4 header format ===&lt;br /&gt;
  4 bytes  - &amp;quot;EVA4&amp;quot;&lt;br /&gt;
  1+ bytes - comment ending with 0x1A byte&lt;br /&gt;
  2 bytes  - number of frames&lt;br /&gt;
  1 byte   - frames per second&lt;br /&gt;
  1 byte   - unused&lt;br /&gt;
&lt;br /&gt;
Frame format is hardcoded to 2-bit 96x92.&lt;br /&gt;
&lt;br /&gt;
Each frame is preceded by 16-bit frame size.&lt;br /&gt;
&lt;br /&gt;
=== EVA5 header format ===&lt;br /&gt;
  4 bytes  - &amp;quot;EVA5&amp;quot;&lt;br /&gt;
  1+ bytes - comment ending with 0x1A byte&lt;br /&gt;
  2 bytes  - number of frames&lt;br /&gt;
  2 bytes  - width&lt;br /&gt;
  2 bytes  - height&lt;br /&gt;
  1 byte   - colour depth (usually 2-bit)&lt;br /&gt;
  1 byte   - frames per second&lt;br /&gt;
  1 byte   - bits per audio sample (0 - 8bps, 1 - 4bps)&lt;br /&gt;
  2 bytes  - sampling frequency&lt;br /&gt;
  2 bytes  - audio block size&lt;br /&gt;
  1 byte   - unused&lt;br /&gt;
&lt;br /&gt;
Each frame is preceded by audio block bytes and 16-bit frame size.&lt;br /&gt;
&lt;br /&gt;
=== Video compression ===&lt;br /&gt;
&lt;br /&gt;
EVA4 and EVA5 use the following opcodes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;00sssccc&amp;lt;/code&amp;gt; -- skip &amp;lt;code&amp;gt;sss&amp;lt;/code&amp;gt; bytes, copy &amp;lt;code&amp;gt;ccc&amp;lt;/code&amp;gt; bytes&lt;br /&gt;
* &amp;lt;code&amp;gt;01ssssss&amp;lt;/code&amp;gt; -- skip &amp;lt;code&amp;gt;ssssss&amp;lt;/code&amp;gt; bytes&lt;br /&gt;
* &amp;lt;code&amp;gt;10cccccc&amp;lt;/code&amp;gt; -- copy &amp;lt;code&amp;gt;cccccc&amp;lt;/code&amp;gt; bytes&lt;br /&gt;
* &amp;lt;code&amp;gt;11sssrrr&amp;lt;/code&amp;gt; -- skip &amp;lt;code&amp;gt;sss&amp;lt;/code&amp;gt; bytes, repeat the next byte &amp;lt;code&amp;gt;rrr&amp;lt;/code&amp;gt; times&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Container Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Perfect_Clarity_Audio&amp;diff=15872</id>
		<title>Perfect Clarity Audio</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Perfect_Clarity_Audio&amp;diff=15872"/>
		<updated>2025-03-29T08:36:18Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*Extension: pca&lt;br /&gt;
*Company: [[Sony]]&lt;br /&gt;
*TwoCC: 0x1971&lt;br /&gt;
&lt;br /&gt;
This format, originally known as [http://en.wikipedia.org/wiki/Sound_Forge Sound Forge] lossless audio, is a simple lossless codec for 16- or 24-bit audio. Despite the extension, &amp;lt;code&amp;gt;pca&amp;lt;/code&amp;gt; files are normal [[WAV]] files with variable-length frames.&lt;br /&gt;
&lt;br /&gt;
Flags stored in extradata may signal the following features being enabled:&lt;br /&gt;
* 1 -- use M/S decorrelation&lt;br /&gt;
* 2 -- LPC is enabled&lt;br /&gt;
* 4 -- CRC present?&lt;br /&gt;
&lt;br /&gt;
Frame format (all values are little-endian, 'C' means number of channels):&lt;br /&gt;
  (intra frame only) 4 bytes -- 0xFFFFFFFF&lt;br /&gt;
  (intra frame only) 4x4xC bytes -- history samples for each channel&lt;br /&gt;
  2 bytes -- number of samples? (negative value is used to signal something)&lt;br /&gt;
  2 bytes -- frame size&lt;br /&gt;
  C bytes -- Rice code parameter(s)&lt;br /&gt;
  C bytes -- filter order/value&lt;br /&gt;
  (if LPC is enabled) 4xC bytes -- LPC filter coefficient (signed bytes)&lt;br /&gt;
  (if something is enabled) 4 bytes -- CRC?&lt;br /&gt;
&lt;br /&gt;
If filter order is 5, block is not coded, otherwise frame data consists of coefficients coded as Rice codes, data is stored per channel.&lt;br /&gt;
Values are read MSB first, codes are re-interpreted as signed with the sign in low bit (e.g. 0 -&amp;amp;gt; 0, 1 -&amp;amp;gt; -1, 2 -&amp;amp;gt; 1 ...).&lt;br /&gt;
&lt;br /&gt;
If LPC is enabled it's applied before fixed predictor in the form of &amp;lt;code&amp;gt;coef[i] -= (coef[i-1]*filt[0] + ... + coef[i-4]*filt[3]) &amp;amp;gt;&amp;amp;gt; 5&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Fixed prediction seems to be borrowed from [[Shorten]]:&lt;br /&gt;
* 0 -- no prediction&lt;br /&gt;
* 1 -- &amp;lt;code&amp;gt;coef[i] += coef[i-1]&amp;lt;/code&amp;gt;&lt;br /&gt;
* 2 -- &amp;lt;code&amp;gt;coef[i] += coef[i-1] * 2 - coef[i-2]&amp;lt;/code&amp;gt;&lt;br /&gt;
* 3 -- &amp;lt;code&amp;gt;coef[i] += coef[i-1] * 3 - coef[i-2] * 3 + coef[i-3]&amp;lt;/code&amp;gt;&lt;br /&gt;
* 4 -- &amp;lt;code&amp;gt;coef[i] += coef[i-1] * 4 - coef[i-2] * 6 + coef[i-3] * 4 - coef[i-4]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When channel decorrelation is present, &amp;lt;code&amp;gt;L = (M * 2 + S) / 2, R = (M * 2 - S) / 2&amp;lt;/code&amp;gt; with different rounding mode depending on signedness and low bit of the values before division.&lt;br /&gt;
&lt;br /&gt;
16-bit audio is output as low bits of the decoded values, 24-bit audio is clipped to the range first.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lossless Audio Codecs]]&lt;br /&gt;
[[Category:Container Formats]]&lt;br /&gt;
[[Category:Formats missing in FFmpeg]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=DVC&amp;diff=15871</id>
		<title>DVC</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=DVC&amp;diff=15871"/>
		<updated>2025-03-29T08:10:33Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: [[Q-Team]]&lt;br /&gt;
* Extension: dvc&lt;br /&gt;
&lt;br /&gt;
This is an animation format based on RLE. Quite likely it was the ancestor of [[QPEG]] codec.&lt;br /&gt;
&lt;br /&gt;
=== Container format ===&lt;br /&gt;
Header (all values are little-endian):&lt;br /&gt;
  6 bytes - &amp;quot;IDVCd\x00&amp;quot;&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - unknown&lt;br /&gt;
  4 bytes - unknown, maybe frame delay in milliseconds&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - unknown, looks somewhat like the number of frames but not exactly it&lt;br /&gt;
  4 bytes - data size&lt;br /&gt;
  68 bytes - unknown&lt;br /&gt;
  708 bytes - palette (starting from colour 20)&lt;br /&gt;
&lt;br /&gt;
Frames start with 16-bit value equal to one (zero means end of file) followed by 32-bit frame size and actual payload.&lt;br /&gt;
&lt;br /&gt;
=== Video compression ===&lt;br /&gt;
Frame data starts with 128-byte remap table (used in literal mode) followed by the opcode stream.&lt;br /&gt;
&lt;br /&gt;
Opcodes:&lt;br /&gt;
* &amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt; -- skip pixel&lt;br /&gt;
* &amp;lt;code&amp;gt;0x01-0x7F&amp;lt;/code&amp;gt; -- literal, output pixel value from the remap table using opcode as an index&lt;br /&gt;
* &amp;lt;code&amp;gt;0x80&amp;lt;/code&amp;gt; -- skip &amp;lt;code&amp;gt;next_byte + 64&amp;lt;/code&amp;gt; pixels&lt;br /&gt;
* &amp;lt;code&amp;gt;0x81&amp;lt;/code&amp;gt; -- skip &amp;lt;code&amp;gt;next_byte + 320&amp;lt;/code&amp;gt; pixels&lt;br /&gt;
* &amp;lt;code&amp;gt;0x82-0xBF&amp;lt;/code&amp;gt; -- skip 2-63 pixels&lt;br /&gt;
* &amp;lt;code&amp;gt;0xC0-0xDF&amp;lt;/code&amp;gt; -- copy 1-32 pixels from the stream&lt;br /&gt;
* &amp;lt;code&amp;gt;0xE0&amp;lt;/code&amp;gt; -- end of stream marker&lt;br /&gt;
* &amp;lt;code&amp;gt;0xE1-0xFF&amp;lt;/code&amp;gt; -- repeat next byte from the stream 2-32 times&lt;br /&gt;
&lt;br /&gt;
[[Category:Container Formats]]&lt;br /&gt;
[[Category:Video Codecs]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=DRL&amp;diff=15870</id>
		<title>DRL</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=DRL&amp;diff=15870"/>
		<updated>2025-03-15T15:59:58Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Mass Media Inc, Philips P.O.V. Entertainment Group&lt;br /&gt;
* Extension: drl&lt;br /&gt;
* Game: [https://www.mobygames.com/game/8082/thunder-in-paradise-interactive/ Thunder in Paradise] (PC port)&lt;br /&gt;
&lt;br /&gt;
This is RLE-based format used in the FMV game.&lt;br /&gt;
&lt;br /&gt;
Header:&lt;br /&gt;
  2 bytes - version&lt;br /&gt;
  2 bytes - number of frames&lt;br /&gt;
  2 bytes - unknown&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  2 bytes - data size in 2kB sectors&lt;br /&gt;
  2 bytes - unknown&lt;br /&gt;
  2 bytes - number of audio chunks to preload&lt;br /&gt;
  2 bytes - number of colours used&lt;br /&gt;
  2 bytes - palette changes are present&lt;br /&gt;
  2 bytes - audio frame length&lt;br /&gt;
  38 bytes - unknown&lt;br /&gt;
  2 bytes - audio mode&lt;br /&gt;
  // initial palette&lt;br /&gt;
  1 byte - unknown&lt;br /&gt;
  1 byte - unknown&lt;br /&gt;
  2 bytes - start colour&lt;br /&gt;
  2 bytes - end colour&lt;br /&gt;
  N*3 bytes - partial VGA palette&lt;br /&gt;
  // tables&lt;br /&gt;
  M*4 bytes - frame offsets (relative to data start)&lt;br /&gt;
  M*2 bytes - bottom 16 bits of total audio length at the end of the frame&lt;br /&gt;
  X bytes - alignment to the next 2kB sector&lt;br /&gt;
&lt;br /&gt;
Then if there are audio preload frames, data for that number of frame follows. Then data is aligned to the multiple of sector size again.&lt;br /&gt;
&lt;br /&gt;
Frames start with the following header:&lt;br /&gt;
  2 bytes - total frame size&lt;br /&gt;
  2 bytes - audio data size&lt;br /&gt;
  2 bytes - update area X offset&lt;br /&gt;
  2 bytes - update area Y offset&lt;br /&gt;
  2 bytes - update area width&lt;br /&gt;
  2 bytes - update area height&lt;br /&gt;
  1 byte  - coding mode&lt;br /&gt;
&lt;br /&gt;
If palette changes are allowed, then palette change data follows (1 byte - start colour index, 1 byte - number of colours, then partial VGA palette).&lt;br /&gt;
&lt;br /&gt;
Then RLE-encoded video data for the update rectangle follows. Opcodes are the following:&lt;br /&gt;
* 0x00..0xDF -- output pixel value&lt;br /&gt;
* 0xE0..0xEF -- skip 2-17 pixels&lt;br /&gt;
* 0xF0..0xFE -- read colour value, repeat it 3-17 times&lt;br /&gt;
* 0xFF -- long skip (next byte value plus 18 pixels)&lt;br /&gt;
&lt;br /&gt;
Finally there's audio data.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=System_Shock_video&amp;diff=15869</id>
		<title>System Shock video</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=System_Shock_video&amp;diff=15869"/>
		<updated>2025-03-15T15:04:04Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a cutscene and audio log format employed by Looking Glass Studios in its game [https://www.mobygames.com/game/681/system-shock/ System Shock]. They are stored inside resource archive and thus have no extension or name, only numerical ID.&lt;br /&gt;
&lt;br /&gt;
Header format:&lt;br /&gt;
  4 bytes - &amp;quot;MOVI&amp;quot;&lt;br /&gt;
  4 bytes - number of chunks&lt;br /&gt;
  4 bytes - TOC size&lt;br /&gt;
  4 bytes - data size&lt;br /&gt;
  4 bytes - duration&lt;br /&gt;
  4 bytes - frames per second in fixed-point 16-bit format (i.e. FPS * 65536)&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  2 bytes - bits per pixel (should be 0 or 8)&lt;br /&gt;
  2 bytes - some palette flag&lt;br /&gt;
  2 bytes - number of audio channels&lt;br /&gt;
  2 bytes - bits per audio sample&lt;br /&gt;
  4 bytes - sample rate in fixed-point format&lt;br /&gt;
  216 bytes - padding&lt;br /&gt;
  768 bytes - initial palette&lt;br /&gt;
&lt;br /&gt;
TOC entry format:&lt;br /&gt;
  3 bytes - timestamp&lt;br /&gt;
  1 byte  - flags (bits 3-6) and type (bits 0-2)&lt;br /&gt;
  4 bytes - offset&lt;br /&gt;
&lt;br /&gt;
Chunk types are:&lt;br /&gt;
* 0 - EOF&lt;br /&gt;
* 1 - video frame&lt;br /&gt;
* 2 - audio&lt;br /&gt;
* 3 - subtitle&lt;br /&gt;
* 4 - palette&lt;br /&gt;
* 5 - tables&lt;br /&gt;
&lt;br /&gt;
=== Video frame ===&lt;br /&gt;
There are two possible frame coding modes.&lt;br /&gt;
&lt;br /&gt;
When chunk flags are not equal to 0xF, frame uses RLE and has update rectangle position and dimensions stored as 16-bit integers before RLE data. Otherwise frame is coded with 4x4 tiles employing Huffman compression and vector quantisation (this mode is used for SVGA videos).&lt;br /&gt;
&lt;br /&gt;
RLE opcodes:&lt;br /&gt;
* 0x00 -- run mode (with count byte and colour value following)&lt;br /&gt;
* 0x01..0x7F -- copy 1-127 pixels&lt;br /&gt;
* 0x80 -- long mode, read 16-bit opcode:&lt;br /&gt;
** 0x0000 -- end of decoding&lt;br /&gt;
** 0x0001..0x7FFF -- skip 1-32767 pixels&lt;br /&gt;
** 0x8000..0xBFFF -- copy 0-16383 pixels&lt;br /&gt;
** 0xC000..0xFFFF -- read colour value, output it 0-16383 times&lt;br /&gt;
* 0x81..0xFF -- skip 1-127 pixels&lt;br /&gt;
&lt;br /&gt;
Tile mode works on frame split into 4x4 tiles with tile operations packed into Huffman-compressed tokens.&lt;br /&gt;
Known operations are:&lt;br /&gt;
* fill tile with a pair of colours (those values are part of the token)&lt;br /&gt;
* fill tile with a pair of colours (those values are part of the token) using mask&lt;br /&gt;
* fill tile with four/eight/sixteen colours using mask, token contains offset in the colour table for the colours to be used&lt;br /&gt;
* leave some tiles unchanged&lt;br /&gt;
* leave the rest of the current tile row unchanged&lt;br /&gt;
* repeat previous operation N times&lt;br /&gt;
&lt;br /&gt;
It is worth noting that if the first colour value is zero, then tile is coded in update mode with zero value meaning &amp;quot;leave pixel unchanged&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Palette chunk ===&lt;br /&gt;
If chunk flags are 0, chunk contains new palette. If chunk flags are 1, current palette should be zeroed out.&lt;br /&gt;
&lt;br /&gt;
=== Table chunk ===&lt;br /&gt;
Chunk flags determine table type. 0 means the colours used in tiled decoding, 1 means Huffman LUT definition (also for tiled decoding).&lt;br /&gt;
&lt;br /&gt;
Huffman LUT is stored run-encoded (3 bytes - token value, 1 byte - repeat count) with initial 32-bit value telling the length of unpacked table.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=MXV&amp;diff=15868</id>
		<title>MXV</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=MXV&amp;diff=15868"/>
		<updated>2025-03-15T13:59:19Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Caiman&lt;br /&gt;
* Extension: MXV&lt;br /&gt;
&lt;br /&gt;
This is a format used for music and video in (Argentinian?) kid-oriented games by Caiman. There are two versions of the format, the older one stores LZ-compressed video and PCM audio, newer version has slightly different format and employs Vorbis audio.&lt;br /&gt;
&lt;br /&gt;
== Old format ==&lt;br /&gt;
&lt;br /&gt;
Header:&lt;br /&gt;
  13 bytes - 'Archivo MXV.\x1A&amp;quot;&lt;br /&gt;
  4 bytes - number of video frames (0 for audio-only files)&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  1 byte  - bits per pixel (8-24)&lt;br /&gt;
  2 bytes - frames per second&lt;br /&gt;
  4 bytes - number of audio frames&lt;br /&gt;
  2 bytes - sampling rate&lt;br /&gt;
  1 byte  - bits per audio sample&lt;br /&gt;
  1 byte  - number of audio channels&lt;br /&gt;
  1 byte  - unknown&lt;br /&gt;
&lt;br /&gt;
If video frames are present, it is followed by the table with the following structure of records:&lt;br /&gt;
  4 bytes - data offset&lt;br /&gt;
  4 bytes - compressed data size&lt;br /&gt;
  4 bytes - unpacked data size&lt;br /&gt;
  4 bytes - timestamp&lt;br /&gt;
  1 byte  - flags&lt;br /&gt;
&lt;br /&gt;
If audio frames are present, there are 32-bit offsets to audio data present right after the header and video frame data (if present). Audio chunks always contain 1 second of PCM audio so storing size is unnecessary.&lt;br /&gt;
&lt;br /&gt;
Video frames are stored as optional palette (signalled by bit 0 of the flags) followed by image data which may be optionally compressed (bit 1 of the flag signals deflate being used on the data, bit 2 of the flags tells that it's custom LZW compression scheme).&lt;br /&gt;
&lt;br /&gt;
== New format ==&lt;br /&gt;
Here &amp;quot;Archivo MXV.\x1A&amp;quot; is followed by chunks with various kinds of data:&lt;br /&gt;
* &amp;lt;code&amp;gt;FHDR&amp;lt;/code&amp;gt; -- actual header (video and audio parameters, the format is similar to the old version)&lt;br /&gt;
* &amp;lt;code&amp;gt;VTBL&amp;lt;/code&amp;gt; -- video frame table (32-bit offset, compressed size, timestamp and flags)&lt;br /&gt;
* &amp;lt;code&amp;gt;ATBL&amp;lt;/code&amp;gt; -- audio table (now with 32-bit offset and size for each frame)&lt;br /&gt;
* &amp;lt;code&amp;gt;AHDR&amp;lt;/code&amp;gt; -- Vorbis headers&lt;br /&gt;
* &amp;lt;code&amp;gt;DATA&amp;lt;/code&amp;gt; -- actual video and audio data (with offsets being relative to its start)&lt;br /&gt;
&lt;br /&gt;
Video data compression seems to still employ deflate on raw images and some additional method for interframes.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Jazz_Jackrabbit_2_J2V&amp;diff=15867</id>
		<title>Jazz Jackrabbit 2 J2V</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Jazz_Jackrabbit_2_J2V&amp;diff=15867"/>
		<updated>2025-03-14T17:07:17Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an animation format used in [https://www.mobygames.com/game/1348/jazz-jackrabbit-2/ Jazz Jackrabbit 2] game.&lt;br /&gt;
&lt;br /&gt;
Header format:&lt;br /&gt;
  8 bytes - &amp;quot;CineFeeed&amp;quot;&lt;br /&gt;
  4 bytes - file size&lt;br /&gt;
  4 bytes - CRC&lt;br /&gt;
  4 bytes - width&lt;br /&gt;
  4 bytes - height&lt;br /&gt;
  2 bytes - depth (should be 8)&lt;br /&gt;
  2 bytes - delay between frames in milliseconds&lt;br /&gt;
  4 bytes - number of frames&lt;br /&gt;
  20 bytes - some sizes&lt;br /&gt;
&lt;br /&gt;
Frame data is split into four streams with different kinds of data (a la [[Smacker]] or [[Bink]]), each compressed with &amp;lt;code&amp;gt;deflate&amp;lt;/code&amp;gt; independently and with chunks containing data for one or more frames being output time from time. Decoder needs to prefetch and unpack that data.&lt;br /&gt;
&lt;br /&gt;
For that reason the rest of the file consists of variable-size repeat of data chunks for each stream prefixed with 32-bit size. Chunks may be empty.&lt;br /&gt;
&lt;br /&gt;
Data streams are:&lt;br /&gt;
* stream 0 - opcodes&lt;br /&gt;
* stream 1 - X offsets&lt;br /&gt;
* stream 2 - Y offsets&lt;br /&gt;
* stream 3 - colour data&lt;br /&gt;
&lt;br /&gt;
Frame decoding works in the following way:&lt;br /&gt;
  pal_present = read_stream(OPCODES, 1);&lt;br /&gt;
  if (pal_present) {&lt;br /&gt;
   pal = read_stream(CLR, 1024); // in RGBA format&lt;br /&gt;
  }&lt;br /&gt;
  for each line {&lt;br /&gt;
    pos = 0;&lt;br /&gt;
    while (pos &amp;lt; width) {&lt;br /&gt;
      op = read_stream(OPCODES, 1);&lt;br /&gt;
      switch (op) {&lt;br /&gt;
      case 0: // long copy&lt;br /&gt;
        len = (uint16_t)read_stream(OPCODES, 2);&lt;br /&gt;
        copy len pixels to the current line position from CLR stream&lt;br /&gt;
        pos += len;&lt;br /&gt;
        break;&lt;br /&gt;
      case 0x01..0x7F: // short copy&lt;br /&gt;
        len = op;&lt;br /&gt;
        copy len pixels to the current line position from CLR stream&lt;br /&gt;
        pos += len;&lt;br /&gt;
        break;&lt;br /&gt;
      case 0x80: // end of line&lt;br /&gt;
        pos = width;&lt;br /&gt;
        break;&lt;br /&gt;
      case 0x81: // long copy of previous segment&lt;br /&gt;
        len = (uint16_t)read_stream(OPCODES, 2);&lt;br /&gt;
        xoff = (uint16_t)read_stream(XOFF, 2);&lt;br /&gt;
        yoff = read_stream(YOFF, 1) - 127;&lt;br /&gt;
        copy len pixels from (x, y + yoff) position in the previous frame&lt;br /&gt;
        pos += len;&lt;br /&gt;
        break;&lt;br /&gt;
      default: // short copy of previous segment&lt;br /&gt;
        len = op;&lt;br /&gt;
        xoff = (uint16_t)read_stream(XOFF, 2);&lt;br /&gt;
        yoff = read_stream(YOFF, 1) - 127;&lt;br /&gt;
        copy len pixels from (x, y + yoff) position in the previous frame&lt;br /&gt;
        pos += len;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Ascorn_SKS&amp;diff=15866</id>
		<title>Ascorn SKS</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Ascorn_SKS&amp;diff=15866"/>
		<updated>2025-03-14T16:07:54Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a simple cutscene format used by Ascorn in their game [https://www.mobygames.com/game/3817/patrician-ii-quest-for-power/ Patrician II]. It is essentially [[Motion JPEG]] with frame index.&lt;br /&gt;
&lt;br /&gt;
File header:&lt;br /&gt;
  4 bytes - &amp;quot;SK10&amp;quot;&lt;br /&gt;
  4 bytes - width&lt;br /&gt;
  4 bytes - height&lt;br /&gt;
  4 bytes - framerate&lt;br /&gt;
  4 bytes - number of frames&lt;br /&gt;
  12 bytes - unused?&lt;br /&gt;
  (4 bytes, 4 bytes) x N - frame index (first value - frame offset, second value - frame size)&lt;br /&gt;
  4 bytes - total size&lt;br /&gt;
  4 bytes - padding&lt;br /&gt;
&lt;br /&gt;
Each frame is the standard JFIF data.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Ascorn_animation&amp;diff=15865</id>
		<title>Ascorn animation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Ascorn_animation&amp;diff=15865"/>
		<updated>2025-03-14T16:00:50Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an animation format used by Ascorn (later Ascaron) in some of its games like [https://www.mobygames.com/game/3816/gloriana/ Elisabeth I (aka Gloriana)] or [https://www.mobygames.com/game/40963/das-hexagon-kartell/ Das Hexagon Kartell]. Unlike many other formats it decodes YUV picture with 5 or 6 bits per component.&lt;br /&gt;
&lt;br /&gt;
File is organised into a series of chunks, each with 4-byte type and size. First chunk should be &amp;lt;code&amp;gt;AN15&amp;lt;/code&amp;gt;, last one should be &amp;lt;code&amp;gt;ENDE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Header chunk ===&lt;br /&gt;
  4 bytes - &amp;quot;AN15&amp;quot;&lt;br /&gt;
  4 bytes - size (usually 64)&lt;br /&gt;
  4 bytes - zero&lt;br /&gt;
  4 bytes - header size again&lt;br /&gt;
  4 bytes - &amp;quot;V0.9&amp;quot;&lt;br /&gt;
  4 bytes - number of video frames&lt;br /&gt;
  4 bytes - number of audio frames&lt;br /&gt;
  4 bytes - unknown, usually zero&lt;br /&gt;
  4 bytes - offset to video frame index&lt;br /&gt;
  4 bytes - offset to audio frame index&lt;br /&gt;
  12 bytes - always zero?&lt;br /&gt;
  3 bytes - unknown&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  1 byte  - unknown&lt;br /&gt;
  4 bytes - frames per one hundredth of second (e.g. 1250 for 12.5 fps)&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
&lt;br /&gt;
=== Audio chunk ===&lt;br /&gt;
  4 bytes - &amp;quot;SAMP&amp;quot;&lt;br /&gt;
  4 bytes - size&lt;br /&gt;
  4 bytes - CRC&lt;br /&gt;
  4 bytes - header size (usually 15, starting from CRC field)&lt;br /&gt;
  3 bytes - sample rate&lt;br /&gt;
  1 byte  - number of channels&lt;br /&gt;
  1 byte  - bits per sample&lt;br /&gt;
  2 bytes - usually zero&lt;br /&gt;
&lt;br /&gt;
Audio data is unpacked PCM&lt;br /&gt;
&lt;br /&gt;
=== Palette chunk ===&lt;br /&gt;
  4 bytes - &amp;quot;PALT&amp;quot;&lt;br /&gt;
  4 bytes - size&lt;br /&gt;
  4 bytes - usually zero&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  768 bytes - VGA palette&lt;br /&gt;
  rest - LUT&lt;br /&gt;
&lt;br /&gt;
This chunk provides look-up table for mapping YUV data into indexed colours.&lt;br /&gt;
&lt;br /&gt;
=== Picture chunk ===&lt;br /&gt;
  4 bytes - &amp;quot;BILD&amp;quot;&lt;br /&gt;
  4 bytes - size&lt;br /&gt;
  4 bytes - usually zero&lt;br /&gt;
  4 bytes - header size&lt;br /&gt;
  2 bytes - width&lt;br /&gt;
  2 bytes - height&lt;br /&gt;
  2 bytes - compression mode&lt;br /&gt;
  4 bytes - luma size&lt;br /&gt;
  4 bytes - first chroma component size&lt;br /&gt;
  4 bytes - second chroma component size&lt;br /&gt;
  8 bytes - unknown&lt;br /&gt;
  if header size &amp;gt; 34 {&lt;br /&gt;
    11 bytes - unknown&lt;br /&gt;
    1 byte - bits per luma sample (0 or 5 - 5 bits, 6 - 6 bits)&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
There are several compression methods known:&lt;br /&gt;
* 2 - raw YUV data packed in bits (5 or 6 bits for luma, signed 8 bits for chroma), luma plane first, chroma planes afterwards&lt;br /&gt;
* 3 - differences to the previous YUV frame&lt;br /&gt;
* 4 - same as method 3 but data is motion compensated with MV data sent before the change data (each 8x8 luma block having MV source consisting of 9-bit vertical offset and 10-bit horizontal offset)&lt;br /&gt;
* 16 - RGB compression&lt;br /&gt;
&lt;br /&gt;
Method 3 codes data almost in the same way as method 2 except that zero component value means skip with the next 8- or 16-bit value (top bit set means 16-bit value, 8 bits otherwise) being the number of values to leave unchanged.&lt;br /&gt;
&lt;br /&gt;
Method 16 is LZ77-like compression performed on RGB24 data. Flags are grouped in bytes and sent before the rest of the data. Flag 1 means raw RGB triplet, flag 0 means reading 16-bit offset plus 8-bit length (plus three) and copying that number of pixels from that offsets.&lt;br /&gt;
&lt;br /&gt;
Image data is stored in wrapped 128000-pixel buffer which fits two images, so the previous image may be referenced while decoding the current one.&lt;br /&gt;
&lt;br /&gt;
=== Index chunks ===&lt;br /&gt;
  4 bytes - &amp;quot;SPTR&amp;quot; (audio) / &amp;quot;BPTR&amp;quot; (video)&lt;br /&gt;
  4 bytes - usually 4&lt;br /&gt;
  4 bytes - usually 12&lt;br /&gt;
  4 bytes - number of entries&lt;br /&gt;
  N*4 bytes - offsets to the audio/video frame chunks&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Ravenloft_ANM&amp;diff=15864</id>
		<title>Ravenloft ANM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Ravenloft_ANM&amp;diff=15864"/>
		<updated>2025-03-14T15:05:59Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: DreamForge&lt;br /&gt;
* Extension: ANM&lt;br /&gt;
* Game: [https://www.mobygames.com/game/3315/ravenloft-strahds-possession/ Ravenloft]&lt;br /&gt;
&lt;br /&gt;
This is a simple RLE-based cutscene format. The header contains 16-bit number of frames and version. Then frames consisting of one or more chunks follow.&lt;br /&gt;
&lt;br /&gt;
Frame starts with 16-bit number of chunks followed by chunks, each with 16-bit type and 32-bit size.&lt;br /&gt;
&lt;br /&gt;
Chunk types are:&lt;br /&gt;
* 0 - VGA palette&lt;br /&gt;
* 1 - clear palette command&lt;br /&gt;
* 2 - intra RLE&lt;br /&gt;
* 3 - inter RLE&lt;br /&gt;
* 4 - repeat decoding previous chunk 16-bit times at 32-bit offset&lt;br /&gt;
* 5-7 - some game engine commands&lt;br /&gt;
* 8 - raw image interleaved by factor four (i.e. each line stores pixels in order 0 40 80 120 1 41 81 ...)&lt;br /&gt;
&lt;br /&gt;
Intra RLE is trivial: read one-byte opcode, non-negative values mean copy length minus one, negative values mean run length minus one.&lt;br /&gt;
&lt;br /&gt;
Inter RLE operates on updating columns of video: first 16-bit number is how many areas to update there are, each one starts with 16-bit left offsets and 16-bit number of segments to update. Each segment is coded as 16-bit number of pixels to skip (vertically) plus how many pixels to update (also vertically), followed by pixel values.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Black_Diamond_STR&amp;diff=15863</id>
		<title>Black Diamond STR</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Black_Diamond_STR&amp;diff=15863"/>
		<updated>2025-03-09T17:46:35Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: STR&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
Video frames are encoded with a method strongly resembling [[Cinepak]], while audio is encoded using the stock [[IMA ADPCM]] algorithm.&lt;br /&gt;
&lt;br /&gt;
The identifier &amp;quot;Black Diamond&amp;quot; comes from a string found in the game's executable: '''MS-DOS Black Diamond Player V0.10.1 BETA.'''&lt;br /&gt;
&lt;br /&gt;
Data is organised into chunks with 32-bit tag and size. 0xF7F7F8F8 is used for audio, &amp;quot;MRFI&amp;quot; is used for images.&lt;br /&gt;
&lt;br /&gt;
Video frame header:&lt;br /&gt;
  1 byte - unknown&lt;br /&gt;
  1 byte - method (should be 5 or 6)&lt;br /&gt;
  2 bytes - number of tiles for 4x4 blocks, first part&lt;br /&gt;
  2 bytes - number of tiles for 4x4 blocks, second part&lt;br /&gt;
  2 bytes - number of tiles for 2x2 sub-blocks&lt;br /&gt;
  2 bytes - palette size&lt;br /&gt;
  2 bytes - switch line (before it tiles from the first part are used, afterwards - from the second part)&lt;br /&gt;
  2 bytes - always zero?&lt;br /&gt;
  N bytes - palette&lt;br /&gt;
  K*4 bytes - paletted vectors for first 4x4 part&lt;br /&gt;
  L*4 bytes - paletted vectors for second 4x4 part&lt;br /&gt;
  M*4 bytes - paletted vectors for 2x2 sub-blocks&lt;br /&gt;
  K*6 bytes - YUV vectors for first 4x4 part&lt;br /&gt;
  L*6 bytes - YUV vectors for second 4x4 part&lt;br /&gt;
  M*6 bytes - YUV vectors for 2x2 part&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
* Mobygames link: http://www.mobygames.com/game/psychic-detective&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Game Formats]]&lt;br /&gt;
[[Category:Formats missing in FFmpeg]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=ReadySoft_scenes&amp;diff=15862</id>
		<title>ReadySoft scenes</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=ReadySoft_scenes&amp;diff=15862"/>
		<updated>2025-03-09T17:37:29Z</updated>

		<summary type="html">&lt;p&gt;Kostya: fill some information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The company has created several PC ports of classic FMV games such as [https://www.mobygames.com/game/4495/dragons-lair-escape-from-singes-castle/ Dragon's Lair], [https://www.mobygames.com/game/54843/space-ace/ Space Ace] or [https://www.mobygames.com/game/2083/brain-dead-13/ Brain Dead 13].&lt;br /&gt;
&lt;br /&gt;
While the formats for each game differ, there is a lot of common between them. For instance, they all employ RLE compression, splitting image into background and sprite and moving them separately.&lt;br /&gt;
&lt;br /&gt;
== Dragon's Lair scenes ==&lt;br /&gt;
Files start with 128-byte header, followed by chunks with the following header:&lt;br /&gt;
  2 bytes - some count&lt;br /&gt;
  4 bytes - chunk size&lt;br /&gt;
  4 bytes - unknown&lt;br /&gt;
  4 bytes - chunk type&lt;br /&gt;
&lt;br /&gt;
Chunk type is a four-character code telling what kinds of data it has inside. First letter being 'A' means RLE-encoded inter frame while 'B' chunks contain raw background image and audio. Images are stored in VGA banked mode (i.e. every fourth column).&lt;br /&gt;
&lt;br /&gt;
== Space Ace scenes ==&lt;br /&gt;
&lt;br /&gt;
Data is organised into chunks (32-bit next chunk offset plus 16-bit chunk ID) with the following meaning:&lt;br /&gt;
* 0 - background&lt;br /&gt;
* 1 - sprite&lt;br /&gt;
* 2 - audio&lt;br /&gt;
* 5 - frame output command?&lt;br /&gt;
* 6 - VGA palette update (starts with 16-bit number of colours, 32-bit offset to palette data)&lt;br /&gt;
&lt;br /&gt;
Background data starts with several 16-bit values: image translation vector (i.e. how to shift it up/left), update area X offset and width, update area Y offset and with. Then there are 32-bit image data size and offset (usually image starts immediately after the header).&lt;br /&gt;
Image is coded with RLE: one-byte opcode, 0x80 means end of decoding, negative values mean run, 0x00 is no-op, positive values mean copy. &lt;br /&gt;
&lt;br /&gt;
Sprite data starts with 16-bit coordinates, 32-bit mask offset and 32-bit data offset. Mask tells which 8x8 sprite blocks should be decoded and displayed over background.&lt;br /&gt;
&lt;br /&gt;
Audio data starts with 32-bit size and offset.&lt;br /&gt;
&lt;br /&gt;
Additionally images are coded for VGA banked mode (i.e. interlaced by every fourth column), in transposed form and background image has size 328x208.&lt;br /&gt;
&lt;br /&gt;
== Brain Dead 13 scenes ==&lt;br /&gt;
&lt;br /&gt;
Data is organised into chunks (32-bit next chunk offset plus 16-bit chunk ID) with the following meaning:&lt;br /&gt;
* 0 - background&lt;br /&gt;
* 1 - sprite&lt;br /&gt;
* 2 - audio&lt;br /&gt;
* 5 - frame output command?&lt;br /&gt;
* 6 - VGA palette update (starts with 16-bit number of colours, 32-bit offset to palette data)&lt;br /&gt;
* 10 - some header chunk&lt;br /&gt;
* 11 - audio header&lt;br /&gt;
&lt;br /&gt;
Background data starts with three pairs of 16-bit values: image translation vector (i.e. how to shift it up/left), update area coordinates, update area dimensions. Then there are 32-bit image data size and offset (usually image starts immediately after the header).&lt;br /&gt;
Image is coded with RLE: one-byte opcode, 0x80 means end of decoding, negative values mean run, positive values mean copy.&lt;br /&gt;
&lt;br /&gt;
Sprite data starts with 16-bit coordinates, 16-bit update flag, 32-bit sprite data size and offset. Image data is coded in the same manner but with two enhancements: opcode 0x00 means long RLE with actual 16-bit operation length, and there are two special pixel values (0x00 mean leave pixel unchanged and 0xFF mean copying data from the background frame).&lt;br /&gt;
&lt;br /&gt;
Audio data starts with 32-bit size and offset.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Kostya</name></author>
	</entry>
</feed>