G.5 RLE Header format

The RLE Header contains the number of RLE Segments for the image, and the starting offset of each of the RLE Segments. Each of these numbers is represented by a UL (unsigned long) value stored in little-endian format. The RLE Header is 16 long words in length. This allows it to describe a compressed image with up to 15 RLE Segments. All unused segments offsets shall be set to zero.

Each of the starting locations for the RLE Segments are byte offsets relative to the beginning of the RLE Header. Since the RLE Header is 16 unsigned longs or 64 bytes, the offset of RLE Segment One is 64.

The following diagram illustrates the ordering of the offsets within the RLE Header.

number of RLE Segments
offset of RLE Segment 1 = 64
offset of RLE Segment 2
. . .
. . .
offset of RLE Segment n
0
0
0
G.6 Example of elements for an encoded YC B C R RLE THREE-FRAME IMAGE WITH BASIC OFFSET TABLE

Figure G.6.1 is an example of encoding of RLE Compressed Frames (described in Section G.4) with the basic offset table. Figure G.6.2 is an example of Item Value data for one frame.

Figure G.6.1EXAMPLE OF ELEMENTS FOR AN ENCODED YC B C R RLE THREE-FRAME IMAGE WITH BASIC OFFSET TABLE

Pixel Data Element Tag Value Representation Data Element Length Data Element
Basic Offset Table with Item Value First Fragment (Frame 1) of Pixel Data
Second Fragment (Frame 2) of Pixel Data Third Fragment (Frame 3) of Pixel Data Sequence Delimiter Item
Item Tag Item Length Item Value Item Tag Item Length Item Value Sequence Delimiter Tag Item Length
(FFFE, E000) 0000 036AH RLE Compressed Frame (FFFE, E000) 0000 0BC8H RLE Compressed Frame (FFFE, E0DD) 0000 0000H
4 bytes 2 bytes 036AH bytes 4 bytes 4 bytes 0BC8H bytes 4 bytes 4 bytes

Figure G.6.2EXAMPLE OF ENCODED YC B C R RLE COMPRESSED FRAME ITEM VALUE

Offset Data Description of Data
0000 0000H 0000 0003H number of RLE Segments (Header)
0000 0040H location of RLE Segment 1 (Y component)
0000 0140H location of RLE Segment 2 (CB component)
0000 01C0H location of RLE Segment 3 (CR component)
0000 0000H
…..
…..
0000 0000H
0000 0040H Y - RLE Segment Data (DATA)
0000 0140H CB - RLE Segment Data (DATA)
0000 01COH CR - RLE Segment Data (DATA)