Duck TrueMotion 2: Difference between revisions
No edit summary |
|||
Line 7: | Line 7: | ||
== Codec principles == | == Codec principles == | ||
This codec employs data separation, so frame is composed from these segments: | This codec operates on 4x4 blocks and employs data separation, so packed frame data is composed from these segments: | ||
# luma deltas for hi-res blocks | # luma deltas for hi-res blocks | ||
# luma deltas for low-res blocks | # luma deltas for low-res blocks | ||
# chroma deltas for hi-res blocks | # chroma deltas for hi-res blocks | ||
# chroma deltas for low-res blocks | # chroma deltas for med-res and low-res blocks | ||
# values for updating whole block | # values for updating whole block | ||
# motion vectors | # motion vectors | ||
Line 17: | Line 17: | ||
Each segment is compressed with own Huffman codes (Huffman tree is stored in segment header), thus gaining compression from grouping similar data. | Each segment is compressed with own Huffman codes (Huffman tree is stored in segment header), thus gaining compression from grouping similar data. | ||
Blocks are unpacked in this way: | |||
LAST 4 ELEMENTS | |||
| | | | | |||
V V V V | |||
D0 -> +d00 +d10 +d20 +d30 -> D0 | |||
D1 -> +d01 +d11 +d21 +d31 -> D1 | |||
D2 -> +d02 +d12 +d22 +d32 -> D2 | |||
D3 -> +d03 +d13 +d23 +d33 -> D2 | |||
| | | | | |||
V V V V | |||
LAST 4 ELEMENTS | |||
When current block is low-res block, an average value of pair of two last elements is calculated and used instead of them. When another type of block occurs (update, motion, still) after doing operation we need to re-calculate deltas. The same applies to chroma blocks, they are just 2x2 size. | |||
Block types: | |||
# Hi-resolution block: 16 luma deltas, 8 chroma deltas | |||
# Medium-resolution block: 16 luma deltas, 2 chroma deltas | |||
# Low-resolution block: 4 luma deltas, 2 chroma deltas | |||
# Null block: no deltas, interpolate it from last 4 elements and deltas | |||
# Still block: copy data from previous frame (and update Dx) | |||
# Update block: 16 luma deltas, 8 chroma deltas, all applied independently , so recalculation is needed | |||
# Motion block: copy block from previous frame with offset provided by motion vector. | |||
Frame decoding is done this way: | |||
read header | |||
unpack all segments | |||
for each block in frame { | |||
get block type from 'block types' segment | |||
decode corresponding block type | |||
} | |||
== Games Using Duck TrueMotion 2 == | == Games Using Duck TrueMotion 2 == |
Revision as of 21:46, 9 February 2006
- FOURCCs: TM20
- Company: On2 (formerly Duck)
- Patents: U.S. # 6,327,304, "Apparatus and method to digitally compress video signals"
- Samples: http://multimedia.cx/samples/ducktm2/
Duck TrueMotion 2 relies of differential coding of samples in a YUV colorspace and coding those deltas using Huffman codes.
Codec principles
This codec operates on 4x4 blocks and employs data separation, so packed frame data is composed from these segments:
- luma deltas for hi-res blocks
- luma deltas for low-res blocks
- chroma deltas for hi-res blocks
- chroma deltas for med-res and low-res blocks
- values for updating whole block
- motion vectors
- block types
Each segment is compressed with own Huffman codes (Huffman tree is stored in segment header), thus gaining compression from grouping similar data.
Blocks are unpacked in this way:
LAST 4 ELEMENTS | | | | V V V V D0 -> +d00 +d10 +d20 +d30 -> D0 D1 -> +d01 +d11 +d21 +d31 -> D1 D2 -> +d02 +d12 +d22 +d32 -> D2 D3 -> +d03 +d13 +d23 +d33 -> D2 | | | | V V V V LAST 4 ELEMENTS
When current block is low-res block, an average value of pair of two last elements is calculated and used instead of them. When another type of block occurs (update, motion, still) after doing operation we need to re-calculate deltas. The same applies to chroma blocks, they are just 2x2 size.
Block types:
- Hi-resolution block: 16 luma deltas, 8 chroma deltas
- Medium-resolution block: 16 luma deltas, 2 chroma deltas
- Low-resolution block: 4 luma deltas, 2 chroma deltas
- Null block: no deltas, interpolate it from last 4 elements and deltas
- Still block: copy data from previous frame (and update Dx)
- Update block: 16 luma deltas, 8 chroma deltas, all applied independently , so recalculation is needed
- Motion block: copy block from previous frame with offset provided by motion vector.
Frame decoding is done this way:
read header unpack all segments for each block in frame { get block type from 'block types' segment decode corresponding block type }
Games Using Duck TrueMotion 2
These software titles are known to use the Duck TrueMotion 2 video codec to encode full motion video: