Duck TrueMotion 2: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
m (Duck TrueMotion2 moved to Duck TrueMotion 2)
m (typo)
(10 intermediate revisions by 7 users not shown)
Line 2: Line 2:
* Company: [[On2|On2 (formerly Duck)]]
* Company: [[On2|On2 (formerly Duck)]]
* Patents: U.S. # 6,327,304, "Apparatus and method to digitally compress video signals"
* Patents: U.S. # 6,327,304, "Apparatus and method to digitally compress video signals"
* Samples: [http://multimedia.cx/samples/ducktm2/ http://multimedia.cx/samples/ducktm2/]
* Samples: http://samples.mplayerhq.hu/V-codecs/TM20/


Duck TrueMotion 2 relies of differential coding of samples in a YUV colorspace and coding those deltas using Huffman codes.
Duck TrueMotion 2 relies on 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 ==
== Games Using Duck TrueMotion 2 ==

Revision as of 22:59, 6 August 2009

Duck TrueMotion 2 relies on 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:

  1. luma deltas for hi-res blocks
  2. luma deltas for low-res blocks
  3. chroma deltas for hi-res blocks
  4. chroma deltas for med-res and low-res blocks
  5. values for updating whole block
  6. motion vectors
  7. 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:

  1. Hi-resolution block: 16 luma deltas, 8 chroma deltas
  2. Medium-resolution block: 16 luma deltas, 2 chroma deltas
  3. Low-resolution block: 4 luma deltas, 2 chroma deltas
  4. Null block: no deltas, interpolate it from last 4 elements and deltas
  5. Still block: copy data from previous frame (and update Dx)
  6. Update block: 16 luma deltas, 8 chroma deltas, all applied independently , so recalculation is needed
  7. 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:

Final Fantasy VII (Windows)