14.01.2013 Views

A.R.Drone Developer Guide - Abstract

A.R.Drone Developer Guide - Abstract

A.R.Drone Developer Guide - Abstract

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.2.1.16 Specific block entropy-encoding<br />

The proprietary format used to encode blocks is based on a mix of RLE and Huffman coding (cf.<br />

http://en.wikipedia.org/wiki/Run-length_encoding and http://en.wikipedia.<br />

org/wiki/Huffman_coding).<br />

To resume, the RLE encoding is used to optimize the many zero values of the list, and the<br />

Huffman encoding is used to optimize the non-zero values.<br />

Below will be shown the pre-defined sets of codewords ("dictionaries"), for RLE and Huffman<br />

coding. Then, the process description and an example.<br />

Note: The first value of the list (the "DC value", cf. Figure 13) is not compressed, but 16 to 10<br />

bits encoded.<br />

Coarse Additionnal Size Value of run Range Length of run<br />

1 1 0 0 1<br />

0 1 2 1 1 1<br />

0 0 1 x 4 (x) + 2 2 : 3 2<br />

0 0 0 1 x x 6 (x x) +4 4 : 7 3<br />

0 0 0 0 1 x x x 8 (x x x) +8 8 : 15 4<br />

0 0 0 0 0 1 x x x x 10 (x x x x) +16 16 : 31 5<br />

0 0 0 0 0 0 1 x x x x x 12 (x x x x x) +32 32 : 63 6<br />

Coarse Additionnal Size Value of run Range Length of run<br />

1 s 2 1 1<br />

0 1 2 EOB<br />

0 0 1 x s 5 (x) + 2 ±2 : 3 2<br />

0 0 0 1 x x s 7 (x x) +4 ±4 : 7 3<br />

0 0 0 0 1 x x x s 9 (x x x) +8 ±8 : 15 4<br />

0 0 0 0 0 1 x x x x s 11 (x x x x) +16 ±16 : 31 5<br />

0 0 0 0 0 0 1 x x x x x s 13 (x x x x x) +32 ±32 : 63 6<br />

0 0 0 0 0 0 1 x x x x x s 15 (x x x x x x) +64 ±64 : 127 7<br />

Note: s is the sign value (0 if datum is positive, 0 otherwise.)<br />

7.2.2 Entropy-encoding process<br />

Encoding principle :<br />

The main principle to compress the values is to form a list of pairs of encoded-data. The first<br />

datum indicates the number of successive zero values (from 0 to 63 times). The second one<br />

corresponds to a non-zero Huffman-encoded value (from 1 to 127), with its sign.<br />

Compression process :<br />

The process to compress the "ZZ-list" (cf. Figure 13) in the output stream could be resumed in<br />

few steps:<br />

• Direct copy of the 10-significant bits of the first 16-bits datum ("DC value")<br />

49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!