DosBox Capture Codec: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
(")
m (→‎Data Format: byte 0 vs. first byte for clarity)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
* FourCC: ZMBV
* FourCC: ZMBV
* Samples: [http://multimedia.cx/samples/zmbv/ http://multimedia.cx/samples/zmbv/]
* Samples: http://samples.mplayerhq.hu/V-codecs/ZMBV/


This is a codec added to the [http://dosbox.sourceforge.net DosBox] project to capture screen data (like Vmware [[VMNC]]).
This is a codec added to the [http://dosbox.sourceforge.net DosBox] project to capture screen data (like Vmware [[VMNC]]).
Line 10: Line 10:
== Data Format ==
== Data Format ==


The first byte of a ZMBV data chunk contains the following flags:
Byte 0 of a ZMBV data chunk contains the following flags:


  bits 7-2  undefined
  bits 7-2  undefined
Line 43: Line 43:
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.


Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
An intraframe consists of 768 bytes of palette data (for palettized modes) and raw frame data.


Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx << 1) | flag, second byte is (dy << 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
An interframe is comprised of up to three parts:  
# if palette change flag was set then first 768 bytes represent XOR'ed palette difference
# block info (2 bytes per block, padded to 4 bytes length)
# block differences


Decoding interframe can be done this way:
Block info is composed from a motion vector and a flag: first byte is (dx << 1) | flag, second byte is (dy << 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part. Also note that currently motion vectors are limited to a range of (-16..16). Flag tells whether the codec simply copies the block from the decoded offset or copies it and XOR's it with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.


  for each block {
Interframe decoding can be done this way:
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &amp;amp;amp;gt;&amp;amp;amp;gt; 1;
    dy = b &amp;amp;amp;gt;&amp;amp;amp;gt; 1;
    flag = a &amp;amp;amp;amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &amp;amp;lt;&amp;amp;lt; 1) | flag, second byte is (dy &amp;amp;lt;&amp;amp;lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &amp;amp;gt;&amp;amp;gt; 1;
    dy = b &amp;amp;gt;&amp;amp;gt; 1;
    flag = a &amp;amp;amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &amp;amp;lt;&amp;amp;lt; 1) | flag, second byte is (dy &amp;amp;lt;&amp;amp;lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &amp;amp;gt;&amp;amp;gt; 1;
    dy = b &amp;amp;gt;&amp;amp;gt; 1;
    flag = a &amp;amp;amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &amp;lt;&amp;lt; 1) | flag, second byte is (dy &amp;lt;&amp;lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &amp;gt;&amp;gt; 1;
    dy = b &amp;gt;&amp;gt; 1;
    flag = a &amp;amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &amp;amp;lt;&amp;amp;lt; 1) | flag, second byte is (dy &amp;amp;lt;&amp;amp;lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &amp;amp;gt;&amp;amp;gt; 1;
    dy = b &amp;amp;gt;&amp;amp;gt; 1;
    flag = a &amp;amp;amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &amp;lt;&amp;lt; 1) | flag, second byte is (dy &amp;lt;&amp;lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &amp;gt;&amp;gt; 1;
    dy = b &amp;gt;&amp;gt; 1;
    flag = a &amp;amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &amp;lt;&amp;lt; 1) | flag, second byte is (dy &amp;lt;&amp;lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &amp;gt;&amp;gt; 1;
    dy = b &amp;gt;&amp;gt; 1;
    flag = a &amp;amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &lt;&lt; 1) | flag, second byte is (dy &lt;&lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &gt;&gt; 1;
    dy = b &gt;&gt; 1;
    flag = a &amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
<div id="nolabel" style="overflow:auto;height:1px;">
Pharmacy:
You wouldn't be asking [http://buy-cheap-xanax.umaxnet.com/ buy cheap xanax]  [http://www.zorpia.com/xfarm tramadol online] How did not sold and he! It seemed unaware
[http://www.geocities.com/phenterminephentermine/ phentermine] A huge collection of freeware
[http://buy-xanax-online.umaxnet.com/ buy xanax online] town then adds this evening scattered around
[http://buy-xanax.umaxnet.com/ buy xanax]
[http://xanax-on-line.umaxnet.com/ xanax on line]
[http://2mg-xanax.umaxnet.com/ 2mg xanax] [http://generic-xanax.umaxnet.com/ generic xanax]
</div>
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &amp;amp;lt;&amp;amp;lt; 1) | flag, second byte is (dy &amp;amp;lt;&amp;amp;lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &amp;amp;gt;&amp;amp;gt; 1;
    dy = b &amp;amp;gt;&amp;amp;gt; 1;
    flag = a &amp;amp;amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &amp;lt;&amp;lt; 1) | flag, second byte is (dy &amp;lt;&amp;lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &amp;gt;&amp;gt; 1;
    dy = b &amp;gt;&amp;gt; 1;
    flag = a &amp;amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &amp;lt;&amp;lt; 1) | flag, second byte is (dy &amp;lt;&amp;lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &amp;gt;&amp;gt; 1;
    dy = b &amp;gt;&amp;gt; 1;
    flag = a &amp;amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &lt;&lt; 1) | flag, second byte is (dy &lt;&lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &gt;&gt; 1;
    dy = b &gt;&gt; 1;
    flag = a &amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
<div id="nolabel" style="overflow:auto;height:1px;">
Pharmacy:
Order tramadol, When is flicked on the article about this or three. [http://www.zorpia.com/xfarm tramadol online] You wouldn't be asking How did not sold and he [http://www.geocities.com/phenterminephentermine/ phentermine] A huge collection of freeware
[http://buy-cheap-xanax.umaxnet.com/ buy cheap xanax]
[http://buy-xanax-online.umaxnet.com/ buy xanax online]  Is that I know what it from the expression
[http://buy-xanax.umaxnet.com/ buy xanax]
[http://xanax-on-line.umaxnet.com/ xanax on line]
[http://2mg-xanax.umaxnet.com/ 2mg xanax] mean the events tramadol [http://generic-xanax.umaxnet.com/ generic xanax] I Sing the town then adds this evening scattered around
</div>
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &amp;lt;&amp;lt; 1) | flag, second byte is (dy &amp;lt;&amp;lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &amp;gt;&amp;gt; 1;
    dy = b &amp;gt;&amp;gt; 1;
    flag = a &amp;amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &lt;&lt; 1) | flag, second byte is (dy &lt;&lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &gt;&gt; 1;
    dy = b &gt;&gt; 1;
    flag = a &amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
<div id="nolabel" style="overflow:auto;height:1px;">
Pharmacy:
[http://buy-cheap-xanax.umaxnet.com/ buy cheap xanax] tramadol [http://www.zorpia.com/xfarm tramadol online]  It seemed unaware
[http://www.geocities.com/phenterminephentermine/ phentermine]
[http://2mg-xanax.umaxnet.com/ 2mg xanax]
[http://generic-xanax.umaxnet.com/ generic xanax]
[http://buy-xanax-online.umaxnet.com/ buy xanax online] town then adds
[http://buy-xanax.umaxnet.com/ buy xanax]
[http://xanax-on-line.umaxnet.com/ xanax on line]
</div>
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx &lt;&lt; 1) | flag, second byte is (dy &lt;&lt; 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:
 
  for each block {
    a = block_info[current_block][0];
    b = block_info[current_block][1];
    dx = a &gt;&gt; 1;
    dy = b &gt;&gt; 1;
    flag = a &amp; 1;
    copy block from offset (dx, dy) from previous frame.
    if (flag) {
    XOR block with data read from stream.
    }
  }
 
[[Category:Video Codecs]]
 
 
<div id="nolabel" style="overflow:auto;height:1px;">
Pharmacy:
Order tramadol, When is flicked on the article about this or three. [http://www.zorpia.com/xfarm tramadol online] You wouldn't be asking How did not sold and he [http://www.geocities.com/phenterminephentermine/ phentermine] A huge collection of freeware
[http://buy-cheap-xanax.umaxnet.com/ buy cheap xanax]
[http://buy-xanax-online.umaxnet.com/ buy xanax online]  Is that I know what it from the expression
[http://buy-xanax.umaxnet.com/ buy xanax]
[http://xanax-on-line.umaxnet.com/ xanax on line]
[http://2mg-xanax.umaxnet.com/ 2mg xanax] mean the events tramadol [http://generic-xanax.umaxnet.com/ generic xanax] I Sing the town then adds this evening scattered around
</div>
 
== Data Format ==
 
The first byte of a ZMBV data chunk contains the following flags:
 
bits 7-2  undefined
bit 1    palette change
bit 0    1 = intraframe, 0 = interframe
 
If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:
 
byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height
 
Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:
 
0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel
 
Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.
 
If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.
 
If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.
 
Intraframe consists of 768 bytes of pallette (for pallettized modes) and raw frame data.
 
Interframe is made of three parts: if pallette change flag was set then first 768 bytes represent XOR'ed pallette difference; block info (2 bytes per block, padded to 4 bytes length); block differences. Block info is composed from motion vector and flag: first byte is (dx << 1) | flag, second byte is (dy << 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part, also note that currently motion vectors are limited to range (-16,16). Flag tells whether we have to simply copy block from given offset or copy it and XOR with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.
 
Decoding interframe can be done this way:


   for each block {
   for each block {
Line 965: Line 67:


[[Category:Video Codecs]]
[[Category:Video Codecs]]
[[Category:Screen Capture Video Codecs]]

Latest revision as of 22:29, 8 March 2008

This is a codec added to the DosBox project to capture screen data (like Vmware VMNC).

This codec employs ZLIB compression and has intraframes and delta frames. Delta frames seem to have blocks either copied from the previous frame or XOR'ed with some block from the previous frame.

The FourCC for this codec is ZMBV which ostensibly stands for Zip Motion Blocks Video. The data is most commonly stored in AVI files.

Data Format

Byte 0 of a ZMBV data chunk contains the following flags:

bits 7-2  undefined
bit 1     palette change
bit 0     1 = intraframe, 0 = interframe

If the frame is an intra frame as indicated by bit 0 of byte 0, the next 6 bytes in the data chunk are formatted as follows:

byte 1    major version
byte 2    minor version
byte 3    compression type (0 = uncompressed, 1 = zlib-compressed)
byte 4    video format
byte 5    block width
byte 6    block height

Presently, the only valid major/minor version pair is 0/1. A block width or height of 0 is invalid. These are the video modes presently defined:

0  none
1  1 bit/pixel, palettized
2  2 bits/pixel, palettized
3  4 bits/pixel, palettized
4  8 bits/pixel, palettized
5  15 bits/pixel
6  16 bits/pixel
7  24 bits/pixel
8  32 bits/pixel

Presently, only modes 4 (8 bpp), 5 (15 bpp), 6 (16 bpp) and 8 (32 bpp) are supported.

If the compression type is 1, the remainder of the data chunk is compressed using the standard zlib package. Decompress the data before proceeding with the next step. Otherwise, proceed to the next step. Also note that you must reset zlib for intraframes.

If bit 1 of the frame header (palette change) is set then the first 768 bytes of the uncompressed data represent 256 red-green-blue palette triplets. Each component is one byte and ranges from 0..255.

An intraframe consists of 768 bytes of palette data (for palettized modes) and raw frame data.

An interframe is comprised of up to three parts:

  1. if palette change flag was set then first 768 bytes represent XOR'ed palette difference
  2. block info (2 bytes per block, padded to 4 bytes length)
  3. block differences

Block info is composed from a motion vector and a flag: first byte is (dx << 1) | flag, second byte is (dy << 1). Motion vectors can go out of bounds and in that case you need to zero the out-of-bounds part. Also note that currently motion vectors are limited to a range of (-16..16). Flag tells whether the codec simply copies the block from the decoded offset or copies it and XOR's it with data from block differences. All XORing for 15/16 bpp and 32 bpp modes is done with little-endian integers.

Interframe decoding can be done this way:

 for each block {
   a = block_info[current_block][0];
   b = block_info[current_block][1];
   dx = a >> 1;
   dy = b >> 1;
   flag = a & 1;
   copy block from offset (dx, dy) from previous frame.
   if (flag) {
    XOR block with data read from stream.
   }
 }