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:
- One byte for Luminance (\(Y\))
- One byte for Blue-difference chroma (\(Cb\) or \(U\))
- One byte for Red-difference chroma (\(Cr\) or \(V\))
- One byte reserved or unused
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:
- Background (b): Typically transparent space around text or graphics.
- Pattern / Foreground (p): The main body of the text or shape.
- Emphasis 1 (e1): Used for outlines, shadows, or borders.
- Emphasis 2 (e2): Used for secondary outlines, anti-aliasing edges, or highlight fills.
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:
- Index for the Background pixel type
- Index for the Pattern pixel type
- Index for the Emphasis 1 pixel type
- 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:
0x0denotes 100% transparency (invisible).0xFdenotes 100% opacity (solid).- Intermediate values provide semi-transparency for smooth blending against the underlying video.
The Advantage of Separating Palette and Video
Decoupling the color definitions from the video stream provides several advantages:
- Dynamic Retheming: A button in a DVD menu can
change color instantly when selected or activated simply by issuing a
new
SET_COLORcommand that points to different indices in the IFO palette, requiring no redraw of the image. - Bandwidth Conservation: The video stream only carries simple 2-bit line art, keeping the bitrate overhead of subtitles negligible.
- Global Consistency: Subtitle text can maintain consistent hues and anti-aliasing standards across an entire feature film from a single, centralized palette configuration.