Browse Source

Fix incorrect colors when decoding Blu-ray subtitles

On Blu-ray colors are stored in the order YCrCb (and not YCbCr) as mentioned in the specifications:
see System Description Blu-ray Disc Read-Only Format, 9.14.4.2.2.1 Palette Definition Segment

When decoding a Blu-ray subtitle, the colors were incorrectly set.
tags/n0.8
Alexandre Colucci Michael Niedermayer 15 years ago
parent
commit
5fd7bc25f1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/pgssubdec.c

+ 1
- 1
libavcodec/pgssubdec.c View File

@@ -246,8 +246,8 @@ static void parse_palette_segment(AVCodecContext *avctx,
while (buf < buf_end) {
color_id = bytestream_get_byte(&buf);
y = bytestream_get_byte(&buf);
cb = bytestream_get_byte(&buf);
cr = bytestream_get_byte(&buf);
cb = bytestream_get_byte(&buf);
alpha = bytestream_get_byte(&buf);

YUV_TO_RGB1(cb, cr);


Loading…
Cancel
Save