How IFO Palettes Define VOB Subpicture Colors

DVD subpictures, used for subtitles and menu overlays, do not store actual color values within their raw graphical streams. Instead, they rely on a 16-color Color Lookup Table (CLUT) defined in the DVD's IFO (Information) file. By pairing a 2-bit pixel mapping system inside the VOB’s subpicture stream with the 16-entry YUV palette stored in the Program Chain (PGC) of the IFO, the DVD player translates lightweight run-length encoded overlays into full-color, anti-aliased graphics on the screen.

The 16-Color Palette in the IFO File

The master palette is located within the Program Chain Information Table (PGCI) of the title's corresponding IFO file. This table contains a dedicated 16-entry array known as the PGC CLUT (Color Lookup Table).

Each entry in the 16-color table is stored as a 32-bit value using the YCrCb (often referred to loosely as YUV) color space:

This setup allows the title creator to define 16 distinct, full-gamut colors that remain globally available throughout that specific Program Chain.

The 2-Bit Subpicture Architecture

Subpicture data stored inside the VOB container is optimized for low bitrate and fast decoding. The raw graphical stream (the Subpicture Unit, or SPU) is a run-length encoded bitmap where each pixel can only have one of four possible 2-bit values (binary 00, 01, 10, and 11).

These four values represent functional roles rather than fixed colors:

Because 2 bits cannot directly point to 16 distinct colors, an intermediary translation layer is required.

Mapping 2-Bit Elements to the 16-Color Palette

The link between the 2-bit subpicture and the 16-color IFO palette is established via control commands located in the Subpicture Display Control Sequence Table (SP_DCSQT), which is embedded alongside the pixel data in the VOB.

Before the player renders a subpicture frame, it processes the SET_COLOR command (control command 0x03). This command contains four 4-bit nibbles, with each nibble representing an index from 0 to 15:

  1. Index for the Background pixel type
  2. Index for the Pattern pixel type
  3. Index for the Emphasis 1 pixel type
  4. Index for the Emphasis 2 pixel type

When the DVD player encounters a pixel marked as "Pattern" (01), it looks at the SET_COLOR assignment to find the corresponding palette index (for example, entry 4). The player then fetches the YCrCb color value from slot 4 of the IFO's 16-color palette and assigns it to that pixel.

Applying Transparency with Contrast Settings

Color definition works hand-in-hand with opacity. Directly following the color mapping, the SPU executes the SET_CONTR command (control command 0x04).

Like the color command, SET_CONTR supplies four 4-bit values (ranging from 0x0 to 0xF) that assign an alpha transparency level to each of the four pixel roles:

The Advantage of Separating Palette and Video

Decoupling the color definitions from the video stream provides several advantages: