[FFmpeg-cvslog] Fix incorrect colors when decoding Blu-ray subtitles

Alexandre Colucci git at videolan.org
Fri Mar 25 19:03:12 CET 2011


ffmpeg | branch: master | Alexandre Colucci <alexandre at elgato.com> | Fri Mar 25 17:31:28 2011 +0100| [5fd7bc25f182e26affdf5ff6e4573188733b38b0] | committer: Michael Niedermayer

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5fd7bc25f182e26affdf5ff6e4573188733b38b0
---

 libavcodec/pgssubdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
index b7fe560..3cc2e66 100644
--- a/libavcodec/pgssubdec.c
+++ b/libavcodec/pgssubdec.c
@@ -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);




More information about the ffmpeg-cvslog mailing list