[FFmpeg-devel] [PATCH]Fix initial vmd palette

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Jul 4 01:28:45 CEST 2013


Hi!

Attached patch fixes the initial vmd palette which currently is transparent.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index 846d7c2..fcb8a9b 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -408,7 +408,8 @@ static av_cold int vmdvideo_decode_init(AVCodecContext *avctx)
         r = raw_palette[palette_index++] * 4;
         g = raw_palette[palette_index++] * 4;
         b = raw_palette[palette_index++] * 4;
-        palette32[i] = (r << 16) | (g << 8) | (b);
+        palette32[i] = 0xFFU << 24 | (r << 16) | (g << 8) | (b);
+        palette32[i] |= palette32[i] >> 6 & 0x30303;
     }
 
     avcodec_get_frame_defaults(&s->prev_frame);


More information about the ffmpeg-devel mailing list