Method for run-length encoding of a bitmap data stream
Abstract
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.
Claims
exact text as granted — not AI-modified1 . An apparatus for run-length encoding of a data stream comprising bitmap formatted subtitle or menu data for a visual presentation on a display, wherein the subtitle or menu data include graphics or text or both, comprising
means for defining a first color; means for defining a range of run-lengths; means for encoding pixels of the first color to first code words with two or three bytes, wherein said first code words comprise a run-length value, and wherein the run-length value comprised in first code words having three bytes exceeds said defined range and may exceed the width of the display; means for encoding pixels of another than the first color to second code words with one, three or four bytes, wherein the second code words comprise a color value, and wherein second code words having three or four bytes comprise a run-length value, and wherein the run-length value comprised in second code words having four bytes exceeds said defined range and may exceed the width of the display.
2 . An apparatus for run-length decoding of an encoded data stream containing compressed bitmap formatted subtitle or menu data for video application, comprising
means for determining code word length, wherein the first byte of a code word is evaluated, and wherein if said first byte has another than a defined first value then said code word length is determined to be one byte, and otherwise the first and second bit of the following, second byte are evaluated, and depending on said first and second bit the code word length is determined to be two, three or four bytes respectively; means for decoding code words determined to be one byte long to single pixels having a color defined by said one byte, the color being different from a defined first color; means for decoding code words determined to be two bytes long to sequences of pixels of the defined first color, wherein the sequence length is defined by the remaining bits of the second byte of the code word; means for decoding code words determined to be three bytes long either to sequences of pixels of the defined first color, wherein the sequence length may exceed the width of the video display and is defined by the third byte and the remaining bits of the second byte, or to sequences of pixels of equal color other than the defined first color, wherein the sequence length is defined by the remaining bits of the second byte; and means for decoding code words determined to be four bytes long to sequences of pixels of equal color other than the defined first color, wherein the sequence length may exceed the width of the video display.
3 . Apparatus according to claim 2 , wherein the means for decoding code words having two bytes that include a sequence length of zero as a sync code word, further comprising means for decoding said sync code word to an end-of-line indication.
4 . Apparatus according to claim 1 , further comprising look-up table means for mapping between said color values, including said defined first color, and display colors.
5 . Apparatus according to claim 1 , wherein said encoded data stream is distributed to multiple transport packets.
6 . A computer-readable medium or computer-readable memory comprising a run-length encoded data stream, the data stream comprising bitmap formatted subtitle or menu data for video presentation on a display, wherein the subtitle or menu data include graphics or text or both, and wherein a first, preferred color and a range of run-lengths are defined, and wherein
pixels of the first color are encoded as first code words with two or three bytes, wherein said first code words comprise a run-length value, and wherein the run-length value comprised in first code words having three bytes exceeds said defined range and may exceed the width of the display; and pixels of another than the first color are encoded as second code words with one, three or four bytes, wherein the second code words comprise a color value, and wherein second code words having three or four bytes comprise a run-length value, and wherein the run-length value comprised in second code words having four bytes exceeds said defined range and may exceed the width of the display.Join the waitlist — get patent alerts
Track US2010040149A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.