ttx_extension Struct Reference

## Data Fields

unsigned int | designations
vbi_ttx_charset_code | charset_code [2]
unsigned int | def_screen_color
unsigned int | def_row_color
unsigned int | foreground_clut
unsigned int | background_clut
struct ttx_ext_fallback | fallback
uint8_t | drcs_clut [2+2 *4+2 *16]
vbi_rgba | color_map [40]

## Field Documentation

## designations

unsigned int ttx_extension::designations

We have data from packets X/28 (in LOP) or M/29 (in magazine) with this set of designations. LOP pages without X/28 packets should fall back to the magazine defaults unless these bits are set. The extension data in struct ttx_magazine is always valid, contains global defaults as specified in EN 300 706 (see _vbi_teletext_decoder_default_magazine()) unless M/29 packets have been received.

- 1 << 4: color_map[0 ... 15] is valid
- 1 << 1: drcs_clut[] is valid
- 1 << 0 or 1 << 4: the remaining fields are valid.

color_map[32 .. 39] is always valid.

## charset_code

vbi_ttx_charset_code ttx_extension::charset_code[2]

Primary and secondary character set.

## def_screen_color

unsigned int ttx_extension::def_screen_color

Default colors.

## foreground_clut

unsigned int ttx_extension::foreground_clut

Adding these values (0, 8, 16, 24) to character color 0 ... 7 gives an index into color_map[] below.

## drcs_clut

uint8_t ttx_extension::drcs_clut[2+2 *4+2 *16]

DRCS color lookup table. Translates (G)DRCS pixel values to indices into the color_map[].

- 2 dummy entries (12x10x1 (G)DRCS pixels are interpreted like built-in character pixels, selecting the current foreground or background color).
- 4 entries for 12x10x2 GDRCS pixel 0 ... 3 to color_map[].
- 4 more for local DRCS
- 16 entries for 12x10x4 and 6x5x4 GDRCS pixel 0 ... 15 to color_map[].
- 16 more for local DRCS.

## color_map

vbi_rgba ttx_extension::color_map[40]

Five palettes of 8 each colors each.

Level 1.0 and 1.5 pages use only palette #0, Level 2.5 and 3.5 pages use palette #0 ... #3.

At Level 2.5 palette #2 and #3 are redefinable, except color_map[8] which is "transparent" color (VBI_TRANSPARENT_BLACK). At Level 3.5 palette #0 and #1 are also redefinable.

Palette #4 never changes and contains libzvbi internal colors for navigation bars, search text highlighting etc. These colors are roughly the same as the default palette #0, see vbi_color.