<?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=Avenger+teambg</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=Avenger+teambg"/>
	<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php/Special:Contributions/Avenger_teambg"/>
	<updated>2026-08-07T21:09:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Talk:Bink_Video&amp;diff=11731</id>
		<title>Talk:Bink Video</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Talk:Bink_Video&amp;diff=11731"/>
		<updated>2009-06-28T08:23:49Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The linux version of BinkPlayer contains the following strings:&lt;br /&gt;
D:\Devel\projects\bink\build\temps\lnx\fft.obj&lt;br /&gt;
D:\Devel\projects\bink\build\temps\lnx\dct.obj&lt;br /&gt;
&lt;br /&gt;
Probably it is worth to reverse engineer that program?&lt;br /&gt;
: The first version had lots more info in it, they forgot to strip it.--[[User:Merbanan|Merbanan]] 13:34, 14 January 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
How can one get the predefined huffman tree data?&lt;br /&gt;
--[[User:Avenger teambg|avenger_teambg]] 04:23, 28 June 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Bink_Container&amp;diff=11351</id>
		<title>Bink Container</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Bink_Container&amp;diff=11351"/>
		<updated>2009-03-19T15:04:50Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: /* Exe files */  better english&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''This page is based on the document 'Description of the Bink File Format' by Mike Melanson at [http://multimedia.cx/bink-format.txt http://multimedia.cx/bink-format.txt].''&lt;br /&gt;
&lt;br /&gt;
* Extenstions: bik&lt;br /&gt;
* Company: [[RAD Game Tools]]&lt;br /&gt;
* Samples: [http://samples.mplayerhq.hu/game-formats/bink/ http://samples.mplayerhq.hu/game-formats/bink/], countless video games&lt;br /&gt;
&lt;br /&gt;
Bink files are multimedia files used in a variety of video games, both on personal computers platforms and video game consoles. The files act as containers for data compressed with the proprietary [[Bink Video|Bink video]] and [[Bink Audio|audio]] codecs. Bink multimedia files are known to bear the .bik extension.&lt;br /&gt;
&lt;br /&gt;
== File Format ==&lt;br /&gt;
&lt;br /&gt;
'''This description is known to be incomplete.'''&lt;br /&gt;
&lt;br /&gt;
All multi-byte numbers are stored in little endian format.&lt;br /&gt;
&lt;br /&gt;
Bink files commence with a 44-byte header which is laid out as follows. Audio information follows the main header. If there are zero audio tracks, then the headers are omitted.&lt;br /&gt;
&lt;br /&gt;
  bytes 0-2     file signature ('BIK')&lt;br /&gt;
  byte 3        Bink Video codec revision (0x62, 0x64, 0x66, 0x67, 0x68, 0x69; b,d,f,g,h,i respectively)&lt;br /&gt;
  bytes 4-7     file size not including the first 8 bytes&lt;br /&gt;
  bytes 8-11    number of frames&lt;br /&gt;
  bytes 12-15   largest frame size in bytes&lt;br /&gt;
  bytes 16-19   number of frames again?&lt;br /&gt;
  bytes 20-23   video width (less than or equal to 32767)&lt;br /&gt;
  bytes 24-27   video height (less than or equal to 32767)&lt;br /&gt;
  bytes 28-31   video frames per second dividend&lt;br /&gt;
  bytes 32-35   video frames per second divider&lt;br /&gt;
  bytes 36-39   video flags&lt;br /&gt;
                   bits 28-31: width and height scaling&lt;br /&gt;
                     1 = 2x height doubled&lt;br /&gt;
                     2 = 2x height interlaced&lt;br /&gt;
                     3 = 2x width doubled&lt;br /&gt;
                     4 = 2x width and height-doubled&lt;br /&gt;
                     5 = 2x width and height-interlaced&lt;br /&gt;
                   bit 20: has alpha plane&lt;br /&gt;
                   bit 17: grayscale&lt;br /&gt;
  bytes 40-43   number of audio tracks (less than or equal to 256)&lt;br /&gt;
  &lt;br /&gt;
  for each audio track&lt;br /&gt;
     two bytes   unknown&lt;br /&gt;
     two bytes   audio channels (1 or 2). Not authoritative, see flags below.&lt;br /&gt;
  &lt;br /&gt;
  for each audio track&lt;br /&gt;
     two bytes   audio sample rate (Hz)&lt;br /&gt;
     two bytes   flags&lt;br /&gt;
                   bit 15: unknown (observed in some samples)&lt;br /&gt;
                   bit 14: unknown (observed in some samples)&lt;br /&gt;
                   bit 13: stereo flag&lt;br /&gt;
                   bit 12: Bink Audio algorithm&lt;br /&gt;
                     1 = use Bink Audio DCT &lt;br /&gt;
                     0 = use Bink Audio FFT&lt;br /&gt;
  &lt;br /&gt;
  for each audio track&lt;br /&gt;
     four bytes  unknown&lt;br /&gt;
&lt;br /&gt;
Revisions f and g contain video planes in YVU order, while the planes are ordered YUV in other (later) revisions. Revision b is found in Heroes of Might and Magic 3, but is not supported by any of the tools published by RAD Game Tools.&lt;br /&gt;
&lt;br /&gt;
The audio track flags are similar to those defined for the [[Smacker]] ''AudioRate'' flags.&lt;br /&gt;
&lt;br /&gt;
Following the header is a frame index table. The number of entries in the table is equal to the number of frames specified in the header. Each entry consists of a 32-bit absolute offset for that frame. There is no length information provided in the table, so the length of a sample is implicitly the difference between frame offsets, and the size of the file (for the very last frame). If bit 0 of an entry is set, that frame is a keyframe; this bit should be masked off to find the actual offset of the frame data in the file.&lt;br /&gt;
&lt;br /&gt;
Each frame contains (optional) audio and video data. Bytes 12-15 (largest frame size) probably exist to provide the playback application with the largest single buffer it will have to allocate. The layout of each frame is as follows:&lt;br /&gt;
&lt;br /&gt;
  for each audio track&lt;br /&gt;
      four bytes        length of audio packet (bytes) plus four bytes. &lt;br /&gt;
                        A value of zero indicates no audio is present for this track.&lt;br /&gt;
      four bytes        number of samples in packet&lt;br /&gt;
      variable length   [[Bink Audio]] packet&lt;br /&gt;
  &lt;br /&gt;
  variable length       [[Bink Video]] packet&lt;br /&gt;
&lt;br /&gt;
== Exe files ==&lt;br /&gt;
Bink data can be contained in exe files. To find where to start decoding search for one of 4 id's in the file:&lt;br /&gt;
 'fKIB'&lt;br /&gt;
 'gKIB'&lt;br /&gt;
 'hKIB'&lt;br /&gt;
 'iKIB'&lt;br /&gt;
&lt;br /&gt;
Note that this is the BIK value in machine order (therefore it appears backwards for x86 binaries).&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [http://www.radgametools.com/down/Bink/BinkLinuxPlayer.zip The Bink Video command line Player for x86 GNU/Linux from RAD Game Tools]&lt;br /&gt;
&lt;br /&gt;
[[Category:Container Formats]]&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Electronic_Arts&amp;diff=10443</id>
		<title>Electronic Arts</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Electronic_Arts&amp;diff=10443"/>
		<updated>2008-09-15T14:39:25Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Website: [http://www.ea.com http://www.ea.com]&lt;br /&gt;
&lt;br /&gt;
Big player in the gaming business, bought up [[Westwood Studios]], [[Origin Systems]], Bullfrog, Maxis, BioWare and dozens of other game developers.&lt;br /&gt;
&lt;br /&gt;
They have created various multimedia formats, see [[Electronic Arts Formats]] for details.&lt;br /&gt;
&lt;br /&gt;
Description on EA's internal image/multimedia library: [http://www.cs.ualberta.ca/iip/IIP/C400/Files/2003/Ebinu.pdf http://www.cs.ualberta.ca/iip/IIP/C400/Files/2003/Ebinu.pdf].&lt;br /&gt;
&lt;br /&gt;
[[Category:Multimedia-related Companies]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Bink_Container&amp;diff=9987</id>
		<title>Bink Container</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Bink_Container&amp;diff=9987"/>
		<updated>2008-04-21T19:45:33Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''This page is based on the document 'Description of the Bink File Format' by Mike Melanson at [http://multimedia.cx/bink-format.txt http://multimedia.cx/bink-format.txt].''&lt;br /&gt;
&lt;br /&gt;
* Extenstions: bik&lt;br /&gt;
* Company: [[RAD Game Tools]]&lt;br /&gt;
* Samples: [http://samples.mplayerhq.hu/game-formats/bink/ http://samples.mplayerhq.hu/game-formats/bink/], countless video games&lt;br /&gt;
&lt;br /&gt;
Bink files are multimedia files used in a variety of video games, both on personal computers platforms and video game consoles. The files act as containers for data compressed with the proprietary [[Bink Video|Bink video]] and [[Bink Audio|audio]] codecs. Bink multimedia files are known to bear the .bik extension.&lt;br /&gt;
&lt;br /&gt;
== File Format ==&lt;br /&gt;
&lt;br /&gt;
'''This description is known to be incomplete.'''&lt;br /&gt;
&lt;br /&gt;
All multi-byte numbers are stored in little endian format.&lt;br /&gt;
&lt;br /&gt;
Bink files commence with a 44-byte header which is laid out as follows. Audio information follows the main header. If there are zero audio tracks, then the headers are omitted.&lt;br /&gt;
&lt;br /&gt;
  bytes 0-2     file signature ('BIK')&lt;br /&gt;
  byte 3        Bink Video codec revision (0x62, 0x66, 0x67, 0x68, 0x69; b,f,g,h,i respectively)&lt;br /&gt;
  bytes 4-7     file size not including the first 8 bytes&lt;br /&gt;
  bytes 8-11    number of frames&lt;br /&gt;
  bytes 12-15   largest frame size in bytes&lt;br /&gt;
  bytes 16-19   number of frames again?&lt;br /&gt;
  bytes 20-23   video width&lt;br /&gt;
  bytes 24-27   video height&lt;br /&gt;
  bytes 28-31   video frames per second dividend&lt;br /&gt;
  bytes 32-35   video frames per second divider&lt;br /&gt;
  bytes 36-39   unknown&lt;br /&gt;
  bytes 40-43   number of audio tracks&lt;br /&gt;
  &lt;br /&gt;
  for each audio track&lt;br /&gt;
     two bytes   unknown&lt;br /&gt;
     two bytes   audio channels (1 or 2). Not authoritative, see flags below.&lt;br /&gt;
  &lt;br /&gt;
  for each audio track&lt;br /&gt;
     two bytes   audio sample rate (Hz)&lt;br /&gt;
     two bytes   flags&lt;br /&gt;
                   bit 15: unknown (observed in some samples)&lt;br /&gt;
                   bit 14: unknown (observed in some samples)&lt;br /&gt;
                   bit 13: stereo flag&lt;br /&gt;
                   bit 12: Bink Audio algorithm&lt;br /&gt;
                     1 = use Bink Audio DCT &lt;br /&gt;
                     0 = use Bink Audio FFT&lt;br /&gt;
  &lt;br /&gt;
  for each audio track&lt;br /&gt;
     four bytes  unknown&lt;br /&gt;
&lt;br /&gt;
The audio track flags are similar to those defined for the [[Smacker]] ''AudioRate'' flags.&lt;br /&gt;
&lt;br /&gt;
Following the header is a frame index table. The number of entries in the table is equal to the number of frames specified in the header. Each entry consists of a 32-bit absolute offset for that frame. There is no length information provided in the table, so the length of a sample is implicitly the difference between frame offsets, and the size of the file (for the very last frame). The absolute offset for the first entry in the table is often, but not always, offset by -1. Data for the first frame always begins immediately after the table, so the first entry in the table can be considered redundant.&lt;br /&gt;
&lt;br /&gt;
Each frame contains (optional) audio and video data. Bytes 12-15 (largest frame size) probably exist to provide the playback application with the largest single buffer it will have to allocate. The layout of each frame is as follows:&lt;br /&gt;
&lt;br /&gt;
  for each audio track&lt;br /&gt;
      four bytes        length of audio packet (bytes) plus four bytes. &lt;br /&gt;
                        A value of zero indicates no audio is present for this track.&lt;br /&gt;
      four bytes        number of samples in packet&lt;br /&gt;
      variable length   [[Bink Audio]] packet&lt;br /&gt;
  &lt;br /&gt;
  variable length       [[Bink Video]] packet&lt;br /&gt;
&lt;br /&gt;
== Exe files ==&lt;br /&gt;
Bink data can be contained in exe files. To find where to start decoding search in the file for one of 4 id's:&lt;br /&gt;
 'fKIB'&lt;br /&gt;
 'gKIB'&lt;br /&gt;
 'hKIB'&lt;br /&gt;
 'iKIB'&lt;br /&gt;
&lt;br /&gt;
Note that this is BIK value is in machine order (therefore appears backwards for x86 binaries).&lt;br /&gt;
&lt;br /&gt;
Revision b is found in Heroes of Might and Magic 3, but is not supported by any of the tools published by RAD Game Tools.&lt;br /&gt;
&lt;br /&gt;
[[Category:Container Formats]]&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Discrete_Cosine_Transform&amp;diff=9986</id>
		<title>Discrete Cosine Transform</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Discrete_Cosine_Transform&amp;diff=9986"/>
		<updated>2008-04-21T19:43:18Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''For the Electronic Arts DCT file format, see [[Electronic Arts DCT]].''&lt;br /&gt;
&lt;br /&gt;
A '''discrete cosine transform''' (DCT) is a Fourier-related transform similar to the [[discrete Fourier transform]] (DFT), but using only real numbers. DCTs are equivalent to DFTs of roughly twice the length, operating on real data with even symmetry (since the Fourier transform of a real and even function is real and even), where in some variants the input and/or output data are shifted by half a sample. There are eight standard DCT variants, of which four are common.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Compression Theory]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Talk:Bink_Container&amp;diff=9975</id>
		<title>Talk:Bink Container</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Talk:Bink_Container&amp;diff=9975"/>
		<updated>2008-04-16T13:59:57Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Original:&lt;br /&gt;
bytes 28-31   video frames per second&lt;br /&gt;
bytes 32-35   image format&lt;br /&gt;
&lt;br /&gt;
Suggested:&lt;br /&gt;
bytes 28-35   video frames per second in a/b format (real number)&lt;br /&gt;
   bytes 28-31 a&lt;br /&gt;
   bytes 32-35 b&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I noticed numbers like:&lt;br /&gt;
6025/201&lt;br /&gt;
2997/100&lt;br /&gt;
Both are very close to 30 (a usual framerate for videos)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is another error in the optional audio header:&lt;br /&gt;
Original:&lt;br /&gt;
bytes 44-45   audio channels (1 or 2)&lt;br /&gt;
bytes 46-47   unknown&lt;br /&gt;
&lt;br /&gt;
Suggested:&lt;br /&gt;
bytes 44-45   unknown (but somehow related to samplerate)&lt;br /&gt;
bytes 46-47   audio channels (1 or 2)&lt;br /&gt;
&lt;br /&gt;
* The framerate correction is indeed right. --[[User:VAG|VAG]] 19:23, 25 December 2006 (EST)&lt;br /&gt;
&lt;br /&gt;
I'm not sure the audio sample rate is quite correct. I get slightly strange values like 44000 (logo_lucas.bik) and 22500 (AnivisionLogo.bik) on some of the samples provided, although I get sensible ones like 44100 (original.bik) on others...  I'm not an audio expert by any means, but it seems strange that these values are so close to multiples of common audio sample rates and yet not equal to them. --[[User:DrV|DrV]] 00:25, 6 January 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
Isn't it 22050? That would be half of 44100 :) And probably because it is mono. I could be mistaken...&lt;br /&gt;
&lt;br /&gt;
* Yes, 22050 and 44100 would be the ones I'd expect to see, but some of the files contain ones close to those but not equal.  --[[User:DrV|DrV]]&lt;br /&gt;
&lt;br /&gt;
logo_legal.bik (from the samples) has no audio (according to the headers), yet it seems its frame data doesn't start with 0 dwords.&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=User_talk:Suxen_drol&amp;diff=9929</id>
		<title>User talk:Suxen drol</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=User_talk:Suxen_drol&amp;diff=9929"/>
		<updated>2008-04-08T19:55:52Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please don't forget to categorize pages when you create new ones.  You can do this by adding &amp;lt;nowiki&amp;gt;[[Category:foo bar]]&amp;lt;/nowiki&amp;gt; to the bottom of the page.  Thanks -- [[User:DonDiego|DonDiego]] 09:37, 30 March 2006 (EST)&lt;br /&gt;
&lt;br /&gt;
== bink video ==&lt;br /&gt;
&lt;br /&gt;
praises for the work on the bik format --[[User:Avenger teambg|Avenger teambg]] 10:27, 7 April 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
Which version of BIK are you yeaning for? --[[User:Suxen drol|Suxen drol]] 05:33, 8 April 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
The one used in IWD2, FOURCC: BIKi. --[[User:Avenger teambg|Avenger teambg]] 06:51, 8 April 2008 (EDT)&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=User_talk:Suxen_drol&amp;diff=9923</id>
		<title>User talk:Suxen drol</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=User_talk:Suxen_drol&amp;diff=9923"/>
		<updated>2008-04-08T10:51:37Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: /* bink video */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please don't forget to categorize pages when you create new ones.  You can do this by adding &amp;lt;nowiki&amp;gt;[[Category:foo bar]]&amp;lt;/nowiki&amp;gt; to the bottom of the page.  Thanks -- [[User:DonDiego|DonDiego]] 09:37, 30 March 2006 (EST)&lt;br /&gt;
&lt;br /&gt;
== bink video ==&lt;br /&gt;
&lt;br /&gt;
praises for the work on the bik format --[[User:Avenger teambg|Avenger teambg]] 10:27, 7 April 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
Which version of BIK are you yeaning for? --[[User:Suxen drol|Suxen drol]] 05:33, 8 April 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
The one used in IWD2, gotta check its exact magic cookie, but i guess it is a relatively recent one. --[[User:Avenger teambg|Avenger teambg]] 06:51, 8 April 2008 (EDT)&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=User_talk:Avenger_teambg&amp;diff=9922</id>
		<title>User talk:Avenger teambg</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=User_talk:Avenger_teambg&amp;diff=9922"/>
		<updated>2008-04-08T10:48:58Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Though i'm an IE modder, the rogue rebalancing mod isn't my work.&lt;br /&gt;
I play bigger, working on an IE clone :&amp;gt;&lt;br /&gt;
That's why i'm interested in the bink and interplay acm formats.&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=User:Avenger_teambg&amp;diff=9921</id>
		<title>User:Avenger teambg</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=User:Avenger_teambg&amp;diff=9921"/>
		<updated>2008-04-08T10:47:29Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GemRB project leader (Infinity Engine rewrite): http://sourceforge.net/projects/gemrb&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=User_talk:Suxen_drol&amp;diff=9915</id>
		<title>User talk:Suxen drol</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=User_talk:Suxen_drol&amp;diff=9915"/>
		<updated>2008-04-07T14:27:46Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: bink video&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please don't forget to categorize pages when you create new ones.  You can do this by adding &amp;lt;nowiki&amp;gt;[[Category:foo bar]]&amp;lt;/nowiki&amp;gt; to the bottom of the page.  Thanks -- [[User:DonDiego|DonDiego]] 09:37, 30 March 2006 (EST)&lt;br /&gt;
&lt;br /&gt;
== bink video ==&lt;br /&gt;
&lt;br /&gt;
praises for the work on the bik format --[[User:Avenger teambg|Avenger teambg]] 10:27, 7 April 2008 (EDT)&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=PIX_FMT_YUV420P&amp;diff=8085</id>
		<title>PIX FMT YUV420P</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=PIX_FMT_YUV420P&amp;diff=8085"/>
		<updated>2007-06-03T15:03:44Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: fixed category link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PIX_FMT_YUV420P contains three channels (or components):&lt;br /&gt;
* Y' ([[luminance]]) channel&lt;br /&gt;
* Cb ([[chrominance]] blue) channel&lt;br /&gt;
* Cr ([[chrominance]] red) channel.&lt;br /&gt;
&lt;br /&gt;
The [[chrominance]] is [[subsampled]] using the '''420''' scheme:&lt;br /&gt;
&lt;br /&gt;
 Note: Be careful not to confuse this pixel format with [[PIX_FMT_YUVJ420P]].&lt;br /&gt;
&lt;br /&gt;
YCbCr 4:2:0 indicates a planar [[YCbCr]] colorspace where a 2x2 block of pixels in an image is represented by 4 Y samples, 1 for each pixel, but all 4 pixels share a Cb sample and a Cr sample.&lt;br /&gt;
&lt;br /&gt;
 Note: The '''P''' in YUV420P indicates '''[[planar]]''' not [[progressive]] or [[palette]] or [[packed]].&lt;br /&gt;
&lt;br /&gt;
It has the following characteristics:&lt;br /&gt;
* YUV colorspace.&lt;br /&gt;
* 12bits per pixel '''average'''.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[Category:Pixel Formats]]&lt;br /&gt;
[[Category:FFmpeg Pixel Formats]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Lossless_compression&amp;diff=8012</id>
		<title>Lossless compression</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Lossless_compression&amp;diff=8012"/>
		<updated>2007-05-29T16:07:30Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A lossless compression method reduces the size of the data with no lost information. The decompressed data is exactly the same as the original. This is typically not as efficient as [[lossy]] compression due to the restrictions of retaining all information.&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Lossless_compression&amp;diff=8011</id>
		<title>Lossless compression</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Lossless_compression&amp;diff=8011"/>
		<updated>2007-05-29T16:05:27Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A lossless compression method reduces the size of the image with no lost information. The decompressed image is exactly the same as the original image. A lossless compression scheme retains all the information but typically is not as efficient due to the restrictions of retaining all data.&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Interplay_MVE&amp;diff=7906</id>
		<title>Interplay MVE</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Interplay_MVE&amp;diff=7906"/>
		<updated>2007-05-12T12:53:00Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: mve&lt;br /&gt;
* Company: [[Interplay Entertainment]]&lt;br /&gt;
* Samples: http://samples.mplayerhq.hu/game-formats/interplay-mve/]&lt;br /&gt;
* Sample Parser: [http://multimedia.cx/parse-ipmve.c http://multimedia.cx/parse-ipmve.c]&lt;br /&gt;
&lt;br /&gt;
Interplay MVE is a full motion video format used in a number of PC games published by Interplay. It combines a custom [[Interplay Video|video codec]] and either [[PCM]] or a [[Interplay DPCM|custom DPCM]] coding scheme for audio.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
The technical description on this page is originally based on an anonymous and thorough description of the format published when Interplay was proactive about pursuing individuals who tried to understand their data format. &amp;quot;BG&amp;quot; refers to the PC game Baldur's Gate, the apparent focus of the author's analysis.&lt;br /&gt;
&lt;br /&gt;
== Interplay MVE Format==&lt;br /&gt;
&lt;br /&gt;
Throughout this description, a &amp;quot;word&amp;quot; is a 16-bit value.  All values are little-endian, unless otherwise specified.&lt;br /&gt;
&lt;br /&gt;
The high-level format of an Interplay MVE file is a small header, followed by variable sized stream chunks; each stream chunk consists of a word giving the length of the chunk, and another giving the type, followed by a stream of 1 or more stream opcodes, which consist of a two-word count for the length of the&lt;br /&gt;
stream opcode, a single byte for the type, a single byte (which I believe to be a &amp;quot;version&amp;quot; field, to allow backwards compatibility ), and then variable data depending on the type of opcode.&lt;br /&gt;
&lt;br /&gt;
So, just to make sure that's clear, we've got the header, followed by a 2-level hierarchical structure:&lt;br /&gt;
&lt;br /&gt;
         ||           CHUNK1         ||           CHUNK2         ||&lt;br /&gt;
 header  || op1 || op2 || op3 || op4 || op1 || op2 || op3 || op4 || ...&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
The Header of an Interplay MVE file must start with the sequence of bytes:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Interplay MVE File\x1A\0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
where \x1A represents ASCII 0x1a (^Z), the old DOS end-of-file character, and \0 represents ASCII 0x00 (NUL).  The reason for this is then, under DOS, if you do:&lt;br /&gt;
&lt;br /&gt;
 C:\&amp;gt;TYPE foobar.MVE&lt;br /&gt;
&lt;br /&gt;
you'll see&lt;br /&gt;
&lt;br /&gt;
 Interplay MVE File&lt;br /&gt;
&lt;br /&gt;
After these 20 bytes, there are 6 more bytes, which I believe are either a file format version, a &amp;quot;magic&amp;quot; number, or were, once upon a time, parameters. In modern Interplay games, these parameters appear to need to be hard-coded. They take the form of 3 words:&lt;br /&gt;
&lt;br /&gt;
 001a 0100 1133&lt;br /&gt;
&lt;br /&gt;
Immediately following this are the chunks.&lt;br /&gt;
&lt;br /&gt;
=== Chunks ===&lt;br /&gt;
&lt;br /&gt;
Each chunk consists of a word giving the total length of the data contained in the chunk, and another word which represents the type of the chunk.  After these four bytes (which are NOT included in the chunk length), comes the chunk data.  The types of chunks I know about (i.e. which are used in BG/BG2 movies that I've examined; the chunk types are not used at all in the movie playback code in BG/BG2) are:&lt;br /&gt;
&lt;br /&gt;
 0000: initialize audio&lt;br /&gt;
 0001: audio only chunk (or maybe only used for audio pre-buffering)&lt;br /&gt;
 0002: initialize video&lt;br /&gt;
 0003: video chunk (usually includes audio.  possibly always includes audio)&lt;br /&gt;
 0004: shutdown chunk&lt;br /&gt;
 0005: end chunk&lt;br /&gt;
&lt;br /&gt;
I don't know why an &amp;quot;end chunk&amp;quot; is needed, since the &amp;quot;shutdown chunk&amp;quot; seems to do that job nicely.  The &amp;quot;end chunk&amp;quot; appears to contain no opcodes.&lt;br /&gt;
&lt;br /&gt;
=== Opcodes ===&lt;br /&gt;
&lt;br /&gt;
The opcodes I've observed range from 0x00 to 0x15.  Of these, the current code used in BG/BG2 uses only from 0x00 through 0x11, so any guesses as to the function of 0x12 through 0x15 would be merely speculation. I have no idea what any of these opcodes are used for.  But, again, since they are unused in&lt;br /&gt;
the BG/BG2 movie player code, they are unnecessary for playback.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x00: End Of Stream ====&lt;br /&gt;
&lt;br /&gt;
No data associated with this. When this opcode is seen, the playback of the movie stops immediately.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x01: End Of Chunk ====&lt;br /&gt;
All this opcode does in theory is to terminate a chunk. In practice, it signals the code to fetch and decode the next chunk.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x02: Create Timer ====&lt;br /&gt;
&lt;br /&gt;
 DWORD   timer rate&lt;br /&gt;
 WORD    timer subdivision&lt;br /&gt;
&lt;br /&gt;
This sets up the timer that drives the animation. Basically, every time the timer expires, it should be starting to pump out the next frame in order to keep up with the desired frame rate.&lt;br /&gt;
&lt;br /&gt;
The normal values I've seen here are 0x2095 for the timer rate (8341), and 8 for the timer subdivision.  What this means in practice is that every 8*8341 (=66728) microseconds, it should be ready to send out the next frame. So...  10000000/66728 == 14.9 frames per second typically. The exact purpose for the timer subdivision is unclear to me, but it may be an artifact of earlier methods of timer handling, since some of the code here appears to possibly even date back to the DOS days.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x03: Initialize Audio Buffers ====&lt;br /&gt;
&lt;br /&gt;
version 0:&lt;br /&gt;
    WORD    (unknown)&lt;br /&gt;
    WORD    flags&lt;br /&gt;
    WORD    sample rate&lt;br /&gt;
    WORD    min buffer length&lt;br /&gt;
&lt;br /&gt;
version 1:&lt;br /&gt;
    WORD    (unknown)&lt;br /&gt;
    WORD    flags&lt;br /&gt;
    WORD    sample rate&lt;br /&gt;
    DWORD   min buffer length&lt;br /&gt;
&lt;br /&gt;
The flags recognized, as of version 0 are:&lt;br /&gt;
    bit 0: 0=mono,  1=stereo&lt;br /&gt;
    bit 1: 0=8-bit, 1=16-bit&lt;br /&gt;
&lt;br /&gt;
The flags recognized, as of version 1 are:&lt;br /&gt;
    bit 0: 0=mono,  1=stereo&lt;br /&gt;
    bit 1: 0=8-bit, 1=16-bit&lt;br /&gt;
    bit 2: 0=uncompressed, 1=compressed&lt;br /&gt;
&lt;br /&gt;
Only uncompressed audio is supported in the version 0 opcode.  I ''think'' the other 13 bits (14 bits for ver. 0) here may be garbage. Whatever they are, they are not apparently used for the playback engine inside BG/BG2.&lt;br /&gt;
&lt;br /&gt;
The sample rate is the standard sampling rate in kHz; typically 22050 in the BG movies.  Buffer length is the size (in bytes) of the buffer that needs to be allocated for the audio. (I don't remember if this is the ''total'' audio buffer size needed, or if this number is a &amp;quot;per-channel&amp;quot; number that needs to be doubled for &amp;quot;stereo&amp;quot; audio streams.) They use 1.5 times the original buffer size in order to have a &amp;quot;safety zone&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I will cover the format of the compressed audio data in the audio data opcode section.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x04: Start/Stop Audio ====&lt;br /&gt;
&lt;br /&gt;
This seems to start and/or stop the audio playback. This opcode contains no data.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x05: Initialize Video Buffer(s) ====&lt;br /&gt;
version 0:&lt;br /&gt;
    WORD    width&lt;br /&gt;
    WORD    height&lt;br /&gt;
&lt;br /&gt;
version 1:&lt;br /&gt;
    WORD    width&lt;br /&gt;
    WORD    height&lt;br /&gt;
    WORD    ?count?&lt;br /&gt;
&lt;br /&gt;
version 2:&lt;br /&gt;
    WORD    width&lt;br /&gt;
    WORD    height&lt;br /&gt;
    WORD    ?count?&lt;br /&gt;
    WORD    true-color&lt;br /&gt;
&lt;br /&gt;
'''(I think width and height are actually expressed as 8x8 pixel blocks. Need to verify. --[[User:Multimedia Mike|Multimedia Mike]] 13:52, 5 February 2006 (EST))'''&lt;br /&gt;
&lt;br /&gt;
Width is the width of the buffer to allocate, and height is the height. Both are given in terms of pixels.  Now, the count appears to be used to over-allocate the video buffer.  To compute the size to allocate for the video buffer, they take 2 bytes per pixel, and multiply by the height and the width, and then multiply by the count.  If scan-line doubling is enabled (which it is not in BG/BG2), it then divides this value by two, on the assumption that there is only enough data for half the resolution. Anyway, the over-allocation may be used to create a larger movie area and pan smoothly or something. I haven't seen a way to use the overallocation with the format details that I've discerned, but the video coding is particularly hairy, as the decoder relies on self-modifying x86 code to function. Yick. Anyway, I'm still in the process of looking for a file that uses over-allocation so that I can figure out exactly why it is used and what it is used for.  (Again, this feature doesn't appear to be widely used in the sampling of BG/BG2 movies that I've examined.)  Note that an alternate possibility for the usage of the over-allocated space is as scratch space.  This possibility will be addressed in the (voluminous!)  documentation for opcode 0x11.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x06: unknown ====&lt;br /&gt;
&lt;br /&gt;
    4 bytes apparently unused?&lt;br /&gt;
    WORD    unknown&lt;br /&gt;
    WORD    unknown&lt;br /&gt;
    WORD    unknown&lt;br /&gt;
    WORD    flip back buffer? (0=no, 1=yes)&lt;br /&gt;
    bytes   unknown&lt;br /&gt;
&lt;br /&gt;
I haven't seen this opcode used in any BG/BG2 movies; however, this may be used for the panning or some clever usage of the over-allocation mentioned in opcode 0x05. If &amp;quot;flip back buffer?&amp;quot; has bit 0 set, it will flip the two allocated buffers before it does whatever it is that it does.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;whatever it does&amp;quot; appears to be characterized by bulk memory moves, which makes it possible that it _is_ used in conjunction with the over-allocated video buffers.&lt;br /&gt;
&lt;br /&gt;
No &amp;quot;version&amp;quot; check is made for this opcode, which makes me suspect that there is only 1 supported version of this opcode.  (version 0, presumably)&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x07: Send Buffer to Display ====&lt;br /&gt;
version 0:&lt;br /&gt;
    WORD    palette start&lt;br /&gt;
    WORD    palette count&lt;br /&gt;
&lt;br /&gt;
version 1:&lt;br /&gt;
    WORD    palette start&lt;br /&gt;
    WORD    palette count&lt;br /&gt;
    WORD    ???&lt;br /&gt;
&lt;br /&gt;
palette start is the index of the first palette entry to be installed before copying from the current back buffer to the display. palette count is the number of palette entries to be installed.  As for the mysterious other flag...  I am still unclear on its usage.  Again, I've seen no example of its usage yet.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x08: Audio Frame (data)/Opcode 0x09: Audio Frame (silence) ====&lt;br /&gt;
    WORD    seq-index&lt;br /&gt;
    WORD    stream-mask&lt;br /&gt;
    WORD    stream-len&lt;br /&gt;
    data    audio data (only for Opcode 0x08)&lt;br /&gt;
&lt;br /&gt;
seq-index is the sequential index of this audio chunk, numbered from 0000 (0000 being the first chunk in the audio file).  stream-mask works as follows:&lt;br /&gt;
&lt;br /&gt;
A given mve file can contain up to 16 parallel audio streams. Presumably this is for alternate languages. The stream-mask determines which stream(s) a given audio chunk belongs to. So, if bit 0 is set in the stream-mask, it belongs to stream 0. Typically, in the English language version of BG, I've seen the sole audio frame (opcode 8) having bit 0 set, and the next silent frame having all 15 of the other bits set.&lt;br /&gt;
&lt;br /&gt;
So, just to make this clear, what we see is:&lt;br /&gt;
    opcode 8: idx=0 mask=0x0001 len=0x16d8 data=...&lt;br /&gt;
    opcode 9: idx=0 mask=0xfffe len=0x16d8&lt;br /&gt;
&lt;br /&gt;
These audio chunks appear to always come in pairs.&lt;br /&gt;
&lt;br /&gt;
stream-len is the total number of samples in the chunk.&lt;br /&gt;
&lt;br /&gt;
For more information on the DPCM format used in Interplay MVE files, see [[Interplay DPCM]].&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0xa: Initialize Video Mode ====&lt;br /&gt;
    WORD    X-resolution&lt;br /&gt;
    WORD    Y-resolution&lt;br /&gt;
    WORD    flags&lt;br /&gt;
&lt;br /&gt;
The usage of the flags field appears to be largely historical. Perhaps with the introduction of DirectX as the underlying medium, rather than the direct graphics hardware manipulation that was, apparently, used in an earlier version, this field is unnecessary. (In fact, in BG, this entire opcode turns into a no-op.)  (Note, for the curious: BG actually contains assembly code to do register level manipulation of VGA hardware. Not enough to actually really do much, but it's there, anyway.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0xb: Create Gradient ====&lt;br /&gt;
    BYTE    baseRB&lt;br /&gt;
    BYTE    numR_RB&lt;br /&gt;
    BYTE    numB_RB&lt;br /&gt;
    BYTE    baseRG&lt;br /&gt;
    BYTE    numR_RG&lt;br /&gt;
    BYTE    numG_RG&lt;br /&gt;
&lt;br /&gt;
I haven't seen this particular opcode used, but it is clear that it generates a gradient palette. It appears that it will generate two gradient palettes, if both count0 and count1 are non-zero. The first gradient is a pure red-blue gradient, and the second a pure red-green gradient. It appears to be designed for EGA/VGA hardware, since it uses 0-63 as the maximum range for a component within a color. The red component of each gradient moves linearly from 0 to 63 within numR_RB (resp. numR_RG) rows, and the blue or green component moves linearly from 0 to 39 within numB_RB (resp numG_RG) columns for the blue or green gradient respectively.&lt;br /&gt;
&lt;br /&gt;
The colors are ordered in row-major ordering, starting at the 'base'th entry.  So, if you had:&lt;br /&gt;
&lt;br /&gt;
    baseRB=12&lt;br /&gt;
    numR_RB=5&lt;br /&gt;
    numB_RB=4&lt;br /&gt;
&lt;br /&gt;
You'd get 20 colors starting at index #12, with a row-major gradient. Specifically you'd see:&lt;br /&gt;
&lt;br /&gt;
    ( 0,0,0) ( 0,0,13) ( 0,0,26) ( 0,0,39)  ; 12...15&lt;br /&gt;
    (15,0,0) (15,0,13) (15,0,26) (15,0,39)  ; 16...19&lt;br /&gt;
    (31,0,0) (31,0,13) (31,0,26) (31,0,39)  ; 20...23&lt;br /&gt;
    (47,0,0) (47,0,13) (47,0,26) (47,0,39)  ; 24...27&lt;br /&gt;
    (63,0,0) (63,0,13) (63,0,26) (63,0,39)  ; 28...31&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0xc: Set Palette ====&lt;br /&gt;
    WORD    pal-start&lt;br /&gt;
    WORD    pal-count&lt;br /&gt;
    data    pal-data&lt;br /&gt;
&lt;br /&gt;
* pal-start indicates the first palette entry to fill&lt;br /&gt;
* pal-count indicates the number of palette entries to fill&lt;br /&gt;
* pal-data is the palette data, 3 bytes per palette entry, packed as RGBRGBRGB&lt;br /&gt;
&lt;br /&gt;
Note that the palette components are 6-bit VGA palette values and only range from 0..63. The values must be shifted to display properly in higher resolution color formats where RGB components are generally 8 bits.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0xd: Set Palette Entries Compressed ====&lt;br /&gt;
    data    compressed palette data&lt;br /&gt;
&lt;br /&gt;
This doesn't appear to have been used in the BG movies. This is a series of 32 entries of the following form:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;byte&amp;gt; &amp;lt;RGB&amp;gt; &amp;lt;RGB&amp;gt; ... &amp;lt;RGB&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where there are between 0 and 8 &amp;lt;RGB&amp;gt; values, taking 3 bytes apiece.&lt;br /&gt;
&lt;br /&gt;
Each bit in the preceding byte determines which of the 8 palette entries have an RGB value stored for them, with the least significant bit corresponding to the first entry in the group of 8.  So, in order to set only the 240th entry in the palette, the data would be:&lt;br /&gt;
&lt;br /&gt;
    00              ;; 00-07&lt;br /&gt;
    00              ;; 08-0f&lt;br /&gt;
    00              ;; 10-17&lt;br /&gt;
    00              ;; 18-1f&lt;br /&gt;
    00              ;; 20-27&lt;br /&gt;
    00              ;; 28-2f&lt;br /&gt;
    00              ;; 30-37&lt;br /&gt;
    00              ;; 38-3f&lt;br /&gt;
    00              ;; 40-47&lt;br /&gt;
    00              ;; 48-4f&lt;br /&gt;
    00              ;; 50-57&lt;br /&gt;
    00              ;; 58-5f&lt;br /&gt;
    00              ;; 60-67&lt;br /&gt;
    00              ;; 68-6f&lt;br /&gt;
    00              ;; 70-77&lt;br /&gt;
    00              ;; 78-7f&lt;br /&gt;
    00              ;; 80-87&lt;br /&gt;
    00              ;; 88-8f&lt;br /&gt;
    00              ;; 90-97&lt;br /&gt;
    00              ;; 98-9f&lt;br /&gt;
    00              ;; a0-a7&lt;br /&gt;
    00              ;; a8-af&lt;br /&gt;
    00              ;; b0-b7&lt;br /&gt;
    00              ;; b8-bf&lt;br /&gt;
    00              ;; c0-c7&lt;br /&gt;
    00              ;; c8-cf&lt;br /&gt;
    00              ;; d0-d7&lt;br /&gt;
    00              ;; d8-df&lt;br /&gt;
    01 rr gg bb     ;; e0-e7&lt;br /&gt;
    00              ;; e8-ef&lt;br /&gt;
    00              ;; f0-f7&lt;br /&gt;
    00              ;; f8-ff&lt;br /&gt;
&lt;br /&gt;
    Giving:&lt;br /&gt;
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
        00 00 00 00 00 00 00 00 00 00 00 00 01 rr gg bb&lt;br /&gt;
        00 00 00&lt;br /&gt;
&lt;br /&gt;
    35 bytes of data instead of 768 to store the whole palette.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0xe: ??? ====&lt;br /&gt;
    data    unknown length&lt;br /&gt;
&lt;br /&gt;
I haven't encountered this value before. What it does is set a pointer to an array of words used during decoding of data using the 0x10 opcode, which I have also not encountered.&lt;br /&gt;
&lt;br /&gt;
I'm still working on figuring out the use of this opcode and the 0x10 opcode, but they don't appear to be used in the BG movies, again. See my comments at opcode 0x10 for more details.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0xf: Set Decoding Map ====&lt;br /&gt;
    data    decoding map&lt;br /&gt;
&lt;br /&gt;
The decoding map is a particular data block used in the decoding of video frames, as encoded via opcode 0x11.  I'll cover it in detail when I get to opcode 0x11.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x10: ??? ====&lt;br /&gt;
&lt;br /&gt;
This is another means of storing video data. I haven't seen it used yet, and am still sorting through the details.  This seems to be tied in with the issue of multiple pages of video memory, as with opcode 6 and the &amp;quot;count&amp;quot; field of opcode 5.&lt;br /&gt;
&lt;br /&gt;
Note that this opcode makes use of 3 (!) data streams, as opposed to 2 for 0x11. Even so, it appears to be a much simpler encoding. The data streams used for this are the most recent 0xe opcode data stream, the most recent 0xf opcode data stream, and this opcode's data stream.&lt;br /&gt;
&lt;br /&gt;
There appears to be verbatim pixel data encoded in the 0x10 stream, but the which pixels have been stored, among other things, is determined by the other streams. It also appears that in this stream all pixel manipulation is done in 8-pixel wide and 8-pixel tall units. This is set-up to loop first over each column, then over each row, then finally over each page:&lt;br /&gt;
&lt;br /&gt;
        foreach page&lt;br /&gt;
            foreach row&lt;br /&gt;
                foreach col&lt;br /&gt;
                    decode opcode data&lt;br /&gt;
&lt;br /&gt;
If I can find an example of one of these files to mess around with, I will complete my analysis of this opcode.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x11: Video Data ====&lt;br /&gt;
&lt;br /&gt;
Ok, this is the big killer opcode. See [[Interplay Video]] for a detailed description of the video coding format.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x12 ====&lt;br /&gt;
Not observed in BG movies, and not used by the player.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x13 ====&lt;br /&gt;
Unknown. Used in the BG movies, but not used by the player. Appears to always(?) have 0x84 bytes of data. This is a recurrent opcode, appearing in most, if not all video chunks.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x14 ====&lt;br /&gt;
Not observed in BG movies, and not used by the player.&lt;br /&gt;
&lt;br /&gt;
==== Opcode 0x15 ====&lt;br /&gt;
Unknown. Used in the BG movies, but not used by the player. Appears to always(?) have 4 bytes of data. This one appears in the &amp;quot;video initialization chunk&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Typical Chunk Formation ===&lt;br /&gt;
&lt;br /&gt;
Audio chunks:&lt;br /&gt;
    opcode 0x8&lt;br /&gt;
    opcode 0x9&lt;br /&gt;
&lt;br /&gt;
Video chunks:&lt;br /&gt;
    opcode 0x2&lt;br /&gt;
    opcode 0xf&lt;br /&gt;
    opcode 0x8&lt;br /&gt;
    opcode 0x9&lt;br /&gt;
    opcode 0x11&lt;br /&gt;
    opcode 0x13&lt;br /&gt;
    opcode 0x4&lt;br /&gt;
    opcode 0x7&lt;br /&gt;
&lt;br /&gt;
video init chunk (type 2):&lt;br /&gt;
    opcode 0xa&lt;br /&gt;
    opcode 0x5&lt;br /&gt;
    opcode 0xc&lt;br /&gt;
    opcode 0x15&lt;br /&gt;
&lt;br /&gt;
audio init chunk (type 0):&lt;br /&gt;
    opcode 0x3&lt;br /&gt;
&lt;br /&gt;
== PC Games Using Interplay MVE Files ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game_group/sheet/gameGroupId,287/ Baldur's Gate]&lt;br /&gt;
* [http://www.mobygames.com/game/dos/descent-ii Descent II]&lt;br /&gt;
* Descent II: Destination Quartzon 3D&lt;br /&gt;
* [http://www.mobygames.com/game/windows/descent-3 Descent III]&lt;br /&gt;
* [http://www.mobygames.com/game/windows/fallout Fallout]&lt;br /&gt;
* [http://www.mobygames.com/game/windows/of-light-and-darkness-the-prophecy Of Light and Darkness: The Prophecy]&lt;br /&gt;
* [http://www.mobygames.com/game/dos/stonekeep Stonekeep]&lt;br /&gt;
* [http://www.mobygames.com/game/windows/virtual-pool Virtual Pool]&lt;br /&gt;
* [http://www.mobygames.com/game/windows/waterworld Waterworld]&lt;br /&gt;
&lt;br /&gt;
[[Category:Container Formats]]&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Interplay_ACM&amp;diff=7735</id>
		<title>Interplay ACM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Interplay_ACM&amp;diff=7735"/>
		<updated>2007-04-21T17:22:31Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: acm or wav&lt;br /&gt;
* Company: [[Interplay Entertainment]]&lt;br /&gt;
* Samples: &lt;br /&gt;
* Sample Parser: &lt;br /&gt;
&lt;br /&gt;
* Usage: Sound format&lt;br /&gt;
* Examples: all Infinity Engine games (baldur's gate, icewind dale, planescape: torment)&lt;br /&gt;
* FourCC: 0x97 0x28 0x03 0x01&lt;br /&gt;
* tools: [[acmlab]] from teamx.ru&lt;br /&gt;
&lt;br /&gt;
This is a lossy compressed audio format with a rather weak compression ratio. (converted to WAV then recompressed to OGG makes it roughly half size). ACM files can be in varying sample rates, but the common one is 22050 Hz, 16 bits and stereo.&lt;br /&gt;
&lt;br /&gt;
The ACM header:&lt;br /&gt;
0x00   FOURCC&lt;br /&gt;
0x04   sample count&lt;br /&gt;
0x08   channel count (some ACM files lie about the channel count)&lt;br /&gt;
0x0a   sample rate&lt;br /&gt;
0x0c   levels (4 bits) and subblocks (12 bits)&lt;br /&gt;
0x0e   &amp;lt;data&amp;gt;&lt;br /&gt;
&lt;br /&gt;
struct ACM_Header {&lt;br /&gt;
        long fourcc;&lt;br /&gt;
        long samples;&lt;br /&gt;
        unsigned short channels;&lt;br /&gt;
        unsigned short rate;&lt;br /&gt;
        unsigned short levels : 4;&lt;br /&gt;
        unsigned short subblocks : 12;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
The infinity games also contain a WAVC header which contains mostly redundant information. These files are used for all sound except music (ambients, voice over, sound effects).&lt;br /&gt;
&lt;br /&gt;
The WAVC header:&lt;br /&gt;
&lt;br /&gt;
struct WAVC_HEADER {&lt;br /&gt;
        char wavc_sig[4];  //WAVC&lt;br /&gt;
        char wavc_ver[4];  //V1.0&lt;br /&gt;
  long uncompressed;       //the uncompressed length (i guess it is raw pcm)&lt;br /&gt;
  long compressed;         //the compressed length&lt;br /&gt;
  long headersize;         //28 (the size of this header, also the offset to the ACM header)&lt;br /&gt;
  short channels;          //1 or 2&lt;br /&gt;
  short bits;              //8 or 16&lt;br /&gt;
  short samplespersec;     //usually 22050&lt;br /&gt;
  short unknown;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Interplay_ACM&amp;diff=7734</id>
		<title>Interplay ACM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Interplay_ACM&amp;diff=7734"/>
		<updated>2007-04-21T17:21:37Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: acm or wav&lt;br /&gt;
* Company: [[Interplay Entertainment]]&lt;br /&gt;
* Samples: &lt;br /&gt;
* Sample Parser: &lt;br /&gt;
&lt;br /&gt;
* Usage: Sound format&lt;br /&gt;
* Examples: all Infinity Engine games (baldur's gate, icewind dale, planescape: torment)&lt;br /&gt;
* FourCC: 0x97 0x28 0x03 0x01&lt;br /&gt;
* tools: [[acmlab]] from teamx.ru&lt;br /&gt;
&lt;br /&gt;
This is a lossy compressed audio format with a rather weak compression ratio. (converted to WAV then recompressed to OGG makes it roughly half size). ACM files can be in varying sample rates, but the common one is 22050 Hz, 16 bits and stereo.&lt;br /&gt;
&lt;br /&gt;
The ACM header:&lt;br /&gt;
0x00   FOURCC&lt;br /&gt;
0x04   sample count&lt;br /&gt;
0x08   channel count (some ACM files lie about the channel count)&lt;br /&gt;
0x0a   sample rate&lt;br /&gt;
0x0c   levels (4 bits) and subblocks (12 bits)&lt;br /&gt;
0x0e   &amp;lt;data&amp;gt;&lt;br /&gt;
&lt;br /&gt;
struct ACM_Header {&lt;br /&gt;
        long fourcc;&lt;br /&gt;
        long samples;&lt;br /&gt;
        unsigned short channels;&lt;br /&gt;
        unsigned short rate;&lt;br /&gt;
        unsigned short levels : 4;&lt;br /&gt;
        unsigned short subblocks : 12;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
The infinity games also contain a WAVC header which contains mostly redundant information. These files are used for all sound except music (ambients, voice over, sound effects).&lt;br /&gt;
&lt;br /&gt;
The WAVC header:&lt;br /&gt;
&lt;br /&gt;
struct WAVC_HEADER {&lt;br /&gt;
        char wavc_sig[4];  //WAVC&lt;br /&gt;
        char wavc_ver[4];  //V1.0&lt;br /&gt;
  long uncompressed;       //the uncompressed length (i guess it is raw pcm)&lt;br /&gt;
  long compressed;         //the compressed length&lt;br /&gt;
  long headersize;         //28 (the size of this header, also the offset to the ACM header)&lt;br /&gt;
  short channels;          //1 or 2&lt;br /&gt;
  short bits;              //8 or 16&lt;br /&gt;
  short samplespersec;     //usually 22050&lt;br /&gt;
  short unknown;&lt;br /&gt;
};&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Interplay_ACM&amp;diff=7733</id>
		<title>Interplay ACM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Interplay_ACM&amp;diff=7733"/>
		<updated>2007-04-21T17:18:43Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Company: Interplay&lt;br /&gt;
Usage: Sound format&lt;br /&gt;
Examples: all Infinity Engine games (baldur's gate, icewind dale, planescape: torment)&lt;br /&gt;
FourCC: 0x97 0x28 0x03 0x01&lt;br /&gt;
tools: acmlab from teamx.ru&lt;br /&gt;
&lt;br /&gt;
This is a lossy compressed audio format with a rather weak compression ratio. (converted to WAV then recompressed to OGG makes it roughly half size). ACM files can be in varying sample rates, but the common one is 22050 Hz, 16 bits and stereo.&lt;br /&gt;
&lt;br /&gt;
The ACM header:&lt;br /&gt;
0x00   FOURCC&lt;br /&gt;
0x04   sample count&lt;br /&gt;
0x08   channel count (some ACM files lie about the channel count)&lt;br /&gt;
0x0a   sample rate&lt;br /&gt;
0x0c   levels (4 bits) and subblocks (12 bits)&lt;br /&gt;
0x0e   &amp;lt;data&amp;gt;&lt;br /&gt;
&lt;br /&gt;
struct ACM_Header {&lt;br /&gt;
        long fourcc;&lt;br /&gt;
        long samples;&lt;br /&gt;
        unsigned short channels;&lt;br /&gt;
        unsigned short rate;&lt;br /&gt;
        unsigned short levels : 4;&lt;br /&gt;
        unsigned short subblocks : 12;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
The infinity games also contain a WAVC header which contains mostly redundant information. These files are used for all sound except music (ambients, voice over, sound effects).&lt;br /&gt;
&lt;br /&gt;
The WAVC header:&lt;br /&gt;
&lt;br /&gt;
struct WAVC_HEADER {&lt;br /&gt;
        char wavc_sig[4];  //WAVC&lt;br /&gt;
        char wavc_ver[4];  //V1.0&lt;br /&gt;
  long uncompressed;       //the uncompressed length (i guess it is raw pcm)&lt;br /&gt;
  long compressed;         //the compressed length&lt;br /&gt;
  long headersize;         //28 (the size of this header, also the offset to the ACM header)&lt;br /&gt;
  short channels;          //1 or 2&lt;br /&gt;
  short bits;              //8 or 16&lt;br /&gt;
  short samplespersec;     //usually 22050&lt;br /&gt;
  short unknown;&lt;br /&gt;
};&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Talk:Interplay_ACM&amp;diff=7721</id>
		<title>Talk:Interplay ACM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Talk:Interplay_ACM&amp;diff=7721"/>
		<updated>2007-04-20T18:33:28Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since i'm not used to wikis, i thought i just start a talk about this topic before adding it to the normal pages.&lt;br /&gt;
Anyone feel free to format this info into a regular page.&lt;br /&gt;
&lt;br /&gt;
Here is what i know about the ACM format (not to confuse with Microsoft's ACM):&lt;br /&gt;
Company: Interplay&lt;br /&gt;
Usage: Sound format&lt;br /&gt;
Examples: all Infinity Engine games (baldur's gate, icewind dale, planescape: torment)&lt;br /&gt;
FourCC: 0x97 0x28 0x03 0x01&lt;br /&gt;
tools: acmlab from teamx.ru&lt;br /&gt;
&lt;br /&gt;
This is a lossy compressed audio format with a rather weak compression ratio. (converted to WAV then recompressed to OGG makes it roughly half size). ACM files can be in varying sample rates, but the common one is 22050 Hz, 16 bits and stereo.&lt;br /&gt;
&lt;br /&gt;
The ACM header:&lt;br /&gt;
0x00   FOURCC&lt;br /&gt;
0x04   sample count&lt;br /&gt;
0x08   channel count (some ACM files lie about the channel count)&lt;br /&gt;
0x0a   sample rate&lt;br /&gt;
0x0c   levels (4 bits) and subblocks (12 bits)&lt;br /&gt;
0x0e   &amp;lt;data&amp;gt;&lt;br /&gt;
&lt;br /&gt;
struct ACM_Header {&lt;br /&gt;
        long fourcc;&lt;br /&gt;
        long samples;&lt;br /&gt;
        unsigned short channels;&lt;br /&gt;
        unsigned short rate;&lt;br /&gt;
        unsigned short levels : 4;&lt;br /&gt;
        unsigned short subblocks : 12;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
The infinity games also contain a WAVC header which contains mostly redundant information. These files are used for all sound except music (ambients, voice over, sound effects).&lt;br /&gt;
&lt;br /&gt;
The WAVC header:&lt;br /&gt;
&lt;br /&gt;
struct WAVC_HEADER {&lt;br /&gt;
        char wavc_sig[4];  //WAVC&lt;br /&gt;
        char wavc_ver[4];  //V1.0&lt;br /&gt;
  long uncompressed;       //the uncompressed length (i guess it is raw pcm)&lt;br /&gt;
  long compressed;         //the compressed length&lt;br /&gt;
  long headersize;         //28 (the size of this header, also the offset to the ACM header)&lt;br /&gt;
  short channels;          //1 or 2&lt;br /&gt;
  short bits;              //8 or 16&lt;br /&gt;
  short samplespersec;     //usually 22050&lt;br /&gt;
  short unknown;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Avenger teambg|Avenger teambg]] 14:33, 20 April 2007 (EDT)&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Smacker&amp;diff=7658</id>
		<title>Smacker</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Smacker&amp;diff=7658"/>
		<updated>2007-04-11T10:31:08Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: typo fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: smk&lt;br /&gt;
* Website: [http://www.radgametools.com/smkmain.htm http://www.radgametools.com/smkmain.htm]&lt;br /&gt;
* Company: [[RAD Game Tools]]&lt;br /&gt;
* Samples: [http://samples.mplayerhq.hu/game-formats/smacker/ http://samples.mplayerhq.hu/game-formats/smacker/], many computer games&lt;br /&gt;
&lt;br /&gt;
Smacker is a technology that has been used in games and other entertainment software titles since the dawn of multimedia-era video games. The Smacker website claims that the format has been used for [http://www.radgametools.com/smkgames.htm over 2600 titles].&lt;br /&gt;
&lt;br /&gt;
Smacker files contain Smacker Video and one of a few different custom audio codecs.&lt;br /&gt;
&lt;br /&gt;
== Container Format ==&lt;br /&gt;
&lt;br /&gt;
These are the data conventions used in this description:&lt;br /&gt;
&lt;br /&gt;
* All multi-byte numbers are stored in little-endian (Intel) format.&lt;br /&gt;
* byte - 8 bits value&lt;br /&gt;
* word - 16 bits value&lt;br /&gt;
* dword - 32 bits value&lt;br /&gt;
* All values are unsigned, unless stated otherwise.&lt;br /&gt;
&lt;br /&gt;
This is the general layout of a Smacker file:&lt;br /&gt;
&lt;br /&gt;
  struct Header&lt;br /&gt;
  dword  FrameSizes[];&lt;br /&gt;
  byte   FrameTypes[];&lt;br /&gt;
  byte   HuffmanTrees[];&lt;br /&gt;
  byte   FramesData[];&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
General file description header. Total size is 104 (0x68) bytes.&lt;br /&gt;
&lt;br /&gt;
   dword Signature;&lt;br /&gt;
   dword Width;&lt;br /&gt;
   dword Height;&lt;br /&gt;
   dword Frames;&lt;br /&gt;
   dword FrameRate;&lt;br /&gt;
   dword Flags;&lt;br /&gt;
   dword AudioSize[7];&lt;br /&gt;
   dword TreesSize;&lt;br /&gt;
   dword MMap_Size;&lt;br /&gt;
   dword MClr_Size;&lt;br /&gt;
   dword Full_Size;&lt;br /&gt;
   dword Type_Size;&lt;br /&gt;
   dword AudioRate[7];&lt;br /&gt;
   dword Dummy;&lt;br /&gt;
&lt;br /&gt;
* Signature - File signature. Either &amp;quot;SMK2&amp;quot; for original Smacker or &amp;quot;SMK4&amp;quot; for latest revisions.&lt;br /&gt;
* Width, Height - Frame dimensions in pixels.&lt;br /&gt;
* Frames - Number of logical frames. File may contain extra &amp;quot;ring&amp;quot; frame, but it's not counted here.&lt;br /&gt;
* FrameRate - can be determined this way:&lt;br /&gt;
  if (FrameRate &amp;gt; 0)&lt;br /&gt;
    fps = 1000 / FrameRate;&lt;br /&gt;
  else if (FrameRate &amp;lt; 0)&lt;br /&gt;
    fps = 100000 / (-FrameRate);&lt;br /&gt;
  else&lt;br /&gt;
    fps = 10;&lt;br /&gt;
* Flags - Only bits 0, 1 and 2 are used so far:&lt;br /&gt;
  Flag bits&lt;br /&gt;
  ---------&lt;br /&gt;
  0 - set to 1 if file contains a ring frame.&lt;br /&gt;
  1 - set to 1 if file is Y-interlaced, meaning that the frame should be&lt;br /&gt;
      scaled to twice its height before it is displayed.&lt;br /&gt;
  2 - set to 1 if file is Y-doubled, meaning that the frame should be&lt;br /&gt;
      scaled to twice its height before it is displayed.&lt;br /&gt;
* AudioSize - Size of the largest unpacked audio data buffer in bytes; this is provided for up to 7 audio tracks.&lt;br /&gt;
* TreesSize - Total size in bytes of HuffmanTrees stored in file.&lt;br /&gt;
* MMap_Size, MClr_Size, Full_Size, Type_Size - Allocation size of corresponding Huffman table in memory.&lt;br /&gt;
* AudioRate - Frequency and format information for each sound track, up to 7 audio tracks. The 32 constituent bits have the following meaning:&lt;br /&gt;
** bit 31 - data is compressed&lt;br /&gt;
** bit 30 - indicates that audio data is present for this track&lt;br /&gt;
** bit 29 - 1 = 16-bit audio; 0 = 8-bit audio&lt;br /&gt;
** bit 28 - 1 = stereo audio; 0 = mono audio&lt;br /&gt;
** bits 27-26 - if both set to zero - use v2 sound decompression&lt;br /&gt;
** bits 25-24 - unused&lt;br /&gt;
** bits 23-0  - audio sample rate&lt;br /&gt;
* Dummy - Unused.&lt;br /&gt;
&lt;br /&gt;
== FrameSizes ==&lt;br /&gt;
&lt;br /&gt;
Following the header is an array of sizes (lengths) of each physical frame in the file. Each size is a 32-bit number stored in little endian format. Additionally, if bit 0 of a frame size is 1 then that frame is a keyframe. Bit 1 is also used for some undetermined purpose. NB: You DO NOT need to shift these bits out to get the proper length but you do need to clear both of these bottom bits.&lt;br /&gt;
&lt;br /&gt;
== FrameTypes ==&lt;br /&gt;
&lt;br /&gt;
The FrameTypes section of a Smacker file contains an array of bytes, where the 8 bits of each byte describe the contents of the corresponding frame. The 8 bits have the following meaning when set:&lt;br /&gt;
&lt;br /&gt;
* 7 - frame contains audio data corresponding to track 6&lt;br /&gt;
* 6 - frame contains audio data corresponding to track 5&lt;br /&gt;
* 5 - frame contains audio data corresponding to track 4&lt;br /&gt;
* 4 - frame contains audio data corresponding to track 3&lt;br /&gt;
* 3 - frame contains audio data corresponding to track 2&lt;br /&gt;
* 2 - frame contains audio data corresponding to track 1&lt;br /&gt;
* 1 - frame contains audio data corresponding to track 0&lt;br /&gt;
* 0 - frame contains a palette record&lt;br /&gt;
&lt;br /&gt;
== HuffmanTrees ==&lt;br /&gt;
The HuffmanTrees section contains Huffman tree data for each decoding table. The tables are stored in this order:&lt;br /&gt;
* MMap&lt;br /&gt;
* MClr&lt;br /&gt;
* Full&lt;br /&gt;
* Type&lt;br /&gt;
&lt;br /&gt;
Each tree consists of four parts:&lt;br /&gt;
* Huffman tree for low byte values&lt;br /&gt;
* Huffman tree for high byte values&lt;br /&gt;
* 3 escape codes&lt;br /&gt;
* Huffman tree data&lt;br /&gt;
&lt;br /&gt;
The first two trees are decoded as described in section [[Smacker#Packed Huffman Trees|Packed Huffman Trees]]. The actual tree data is decoded in mostly the same way except that a leaf value is 16 bits long and decoded from two Huffman trees (low byte first). You should also store pointers to nodes with values equal to escape values.&lt;br /&gt;
&lt;br /&gt;
== FramesData ==&lt;br /&gt;
The FramesData section contains the data for each frame. Additionally, each frame can be subdivided into multiple chunks and stored in this order:&lt;br /&gt;
* new palette&lt;br /&gt;
* audio stream(s)&lt;br /&gt;
* video data&lt;br /&gt;
&lt;br /&gt;
=== Palette Chunk ===&lt;br /&gt;
A palette chunk contains palette change information. Note that Smacker files use a 256-entry RGB where each component is 8 bits large. I.e., individual red, green, and blue palette components have a possible range of 0..255.&lt;br /&gt;
&lt;br /&gt;
The layout of a palette chunk is:&lt;br /&gt;
&lt;br /&gt;
 byte Length;&lt;br /&gt;
 byte Blocks[];&lt;br /&gt;
&lt;br /&gt;
* Length - Size of the entire palette chunk, including this length byte, divided by 4.     &lt;br /&gt;
* Blocks - One or more blocks of palette data.&lt;br /&gt;
&lt;br /&gt;
Each block may be either 1, 2, or 3 bytes long, depending on the top one or two bits of the first byte. These are the 3 possible cases:&lt;br /&gt;
&lt;br /&gt;
* 1ccccccc: The top bit of the first byte in the block is 1. Copy next (c + 1) color entries of the previous palette to the next entries of the new palette.                             &lt;br /&gt;
* 01cccccc, ssssssss: The top 2 bits of the first byte in the block are 01. Copy (c + 1) color entries of the previous palette, starting from entry (s) to the next entries of the new palette.&lt;br /&gt;
* 00bbbbbb, 00gggggg, 00rrrrrr: The top 2 bits of the first byte in the block are 00. Use (b, g, r) to create the next entry of the new palette. Note, that each component in this case is only 6 bits long. You need to upscale them to the full 8-bit values using the following lookup table:&lt;br /&gt;
&lt;br /&gt;
  unsigned char palmap[64] = {&lt;br /&gt;
    0x00, 0x04, 0x08, 0x0C, 0x10, 0x14, 0x18, 0x1C,&lt;br /&gt;
    0x20, 0x24, 0x28, 0x2C, 0x30, 0x34, 0x38, 0x3C,&lt;br /&gt;
    0x41, 0x45, 0x49, 0x4D, 0x51, 0x55, 0x59, 0x5D,&lt;br /&gt;
    0x61, 0x65, 0x69, 0x6D, 0x71, 0x75, 0x79, 0x7D,&lt;br /&gt;
    0x82, 0x86, 0x8A, 0x8E, 0x92, 0x96, 0x9A, 0x9E,&lt;br /&gt;
    0xA2, 0xA6, 0xAA, 0xAE, 0xB2, 0xB6, 0xBA, 0xBE,&lt;br /&gt;
    0xC3, 0xC7, 0xCB, 0xCF, 0xD3, 0xD7, 0xDB, 0xDF,&lt;br /&gt;
    0xE3, 0xE7, 0xEB, 0xEF, 0xF3, 0xF7, 0xFB, 0xFF&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
Keep parsing palette blocks until all 256 colors of the new palette have been filled, or until the palette chunk has been depleted.&lt;br /&gt;
&lt;br /&gt;
=== Audio Track Chunk ===&lt;br /&gt;
An audio track chunk contains a portion of audio data corresponding to a single track. A Smacker file can contain up to 7 audio tracks and a single frame may have several audio track chunks. The layout of a single audio track chunk is:&lt;br /&gt;
&lt;br /&gt;
  dword Length;&lt;br /&gt;
  dword UnpackedLength; (optional)&lt;br /&gt;
  byte Data[];&lt;br /&gt;
&lt;br /&gt;
* Length - Size of the entire chunk, including this length field.&lt;br /&gt;
* UnpackedLength - Size of decompressed Data. This field is present only if the corresponding AudioRate header field indicates that this track uses compressed data.&lt;br /&gt;
* Data - Audio data, encoded as specified by corresponding AudioRate header field.&lt;br /&gt;
&lt;br /&gt;
=== Video Chunk ===&lt;br /&gt;
&lt;br /&gt;
A video chunk contains compressed video data for the remainder of a frame.&lt;br /&gt;
&lt;br /&gt;
== Bit Streams ==&lt;br /&gt;
&lt;br /&gt;
HuffmanTrees, video and audio data, stored and accessed via bit streams. Bits counted from the lower bit of each new byte. Thus if we have stream of bytes 0x5C, 0x96, 0xEF and sequentially read 5, 6 and 7 bits, we'll get this output: 0x1C, 0x32, 0x72.&lt;br /&gt;
&lt;br /&gt;
== Packed Huffman Trees ==&lt;br /&gt;
&lt;br /&gt;
Huffman trees are stored in the bitstream in a compressed format. Basic stream layout:&lt;br /&gt;
&lt;br /&gt;
   Tag&lt;br /&gt;
   Flag[, Leaf][, Flag[, Leaf]][, ...]&lt;br /&gt;
&lt;br /&gt;
   Tag  - Single bit, indicates that tree is present.&lt;br /&gt;
   Flag - Single bit, indicates whether tree entry is a Node (1) or Leaf (0).&lt;br /&gt;
   Leaf - If Flag bit is zero, then next 8 bits or variable size field follow,&lt;br /&gt;
          representing a tree leaf value.&lt;br /&gt;
&lt;br /&gt;
== Reconstructing the Tree ==&lt;br /&gt;
&lt;br /&gt;
Before trees can be used, they need to be unpacked into an easily seekable form. Reconstruction algorithm ('stream' denotes packed tree, 'tree' - unpacked):&lt;br /&gt;
&lt;br /&gt;
   1: Read Tag&lt;br /&gt;
   2: If Tag is zero, finish&lt;br /&gt;
   3: Read Flag&lt;br /&gt;
   4a: If Flag is non-zero:&lt;br /&gt;
     5a: Remember current tree node&lt;br /&gt;
     5b: Advance to its '0' branch&lt;br /&gt;
     5c: Repeat recursively from step 3 (one level down)&lt;br /&gt;
   4b: If flag is zero:&lt;br /&gt;
     5a: Read Leaf from stream&lt;br /&gt;
     5b: Assign Leaf value to current node (convert it to leaf)&lt;br /&gt;
   6: If no node previously remembered, finish (one level up)&lt;br /&gt;
   7: Use node's '1' branch from step 5a as current tree position&lt;br /&gt;
   8: Repeat from step 3&lt;br /&gt;
&lt;br /&gt;
Imagine, we have following packed tree stream (these are not bytes, just a sequence of codes!):&lt;br /&gt;
&lt;br /&gt;
   1, 1, 1, 1, 0, 3, 1, 0, 4, 0, 5, 0, 6, 1, 0, 7, 0, 8&lt;br /&gt;
&lt;br /&gt;
Decompressing the tree, we'll get:&lt;br /&gt;
&lt;br /&gt;
                                &amp;lt;--'0'- -'1'--&amp;gt;&lt;br /&gt;
                                      ( )&lt;br /&gt;
                                     /  \&lt;br /&gt;
                                    /   ( )&lt;br /&gt;
                                   /   /   \&lt;br /&gt;
                                 ( ) (7)   (8)&lt;br /&gt;
                                /   \&lt;br /&gt;
                              ( )   (6)&lt;br /&gt;
                             /   \&lt;br /&gt;
                           (3)   ( )&lt;br /&gt;
                                /   \&lt;br /&gt;
                              (4)   (5)&lt;br /&gt;
&lt;br /&gt;
== Optimized Compression ==&lt;br /&gt;
Smacker uses several techniques to improve compression ratio. When Huffman codes are used to compress 8-bit values (bytes) each Leaf entry holds raw 8 bits of data. When Huffman codes are used to compress 16-bit values (even if the actual value requires fewer than 16 bits), the packed tree's Leaves do not contain all 16 bits. Instead, the stored bits are decompressed using the two previously initialized 8-bit Huffman decoders (each with its own tree). The lower byte is decompressed first, then highest. So when you enter steps 4b-5a of the tree unpacking algorithm, you need to invoke another Huffman decoder twice to read the full 16-bit Leaf value.&lt;br /&gt;
&lt;br /&gt;
Another optimization technique employed is semi-dynamic trees. When you unpack codes from a tree and a code is not the same as previously unpacked one, it will be moved together with another two recent codes to the shortest tree's branches. Shortest branches are explicitly marked with special Leaf values and replaced with zeros during tree reconstruction.&lt;br /&gt;
&lt;br /&gt;
Both optimization methods are used together, so typical tree initialization involves the following steps:&lt;br /&gt;
&lt;br /&gt;
   1a: Read Tag (of main tree)&lt;br /&gt;
   1b: If Tag is zero, finish&lt;br /&gt;
   2: Read Huffman tree for low bytes&lt;br /&gt;
   3: Read Huffman tree for high bytes&lt;br /&gt;
   4a: Read 16-bit marker of shortest node #1&lt;br /&gt;
   4b: Read 16-bit marker of shortest node #2&lt;br /&gt;
   4c: Read 16-bit marker of shortest node #3&lt;br /&gt;
   5: Read the rest of Huffman tree, contains 16-bit values&lt;br /&gt;
   5a: When you read Leaf and it's value matches one of the markers obtained on step&lt;br /&gt;
       4, remember the leaf for this marker and set leaf's value to zero.&lt;br /&gt;
&lt;br /&gt;
== Unpacking Data Using Huffman Trees ==&lt;br /&gt;
&lt;br /&gt;
The unpacking process is fairly simple. Start from the top of the Huffman tree. Read and examine the next bit of packed bitstream. According to its value, choose either the '0' or '1' branch of the tree. As soon as you encounter a leaf, the unpacking is finished and a value is obtained. Otherwise, repeat bit reading and tree branching. If a dynamic tree used, compare unpacked value with previously unpacked one. If the value is different, move two previously remembered values to shortest branches #2 and #3, and newly unpacked value to #1.&lt;br /&gt;
&lt;br /&gt;
== Unpacking Audio Track ==&lt;br /&gt;
&lt;br /&gt;
Depending on AudioRate flags, sound can be stored in either uncompressed or packed form.&lt;br /&gt;
&lt;br /&gt;
Uncompressed data is stored as raw [[PCM]] samples.&lt;br /&gt;
&lt;br /&gt;
Compressed audio may be stored in Huffman-packed DPCM format or, in case of perceptual coding used (that is [[Bink Audio]]), as rle-packed coefficients.&lt;br /&gt;
&lt;br /&gt;
=== Huffman DPCM ===&lt;br /&gt;
&lt;br /&gt;
DPCM-packed stream has the following format:&lt;br /&gt;
&lt;br /&gt;
 DataPresent, IsStereo, Is16Bits, Trees[], Bases[], Data[]&lt;br /&gt;
&lt;br /&gt;
* DataPresent - Bit, indicates sound presence&lt;br /&gt;
* IsStereo - Bit, indicates mono or stereo sound&lt;br /&gt;
* Is16Bits - Bit, indicates 8 or 16 bits samples&lt;br /&gt;
* Trees - 8-bits Huffman trees, one tree per each byte of unpacked sample (i.e. single tree for 8bit mono sound, 4 trees for 16bits stereo sound).&lt;br /&gt;
* Bases - One to four 8-bits starting values for each of sample' bytes&lt;br /&gt;
* Data - Huffman-packed stream of 8-bit deltas for each byte of samples&lt;br /&gt;
&lt;br /&gt;
Obviously, Is16Bits and IsStereo must match flags of AudioRate field.&lt;br /&gt;
&lt;br /&gt;
Decompression steps:&lt;br /&gt;
&lt;br /&gt;
# Read DataPresent; if no DataPresent, finish&lt;br /&gt;
# Read IsStereo&lt;br /&gt;
# Read Is16Bits&lt;br /&gt;
# Read number of Trees, according to resulting sample size (see above)&lt;br /&gt;
# Read number of Bases, according to resulting sample size (see above). If sample is 16-bits wide, it's highest base byte stored first. First comes right-channel bases, then left-channel one(s).&lt;br /&gt;
# Output Base bytes is an unpacked sample.&lt;br /&gt;
# For every byte part of sample, Huffman decompress delta from Data using its Tree and add it to the Base byte. If sample is 16-bits wide, low byte stored first, then high, left channel, then right (opposing to step 5). When you unpack 16-bits sample, take in to account possible overflow of lower byte and adjust high byte accordingly.&lt;br /&gt;
# Repeat step 6 until all data decompressed (UnpackedLength bytes of samples processed)&lt;br /&gt;
&lt;br /&gt;
== Unpacking Video ==&lt;br /&gt;
The video in a Smacker is encoded as a series of 4x4 pixel blocks. The image is decoded left to right, top to bottom. If the original image size is not divisible by 4, it is padded up to the next block boundary.&lt;br /&gt;
&lt;br /&gt;
=== Block Types ===&lt;br /&gt;
&lt;br /&gt;
* Mono Block  (0) - Whole block contains only pixels of two colors and special map of their order.&lt;br /&gt;
* Full Block  (1) - Normal full-color block. v4 may perform extra compession of this block.&lt;br /&gt;
* Void Block  (2) - Empty (skip) block, indicates that whole block data is unchanged from previous frame.&lt;br /&gt;
* Solid Block (3) - Whole block is filled with single color.&lt;br /&gt;
&lt;br /&gt;
Mono blocks colors, Mono blocks maps and Full blocks have it's own 16-bit Huffman tables, stored in the beginning of the file (MClr, MMap and Full respectively).&lt;br /&gt;
&lt;br /&gt;
Compressed frame stream consists of a packed block Types descriptors and actual blocks data. Another 16-bits Huffman table stored in the file header for Type descriptors decompression.&lt;br /&gt;
&lt;br /&gt;
Type descriptors have the following format in bits:&lt;br /&gt;
        1..0 - Type of block&lt;br /&gt;
        7..2 - Blocks chain length. Not a real length, but index in the table:&lt;br /&gt;
                 unsigned int sizetable[64] = {&lt;br /&gt;
                   1,    2,    3,    4,    5,    6,    7,    8,&lt;br /&gt;
                   9,   10,   11,   12,   13,   14,   15,   16,&lt;br /&gt;
                  17,   18,   19,   20,   21,   22,   23,   24,&lt;br /&gt;
                  25,   26,   27,   28,   29,   30,   31,   32,&lt;br /&gt;
                  33,   34,   35,   36,   37,   38,   39,   40,&lt;br /&gt;
                  41,   42,   43,   44,   45,   46,   47,   48,&lt;br /&gt;
                  49,   50,   51,   52,   53,   54,   55,   56,&lt;br /&gt;
                  57,   58,   59,  128,  256,  512, 1024, 2048};&lt;br /&gt;
       15..8 - Extra data, mainly contains fill color for Solid block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Frame painting steps:&lt;br /&gt;
&lt;br /&gt;
# Read Type descriptor&lt;br /&gt;
# Draw single block selected by Type bits&lt;br /&gt;
# If whole image drawn, finish&lt;br /&gt;
# Repeat from step 2 until whole chain complete&lt;br /&gt;
# Repeat from step 1&lt;br /&gt;
&lt;br /&gt;
=== Mono Block ===&lt;br /&gt;
&lt;br /&gt;
Mono block contains 16 pixels of two colors. First, you need to unpack the pixel's color from the stream using the MClr Huffman table. The high byte of the unpacked value contains color1 and lower byte contains color2. Next, decode the pixels map, using MMap table. For each bit of the map, starting from the least significant bit, if the value is zero, paint pixel using color0, if bit is set paint with color1. Repeat until all 16 pixels are painted.&lt;br /&gt;
&lt;br /&gt;
=== Full Block ===&lt;br /&gt;
&lt;br /&gt;
Full block contains 16 pixels of any color. Format of this block has been changed in v4.&lt;br /&gt;
&lt;br /&gt;
==== v2 Full Block ====&lt;br /&gt;
&lt;br /&gt;
Decompress 16-bit value and use it draw pixels 3 and 4. Use lower byte for pixel 3 and high byte for pixel 4. Then, decompress next value and paint pixels 1 and 2 using same technique. Advance to the next 4 pixels. Repeat these steps to draw all 16 pixels.&lt;br /&gt;
&lt;br /&gt;
==== v4 Full Block ====&lt;br /&gt;
&lt;br /&gt;
Chain of v4 Full blocks prepended with extra bits, determinating sub-type of all following blocks in the chain. If first bit is 0, paint chain of blocks as v2 Full blocks. Otherwise, read next bit. If bit is zero, paint chain of Double-blocks; if one, paint chain of Half-blocks.&lt;br /&gt;
&lt;br /&gt;
===== v4 Double Block =====&lt;br /&gt;
&lt;br /&gt;
Decompress 16-bits value and use it to draw first two 2x2 subblocks (left to right, top to bottom), filling whole subblock with single color (i.e low byte used for pixels 1, 2, 5, 6 and high byte for pixels 3, 4, 7, 8). Advance to the next two subblocks and repeat again to paint all 16 pixels.&lt;br /&gt;
&lt;br /&gt;
===== v4 Half Block =====&lt;br /&gt;
&lt;br /&gt;
Perform steps similar to v2 Full block, but instead of drawing each even line, just duplicate if from previous line.&lt;br /&gt;
&lt;br /&gt;
=== Void Block ===&lt;br /&gt;
&lt;br /&gt;
All 16 pixels in the block are unchanged from the previous frame.&lt;br /&gt;
&lt;br /&gt;
=== Solid Block ===&lt;br /&gt;
&lt;br /&gt;
Fill whole block using color obtained as Extra value during Type descriptor decoding.&lt;br /&gt;
&lt;br /&gt;
[[Category:Container Formats]]&lt;br /&gt;
[[Category:Game Formats]]&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Audio Codecs]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Electronic_Arts_MAD&amp;diff=7657</id>
		<title>Electronic Arts MAD</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Electronic_Arts_MAD&amp;diff=7657"/>
		<updated>2007-04-11T10:20:43Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: reverted vandalism to last good page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: mad&lt;br /&gt;
* Company: [[Electronic Arts]]&lt;br /&gt;
* Samples: http://samples.mplayerhq.hu/game-formats/dct-mad/&lt;br /&gt;
&lt;br /&gt;
MAD is a video codec used in various games published by companies under the Electronic Arts umbrella. The codec is an evolution of the earlier [[Electronic_Arts_TGQ|TGQ]] and [[Electronic_Arts_TQI|TQI]] codecs, adding motion compensation and low-quality frame concepts. MAD is an abbreviation for &amp;quot;Madcow Movie&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Chunk Types ==&lt;br /&gt;
See [[Electronic Arts Formats]] for file format description. Each MADk, MADm and MADe chunk corresponds to a video frame, where MADk is an intra-frame, MADm is an inter-frame and MADe is a low-quality-inter frame. Low-quality-inter frames are identical to inter frames, but are not used for motion compensation and are discarded immediately after presentation. Each frame is divided into 16x16 pixel macroblocks, with each macroblock further divided into with four 8x8 luma and two half-resolution 8x8 chroma blocks. Standard [[MPEG-1]] block ordering is used.&lt;br /&gt;
&lt;br /&gt;
Each chunk begins with a 16 byte header, followed by a bitstream. Symbols within the header are encoded using 16-bit little-endian most-to-least-significant bit packing. &amp;lt;FIXME: explain bit packing&amp;gt;. Although frame type is reported within the header, the field is not valid in some samples, and is therefore unreliable. Frame type should be inferred from the chunk type.&lt;br /&gt;
&lt;br /&gt;
    Offset   Data_type   Name         Description&lt;br /&gt;
    0x0000   four bytes  unknown      always zero&lt;br /&gt;
    0x0000   le_u16      unknown&lt;br /&gt;
    0x0006   le_u16      frame_rate   milliseconds per frame&lt;br /&gt;
    0x0008   le_u16      width        image width (pixels)&lt;br /&gt;
    0x000a   le_u16      height       image height (pixels)&lt;br /&gt;
    0x000c   u8          unknown&lt;br /&gt;
    0x000d   u8          quantizer    frame quantizer&lt;br /&gt;
    0x000e   u8          frame_type   not valid for all samples&lt;br /&gt;
    0x000f   u8          unknown&lt;br /&gt;
    for each vertical macroblock&lt;br /&gt;
        for each horizontal macroblock&lt;br /&gt;
            decode_mb&lt;br /&gt;
&lt;br /&gt;
== Macroblock Decoding ==&lt;br /&gt;
Macroblock composition is based on a 6-bit block type, where each bit indicates the type of an 8x8 block within macroblock. The least-significant-bit corresponds to the first block. A clear bit indicates an intra-block, and a set bit indicates a motion-compensated block.&lt;br /&gt;
&lt;br /&gt;
For intra frames, the block type is assumed to be all clear. For inter and low-quality inter frames, the block type is derived from a VLC. If the block type is none zero, then a full-pel motion vector is read from the bitstream. A description of the block_type VLC and decoding algorithm is provided below.&lt;br /&gt;
&lt;br /&gt;
   if (intra frame) &lt;br /&gt;
       block_type = 000000b&lt;br /&gt;
   else // inter or low-quality-inter frame&lt;br /&gt;
       switch get_vlc()&lt;br /&gt;
       case 1b  : block_type = 111111b&lt;br /&gt;
       case 01b : block_type = get_bits(6);&lt;br /&gt;
       case 00b : block_type = 000000b&lt;br /&gt;
   &lt;br /&gt;
       if (block_type != 0)&lt;br /&gt;
           x = GetVector();&lt;br /&gt;
           y = GetVector();&lt;br /&gt;
   &lt;br /&gt;
   for i = 0 through 5	// for each block&lt;br /&gt;
       if block_type &amp;amp; (1&amp;lt;&amp;lt;i)&lt;br /&gt;
           mc_offset = GetVector()&lt;br /&gt;
           motion_compensation&lt;br /&gt;
       else&lt;br /&gt;
           decode_coeffs&lt;br /&gt;
&lt;br /&gt;
Full-pel 8x8 block motion compensation is performed using the motion vector. Following the compensation step, each pixel in the block is offset by the mc_offset value and clipped to 0, 255.&lt;br /&gt;
&lt;br /&gt;
==GetVector Definition==&lt;br /&gt;
Vector values are read from the bitstream using the following algorithm.&lt;br /&gt;
&lt;br /&gt;
    value = 0&lt;br /&gt;
    if (get_bits(1))&lt;br /&gt;
        if (get_bits(1))&lt;br /&gt;
            value = -17&lt;br /&gt;
        value += get_bits(4) + 1&lt;br /&gt;
&lt;br /&gt;
==Coefficient Decoding==&lt;br /&gt;
All coefficients, including DC, are decoded using the MPEG-1 AC [[Run_Length_Encoding|run-length]] VLC technique. The RLVLC table is identical to that used for the [[Electronic_Arts_TGQ|TGQ]] codec and coefficients are ordered using the [http://wiki.multimedia.cx/index.php?title=Image:Ea_tgq_zigzag.png EA zigzag scan pattern]. Dequantization is performed by multiplying the coefficients by a dequantization table. This table is calculated for each frame using the frame quantizer.&lt;br /&gt;
&lt;br /&gt;
    dequant_table[0] = base_table[0] * base_table2[0]&lt;br /&gt;
    for i equals 0 through 63&lt;br /&gt;
        dequant_table[i] = (base_table[i]*base_table2[i]*frame_quant + 4) / 8&lt;br /&gt;
 &lt;br /&gt;
    where base_table and base_table2 are defined in [[Electronic_Arts_TGQ|TGQ]] and [[Electronic_Arts_TGQ|TQI]] respectively.&lt;br /&gt;
&lt;br /&gt;
==Inverse DCT and Clipping==&lt;br /&gt;
An IDCT-based algorithm is applied to each block. &amp;lt;FIXME: hyperlink to implementation&amp;gt;. The resulting values are offset by 128, and clipped to 0, 255 to give 8-bit luma and chroma pixel levels.&lt;br /&gt;
&lt;br /&gt;
== Games Using MAD ==&lt;br /&gt;
See [[Electronic Arts Formats]] for listing.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Bethsoft_VID&amp;diff=7656</id>
		<title>Bethsoft VID</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Bethsoft_VID&amp;diff=7656"/>
		<updated>2007-04-11T10:19:54Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: reverted vandalism to last good page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: [[Bethesda Softworks]]&lt;br /&gt;
* Specification: http://www.svatopluk.com/andux/docs/dfvid.html&lt;br /&gt;
* Samples: http://samples.mplayerhq.hu/game-formats/bethsoft-vid/&lt;br /&gt;
&lt;br /&gt;
[[Run Length Encoding|RLE]]-based format used in ''The Elder Scrolls II: Daggerfall'',''Terminator: Skynet''  and ''Terminator: Future Shock''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related software==&lt;br /&gt;
*[http://www.svatopluk.com/daggerfall/download/dagvid.stm DagVid]&amp;amp;mdash;a player&lt;br /&gt;
*[http://www.svatopluk.com/daggerfall/download/vid2avi.stm DFVid2AVI]&lt;br /&gt;
*[http://www.svatopluk.com/andux/ Andux's] VID tools&lt;br /&gt;
**VIDDump&amp;amp;mdash;dumps audio, palette, and raw frame data&lt;br /&gt;
**VID Audio Dumper&lt;br /&gt;
**MakeVID (prototype)&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs|VID (Bethsoft)]]&lt;br /&gt;
[[Category:Game Formats|VID (Bethsoft)]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Xan_DPCM&amp;diff=7655</id>
		<title>Xan DPCM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Xan_DPCM&amp;diff=7655"/>
		<updated>2007-04-11T10:18:22Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Company: [[Origin Systems]]&lt;br /&gt;
&lt;br /&gt;
Origin's [http://www.mobygames.com/game/dos/wing-commander-iv-the-price-of-freedom Wing Commander IV: The Price of Freedom] computer game transports multimedia cutscenes in standard Microsoft [[Microsoft Audio/Video Interleaved|AVI]] files. The audio in these files is encoded using a custom format that this page takes the liberty of naming Xan DPCM.&lt;br /&gt;
&lt;br /&gt;
Note that an AVI file demuxer will probably need to be modified to support the algorithm. The [[WAVEFORMATEX]] headers in the Xan AVI files report the audio coding as format 0x0001: [[PCM]]. However, the file's 'auds' chunk begins with the fourcc 'Axan'. A program can either check for this or assume that the file uses Xan DPCM if it uses [[Origin Xan Codec|Xan]] video.&lt;br /&gt;
&lt;br /&gt;
Classifying the Xan audio coding method as a DPCM algorithm is a little shaky. It actually resembles a cross between a DPCM algorithm and a APDCM algorithm. Perhaps the designers could not decide between the two algorithm families and decided to split the difference. The algorithm encodes 16-bit PCM samples as 8-bit bytes by packing a 6-bit delta value along with a 2-bit delta modifier into a byte.&lt;br /&gt;
&lt;br /&gt;
For each chunk of Xan DPCM data, the first 2 or 4 bytes are the initial predictors for that chunk, depending on mono or stereo data, and are encoded as signed, 16-bit, little-endian numbers. A shifter value for each channel is initialized to 4. For each byte in the stream (assuming mono data):&lt;br /&gt;
&lt;br /&gt;
    byte = next byte in stream&lt;br /&gt;
    diff = (byte &amp;amp; 0xFC) &amp;lt;&amp;lt; 8&lt;br /&gt;
    if bottom 2 bits of byte are both 1 (byte &amp;amp; 0x03)&lt;br /&gt;
        shifter++&lt;br /&gt;
    else&lt;br /&gt;
        shifter -= (2 * (byte &amp;amp; 3))&lt;br /&gt;
    note that the shift value may not go below 0 and must be saturated here&lt;br /&gt;
    shift diff right by shifter value&lt;br /&gt;
    apply diff to the current predictor&lt;br /&gt;
    saturate predictor to signed, 16-bit range &lt;br /&gt;
&lt;br /&gt;
Note that diff must be treated as a signed 16-bit number. For stereo data, the bytes represent interleaved samples in LRLR order.&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio Codecs]]&lt;br /&gt;
[[Category:DPCM Audio Codecs]]&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Talk:YouTube&amp;diff=7578</id>
		<title>Talk:YouTube</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Talk:YouTube&amp;diff=7578"/>
		<updated>2007-04-06T11:42:17Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: where is theora?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;haha , fun way to check if youtube is using ffmpeg or not :) i was going to email them, guess i'll give that a chance right now. &lt;br /&gt;
-[[User:Compn|Compn]] 20:57, 4 January 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
You should be able to get around the file too long message by having the upgraded youtube account (called something like director).  It allows you to post movies that last more than 10 minutes.  According to the website, the maximum size is 100 MB.&lt;br /&gt;
&lt;br /&gt;
Mentioned in the Troubleshooting:Uploads section is that Real media (.rm) and Flash (.flv) are not supported.  They mention using Windows Movie Maker or iMovie, so all the formats that either one can produce should work.&lt;br /&gt;
[[User:Dashcloud|Dashcloud]] 00:04, 5 January 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
:I thought I remembered reading forums somewhere about people transcoding to FLV and uploading to YouTube. They reported it worked, but there was generational loss since YouTube transcodes it to a new FLV anyway. I have yet to test it personally. Also, I tend to think that any length error indicated in this table is a malfunction on the part of the trancoding software since none of the files were anywhere near the file size limit nor time limit. --[[User:Multimedia Mike|Multimedia Mike]] 00:44, 5 January 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
::Just added RealVideo versions 1..3 to the list (they all work). If those 3 work, I wager #4 will work as soon as it has been given enough time to process. FLV/Sorenson works but not the other codecs. --[[User:Multimedia Mike|Multimedia Mike]] 03:31, 5 January 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
anyone try some h264 samples? &lt;br /&gt;
-[[User:Compn|Compn]] 15:35, 9 January 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
:I haven't tried any yet. If you know of some specific samples I should try, particularly ones that flex particular H.264 properties, either try uploading them, or let me know the links so I can try them. --[[User:Multimedia Mike|Multimedia Mike]] 18:18, 9 January 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
::You can easily create h264 samples, and a lot of other formats using LiVES (http://lives.sourceforge.net). I'd be interested to know which of LiVES formats are supported, particularly the Free ones like theora and dirac. [[User:Salsaman|Salsaman]] 19:39, 25 January 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
I wonder why i can't find theora on this list (neither on supported nor on the non-supported part).&lt;br /&gt;
Shouldn't it be listed somewhere???&lt;br /&gt;
Excuse me, i'm largely ignorant, so enlighten me :)&lt;br /&gt;
--[[User:Avenger teambg|Avenger teambg]] 07:42, 6 April 2007 (EDT)&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Dirac&amp;diff=6868</id>
		<title>Dirac</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Dirac&amp;diff=6868"/>
		<updated>2007-01-26T14:27:03Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FOURCC: BBCD&lt;br /&gt;
* Company: [[BBC]]&lt;br /&gt;
* Website: [http://dirac.sf.net/ http://dirac.sf.net/]&lt;br /&gt;
&lt;br /&gt;
Experimental wavelet-based video codec being developed by the [[BBC]]. The development of a C++ Dirac implementation under the MPL license is hosted at SourceForge. &lt;br /&gt;
[http://schrodinger.sf.net  The Schrödinger Project] is an implementation written in ANSI C89, jointly developed by [[Fluendo]] and [[BBC]].&lt;br /&gt;
&lt;br /&gt;
[[Category: Video Codecs]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Interplay_Entertainment&amp;diff=6790</id>
		<title>Interplay Entertainment</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Interplay_Entertainment&amp;diff=6790"/>
		<updated>2007-01-19T10:25:02Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Website: [http://www.interplay.com/ http://www.interplay.com/]&lt;br /&gt;
&lt;br /&gt;
Gaming company from 1983, best known for Lost Vikings and a number of role-playing games. Creators of the [[Interplay MVE]] format.&lt;br /&gt;
Interplay became extinct in 2005.&lt;br /&gt;
&lt;br /&gt;
[[Category:Multimedia-related Companies]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Talk:Bink_Video&amp;diff=6776</id>
		<title>Talk:Bink Video</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Talk:Bink_Video&amp;diff=6776"/>
		<updated>2007-01-14T10:24:27Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The linux version of BinkPlayer contains the following strings:&lt;br /&gt;
D:\Devel\projects\bink\build\temps\lnx\fft.obj&lt;br /&gt;
D:\Devel\projects\bink\build\temps\lnx\dct.obj&lt;br /&gt;
&lt;br /&gt;
Probably it is worth to reverse engineer that program?&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Bink_Video&amp;diff=6775</id>
		<title>Bink Video</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Bink_Video&amp;diff=6775"/>
		<updated>2007-01-14T10:21:12Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FourCC: BINK (note that some FourCC lists assert that BINK is a FourCC for general-purpose multimedia containers; however, Bink data is always known to be encapsulated in a custom container format)&lt;br /&gt;
* Company: [[RAD Game Tools]]&lt;br /&gt;
* Samples: [http://samples.mplayerhq.hu/game-formats/bink/ http://samples.mplayerhq.hu/game-formats/bink/], countless video games&lt;br /&gt;
&lt;br /&gt;
A video codec that purports to use every video coding technique ([[DCT]],[[FFT]]) under the sun and used in a large number of computer and console games. The video is packaged in custom [[Bink Container|Bink]] files.&lt;br /&gt;
&lt;br /&gt;
[[Category:Undiscovered Video Codecs]]&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Undiscovered Game Formats]]&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Talk:Bink_Container&amp;diff=6738</id>
		<title>Talk:Bink Container</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Talk:Bink_Container&amp;diff=6738"/>
		<updated>2007-01-07T16:05:20Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Original:&lt;br /&gt;
bytes 28-31   video frames per second&lt;br /&gt;
bytes 32-35   image format&lt;br /&gt;
&lt;br /&gt;
Suggested:&lt;br /&gt;
bytes 28-35   video frames per second in a/b format (real number)&lt;br /&gt;
   bytes 28-31 a&lt;br /&gt;
   bytes 32-35 b&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I noticed numbers like:&lt;br /&gt;
6025/201&lt;br /&gt;
2997/100&lt;br /&gt;
Both are very close to 30 (a usual framerate for videos)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is another error in the optional audio header:&lt;br /&gt;
Original:&lt;br /&gt;
bytes 44-45   audio channels (1 or 2)&lt;br /&gt;
bytes 46-47   unknown&lt;br /&gt;
&lt;br /&gt;
Suggested:&lt;br /&gt;
bytes 44-45   unknown (but somehow related to samplerate)&lt;br /&gt;
bytes 46-47   audio channels (1 or 2)&lt;br /&gt;
&lt;br /&gt;
* The framerate correction is indeed right. --[[User:VAG|VAG]] 19:23, 25 December 2006 (EST)&lt;br /&gt;
&lt;br /&gt;
I'm not sure the audio sample rate is quite correct. I get slightly strange values like 44000 (logo_lucas.bik) and 22500 (AnivisionLogo.bik) on some of the samples provided, although I get sensible ones like 44100 (original.bik) on others...  I'm not an audio expert by any means, but it seems strange that these values are so close to multiples of common audio sample rates and yet not equal to them. --[[User:DrV|DrV]] 00:25, 6 January 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
Isn't it 22050? That would be half of 44100 :) And probably because it is mono. I could be mistaken...&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Bink_Container&amp;diff=6675</id>
		<title>Bink Container</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Bink_Container&amp;diff=6675"/>
		<updated>2007-01-04T09:48:14Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''This page is based on the document 'Description of the Bink File Format' by Mike Melanson at [http://multimedia.cx/bink-format.txt http://multimedia.cx/bink-format.txt].''&lt;br /&gt;
&lt;br /&gt;
* Extenstions: bik&lt;br /&gt;
* Company: [[RAD Game Tools]]&lt;br /&gt;
* Samples: [http://samples.mplayerhq.hu/game-formats/bink/ http://samples.mplayerhq.hu/game-formats/bink/], countless video games&lt;br /&gt;
&lt;br /&gt;
Bink files are multimedia files used in a variety of video games, both on personal computers platforms and video game consoles. The files act as containers for data compressed with the proprietary [[Bink Video|Bink video]] and [[Bink Audio|audio]] codecs. Bink multimedia files are known to bear the .bik extension.&lt;br /&gt;
&lt;br /&gt;
== File Format ==&lt;br /&gt;
&lt;br /&gt;
'''This description is known to be incomplete.'''&lt;br /&gt;
&lt;br /&gt;
All multi-byte numbers are stored in little endian format.&lt;br /&gt;
&lt;br /&gt;
Bink files appear to start with a 56-byte header which is laid out as follows:&lt;br /&gt;
&lt;br /&gt;
  bytes 0-2     file signature ('BIK')&lt;br /&gt;
  byte 3        possibly a file version number (e.g., 0x68, 0x69)&lt;br /&gt;
  bytes 4-7     file size not including the first 8 bytes&lt;br /&gt;
  bytes 8-11    number of frames&lt;br /&gt;
  bytes 12-15   largest frame size in bytes&lt;br /&gt;
  bytes 16-19   number of frames again?&lt;br /&gt;
  bytes 20-23   video width&lt;br /&gt;
  bytes 24-27   video height&lt;br /&gt;
  bytes 28-31   video frames per second dividend&lt;br /&gt;
  bytes 32-35   video frames per second divider&lt;br /&gt;
  bytes 36-39   unknown&lt;br /&gt;
  bytes 40-43   audio flag: if 0, header ends; if 1, header continues;&lt;br /&gt;
    bytes 44-45   unknown&lt;br /&gt;
    bytes 46-47   audio channels (1 or 2)&lt;br /&gt;
    bytes 48-49   audio sample rate&lt;br /&gt;
    bytes 50-55   unknown&lt;br /&gt;
&lt;br /&gt;
Following the header is a sample offset table. The number of entries in the table is equal to the number of samples specified in the header. Each entry consists of a 32-bit absolute offset for that sample. There is no length information, so the length of a sample is implicitly the difference between sample offsets. One frame contains both audio and video data (if both are present it the file). Bytes 12-15 (largest frame size) probably exist to provide the playback application with the largest single buffer it will have to allocate.&lt;br /&gt;
&lt;br /&gt;
[[Category:Container Formats]]&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Vodei&amp;diff=6674</id>
		<title>Vodei</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Vodei&amp;diff=6674"/>
		<updated>2007-01-04T09:46:44Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: typo fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: Vodei&lt;br /&gt;
&lt;br /&gt;
Vodei is a file format consisting of a short [[AVI]] file with an additional encrypted/obfuscated segment appended to the end.&lt;br /&gt;
&lt;br /&gt;
The AVI portion of the file usually contains a short advertisement for vodei.com encoded with [[Microsoft RLE]].  Vodei.com sells software which will decode the additional segment.  Although advertised as a &amp;quot;free download&amp;quot;, this is adware which will persistently nag the user for payment.&lt;br /&gt;
&lt;br /&gt;
Vodei is not a codec, and after extracting the additional data from the end of the AVI file, simply passes it to the standard [[VfW|Video For Windows]] interface for decoding.  (Since the Vodei software contains no codecs, the Vodei web site recommends that the user install ffdshow.)&lt;br /&gt;
&lt;br /&gt;
It is also believed that Vodei itself is encoding movies in vodei format to entice users into buying vodei just for a few movies.&lt;br /&gt;
&lt;br /&gt;
[[Category:Container Formats]]&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Talk:Bink_Container&amp;diff=6604</id>
		<title>Talk:Bink Container</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Talk:Bink_Container&amp;diff=6604"/>
		<updated>2006-12-20T15:21:16Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Original:&lt;br /&gt;
bytes 28-31   video frames per second&lt;br /&gt;
bytes 32-35   image format&lt;br /&gt;
&lt;br /&gt;
Suggested:&lt;br /&gt;
bytes 28-35   video frames per second in a/b format (real number)&lt;br /&gt;
   bytes 28-31 a&lt;br /&gt;
   bytes 32-35 b&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I noticed numbers like:&lt;br /&gt;
6025/201&lt;br /&gt;
2997/100&lt;br /&gt;
Both are very close to 30 (a usual framerate for videos)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is another error in the optional audio header:&lt;br /&gt;
Original:&lt;br /&gt;
bytes 44-45   audio channels (1 or 2)&lt;br /&gt;
bytes 46-47   unknown&lt;br /&gt;
&lt;br /&gt;
Suggested:&lt;br /&gt;
bytes 44-45   unknown (but somehow related to samplerate)&lt;br /&gt;
bytes 46-47   audio channels (1 or 2)&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Talk:Bink_Container&amp;diff=6603</id>
		<title>Talk:Bink Container</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Talk:Bink_Container&amp;diff=6603"/>
		<updated>2006-12-20T14:55:12Z</updated>

		<summary type="html">&lt;p&gt;Avenger teambg: suggested correction for bink container&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Original:&lt;br /&gt;
bytes 28-31   video frames per second&lt;br /&gt;
bytes 32-35   image format&lt;br /&gt;
&lt;br /&gt;
Suggested:&lt;br /&gt;
bytes 28-35   video frames per second in a/b format (real number)&lt;br /&gt;
   bytes 28-31 a&lt;br /&gt;
   bytes 32-35 b&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I noticed numbers like:&lt;br /&gt;
6025/201&lt;br /&gt;
2997/100&lt;br /&gt;
Both are very close to 30 (a usual framerate for videos)&lt;/div&gt;</summary>
		<author><name>Avenger teambg</name></author>
	</entry>
</feed>