[FFmpeg-cvslog] Set more KMVC palettes opaque.

Carl Eugen Hoyos git at videolan.org
Sun Nov 13 03:02:23 CET 2011


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Nov 13 03:01:30 2011 +0100| [0d49dd37253e850d433874cd134701a624082ebc] | committer: Carl Eugen Hoyos

Set more KMVC palettes opaque.

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

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

diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c
index 175b84c..8663c95 100644
--- a/libavcodec/kmvc.c
+++ b/libavcodec/kmvc.c
@@ -269,7 +269,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPa
         ctx->pic.palette_has_changed = 1;
         // palette starts from index 1 and has 127 entries
         for (i = 1; i <= ctx->palsize; i++) {
-            ctx->pal[i] = bytestream_get_be24(&buf);
+            ctx->pal[i] = 0xFF << 24 | bytestream_get_be24(&buf);
         }
     }
 
@@ -356,7 +356,7 @@ static av_cold int decode_init(AVCodecContext * avctx)
     c->prev = c->frm1;
 
     for (i = 0; i < 256; i++) {
-        c->pal[i] = i * 0x10101;
+        c->pal[i] = 0xFF << 24 | i * 0x10101;
     }
 
     if (avctx->extradata_size < 12) {



More information about the ffmpeg-cvslog mailing list