## MMPM/2 Device Driver Reference

[prev][next][parent][TOC]

### Format of Block Header

The encoding for a block begins with a block header specifying how the four quadrants it represents have been encoded. In addition to specifying these encoding types, certain values of the block header are reserved as escape values that contain control information about the interpretation of the data stream. The possibilities for processing a block as specified by the block header fall into two basic categories:

Quadrant encodings

Quadrant encodings specify that the block is comprised of four quadrants, NW, SW, SE, and NE. Each quadrant in turn is separately encoded with a quadrant encoding type. Quadrants in a block are encoded independently, and may use different quadrant encoding types, with some restrictions which are described later.

Block header escape

Rather than indicate the encoding type for a block and its respective quadrants, certain values are reserved as escape values to enable special processing of the data stream.

A block encoding is encoded using a one-byte block header followed by an encoding type. The following figure shows the format for a block encoding.

    /---------------------------------------\
    |XXXXXXXX|  BLOCK ENCODING DATA         |
    \---------------------------------------/
      Header     Encoded Quadrants

A quadrant encoding block uses the two left-most bits of the block header to specify how the first quadrant in the stream was encoded. Similarly, the next two left-most bits of the block header specify how the next quadrant was encoded, and so on. The following figure shows the format for a quadrant block.

    /----------------------------------------------\
    |Q1Q2Q3Q4|COLOR  QUAD 1  QUAD 2  QUAD 3  QUAD 4|
    \----------------------------------------------/
     Header    Four Quadrant Encodings

The specification of the block header bits depends on the current stream interpretation mode. This mode determines which set of four encoding types is used when a block is decomposed into quadrants. The stream interpretation mode can be switched anywhere within a frame. The stream interpretation mode defaults to mode 0 at the start of each frame.

The following combination of quadrant types are defined for mode 0 stream interpretation:

00: Unchanged quadrant
01: Homogeneous/shallow LTC quadrant
10: LTC quadrant
11: Statistical/extended LTC quadrant

The following combination of quadrant types are defined for mode 1 stream interpretation:

00: Unchanged quadrant
01: Homogenous quadrant
10: Subsampled 4-luminance quadrant
11: 16-luminance quadrant