Subtitling aims at the presentation of text information and graphical
data, encoded as pixel bitmaps. The size of subtitle bitmaps may exceed
video frame dimensions, so that only portions are displayed at a time.
The bitmaps are a separate layer lying above the video, e.g. for
synchronized video subtitles, animations and navigation menus, and
therefore contain many transparent pixels. An advanced adaptation for
bitmap encoding for HDTV, e.g. 1920.times.1280 pixels per frame as
defined for the Blu-ray Disc Prerecorded format, providing optimized
compression results for such subtitling bitmaps, is achieved by a
four-stage run length encoding. Shorter or longer sequences of pixels of
a preferred color, e.g. transparent, are encoded using the second or
third shortest code words, while single pixels of different color are
encoded using the shortest code words, and sequences of pixels of equal
color use the third or fourth shortest code words.