2.2.4.1.1.3.1.1 CLEARCODEC_SUBCODEC_RLEX

The CLEARCODEC_SUBCODEC_RLEX structure contains a palette and segments that contain encoded indexes that reference colors in the palette.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

paletteCount

paletteEntries (variable)

...

...

segments (variable)

...

...

paletteCount (1 byte):  An 8-bit unsigned integer that specifies the number of RLEX_RGB_TRIPLET (section 2.2.4.1.1.3.1.1.1) structures in the paletteEntries field. This value MUST be less than or equal to 0x7F. The number of bits in the stopIndex field of each CLEARCODEC_SUBCODEC_RLEX_SEGMENT (section 2.2.4.1.1.3.1.1.2) structure embedded in the segments field is given by floor(log2(paletteCount – 1)) + 1.

paletteEntries (variable):  A variable-length array of RLEX_RGB_TRIPLET structures. The number of elements in this array is specified by the paletteCount field.

segments (variable):  A variable-length array of CLEARCODEC_SUBCODEC_RLEX_SEGMENT structures.